-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchunk-GSPTCPT2.js
More file actions
1 lines (1 loc) · 13.7 KB
/
chunk-GSPTCPT2.js
File metadata and controls
1 lines (1 loc) · 13.7 KB
1
import{$f as ee,Ac as p,Cd as k,Ea as a,Ef as G,Fc as E,Fe as x,Ff as M,Gc as f,Gd as b,If as Y,Je as Q,Kd as j,Ke as $,Mf as C,Of as X,Pd as H,Sf as Z,U as g,V as s,Wf as w,X as U,Y as m,_d as z,a as c,b as R,cd as u,fg as L,gf as K,hg as D,m as V,n as I,o as N,q as _,se as J,u as B,xd as h,z as W}from"./chunk-WQJ6KM2T.js";function fe(t,q){if(t){let e=t.getMonth()+1,i=t.getDate()<10?"0"+t.getDate():t.getDate(),o=e<10?"0"+e:e,n=ye(t.getFullYear()),l=t.toString();return q?n+"-"+o+"-"+i+q:n+"-"+o+"-"+i+"T"+l.substring(16,24)+l.substring(28,31)+":"+l.substring(31,33)}else return null}function ye(t){if(t>=1e3)return t.toString();if(t>99&&t<1e3)return`0${t}`;if(t>9&&t<100)return`00${t}`;if(t>=0&&t<10)return`000${t}`}function y(t){return t?t<10?`0${t}`:t:"00"}var de=function(t){return t.All="all",t.Email="email",t.SMS="sms",t}(de||{});var di=de.Email;var ve=(()=>{class t{http=m(f);post(e,i,o){return this.http.post(e,i,{observe:"response",params:o})}static \u0275fac=function(i){return new(i||t)};static \u0275prov=g({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var te=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({providers:[$,ve],imports:[p,u,M,x,b]})}return t})();var S=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({imports:[p,u,h,k,M,Z]})}return t})(),ue=function(t){return t.None="none",t.ExceededAttempts="exceededAttempts",t.ExpiredPassword="expiredPassword",t}(ue||{}),ui=ue.None;var ie=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({imports:[p,h,D,S]})}return t})();var Pe=(()=>{class t{http=m(f);post(e,i){return this.http.post(e,i,{observe:"response"})}static \u0275fac=function(i){return new(i||t)};static \u0275prov=g({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var oe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({providers:[Pe],imports:[p,u,h,D,S]})}return t})(),_e={en:{errorRenderPage:"Error loading page",notPossibleLoadMetadataPage:"The page metadata could not be loaded"},es:{errorRenderPage:"Error al cargar la p\xE1gina",notPossibleLoadMetadataPage:"No se pudieron cargar los metadatos de la p\xE1gina."},pt:{errorRenderPage:"Erro ao carregar a p\xE1gina",notPossibleLoadMetadataPage:"N\xE3o foi poss\xEDvel carregar os metadados da p\xE1gina"},ru:{errorRenderPage:"\u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B",notPossibleLoadMetadataPage:"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u043C\u0435\u0442\u0430\u0434\u0430\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B"}},be=(()=>{class t{http=m(f);notification=m(K);headers=new E({"X-PO-SCREEN-LOCK":"true"});endpoint="/";language;metadata;constructor(){let e=m(j);this.language=e.getShortLanguage()}configServiceApi(e={}){this.endpoint=e.endpoint,this.metadata=e.metadata||this.metadata}getMetadata(e="list"){let i=`${this.endpoint}-${e}-metadata`,o=JSON.parse(localStorage.getItem(i))||{},l=`${this.metadata||`${this.endpoint}/metadata`}?type=${e}&version=${o.version||""}`;return this.http.get(l).pipe(_(r=>r.version!==void 0&&r.version===o.version?o:(localStorage.setItem(i,JSON.stringify(r)),c(c({},o),r))),W(r=>{if(Object.keys(o).length)return I(o);let{errorRenderPage:v,notPossibleLoadMetadataPage:P}=_e[this.language];return this.notification.warning(P),B(I({title:v}),N(r))}))}deleteResource(e,i){let o=this.getLocalEndPoint(i,!0),n=e?`${o}/${e}`:o;return this.http.delete(n,{headers:this.headers})}deleteResources(e,i){return this.http.request("delete",`${this.getLocalEndPoint(i)}`,{headers:this.headers,body:e})}getResources(e,i){return this.http.get(this.getLocalEndPoint(i),{headers:this.headers,params:e})}getResource(e,i){return this.http.get(`${this.getLocalEndPoint(i,!0)}/${e}`,{headers:this.headers})}createResource(e,i){return this.http.post(`${this.getLocalEndPoint(i)}`,e,{headers:this.headers})}updateResource(e,i,o){return this.http.put(`${this.getLocalEndPoint(o,!0)}/${e}`,i,{headers:this.headers})}getLocalEndPoint(e,i=!1){return e=e??this.endpoint,i&&(e=e==="/"?"":e),e}static \u0275fac=function(i){return new(i||t)};static \u0275prov=g({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ce=(()=>{class t{http=m(f);getCustomOptions(e,i,o){return this.createObservable(e).pipe(_(n=>this.mergePageOptions(i,n,o)))}changeOriginalOptionsToNewOptions(e,i){Object.keys(i).forEach(o=>{let n=i[o];if(o in e){if(Array.isArray(n)){e[o]=[...n];return}if(typeof n=="number"||typeof n=="string"||typeof n=="boolean"){e[o]=n;return}n!==null&&typeof n=="object"&&(e[o]=c({},n))}})}createObservable(e){return typeof e=="string"?this.http.post(e,{}):V(Promise.resolve(e()))}mergePageOptions(e,i,o){let n=o.schema.reduce((l,r)=>R(c({},l),{[r.nameProp]:this.createNewProp(r,e,i)}),{});return Object.keys(n).forEach(l=>n[l]===void 0&&delete n[l]),n}createNewProp(e,i,o){return e.merge?this.mergeOptions(i[e.nameProp],o[e.nameProp],e.keyForMerge):o[e.nameProp]??i[e.nameProp]}mergeOptions(e,i,o){if(!(!e&&!i))return i?e?e instanceof Array&&i instanceof Array?this.mergeOptionsArray(e,i,o):c(c({},e),i):i:e}mergeOptionsArray(e,i,o){let n=i.filter(r=>!e.find(v=>v[o]===r[o]));return[...e.map(r=>{let v=i.find(P=>r[o]===P[o])||r;return c(c({},r),v)}),...n]}static \u0275fac=function(i){return new(i||t)};static \u0275prov=g({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var A=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({providers:[be],imports:[p]})}return t})(),ne=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({imports:[p,u,h,C,b,x,w,L,A]})}return t})();var re=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({imports:[p,u,h,z,k,C,X,b,w,L,A]})}return t})(),F=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({providers:[Ce],imports:[p]})}return t})(),d={en:{title:"Advanced search",cancelLabel:"Cancel",confirmLabel:"Apply filters"},es:{title:"B\xFAsqueda avanzada",cancelLabel:"Cancelar",confirmLabel:"Aplicar filtros"},pt:{title:"Busca avan\xE7ada",cancelLabel:"Cancelar",confirmLabel:"Aplicar filtros"},ru:{title:"\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u043D\u044B\u0439 \u043F\u043E\u0438\u0441\u043A",cancelLabel:"\u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",confirmLabel:"\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440\u044B"}};var mi={en:{disclaimerGroupTitle:"Displaying results filtered by:",filterTitle:d.en.title,filterCancelLabel:d.en.cancelLabel,filterConfirmLabel:d.en.confirmLabel,quickSearchLabel:"Quick search:",searchPlaceholder:"Search"},es:{disclaimerGroupTitle:"Presentando resultados filtrados por:",filterTitle:d.es.title,filterCancelLabel:d.es.cancelLabel,filterConfirmLabel:d.es.confirmLabel,quickSearchLabel:"B\xFAsqueda r\xE1pida:",searchPlaceholder:"Buscar"},pt:{disclaimerGroupTitle:"Apresentando resultados filtrados por:",filterTitle:d.pt.title,filterCancelLabel:d.pt.cancelLabel,filterConfirmLabel:d.pt.confirmLabel,quickSearchLabel:"Pesquisa r\xE1pida:",searchPlaceholder:"Pesquisar"},ru:{disclaimerGroupTitle:"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432, \u043E\u0442\u0444\u0438\u043B\u044C\u0442\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u043F\u043E:",filterTitle:d.ru.title,filterCancelLabel:d.ru.cancelLabel,filterConfirmLabel:d.ru.confirmLabel,quickSearchLabel:"\u0411\u044B\u0441\u0442\u0440\u044B\u0439 \u043F\u043E\u0438\u0441\u043A:",searchPlaceholder:"\u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435"}};var O=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({imports:[p,u,h,C,H,x,w,F]})}return t})();var se=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({imports:[p,u,h,G,O,F,A]})}return t})();var me=(()=>{class t{http=m(f);headers=new E({"X-PO-SCREEN-LOCK":"true"});endpoint="/";configServiceApi(e={}){this.endpoint=e.endpoint}createResource(e){let i=this.convertToJobScheduler(e);return this.http.post(`${this.endpoint}`,i,{headers:this.headers})}getHeadProcesses(){let e={"X-PO-No-Error":"true"};return this.http.head(`${this.endpoint}/processes`,{headers:e})}getParametersByProcess(e){return this.http.get(`${this.endpoint}/processes/${e}/parameters`,{headers:this.headers}).pipe(_(i=>i.items))}getProcess(e){return this.http.get(`${this.endpoint}/processes/${e}`,{headers:this.headers})}getProcesses(e={}){return this.http.get(`${this.endpoint}/processes`,{params:e})}getResource(e){return this.http.get(`${this.endpoint}/${e}`,{headers:this.headers}).pipe(_(i=>this.convertToJobSchedulerInternal(i)))}updateResource(e,i){let o=this.convertToJobScheduler(i);return this.http.put(`${this.endpoint}/${e}`,o,{headers:this.headers})}convertToJobScheduler(e){let i=c({},e);if(e.periodicity&&(e.periodicity==="single"?i.recurrent=!1:Object.assign(i,this.convertToPeriodicity(e))),e.firstExecutionHour&&(i.firstExecution=this.replaceHourFirstExecution(e.firstExecution,e.firstExecutionHour)),e.frequency&&e.frequency.type){if(i.rangeExecutions={frequency:c({},e.frequency)},e.rangeLimitHour){let o=e.rangeLimitHour.split(":");i.rangeExecutions.rangeLimit={hour:parseInt(o[0],10),minute:parseInt(o[1],10)}}e.rangeLimitDay&&(i.rangeExecutions.rangeLimit=R(c({},i.rangeExecutions.rangeLimit),{day:e.rangeLimitDay}))}return Object.keys(this.returnValidExecutionParameter(i.executionParameter)).length||delete i.executionParameter,this.removeInvalidKeys(i),i}convertToJobSchedulerInternal(e={}){let i=c({},e);return e.firstExecution&&(i.firstExecutionHour=this.getHourFirstExecution(e.firstExecution)),Object.assign(i,this.convertToPeriodicityInternal(e)),e.rangeExecutions&&(i.rangeLimitHour=`${e.rangeExecutions.rangeLimit.hour<10?"0"+e.rangeExecutions.rangeLimit.hour:e.rangeExecutions.rangeLimit.hour}:${e.rangeExecutions.rangeLimit.minute<10?"0"+e.rangeExecutions.rangeLimit.minute:e.rangeExecutions.rangeLimit.minute}`,i.rangeLimitDay=e.rangeExecutions.rangeLimit.day,i.frequency={type:e.rangeExecutions.frequency.type,value:e.rangeExecutions.frequency.value}),this.removeInvalidKeys(i,["weekly","monthly","daily"]),i}convertToPeriodicity(e){let i={},o=e.periodicity;return o&&(i[o]={},o==="monthly"?i[o].day=e.dayOfMonth?parseInt(e.dayOfMonth,10):0:o==="weekly"&&(i[o].daysOfWeek=e.daysOfWeek),i[o].hour=e.hour?parseInt(e.hour.split(":")[0],10):0,i[o].minute=e.hour?parseInt(e.hour.split(":")[1],10):0),i}convertToPeriodicityInternal(e={}){return e.monthly?{periodicity:"monthly",hour:`${y(e.monthly.hour)}:${y(e.monthly.minute)}`,dayOfMonth:e.monthly.day}:e.daily?{periodicity:"daily",hour:`${y(e.daily.hour)}:${y(e.daily.minute)}`}:e.weekly?{periodicity:"weekly",hour:`${y(e.weekly.hour)}:${y(e.weekly.minute)}`,daysOfWeek:[...e.weekly.daysOfWeek]}:{periodicity:"single"}}getCurrentHour(e){let i=y(e.getHours()),o=y(e.getMinutes());return`${i}:${o}`}getHourFirstExecution(e){return this.getCurrentHour(new Date(e))}removeInvalidKeys(e,i){let o=i||["periodicity","hour","minute","day","daysOfWeek","dayOfMonth","firstExecutionHour","frequency","rangeLimitHour","rangeLimitDay"];Object.keys(e).forEach(n=>{(o.includes(n)||n==="rangeExecutions"&&e.periodicity==="single")&&delete e[n]})}replaceHourFirstExecution(e,i){try{if(!e)return e;let o=e.split("-"),n=i.split(":");if(o.length<2||n.length<1)return e;let l=parseInt(o[0]),r=parseInt(o[1])-1,v=parseInt(o[2]),P=parseInt(n[0],10),ge=parseInt(n[1],10),T=new Date(l,r,v,P,ge);return T instanceof Date&&!isNaN(T.getTime())?fe(T):e}catch{return e}}returnValidExecutionParameter(e){let i=c({},e);for(let o in i)i.hasOwnProperty(o)&&i[o]===void 0&&delete i[o];return i}static \u0275fac=function(i){return new(i||t)};static \u0275prov=g({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var we=(()=>{class t{poPageJobSchedulerService=m(me);getFilteredItems({filter:e,page:i,pageSize:o}){let n={page:i,pageSize:o,search:e};return this.poPageJobSchedulerService.getProcesses(n)}getObjectByValue(e){return this.poPageJobSchedulerService.getProcess(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=g({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ae=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({providers:[me,we],imports:[p,u,z,J,Q,k,C,M,b,Y,w,ee,L]})}return t})(),he=function(t){return t.Basic="Basic",t.Bearer="Bearer",t}(he||{}),Se=(()=>{class t{http;constructor(e){this.http=e}onLogin(e,i,o){if(i===he.Bearer)return o.password=btoa(o.password),this.http.post(e,o);{let n=`(${o.login}:${o.password})`,l=new E({Authorization:`${i} `+btoa(n)});return delete o.login,delete o.password,this.http.post(e,o,{headers:l})}}static \u0275fac=function(i){return new(i||t)(U(f))};static \u0275prov=g({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var le=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({providers:[Se],imports:[p,u,h,S,D]})}return t})(),ce=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({imports:[te,S,ie,oe,ne,re,O,se,ae,le,te,S,ie,oe,ne,re,O,se,ae,le]})}return t})(),pe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({imports:[F,A,F,A]})}return t})(),hi=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=a({type:t});static \u0275inj=s({imports:[ce,pe,ce,pe]})}return t})();export{O as a,hi as b};