%PDF- %PDF-
Direktori : /home/vacivi36/www2]/app/ |
Current File : /home/vacivi36/www2]/app/563.73decb871073e8d9.js |
"use strict";(self.webpackChunkmaterial=self.webpackChunkmaterial||[]).push([[563],{3088:(J,C,c)=>{c.d(C,{s:()=>d});var m=c(5136),O=c(2340),i=c(520),u=c(5e3);let d=(()=>{class g extends m.b{constructor(){super(...arguments),this.key="vaccines",this.baseUrl=O.N.apiBaseUrl}importVaccines(T){const v=new FormData;v.append("file",T);const _=new i.WM({Accept:"application/json"}),p=`${this.baseUrl}/api/${this.key}/import`;return new Promise((P,a)=>{this.http.post(p,v,{headers:_}).subscribe({next:x=>P(x),error:x=>a(x)})})}}return g.\u0275fac=function(){let h;return function(v){return(h||(h=u.n5z(g)))(v||g)}}(),g.\u0275prov=u.Yz7({token:g,factory:g.\u0275fac,providedIn:"root"}),g})()},5539:(J,C,c)=>{c.d(C,{jt:()=>de,JB:()=>ue});var m=c(8279),O=c(7587),i=c(5e3),u=c(7582),d="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0;function h(t,r,e){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){p(n.response,r,e)},n.onerror=function(){console.error("could not download file")},n.send()}function T(t){var r=new XMLHttpRequest;r.open("HEAD",t,!1);try{r.send()}catch(e){}return r.status>=200&&r.status<=299}function v(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(r)}}var _=d.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=d.saveAs||("object"!=typeof window||window!==d?function(){}:"download"in HTMLAnchorElement.prototype&&!_?function(r,e,n){var o=d.URL||d.webkitURL,s=document.createElement("a");s.download=e=e||r.name||"download",s.rel="noopener","string"==typeof r?(s.href=r,s.origin!==location.origin?T(s.href)?h(r,e,n):v(s,s.target="_blank"):v(s)):(s.href=o.createObjectURL(r),setTimeout(function(){o.revokeObjectURL(s.href)},4e4),setTimeout(function(){v(s)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,n){if(e=e||r.name||"download","string"==typeof r)if(T(r))h(r,e,n);else{var o=document.createElement("a");o.href=r,o.target="_blank",setTimeout(function(){v(o)})}else navigator.msSaveOrOpenBlob(function g(t,r){return void 0===r?r={autoBom:!1}:"object"!=typeof r&&(console.warn("Deprecated: Expected third argument to be a object"),r={autoBom:!r}),r.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(r,n),e)}:function(r,e,n,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof r)return h(r,e,n);var s="application/octet-stream"===r.type,l=/constructor/i.test(d.HTMLElement)||d.safari,M=/CriOS\/[\d]+/.test(navigator.userAgent);if((M||s&&l||_)&&"undefined"!=typeof FileReader){var D=new FileReader;D.onloadend=function(){var y=D.result;y=M?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=y:location=y,o=null},D.readAsDataURL(r)}else{var H=d.URL||d.webkitURL,I=H.createObjectURL(r);o?o.location=I:location.href=I,o=null,setTimeout(function(){H.revokeObjectURL(I)},4e4)}});d.saveAs=p.saveAs=p;let P=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i.oAB({type:t}),t.\u0275inj=i.cJS({imports:[O.HT]}),t})();var a=(()=>{return(t=a||(a={})).XLS="xls",t.XLSX="xlsx",t.CSV="csv",t.TXT="txt",t.JSON="json",t.OTHER="other",a;var t})();let x=(()=>{class t{constructor(){}extractRows(e,n,o){return this.getRowsAsJsonArray(e,n,null!=o?o:e._rowOutlet)}getRowsAsJsonArray(e,n,o){const s=this.getRenderedRows(e,o);return this.convertToJsonArray(n,s)}getRenderedRows(e,n){return e._getRenderedRows(n)}convertToJsonArray(e,n){const o=new Array;for(let s=0;s<n.length;s++){const l=this.convertRow(e,n[s]);o.push(this.createExcelItem(l))}return o}convertRow(e,n){const o=new Array,s=n.children;for(let l=0;l<s.length;l++)if(!this.shouldHide(e,l)){const M=s.item(l).innerText.trim();o.push(M)}return o}shouldHide(e,n){return!(!e||!e.includes(n))}createExcelItem(e){return Object.assign({},e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t},token:t,providedIn:"root"}),t})();class S{constructor(r,e){this.extension=r,this.contentTypeHeader=e}}const w=";charset=utf-8",R=a.TXT+"/",F="application/octet-stream",f=".",z=f+a.XLSX,W=f+a.CSV,V=f+a.JSON,K=f+a.TXT,$=new S(f+a.XLS,F+w),Q=new S(z,F+w),Z=new S(V,R+JSON+w),q=new S(K,R+a.TXT+w),ee=new S(W,R+a.CSV+w),te=".*."+a.XLS+"$",L=new i.OlP("XLSX_LIGHTWEIGHT");class b{static save(r,e,n){const o=new Blob([r],{type:e.contentTypeHeader});let s="mat-table-exporter";n&&n.fileName&&(s=n.fileName),p(o,s+e.extension)}static isXls(r){return null!=r.toLowerCase().match(te)}static identifyExportType(r){return r&&b.isXls(r)?a.XLS:a.XLSX}static removeExtension(r){r.fileName=r.fileName.split(f)[0]}}class X{constructor(){}export(r,e){if(!r)throw new Error("Empty json array is provided, rows parameter is mandatory!");const n=this.getMimeType();this.createContent(r,e).then(o=>{b.save(o,n,e)})}}class A extends X{constructor(r){super(),this.sheetJsHelper=r}createContent(r,e){return(0,u.mG)(this,void 0,void 0,function*(){const n=(yield this.sheetJsHelper.getXlsx()).utils.json_to_sheet(r,{skipHeader:!0});return yield this.workSheetToContent(n,e)})}}let E=(()=>{class t{constructor(e){this.xlsxLightweight=e}getXlsx(){return(0,u.mG)(this,void 0,void 0,function*(){return this.xlsxLightweight?yield c.e(557).then(c.t.bind(c,7557,23)):yield c.e(239).then(c.t.bind(c,5239,23))})}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(L,8))},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t((0,i.LFG)(L,8))},token:t,providedIn:"root"}),t})(),se=(()=>{class t extends A{constructor(e){super(e)}workSheetToContent(e,n){var o;return(0,u.mG)(this,void 0,void 0,function*(){return"\ufeff"+(yield this.sheetJsHelper.getXlsx()).utils.sheet_to_csv(e,{FS:null!==(o=null==n?void 0:n.delimiter)&&void 0!==o?o:","})})}getMimeType(){return ee}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(E))},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t((0,i.LFG)(E))},token:t,providedIn:"root"}),t})(),ae=(()=>{class t extends X{constructor(){super()}createContent(e,n){return(0,u.mG)(this,void 0,void 0,function*(){let o="";return e.forEach(s=>{o+=Object.values(s).join(this.getDelimiter(n))+"\n"}),o})}getMimeType(){return q}getDelimiter(e){return e&&e.delimiter?e.delimiter:"\t"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),k=(()=>{class t extends A{constructor(e){super(e)}workSheetToContent(e,n={}){return(0,u.mG)(this,void 0,void 0,function*(){const{utils:o,write:s}=yield this.sheetJsHelper.getXlsx(),l=o.book_new();return n.columnWidths&&(e["!cols"]=this.convertToWch(n.columnWidths)),this.correctTypes(n),o.book_append_sheet(l,e,n.sheet),s(l,n)})}getMimeType(){return $}correctTypes(e){e.type||(e.type="array"),e.bookType=this.getMimeType().extension.replace(".","")}convertToWch(e){return e.map(n=>({wch:n}))}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(E))},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t((0,i.LFG)(E))},token:t,providedIn:"root"}),t})(),ce=(()=>{class t extends X{constructor(){super()}createContent(e,n){return(0,u.mG)(this,void 0,void 0,function*(){return JSON.stringify(e)})}getMimeType(){return Z}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),N=(()=>{class t extends k{constructor(e){super(e)}getMimeType(){return Q}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(E))},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t((0,i.LFG)(E))},token:t,providedIn:"root"}),t})(),j=(()=>{class t{constructor(e){this.injector=e}getService(e){switch(e){case a.XLS.valueOf():return this.injector.get(k);case a.XLSX.valueOf():return this.injector.get(N);case a.JSON.valueOf():return this.injector.get(ce);case a.TXT.valueOf():return this.injector.get(ae);case a.CSV.valueOf():return this.injector.get(se);case a.OTHER.valueOf():return null;default:return this.injector.get(N)}}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(i.zs3))},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t((0,i.LFG)(i.gxx))},token:t,providedIn:"root"}),t})(),le=(()=>{class t{constructor(e,n,o,s){this.renderer=e,this.serviceLocator=n,this.dataExtractor=o,this._cdkTable=s,this.exportCompleted=new i.vpe,this.exportStarted=new i.vpe}exportTable(e,n){this.loadExporter(e),this._options=n,this.exportStarted.emit(),this._isIterating=!0,this._isExporting=!0,this._data=new Array,this.extractTableHeader();try{this.exportWithPagination()}catch(o){this.exportSinglePage()}}toggleRow(e){const n=this.getPaginatedRowIndex(e);this.isToggleOn(n)?this.toggleOff(n):this.toggleOn(n)}resetToggleRows(){this._selectedRows=[]}toggleOn(e){this._selectedRows=[...this._selectedRows||[],e]}toggleOff(e){this._selectedRows=this._selectedRows.filter(n=>n!==e)}isToggleOn(e){var n;return null===(n=this._selectedRows)||void 0===n?void 0:n.includes(e)}loadExporter(e){this._exporterService=e===a.OTHER.valueOf()?this.exporter:this.serviceLocator.getService(e)}exportWithPagination(){this._initialPageIndex=this.getCurrentPageIndex(),this.initPageHandler(),this.goToPage(0)}exportSinglePage(){this.extractDataOnCurrentPage(),this.extractTableFooter(),this.exportExtractedData()}extractDataOnCurrentPage(){const e=this.dataExtractor.extractRows(this._cdkTable,this.hiddenColumns);this._data=this._data.concat(this.getSelectedRows(e))}getSelectedRows(e){return this.isSelectiveExport()?e.filter((n,o)=>this._selectedRows.includes(this.getPaginatedRowIndex(o))):e}isSelectiveExport(){return this._selectedRows&&!this.isMasterToggleOff()&&!this.isMasterToggleOn()}isMasterToggleOn(){return this.compareSelectedRowCount(this.getTotalItemsCount())}isMasterToggleOff(){return this.compareSelectedRowCount(0)}compareSelectedRowCount(e){var n;return(null===(n=this._selectedRows)||void 0===n?void 0:n.length)===e}initPageHandler(){this._subscription||(this._subscription=this.getPageChangeObservable().subscribe(()=>{setTimeout(()=>{this._isIterating?(this.extractDataOnCurrentPage(),this.hasNextPage()?this.nextPage():(this._isIterating=!1,this.goToPage(this._initialPageIndex))):this._isExporting&&(this._isExporting=!1,this.extractTableFooter(),this.exportExtractedData())})}))}exportExtractedData(){this._exporterService.export(this._data,this._options),this._data=new Array,this.exportCompleted.emit()}extractSpecialRows(e){this._data.push(...this.dataExtractor.extractRows(this._cdkTable,this.hiddenColumns,e))}extractTableHeader(){this.extractSpecialRows(this._cdkTable._headerRowOutlet)}extractTableFooter(){this.extractSpecialRows(this._cdkTable._footerRowOutlet)}hasNextPage(){return this.getCurrentPageIndex()<this.getPageCount()-1}nextPage(){this.goToPage(this.getCurrentPageIndex()+1)}getPaginatedRowIndex(e){return e+this.getPageSize()*this.getCurrentPageIndex()}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.Qsj),i.Y36(j),i.Y36(x),i.Y36(void 0))},t.\u0275dir=i.lG2({type:t,inputs:{hiddenColumns:"hiddenColumns",exporter:"exporter"},outputs:{exportCompleted:"exportCompleted",exportStarted:"exportStarted"}}),t})(),de=(()=>{class t extends le{constructor(e,n,o,s){super(e,n,o,s)}ngAfterViewInit(){this.exportStarted.subscribe(e=>{this.enablePaginator(!1)}),this.exportCompleted.subscribe(e=>{this.enablePaginator(!0)})}getPageCount(){return this.getPaginator().getNumberOfPages()}getPageSize(){var e,n;return null!==(n=null===(e=this.getPaginator())||void 0===e?void 0:e.pageSize)&&void 0!==n?n:0}getCurrentPageIndex(){var e,n;return null!==(n=null===(e=this.getPaginator())||void 0===e?void 0:e.pageIndex)&&void 0!==n?n:0}getTotalItemsCount(){var e,n,o,s,l;return null!==(l=null!==(n=null===(e=this.getPaginator())||void 0===e?void 0:e.length)&&void 0!==n?n:null===(s=null===(o=this.getDataSource())||void 0===o?void 0:o.data)||void 0===s?void 0:s.length)&&void 0!==l?l:0}goToPage(e){this.getPaginator().pageIndex=e,this.getPaginator()._changePageSize(this.getPaginator().pageSize)}getPageChangeObservable(){return this.getPaginator().page}getDataSource(){return this._cdkTable.dataSource}getPaginator(){return this.getDataSource().paginator}enablePaginator(e){this.getPaginator()&&(this.getPaginator().disabled=!e,this.getPaginator()._changePageSize(this.getPaginator().pageSize))}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.Qsj),i.Y36(j),i.Y36(x),i.Y36(m.BZ,11))},t.\u0275dir=i.lG2({type:t,selectors:[["","matTableExporter",""]],exportAs:["matTableExporter"],features:[i.qOj]}),t})(),ue=(()=>{class t{static forRoot(e){return{ngModule:t,providers:[{provide:L,useValue:e.xlsxLightWeight}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i.oAB({type:t}),t.\u0275inj=i.cJS({imports:[m.p0,P]}),t})()}}]);