dta-vision-ocr
Version:
Biblioteca Angular com PO UI para extração de dados estruturados via OCR a partir de imagens ou PDFs, retornando JSON configurável com suporte a processamento em lote.
652 lines (644 loc) • 54.4 kB
JavaScript
import * as i0 from '@angular/core';
import { EventEmitter, Output, Injectable, ViewChild, Input, Component } from '@angular/core';
import * as i2 from '@po-ui/ng-components';
import { PoModule, PoModalComponent } from '@po-ui/ng-components';
import * as i5 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i6 from '@angular/forms';
import { FormsModule } from '@angular/forms';
import * as i1$1 from '@angular/platform-browser';
import * as signalR from '@microsoft/signalr';
import { map, throwError, of, BehaviorSubject, switchMap } from 'rxjs';
import * as i1 from '@angular/common/http';
import { HttpHeaders } from '@angular/common/http';
import { map as map$1, catchError } from 'rxjs/operators';
var SessionStatusEnum;
(function (SessionStatusEnum) {
/**
* PENDENTE ==> (APAGAR EM 10 MINUTOS)
*/
SessionStatusEnum[SessionStatusEnum["Pendente"] = 1] = "Pendente";
/**
* ATIVADO ==> (ATUALIZAR EM 10 MINUTOS E DEPOIS 10 MINUTOS)
* E APAGAR SE CASO ULTRAPASSAR OS 10 MINUTOS.
*/
SessionStatusEnum[SessionStatusEnum["Ativado"] = 2] = "Ativado";
/**
* Documento Processado ==> Entrou no loop de documentos.
*/
SessionStatusEnum[SessionStatusEnum["DocumentoProcessado"] = 3] = "DocumentoProcessado";
/**
* Consumido ==> Após a chamada do loop mandar uma chamada.
*/
SessionStatusEnum[SessionStatusEnum["Consumido"] = 4] = "Consumido";
/**
* EXPIRADO ==> (Apenas para os status Pendente e Ativo).
*/
SessionStatusEnum[SessionStatusEnum["Expirado"] = 5] = "Expirado";
/**
* Error .==> caso ocorra algum erro.
*/
SessionStatusEnum[SessionStatusEnum["Error"] = 100] = "Error";
})(SessionStatusEnum || (SessionStatusEnum = {}));
const environment = {
production: false,
api: {
dtaAuth: {
baseUrl: 'https://auth.dta.totvs.io/api/productKey/auth',
endpoints: {
token: '/token',
refreshToken: '/refresh-token'
}
}
},
apiHost: 'https://visiondocument.dta.totvs.io/',
apiHostWebApp: 'https://visiondocumentwebapp.dta.totvs.io/',
sessionStorageKeys: {
idTotvsVisionDocument: '',
idProjetoDocument: '',
userDocument: '',
contingencyDocument: ''
}
};
class SignalRService {
constructor() {
this.host = '';
this.messageReceived = new EventEmitter();
this.statusUpdated = new EventEmitter();
}
initializeConnection(sessionID) {
// Fechar conexão existente antes de criar uma nova
this.closeConnection();
this.hubConnection = new signalR.HubConnectionBuilder()
.withUrl(`${this.host}documentHub?SESSIONID=${sessionID}`, {
transport: signalR.HttpTransportType.WebSockets,
withCredentials: false
})
.configureLogging(signalR.LogLevel.Information)
.withAutomaticReconnect()
.build();
this.hubConnection.onclose(() => {
console.error('Connection closed');
});
}
closeConnection() {
if (this.hubConnection) {
// Fechar a conexão e remover listeners
this.hubConnection.stop().then(() => {
console.log('Connection closed');
}).catch(err => console.error('Error closing connection:', err));
this.hubConnection = undefined;
}
}
async startConnection() {
if (this.hubConnection?.state === signalR.HubConnectionState.Connected) {
await this.hubConnection.stop();
}
try {
await this.hubConnection?.start();
}
catch (err) {
console.error("Error iniciar Hub:", err);
}
}
async joinSession(sessionID) {
try {
if (this.hubConnection?.state === signalR.HubConnectionState.Connected) {
await this.hubConnection.invoke('JoinSession', sessionID);
this.ensureListening();
}
}
catch (err) {
console.error("Error ao iniciar session:", err);
}
}
async leaveSession(sessionID) {
try {
if (this.hubConnection?.state === signalR.HubConnectionState.Connected) {
await this.hubConnection.invoke('LeaveSession', sessionID);
// Após deixar a sessão, feche a conexão para garantir limpeza total
await this.hubConnection.stop();
}
}
catch (err) {
console.error("Error sair da session:", err);
}
}
async formsLocal(sessionID, body, idTotvs, idProjeto) {
try {
if (this.hubConnection?.state === signalR.HubConnectionState.Connected) {
const bodyString = JSON.stringify(body);
await this.hubConnection.invoke('SendMessage', sessionID, bodyString, idTotvs, idProjeto);
}
}
catch (err) {
console.error(err);
}
return undefined;
}
ensureListening() {
// Primeiro, verifique se já temos a conexão
if (!this.hubConnection) {
return;
}
// Remova handlers existentes para evitar duplicações
this.hubConnection.off("ReceiveMessage");
this.hubConnection.off("StatusUpdated");
// Registre os novos handlers
this.hubConnection.on("ReceiveMessage", (message) => {
const documentResponse = JSON.parse(message);
const uniqueKey = new Date().getTime();
this.messageReceived.emit({ menssagem: documentResponse, uniqueKey });
});
this.hubConnection.on("StatusUpdated", (status) => {
this.statusUpdated.emit({ status });
});
}
// Método para limpar recursos quando o componente é destruído
dispose() {
this.closeConnection();
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: SignalRService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: SignalRService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: SignalRService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], propDecorators: { statusUpdated: [{
type: Output
}] } });
class DtaVisionAuthenticationTokenApi {
constructor(http) {
this.http = http;
this.baseUrl = environment.api.dtaAuth.baseUrl;
}
/**
* Gera um novo token de autenticação
*/
postToken(authenticationDtaModel) {
return this.http.post(`${this.baseUrl}${environment.api.dtaAuth.endpoints.token}`, authenticationDtaModel);
}
/**
* Faz refresh do token atual
*/
postRefreshToken(tokenJwt) {
const headers = new HttpHeaders().set('Authorization', `Bearer ${tokenJwt}`);
return this.http.post(`${this.baseUrl}${environment.api.dtaAuth.endpoints.refreshToken}`, {}, { headers });
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DtaVisionAuthenticationTokenApi, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DtaVisionAuthenticationTokenApi, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DtaVisionAuthenticationTokenApi, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }] });
class DtaVisionAuthenticationTokenService {
constructor(dtaVisionAuthenticationTokenApi) {
this.dtaVisionAuthenticationTokenApi = dtaVisionAuthenticationTokenApi;
this.storageKey = 'jwtDtaVision';
this.authModelStorageKey = 'authModelDtaVision'; // para salvar o modelo no storage
this.expWarningSeconds = 300; // 5 minutos
}
/**
* Gera o token e armazena no sessionStorage
*/
generateAndStoreToken(authenticationDtaModel) {
return this.dtaVisionAuthenticationTokenApi.postToken(authenticationDtaModel).pipe(map(response => {
if (response.token) {
sessionStorage.setItem(this.storageKey, response.token);
}
return response;
}));
}
/**
* Faz refresh do token atual e armazena no sessionStorage
*/
refreshToken(tokenJwt) {
return this.dtaVisionAuthenticationTokenApi.postRefreshToken(tokenJwt).pipe(map(response => {
if (response.token) {
sessionStorage.setItem(this.storageKey, response.token);
}
return response;
}));
}
/**
* Verifica se o token armazenado é válido (não expirado)
*/
isTokenValid() {
const token = this.getToken();
if (!token)
return false;
const payload = token.split('.')[1];
if (!payload)
return false;
try {
const decoded = JSON.parse(atob(payload));
if (!decoded.exp)
return false;
const now = Math.floor(Date.now() / 1000);
return decoded.exp > now;
}
catch {
return false;
}
}
/**
* Obtém o token JWT salvo no sessionStorage
*/
getToken() {
return sessionStorage.getItem(this.storageKey);
}
/**
* Salva o model de autenticação no sessionStorage (como JSON)
*/
setAuthModelToStorage() {
const model = {
totvsId: sessionStorage.getItem('idTotvsVisionDocument') ?? environment.sessionStorageKeys.idTotvsVisionDocument,
projectId: sessionStorage.getItem('idProjetoDocument') ?? environment.sessionStorageKeys.idProjetoDocument,
user: sessionStorage.getItem('userDocument') ?? environment.sessionStorageKeys.userDocument,
contingency: sessionStorage.getItem('contingencyDocument') ?? environment.sessionStorageKeys.contingencyDocument,
applicationID: 1
};
sessionStorage.setItem(this.authModelStorageKey, JSON.stringify(model));
}
/**
* Recupera o model de autenticação salvo no sessionStorage
*/
getAuthModelFromStorage() {
const data = sessionStorage.getItem(this.authModelStorageKey);
return data ? JSON.parse(data) : null;
}
/**
* Garante um token válido: se expirado, faz novo login,
* se perto de expirar, faz refresh, senão retorna o atual
*/
getTokenValidOrRefresh() {
const token = this.getToken();
// Cria o modelo de autenticação usando os dados corretos do sessionStorage
const authModel = {
totvsId: sessionStorage.getItem('idTotvsVisionDocument') ?? environment.sessionStorageKeys.idTotvsVisionDocument,
projectId: sessionStorage.getItem('idProjetoDocument') ?? environment.sessionStorageKeys.idProjetoDocument,
user: sessionStorage.getItem('userDocument') ?? environment.sessionStorageKeys.userDocument,
contingency: sessionStorage.getItem('contingencyDocument') ?? environment.sessionStorageKeys.contingencyDocument,
applicationID: 1
};
// Não existe token? Gerar novo
if (!token) {
if (!authModel.totvsId || !authModel.projectId || !authModel.user) {
return throwError(() => new Error('Dados de autenticação DTA-VISION-DOCUMENT incompletos no sessionStorage.'));
}
return this.generateAndStoreToken(authModel).pipe(map(res => {
if (!res.token)
throw new Error('Falha ao gerar novo token!');
return res.token;
}));
}
// Checar expiração e refresh
const payload = token.split('.')[1];
if (!payload) {
if (!authModel.totvsId || !authModel.projectId || !authModel.user) {
return throwError(() => new Error('Token inválido e dados de autenticação DTA-VISION-DOCUMENT incompletos.'));
}
return this.generateAndStoreToken(authModel).pipe(map(res => {
if (!res.token)
throw new Error('Falha ao gerar novo token!');
return res.token;
}));
}
let decoded;
try {
decoded = JSON.parse(atob(payload));
}
catch {
if (!authModel.totvsId || !authModel.projectId || !authModel.user) {
return throwError(() => new Error('Token inválido e dados de autenticação DTA-VISION-DOCUMENT incompletos.'));
}
return this.generateAndStoreToken(authModel).pipe(map(res => {
if (!res.token)
throw new Error('Falha ao gerar novo token!');
return res.token;
}));
}
const now = Math.floor(Date.now() / 1000);
// Expirado já?
if (!decoded.exp || decoded.exp <= now) {
if (!authModel.totvsId || !authModel.projectId || !authModel.user) {
return throwError(() => new Error('Token expirado e dados de autenticação DTA-VISION-DOCUMENT incompletos.'));
}
return this.generateAndStoreToken(authModel).pipe(map(res => {
if (!res.token)
throw new Error('Falha ao gerar novo token!');
return res.token;
}));
}
// Perto de expirar: faz refresh!
if (decoded.exp - now < this.expWarningSeconds) {
return this.refreshToken(token).pipe(map(res => {
if (!res.token)
throw new Error('Falha ao renovar token!');
return res.token;
}));
}
// Se chegou aqui, token está válido e seguro para uso!
return of(token);
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DtaVisionAuthenticationTokenService, deps: [{ token: DtaVisionAuthenticationTokenApi }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DtaVisionAuthenticationTokenService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DtaVisionAuthenticationTokenService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: DtaVisionAuthenticationTokenApi }] });
const TOKEN_URL = `${environment.api.dtaAuth.baseUrl}${environment.api.dtaAuth.endpoints.token}`;
const REFRESH_URL = `${environment.api.dtaAuth.baseUrl}${environment.api.dtaAuth.endpoints.refreshToken}`;
class JwtAuthApi {
constructor(http) {
this.http = http;
this.tokenSubject = new BehaviorSubject(null);
}
getValidToken(credentials) {
const cache = this.tokenSubject.value;
if (cache && this.isSameCredentials(credentials, cache.credentials) && !this.isTokenExpiring(cache.token)) {
return of(cache.token);
}
if (cache && this.isSameCredentials(credentials, cache.credentials) && this.isTokenExpiring(cache.token)) {
return this.refreshToken(cache.token).pipe(map$1(token => {
this.tokenSubject.next({ credentials, token });
return token;
}), catchError(() => {
return this.createToken(credentials).pipe(map$1(token => {
this.tokenSubject.next({ credentials, token });
return token;
}));
}));
}
return this.createToken(credentials).pipe(map$1(token => {
this.tokenSubject.next({ credentials, token });
return token;
}));
}
isSameCredentials(a, b) {
return (a.totvsId === b.totvsId &&
a.projectId === b.projectId &&
a.user === b.user &&
a.contingency === b.contingency);
}
createToken(credentials) {
return this.http.post(TOKEN_URL, credentials)
.pipe(map$1(resp => resp.token));
}
refreshToken(token) {
const headers = new HttpHeaders().set('Authorization', `Bearer ${token}`);
return this.http.post(REFRESH_URL, {}, { headers })
.pipe(map$1(resp => resp.token));
}
decodeJwt(token) {
try {
const base64 = token.split('.')[1].replace(/-/g, '+').replace(/_/g, '/');
const jsonPayload = decodeURIComponent(atob(base64)
.split('')
.map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))
.join(''));
return JSON.parse(jsonPayload);
}
catch {
return null;
}
}
isTokenExpiring(token, rangeSeconds = 60) {
const payload = this.decodeJwt(token);
if (!payload?.exp)
return true;
const nowSec = Math.floor(Date.now() / 1000);
return (payload.exp - nowSec) < rangeSeconds;
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: JwtAuthApi, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: JwtAuthApi, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: JwtAuthApi, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }] });
class SessionIdApi {
constructor(http, jwtAuthApi) {
this.http = http;
this.jwtAuthApi = jwtAuthApi;
}
post(host, idDTAVision, idProjeto, user, contingency, buttonDocumentModel) {
const credentials = {
totvsId: idDTAVision,
projectId: idProjeto,
user: user,
contingency: contingency
};
return this.jwtAuthApi.getValidToken(credentials).pipe(switchMap(token => {
const headers = new HttpHeaders()
.set('Content-Type', 'application/json')
.set('Authorization', `Bearer ${token}`);
return this.http.post(`${host}api/dta-vision-ocr/new-session`, buttonDocumentModel, { headers });
}));
}
delete(host, sessionID) {
let headers = new HttpHeaders();
headers = headers.set('Content-Type', 'application/json');
headers = headers.set('SESSIONID', `${sessionID}`);
return this.http.delete(`${host}api/dta-vision-ocr/session-id`, { headers, responseType: 'text' });
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: SessionIdApi, deps: [{ token: i1.HttpClient }, { token: JwtAuthApi }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: SessionIdApi, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: SessionIdApi, decorators: [{
type: Injectable,
args: [{
providedIn: 'root',
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: JwtAuthApi }] });
class DTAVisionOCRComponent {
openDialog() {
this.poDialog.confirm({
title: 'Criar nova sessão',
message: 'Tem certeza de que deseja criar uma nova sessão ?',
confirm: () => this.newSession(),
cancel: () => { },
literals: { cancel: 'Cancelar', confirm: 'Criar nova sessão' },
});
}
iniciarSessao() {
this.telaInicial = false;
}
constructor(sanitizer, poNotificationService, signalRService, sessionIDApi, poDialog) {
this.sanitizer = sanitizer;
this.poNotificationService = poNotificationService;
this.signalRService = signalRService;
this.sessionIDApi = sessionIDApi;
this.poDialog = poDialog;
this.idDTAVision = '';
this.idProjeto = '';
this.listButtonsDocument = [];
this.user = '';
this.contingency = '';
this.informacaoEnviada = new EventEmitter();
this.loading = false;
this.screenLock = false;
this.doesNotDisplayMessage = localStorage?.getItem('doesNotDisplayMessage') === 'true';
this.telaInicial = true;
this.sessionText = 'Sessão iniciada. Para gerar nova sessão, aguarde 1m 30s';
this.host = environment.apiHost; //"https://visiondocument.dta.totvs.io/";
this.hostWebApp = environment.apiHostWebApp; //"https://visiondocumentwebapp.dta.totvs.io/";
this.routeWeb = "#/doc/";
this.statusDocument = SessionStatusEnum.Pendente;
this.isMobileDevice = false;
this.sessionExpired = false;
this.listDocumentUniqueKey = [];
}
ngOnInit() {
this.telaInicial = !this.doesNotDisplayMessage;
this.signalRService.host = this.host;
this.validateSession();
this.openWebAppModal();
this.initializeSignalRConnection();
this.initializeSessionStatus();
}
initializeSessionStatus() {
this.statusSubscription = this.signalRService.statusUpdated.subscribe({
next: (statusUpdate) => {
this.statusDocument = Number(statusUpdate.status);
},
error: (err) => console.error('Erro ao receber atualização de status:', err)
});
}
ngOnDestroy() {
this.statusSubscription?.unsubscribe();
// Adicione esta linha para garantir limpeza total
this.signalRService.dispose();
}
documentProcess() {
return this.statusDocument == SessionStatusEnum.DocumentoProcessado;
}
openWebAppModal() {
this.sessionID = sessionStorage.getItem('DTAVisionocrdata') ? JSON.parse(sessionStorage.getItem('DTAVisionocrdata') ?? '').sessionID : null;
if (this.sessionID == null || this.sessionID == undefined) {
this.getSessionID();
}
else if (this.webAppModal) {
this.setUrl();
this.webAppModal.open();
}
}
closeWebAppModal() {
if (this.webAppModal) {
this.webAppModal.close();
}
}
async newSession() {
// Remove informações da sessão
if (this.sessionID) {
await this.signalRService.leaveSession(this.sessionID);
}
sessionStorage.removeItem('DTAVisionocrdata');
this.telaInicial = true;
this.sessionID = null;
// Troca o caminho da rota para forçar o recarregamento
this.safeUrl = undefined;
if (this.routeWeb === "#/doc/") {
this.routeWeb = "#/doc1/";
}
else {
this.routeWeb = "#/doc/";
}
// Aguarde um pouco e então reinicialize
setTimeout(() => {
this.ngOnInit();
}, 100);
}
validateSession() {
const ocr = sessionStorage.getItem('DTAVisionocrdata');
if (!ocr) {
return;
}
const objectOCR = JSON.parse(ocr);
this.sessionID = objectOCR.sessionID;
this.setUrl();
}
setUrl() {
if (this.sessionID) {
const url = `${this.hostWebApp}${this.routeWeb}${this.sessionID}`;
this.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(url);
}
}
async initializeSignalRConnection() {
try {
if (this.sessionID && this.idProjeto) {
this.signalRService.initializeConnection(this.sessionID);
await this.signalRService.startConnection();
this.joinSession(this.sessionID ?? "");
this.signalRService.messageReceived.subscribe((data) => {
// Verifica se o uniqueKey já existe na lista
if (this.listDocumentUniqueKey.includes(data.uniqueKey)) {
return; // Se já existe, não faz nada
}
// Se não existe, adiciona à lista
this.listDocumentUniqueKey.push(data.uniqueKey);
this.listDocumentUniqueKey = this.listDocumentUniqueKey.slice(-5); // Mantém apenas os últimos 5 uniqueKeys
this.informacaoEnviada.emit(data);
this.sessionID = null;
sessionStorage.removeItem('DTAVisionocrdata');
});
}
}
catch (error) {
console.error('Erro ao iniciar conexão:', error);
this.poNotificationService.error('Erro ao iniciar conexão. Verifique os detalhes no console.');
}
}
joinSession(sessionID) {
this.signalRService.joinSession(sessionID).then().catch(err => console.error(err));
}
getSessionID() {
if (this.listButtonsDocument.length === 0) {
this.poNotificationService.error('Nenhum documento criado');
return;
}
this.loading = true;
this.screenLock = true;
this.sessionIDApi.post(this.signalRService.host, this.idDTAVision, this.idProjeto, this.user, this.contingency, this.listButtonsDocument).subscribe({
next: (response) => {
if (!response.sessionID) {
return;
}
this.sessionID = response.sessionID;
const objectOCR = {
sessionID: response.sessionID,
expiredAt: response.expiredAt
};
sessionStorage.setItem('DTAVisionocrdata', JSON.stringify(objectOCR));
this.openWebAppModal();
this.initializeSignalRConnection();
},
error: () => {
this.loading = false;
this.screenLock = false;
},
complete: () => {
this.loading = false;
this.screenLock = false;
}
});
}
onCheckboxChange() {
localStorage.setItem('doesNotDisplayMessage', String(this.doesNotDisplayMessage));
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DTAVisionOCRComponent, deps: [{ token: i1$1.DomSanitizer }, { token: i2.PoNotificationService }, { token: SignalRService }, { token: SessionIdApi }, { token: i2.PoDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.8", type: DTAVisionOCRComponent, isStandalone: true, selector: "dta-vision-ocr", inputs: { idDTAVision: "idDTAVision", idProjeto: "idProjeto", listButtonsDocument: "listButtonsDocument", user: "user", contingency: "contingency" }, outputs: { informacaoEnviada: "informacaoEnviada" }, viewQueries: [{ propertyName: "webAppModal", first: true, predicate: PoModalComponent, descendants: true, static: true }], ngImport: i0, template: "<po-modal #webAppModal p-title=\"DTA Vision Document\" [p-hide-close]=\"true\">\r\n <po-loading-overlay [hidden]=\"!loading\" [p-screen-lock]=\"screenLock\">\r\n </po-loading-overlay>\r\n\r\n <div class=\"modal-content\" *ngIf=\"this.telaInicial\">\r\n <svg class=\"logo\" width=\"96\" height=\"96\" viewBox=\"0 0 96 96\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g clip-path=\"url(#clip0_112_3648)\">\r\n <mask id=\"mask0_112_3648\" style=\"mask-type:luminance\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"96\"\r\n height=\"96\">\r\n <path d=\"M96 0H0V96H96V0Z\" fill=\"white\" />\r\n </mask>\r\n <g mask=\"url(#mask0_112_3648)\">\r\n <mask id=\"mask1_112_3648\" style=\"mask-type:alpha\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"96\"\r\n height=\"96\">\r\n <path\r\n d=\"M48 96C74.5096 96 96 74.5096 96 48C96 21.4903 74.5096 0 48 0C21.4903 0 0 21.4903 0 48C0 74.5096 21.4903 96 48 96Z\"\r\n fill=\"#924242\" />\r\n </mask>\r\n <g mask=\"url(#mask1_112_3648)\">\r\n <path\r\n d=\"M47.04 94.08C73.0195 94.08 94.08 73.0195 94.08 47.04C94.08 21.0605 73.0195 0 47.04 0C21.0605 0 0 21.0605 0 47.04C0 73.0195 21.0605 94.08 47.04 94.08Z\"\r\n fill=\"#F2F2F2\" />\r\n <g opacity=\"0.4\">\r\n <path\r\n d=\"M221.76 86.622C204.962 86.88 192.543 86.3981 148.195 72.6726C73.3583 49.5105 41.7616 84.96 2.41178e-05 86.88C-2.6694e-05 79.5684 2.20514e-05 27.8399 5.36486e-07 16.32C37.6021 15.8399 59.0416 17.4017 118.863 39.9143C175.939 61.3934 190.562 16.3201 221.76 16.3201C221.76 26.4 221.76 76.8 221.76 86.622Z\"\r\n fill=\"#E042E3\" />\r\n </g>\r\n <g opacity=\"0.2\">\r\n <path\r\n d=\"M220.8 69.1201C204 74.4 187.179 93.5393 164.64 93.6C140.856 93.664 117.904 84.4963 90.2487 72.7441C41.4259 51.9973 5.27999 66.24 1.77264e-05 69.1201C2.22364e-06 63.36 -8.17627e-06 36.2743 8.5321e-06 23.5201C14.88 16.8 47.6413 13.5319 117.422 39.5581C171.928 59.887 215.04 26.4 220.8 23.52C220.8 34.56 220.8 60.96 220.8 69.1201Z\"\r\n fill=\"#DF6DFF\" />\r\n </g>\r\n <g opacity=\"0.2\">\r\n <path\r\n d=\"M276.481 97.4399C250.081 95.04 226.73 81.5462 186.241 84C107.041 88.8 85.9208 113.28 9.0922e-06 97.4399C9.0922e-06 71.5702 -1.59244e-05 44.6397 1.70347e-05 36.9599C20.1608 31.68 59.0599 16.9619 147.312 51.6165C218.325 79.5016 252.961 42.72 276.481 36.9599C276.481 47.5199 276.481 80.5993 276.481 97.4399Z\"\r\n fill=\"#045B8F\" />\r\n </g>\r\n <g opacity=\"0.7\">\r\n <path\r\n d=\"M273.6 52.1605C251.04 60.4801 240.48 77.3762 216.96 78.2399C188.776 79.2748 138.792 58.7341 99.36 52.1605C85.92 49.92 77.7418 47.9971 52.32 46.56C28.7043 45.225 20.16 46.0801 2.63617e-06 52.1605C2.63617e-06 29.3741 -7.43463e-06 32.1599 1.17914e-05 24.9599C19.68 22.08 39.36 17.76 83.52 29.2801C101.657 34.0116 133.375 46.681 149.53 53.1205C216 81.1198 228.48 32.16 273.6 24.9599C273.6 37.0273 273.6 28.2697 273.6 52.1605Z\"\r\n fill=\"#A541A7\" />\r\n </g>\r\n </g>\r\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\r\n d=\"M48 5.48573C24.52 5.48573 5.48573 24.52 5.48573 48C5.48573 71.4803 24.52 90.5145 48 90.5145C71.4802 90.5145 90.5145 71.4802 90.5145 48C90.5145 24.52 71.4803 5.48573 48 5.48573ZM0 48C0 21.4903 21.4903 0 48 0C74.5099 0 96 21.4903 96 48C96 74.5099 74.5099 96 48 96C21.4903 96 0 74.5099 0 48Z\"\r\n fill=\"url(#paint0_linear_112_3648)\" />\r\n </g>\r\n </g>\r\n <defs>\r\n <linearGradient id=\"paint0_linear_112_3648\" x1=\"72\" y1=\"0.959995\" x2=\"21.12\" y2=\"87.36\"\r\n gradientUnits=\"userSpaceOnUse\">\r\n <stop stop-color=\"#1271A9\" />\r\n <stop offset=\"1\" stop-color=\"#A826AB\" />\r\n </linearGradient>\r\n <clipPath id=\"clip0_112_3648\">\r\n <rect width=\"96\" height=\"96\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n\r\n <h3 class=\"c-modal-title po-font-title\">Boas-vindas ao DTA Vision Document</h3>\r\n <p class=\"c-modal-subtext po-font-text\">Este \u00E9 o assistente para envio otimizado de documentos. Assim que voc\u00EA\r\n concluir o upload dos documentos, as informa\u00E7\u00F5es ser\u00E3o carregadas automaticamente no sistema.</p>\r\n <po-accordion class=\"c-modal-accordion-instructions\">\r\n <po-accordion-item p-label=\"Orienta\u00E7\u00F5es para envio dos documentos\">\r\n <div class=\"instruction-item\">\r\n <i class=\"ph ph-seal-check\"></i>\r\n <p class=\"po-font-text\">Tamanho do documento: At\u00E9 2MP</p>\r\n </div>\r\n <div class=\"instruction-item\">\r\n <i class=\"ph ph-seal-check\"></i>\r\n <p class=\"po-font-text\">Imagem leg\u00EDvel e na horizontal</p>\r\n </div>\r\n <div class=\"instruction-item\">\r\n <i class=\"ph ph-seal-check\"></i>\r\n <p class=\"po-font-text\">Documentos suportados: PNG, JPEG, JPG, WEBP e PDF (m\u00E1ximo de 10 p\u00E1ginas por PDF).</p> \r\n </div>\r\n </po-accordion-item>\r\n </po-accordion>\r\n <p class=\"c-modal-subtext\">Lembre-se, a sess\u00E3o para upload dos documentos dura 10 minutos. Caso o tempo se esgote, o\r\n processo dever\u00E1 ser reiniciado. <strong>Quando estiver pronto, clique em Avan\u00E7ar!</strong></p>\r\n \r\n <div style=\"margin-bottom: 16px;\">\r\n <po-checkbox \r\n p-label=\"N\u00E3o exibir a mensagem de boas-vindas novamente.\"\r\n [(ngModel)]=\"doesNotDisplayMessage\"\r\n (p-change)=\"onCheckboxChange()\">\r\n </po-checkbox>\r\n </div>\r\n \r\n <po-modal-footer *ngIf=\"this.telaInicial\">\r\n <po-button p-icon=\"ph ph-caret-right\" p-label=\"Iniciar Sess\u00E3o\" p-kind=\"primary\"\r\n (p-click)=\"iniciarSessao()\"></po-button>\r\n <po-button p-label=\"Fechar\" (p-click)=\"closeWebAppModal()\"></po-button>\r\n </po-modal-footer>\r\n </div>\r\n \r\n <div class=\"session-info\" *ngIf=\"!this.telaInicial\">\r\n <iframe [src]=\"safeUrl\" class=\"full-height-iframe\" title=\"Web Viewer\"></iframe>\r\n </div>\r\n <po-modal-footer *ngIf=\"!this.telaInicial\">\r\n <po-button p-label=\"Criar nova sess\u00E3o\" (p-click)=\"openDialog()\" \r\n p-icon=\"ph ph-arrows-clockwise\"> </po-button>\r\n <po-button p-label=\"Fechar\" (p-click)=\"closeWebAppModal()\"></po-button>\r\n </po-modal-footer>\r\n</po-modal>", styles: [".c-modal-title{margin-top:16px}.c-modal-accordion-instructions{margin-bottom:16px}.c-modal-subtext{margin-top:24px;margin-bottom:24px}:host ::ng-deep .po-modal-body{padding:24px;display:flex;flex-direction:column;height:100%;max-height:70vh;min-height:300px;box-sizing:border-box}@media (max-width: 768px){:host ::ng-deep .po-modal-body{padding:24px 2px;display:flex;flex-direction:column;height:100%;max-height:70vh;min-height:300px;box-sizing:border-box}}.custom-button{background-color:#12688e;color:#fff;border:none;border-radius:5px;padding:10px 20px;display:flex;align-items:center;cursor:pointer;font-family:Arial,sans-serif;font-size:16px;transition:background-color .3s ease}.custom-button:hover{background-color:#0d4f71}.button-icon{width:30px;height:30px;margin-right:10px;border-radius:50%}.instruction-item{display:flex;align-items:center;margin-bottom:8px}.ph{margin-right:8px;color:#00f}.session-info{display:flex;flex-direction:column;height:100vh}.session-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.flex-fill{flex:1}.session-text{margin-left:2px}.full-height-iframe{border:none;flex:1 1 auto;width:100%;min-height:300px}html,body{height:100%}body{margin:0;font-family:NunitoSans,sans-serif}.po-input{height:32px;left:196px;top:236px;border-radius:2px;padding:0 8px}.po-input:hover:enabled{background-color:#eef7fa;border:1px solid #0c9abe;cursor:pointer}po-tab-button,po-tabs{--color: #045b8f;--color-hover: #045b8f}.po-tab-button:first-child{margin-left:0%}.po-button[p-kind=link]:hover,.po-button[p-kind=tertiary]:hover,.po-button[p-kind=tertiary]{color:#045b8f}.po-modal-body{padding:1px var(--spacing-2xl) 1px var(--spacing-md);margin:0}.po-tabs-header{padding-left:0;padding-right:0}po-checkbox{--color-checked: #045b8f}.po-table .po-table-row-active td{background-color:#fff}.po-disclaimer{background-color:#045b8f}.po-input:hover{background-color:#fff}po-button{--color: #045b8f;--border-color-hover: #0c9abe}.po-tag-removable{background-color:#045b8f;color:#fff}.po-tag-remove{color:#fff}po-select{--background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18.707 8.293a.999.999 0 00-1.414 0L12 13.586 6.707 8.293a.999.999 0 10-1.414 1.414l6 6a.997.997 0 001.414 0l6-6a.999.999 0 000-1.414z' fill='%23045B8F' /%3E%3C/svg%3E\")}.po-disclaimer-label span{color:#fff}.po-table thead tr th.po-table-header-sorted{background-color:#fff}po-table{--color-hover: black;--background-color-hover: #9cd8fc}po-loading-icon{--color: #045b8f}.po-label{height:24px;font-family:NunitoSans,sans-serif;font-style:normal;font-weight:700;font-size:14px;line-height:24px;display:flex;align-items:flex-end;color:#4a5c60;flex:none;order:0;flex-grow:0}.po-tab-button-label.po-text-ellipsis{font-family:NunitoSans,sans-serif;font-style:normal;font-weight:700;line-height:16px;font-size:14px;text-transform:capitalize}.po-disclaimer .po-disclaimer-remove{background-color:#045b8f}.po-disclaimer .po-disclaimer-label{background:#0c9abec9;border-radius:3px}.po-disclaimer .po-disclaimer-label,.po-disclaimer .po-disclaimer-remove{color:#fff;background:#045b8f}.po-icon.po-field-icon.po-icon-search.po-icon-input:before{color:#045b8f}.po-icon.po-field-icon.po-icon-calendar.po-icon-input:before{color:#045b8f}.po-select:hover:enabled{background-color:#eef7fa;border:1px solid #0c9abe;cursor:pointer}.po-datepicker-range-field.po-input{max-height:32px}.po-datepicker-range-field.po-input:hover{background-color:#eef7fa!important;border:1px solid #0c9abe;cursor:pointer}.po-modal-footer{padding-top:14px;padding-bottom:14px}.po-modal-header{padding:14px!important;margin:0}.po-modal-title{font-family:NunitoSans,sans-serif;font-style:normal;font-weight:400;font-size:24px;line-height:32px;padding:0;color:#4a5c60}.po-modal-footer-align-right .po-button{outline:none}po-radio{--color-checked: #045b8f}po-switch{--color-checked: #045b8f}.filter-area{margin-bottom:6px}.po-field-icon.po-icon-input:not(.po-icon-eye-off),po-clean.po-icon-input span.po-field-icon{color:#045b8f}.po-menu-item,.po-menu-collapse-button-icon,.po-accordion-item-header-button,.po-link{color:#045b8f}:root{--color-brand-01-lightest: #d7f0fe;--color-brand-01-lighter: #9cd8fc;--color-brand-01-light: #6bc5fa;--color-brand-01-base: #045b8f;--color-brand-01-dark: #013f65;--color-brand-01-darker: #002944;--color-brand-01-darkest: #00182b;--color-brand-02-base: #045b8f;--color-brand-03-base: #045b8f;--color-neutral-dark-70: #4d4d4d;--color-neutral-dark-80: #363636;--color-neutral-dark-90: #1a1a1a;--color-neutral-dark-95: #0d0d0d;--color-neutral-light-00: #ffffff;--color-neutral-light-05: #f2f2f2;--color-neutral-light-10: #e5e5e5;--color-neutral-light-20: #cccccc;--color-neutral-light-30: #b2b2b2;--color-neutral-mid-40: #999999;--color-neutral-mid-60: #666666;--font-family-theme: \"NunitoSans\", sans-serif;--font-family-theme-bold: \"NunitoSans Bold\", sans-serif;--font-family-theme-extra-light: \"NunitoSans Extra Light\", sans-serif;--font-family: var(--font-family-theme);--font-family-bold: var(--font-family-theme-bold);--font-family-extra-light: var(--font-family-theme-extra-light)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: PoModule }, { kind: "component", type: i2.PoAccordionComponent, selector: "po-accordion" }, { kind: "component", type: i2.PoAccordionItemComponent, selector: "po-accordion-item", inputs: ["p-label", "p-label-tag", "p-disabled", "p-type-tag"], outputs: ["p-expand", "p-collapse"] }, { kind: "component", type: i2.PoButtonComponent, selector: "po-button" }, { kind: "component", type: i2.PoCheckboxComponent, selector: "po-checkbox" }, { kind: "component", type: i2.PoLoadingOverlayComponent, selector: "po-loading-overlay" }, { kind: "component", type: i2.PoModalComponent, selector: "po-modal" }, { kind: "component", type: i2.PoModalFooterComponent, selector: "po-modal-footer", inputs: ["p-disabled-align"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DTAVisionOCRComponent, decorators: [{
type: Component,
args: [{ selector: 'dta-vision-ocr', standalone: true, imports: [CommonModule, PoModule, FormsModule], template: "<po-modal #webAppModal p-title=\"DTA Vision Document\" [p-hide-close]=\"true\">\r\n <po-loading-overlay [hidden]=\"!loading\" [p-screen-lock]=\"screenLock\">\r\n </po-loading-overlay>\r\n\r\n <div class=\"modal-content\" *ngIf=\"this.telaInicial\">\r\n <svg class=\"logo\" width=\"96\" height=\"96\" viewBox=\"0 0 96 96\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g clip-path=\"url(#clip0_112_3648)\">\r\n <mask id=\"mask0_112_3648\" style=\"mask-type:luminance\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"96\"\r\n height=\"96\">\r\n <path d=\"M96 0H0V96H96V0Z\" fill=\"white\" />\r\n </mask>\r\n <g mask=\"url(#mask0_112_3648)\">\r\n <mask id=\"mask1_112_3648\" style=\"mask-type:alpha\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"96\"\r\n height=\"96\">\r\n <path\r\n d=\"M48 96C74.5096 96 96 74.5096 96 48C96 21.4903 74.5096 0 48 0C21.4903 0 0 21.4903 0 48C0 74.5096 21.4903 96 48 96Z\"\r\n fill=\"#924242\" />\r\n </mask>\r\n <g mask=\"url(#mask1_112_3648)\">\r\n <path\r\n d=\"M47.04 94.08C73.0195 94.08 94.08 73.0195 94.08 47.04C94.08 21.0605 73.0195 0 47.04 0C21.0605 0 0 21.0605 0 47.04C0 73.0195 21.0605 94.08 47.04 94.08Z\"\r\n fill=\"#F2F2F2\" />\r\n <g opacity=\"0.4\">\r\n <path\r\n d=\"M221.76 86.622C204.962 86.88 192.543 86.3981 148.195 72.6726C73.3583 49.5105 41.7616 84.96 2.41178e-05 86.88C-2.6694e-05 79.5684 2.20514e-05 27.8399 5.36486e-07 16.32C37.6021 15.8399 59.0416 17.4017 118.863 39.9143C175.939 61.3934 190.562 16.3201 221.76 16.3201C221.76 26.4 221.76 76.8 221.76 86.622Z\"\r\n fill=\"#E042E3\" />\r\n </g>\r\n <g opacity=\"0.2\">\r\n <path\r\n d=\"M220.8 69.1201C204 74.4 187.179 93.5393 164.64 93.6C140.856 93.664 117.904 84.4963 90.2487 72.7441C41.4259 51.9973 5.27999 66.24 1.77264e-05 69.1201C2.22364e-06 63.36 -8.17627e-06 36.2743 8.5321e-06 23.5201C14.88 16.8 47.6413 13.5319 117.422 39.5581C171.928 59.887 215.04 26.4 220.8 23.52C220.8 34.56 220.8 60.96 220.8 69.1201Z\"\r\n fill=\"#DF6DFF\" />\r\n </g>\r\n <g opacity=\"0.2\">\r\n <path\r\n d=\"M276.481 97.4399C250.081 95.04 226.73 81.5462 186.241 84C107.041 88.8 85.9208 113.28 9.0922e-06 97.4399C9.0922e-06 71.5702 -1.59244e-05 44.6397 1.70347e-05 36.9599C20.1608 31.68 59.0599 16.9619 147.312 51.6165C218.325 79.5016 252.961 42.72 276.481 36.9599C276.481 47.5199 276.481 80.5993 276.481 97.4399Z\"\r\n fill=\"#045B8F\" />\r\n </g>\r\n <g opacity=\"0.7\">\r\n <path\r\n d=\"M273.6 52.1605C251.04 60.4801 240.48 77.3762 216.96 78.2399C188.776 79.2748 138.792 58.7341 99.36 52.1605C85.92 49.92 77.7418 47.9971 52.32 46.56C28.7043 45.225 20.16 46.0801 2.63617e-06 52.1605C2.63617e-06 29.3741 -7.43463e-06 32.1599 1.17914e-05 24.9599C19.68 22.08 39.36 17.76 83.52 29.2801C101.657 34.0116 133.375 46.681 149.53 53.1205C216 81.1198 228.48 32.16 273.6 24.9599C273.6 37.0273 273.6 28.2697 273.6 52.1605Z\"\r\n fill=\"#A541A7\" />\r\n </g>\r\n </g>\r\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\r\n d=\"M48 5.48573C24.52 5.48573 5.48573 24.52 5.48573 48C5.48573 71.4803 24.52 90.5145 48 90.5145C71.4802 90.5145 90.5145 71.4802 90.5145 48C90.5145 24.52 71.4803 5.48573 48 5.48573ZM0 48C0 21.4903 21.4903 0 48 0C74.5099 0 96 21.4903 96 48C96 74.5099 74.5099 96 48 96C21.4903 96 0 74.5099 0 48Z\"\r\n fill=\"url(#paint0_linear_112_3648)\" />\r\n </g>\r\n </g>\r\n <defs>\r\n <linearGradient id=\"paint0_linear_112_3648\" x1=\"72\" y1=\"0.959995\" x2=\"21.12\" y2=\"87.36\"\r\n gradientUnits=\"userSpaceOnUse\">\r\n <stop stop-color=\"#1271A9\" />\r\n <stop offset=\"1\" stop-color=\"#A826AB\" />\r\n </linearGradient>\r\n <clipPath id=\"clip0_112_3648\">\r\n <rect width=\"96\" height=\"96\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n\r\n <h3 class=\"c-modal-title po-font-title\">Boas-vindas ao DTA Vision Document</h3>\r\n <p class=\"c-modal-subtext po-font-text\">Este \u00E9 o assistente para envio otimizado de documentos. Assim que voc\u00EA\r\n concluir o upload dos documentos, as informa\u00E7\u00F5es ser\u00E3o carregadas automaticamente no sistema.</p>\r\n <po-accordion class=\"c-modal-accordion-instructions\">\r\n <po-accordion-item p-label=\"Orienta\u00E7\u00F5es para envio dos documentos\">\r\n <div class=\"instruction-item\">\r\n <i class=\"ph ph-seal-check\"></i>\r\n <p class=\"po-font-text\">Tamanho do documento: At\u00E9 2MP</p>\r\n </div>\r\n <div class=\"instruction-item\">\r\n <i class=\"ph ph-seal-check\"></i>\r\n <p class=\"po-font-text\">Imagem leg\u00EDvel e na horizontal</p>\r\n </div>\r\n <div class=\"instruction-item\">\r\n <i class=\"ph ph-seal-check\"></i>\r\n <p class=\"po-font-text\">Documentos suportados: PNG, JPEG, JPG, WEBP e PDF (m\u00E1ximo de 10 p\u00E1ginas por PDF).</p> \r\n </div>\r\n </po-accordion-item>\r\n </po-accordion>\r\n <p class=\"c-modal-subtext\">Lembre-se, a sess\u00E3o para upload dos documentos dura 10 minutos. Caso o tempo se esgote, o\r\n processo dever\u00E1 ser reiniciado. <strong>Quando estiver pronto, clique em Avan\u00E7ar!</strong></p>\r\n \r\n <div style=\"margin-bottom: 16px;\">\r\n <po-checkbox \r\n p-label=\"N\u00E3o exibir a mensagem de boas-vindas novamente.\"\r\n [(ngModel)]=\"doesNotDisplayMessage\"\r\n (p-change)=\"onCheckboxChange()\">\r\n </po-checkbox>\r\n </div>\r\n \r\n <po-modal-footer *ngIf=\"this.telaInicial\">\r\n <po-button p-icon=\"ph ph-caret-right\" p-label=\"Iniciar Sess\u00E3o\" p-kind=\"primary\"\r\n (p-click)=\"iniciarSessao()\"></po-button>\r\n <po-button p-label=\"Fechar\" (p-click)=\"closeWebAppModal()\"></po-button>\r\n </po-modal-footer>\r\n </div>\r\n \r\n <div class=\"session-info\" *ngIf=\"!this.telaInicial\">\r\n <iframe [src]=\"safeUrl\" class=\"full-height-iframe\" title=\"Web Viewer\"></iframe>\r\n </div>\r\n <po-modal-footer *ngIf=\"!this.telaInicial\">\r\n <po-button p-label=\"Criar nova sess\u00E3o\" (p-click)=\"openDialog()\" \r\n p-icon=\"ph ph-arrows-clockwise\"> </po-button>\r\n <po-button p-label=\"Fechar\" (p-click)=\"closeWebAppModal()\"></po-button>\r\n </po-modal-footer>\r\n</po-modal>", styles: [".c-modal-title{margin-top:16px}.c-modal-accordion-instructions{margin-bottom:16px}.c-modal-subtext{margin-top:24px;margin-bottom:24px}:host ::ng-deep .po-modal-body{padding:24px;display:flex;flex-direction:column;height:100%;max-height:70vh;min-height:300px;box-sizing:border-box}@media (max-width: 768px){:host ::ng-deep .po-modal-body{padding:24px 2px;display:flex;flex-direction:column;height:100%;max-height:70vh;min-height:300px;box-sizing:border-box}}.custom-button{background-color:#12688e;color:#fff;border:none;border-radius:5px;padding:10px 20px;display:flex;align-items:center;cursor:pointer;font-family:Arial,sans-serif;font-size:16px;transition:background-color .3s ease}.custom-button:hover{background-color:#0d4f71}.button-icon{width:30px;height:30px;margin-right:10px;border-radius:50%}.instruction-item{display:flex;align-items:center;margin-bottom:8px}.ph{margin-right:8px;color:#00f}.session-info{display:flex;flex-direction:column;height:100vh}.session-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.flex-fill{flex:1}.session-text{margin-left:2px}.full-height-iframe{border:none;flex:1 1 auto;width:100%;min-height:300px}html,body{height:100%}body{margin:0;font-family:NunitoSans,sans-serif}.po-input{height:32px;left:196px;top:236px;border-radius:2px;padding:0 8px}.po-input:hover:enabled{background-color:#eef7fa;border:1px solid #0c9abe;cursor:pointer}po-tab-button,po-tabs{--color: #045b8f;--color-hover: #045b8f}.po-tab-button:first-child{margin-left:0%}.po-button[p-kind=link]:hover,.po-button[p-kind=tertiary]:hover,.po-button[p-kind=tertiary]{color:#045b8f}.po-modal-body{padding:1px var(--spacing-2xl) 1px var(--spacing-md);margin:0}.po-tabs-header{padding-left:0;padding-right:0}po-checkbox{--color-checked: #045b8f}.po-table .po-table-row-active td{background-color:#fff}.po-disclaimer{background-color:#045b8f}.po-input:hover{background-color:#fff}p