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,EAAcnC,EAAqBqC,EAAOwC,EAAUE,EAAevC,EAAcC,EAAkBC,EAAkBC,EAAsBnX,EAC7I,IAIJ,MAA+B,iBAApB5a,EAAOgyB,SACTpB,GAAoB,EAAM5wB,EAAOgyB,SAAU,CAAErgB,QAASqgB,EAASrgB,UAE/D,CAAEA,QAASqgB,EAASrgB,QAG/B,CArbayiB,CAAQxwB,EAChB,UAFM,SAEN,oB","sources":["webpack://configuracao/./js/componentes/alertaVagas/templatesAlertaVaga.js","webpack://configuracao/./js/localizacao/global/global.js","webpack://configuracao/./js/localizacao/profissoes-detalhes/profissoes-detalhes.js","webpack://configuracao/./js/profissoes-detalhes.js","webpack://configuracao/./js/localizacao/alertaVaga/alertaVaga.js","webpack://configuracao/./js/utilidades/alertaVaga.js","webpack://configuracao/./js/localizacao/eventoBuscarVagaRedirect/eventoBuscarVagaRedirect.js","webpack://configuracao/./js/utilidades/eventoBuscarVagaRedirect.js","webpack://configuracao/./js/utilidades/getFetch.js","webpack://configuracao/./js/utilidades/isNullOrEmpty.js","webpack://configuracao/./js/utilidades/loadFullPage.js","webpack://configuracao/./js/utilidades/obterCookie.js","webpack://configuracao/./js/utilidades/obterDispositivo.js","webpack://configuracao/./js/utilidades/obterOrigem.js","webpack://configuracao/./js/utilidades/obterQueryString.js","webpack://configuracao/./js/utilidades/postFetch.js","webpack://configuracao/./js/utilidades/salvarCookie.js","webpack://configuracao/./js/utilidades/toastErroCarregar.js","webpack://configuracao/./js/utilidades/toastSucesso.js","webpack://configuracao/./js/utilidades/trackEventos.js","webpack://configuracao/./js/utilidades/uuid.js","webpack://configuracao/./js/utilidades/validarResultado.js","webpack://configuracao/./node_modules/just-validate/dist/just-validate.es.js","webpack://configuracao/./node_modules/notiflix/build/notiflix-confirm-aio.js"],"sourcesContent":["import i18next from \"i18next\";\r\n\r\nexport function templateBtnAlertaVagas(data, cargo, tipoPaginaID, localidadesSeparadas = \"\"){\r\n\r\n let btnAlertaVagas = \"\";\r\n\r\n if(data.exibirAlertaVagas){\r\n\r\n if(data.possuiAlertaVagas){\r\n btnAlertaVagas = `\r\n <button class=\"btn btn-outline-primary d-inline botao-alerta\" id=\"botao-alerta\" data-vaga-id=\"${tipoPaginaID}\" data-alerta-id=\"${data.possuiAlertaVagas.ID}\" data-profissao-id=\"${tipoPaginaID}\" data-cargo=\"${cargo}\" data-localidade=\"${localidadesSeparadas}\">\r\n <i class=\"bi bi-gear\"></i> ${i18next.t('AlertaVagasBtnEditar')}\r\n </button>\r\n `;\r\n }\r\n\r\n else{\r\n btnAlertaVagas = `\r\n <button class=\"btn btn-outline-primary d-inline botao-alerta\" id=\"botao-alerta\" data-vaga-id=\"${tipoPaginaID}\" data-profissao-id=\"${tipoPaginaID}\" data-localidade=\"${localidadesSeparadas}\" data-cargo=\"${cargo}\">\r\n <i class=\"bi bi-bell\"></i> ${i18next.t('AlertaVagasBtnAtivar')}</button>\r\n `;\r\n }\r\n }\r\n\r\n return btnAlertaVagas;\r\n}\r\n\r\n\r\nexport function templateCardAlertaVagas (data, cargo, tipoPaginaID, localidadesSeparadas = \"\", localidadesSeparadasVirgula = \"\") {\r\n \r\n let btnAlertaVagas = templateBtnAlertaVagas(data, cargo,tipoPaginaID,localidadesSeparadas);\r\n\r\n const template = `\r\n <div class=\"border-0 d-flex flex-row align-items-center justify-content-between\" id=\"botao-wrapper-alerta\">\r\n <div class=\"${data.exibirAlertaVagas ? \"col-8\" : \"col-12\"}\">\r\n <h5 class=\"m-0\"><b>${!data.exibirAlertaVagas ? i18next.t('AlertaVagasEntreCrieText') : (data.possuiAlertaVagas ? i18next.t('AlertaVagasEditarText') : i18next.t('AlertaVagasConfigurarAlertaText'))}</b> <b>${cargo}</b></h5>\r\n <small>${cargo} ${i18next.t('AlertaVagasEm')}\r\n ${localidadesSeparadasVirgula}\r\n </small>\r\n </div>\r\n ${btnAlertaVagas}\r\n </div>\r\n `;\r\n\r\n return template;\r\n};","import i18next from 'i18next';import resource_0 from \"./global.ptbr.json\" assert { type: 'JSON' };import resource_1 from \"./global.es.json\" assert { type: 'JSON' };import resource_2 from \"./global.en.json\" assert { type: 'JSON' };const cultura = CULTURE_EMPREGARE.replace('-', '');export const inicializarInternacionalizacao = () => {if (!i18next.isInitialized) {i18next.init({ lng:cultura, debug:true, defaultNS:'translation', resources: {}, fallbackLng: (code) => [ code.slice(0,2), 'ptbr' ]});}i18next.addResources('ptbr', 'translation', resource_0);i18next.addResources('es', 'translation', resource_1);i18next.addResources('en', 'translation', resource_2);}","import i18next from 'i18next';import resource_0 from \"./profissoes-detalhes.ptbr.json\" assert { type: 'JSON' };import resource_1 from \"./profissoes-detalhes.es.json\" assert { type: 'JSON' };import resource_2 from \"./profissoes-detalhes.en.json\" assert { type: 'JSON' };import { inicializarInternacionalizacao as inicializarGlobal } from '../global/global';const cultura = CULTURE_EMPREGARE.replace('-', '');export const inicializarInternacionalizacao = () => {inicializarGlobal();if (!i18next.isInitialized) {i18next.init({ lng:cultura, debug:true, defaultNS:'translation', resources: {}, fallbackLng: (code) => [ code.slice(0,2), 'ptbr' ]});}i18next.addResources('ptbr', 'translation', resource_0);i18next.addResources('es', 'translation', resource_1);i18next.addResources('en', 'translation', resource_2);}","import { obterQueryString } from './utilidades/obterQueryString';\r\nimport { obterOrigem } from './utilidades/obterOrigem';\r\nimport { obterDispositivo } from './utilidades/obterDispositivo';\r\nimport { obterCookie } from './utilidades/obterCookie';\r\nimport { isNullOrEmpty } from './utilidades/isNullOrEmpty';\r\nimport { salvarCookie } from './utilidades/salvarCookie';\r\nimport { addTrack } from './utilidades/trackEventos';\r\nimport Splide, { CLASS_TRACK } from '@splidejs/splide';\r\nimport { getFetch } from \"./utilidades/getFetch\";\r\nimport { AlertaVaga } from './utilidades/alertaVaga';\r\nimport { templateBtnAlertaVagas } from './componentes/alertaVagas/templatesAlertaVaga';\r\nimport i18next from 'i18next';\r\nimport { inicializarInternacionalizacao } from './localizacao/profissoes-detalhes/profissoes-detalhes';\r\n\r\nconst page = {\r\n Templates:{\r\n templateVagasSkeletonLoading(){\r\n const html = [];\r\n\r\n for (let i = 0; i < 10; i++) {\r\n html.push(`\r\n <li class=\"splide__slide card-vaga\">\r\n <div class=\"py-3 px-3\">\r\n <div class=\"card shadow border rounded-3 mb-3 card-loading\">\r\n <div class=\"card-body\">\r\n <div class=\"row\">\r\n <div class=\"col-2 col-lg-1\">\r\n <div class=\"rounded card-loading-image\"></div>\r\n </div>\r\n <div class=\"col-1\"></div>\r\n <div class=\"col-9 d-flex align-items-center\">\r\n <div class=\"card-loading-bar py-3\" style=\"width: 95%\"></div>\r\n </div>\r\n <div class=\"col-10 col-lg-11\">\r\n <div class=\"card-loading-bar py-3 mt-3 mb-5\" style=\"width: 75%\"></div>\r\n <div class=\"card-loading-bar py-1 mb-3 mt-5\" style=\"width: 75%\"></div>\r\n <div class=\"d-flex gap-3\">\r\n <div class=\"card-loading-bar py-3 rounded-5\" style=\"width: 10em\"></div>\r\n <div class=\"card-loading-bar py-3 rounded-5\" style=\"width: 10em\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n `);\r\n }\r\n\r\n return html.join('');\r\n },\r\n templateVagas(vagas){\r\n const html = [];\r\n const sectionVagas = document.querySelector('#section-vagas');\r\n const colSplide = sectionVagas.querySelector('.col-vagas-splide');\r\n const colAlert = sectionVagas.querySelector('.col-vagas-alert');\r\n\r\n if(vagas.length > 0){\r\n colSplide.classList.remove('d-none');\r\n colAlert.classList.add('d-none');\r\n\r\n vagas.forEach(vaga => {\r\n const stringCidades = vaga.cidades.length == 1 ? vaga.cidades[0] : vaga.cidades[0] + \". E outras...\";\r\n\r\n let template = `\r\n <li class=\"splide__slide card-vaga\">\r\n <div class=\"card-vagas bg-white border rounded-3 py-3 px-3 hover-info\">\r\n <div class=\"d-flex gap-4 mb-4 align-items-center empresa-container\">\r\n <div class=\"img-responsiva rounded\">\r\n <img src=\"${vaga.logoThumb}\" alt=\"Logo da Empresa\" title=\"Logo da Empresa\">\r\n </div>\r\n <p class=\"mb-0 fs-6 nome-da-empresa\">${vaga.empresa}</p>\r\n </div>\r\n <div class=\"d-flex flex-column gap-3 justify-content-center\">\r\n <h5 class=\"fw-bold mb-2 vaga-title\">${vaga.titulo}</h5>\r\n <p class=\"cidades-text mb-0\"><span class=\"badge bg-span-card-vaga rounded-5\"><i class=\"bi bi-geo-alt fs-6\"></i></span> ${stringCidades}</p>\r\n <div class=\"\">\r\n <ul class=\"list-group list-group-horizontal flex-wrap ajuste-tamanho-fonte-mobile-list-group\">`;\r\n\r\n if(vaga.trabalhoRemoto != \"NaoInformado\")\r\n {\r\n template += ` \r\n <li class=\"list-group-item border-0 bg-transparent ps-0 ajuste-badge-modalidade-trabalho\">\r\n <span class=\"badge rounded-4 text-cinza-medio bg-cinza-claro fw-normal px-3 py-1\">\r\n <small class=\"d-flex align-items-center gap-2\">\r\n <i class=\"bi bi-briefcase-fill fs-5\"></i>\r\n <span class=\"texto-badge\">${vaga.trabalhoRemotoTexto}</span>\r\n </small>\r\n </span>\r\n </li>`;\r\n }\r\n\r\n if(!isNullOrEmpty(vaga.salario))\r\n {\r\n template += ` \r\n <li class=\"list-group-item border-0 bg-transparent ps-0 pe-0\">\r\n <span class=\"badge rounded-4 text-cinza-medio bg-cinza-claro fw-normal px-3 py-1\">\r\n <small class=\"d-flex align-items-center gap-2\">\r\n <i class=\"bi bi-cash fs-5\"></i>\r\n <span class=\"texto-badge\"> ${vaga.salario}</span>\r\n </small>\r\n </span>\r\n </li>`;\r\n }\r\n\r\n template += ` \r\n </ul>\r\n </div>\r\n </div>\r\n <a href=\"/${vaga.url}\" class=\"stretched-link\"></a>\r\n </div>\r\n </li>`;\r\n\r\n html.push(template);\r\n });\r\n\r\n if(vagas.length >= 20){\r\n const verMais = `\r\n <li class=\"splide__slide card-vaga\">\r\n <div class=\"card-vagas bg-white border rounded-4 d-flex align-items-center justify-content-center hover-info h-100\">\r\n <div class=\"ver-mais-vagas\">\r\n <a href=\"/pt-br/vagas\" target=\"_blank\" type=\"button\" class=\"btn-mais-vagas stretched-link link-underline\"> Mais Vagas...</a>\r\n </div>\r\n </div>\r\n </li>\r\n `;\r\n html.push(verMais);\r\n }\r\n }\r\n else{\r\n colSplide.classList.add('d-none');\r\n colAlert.classList.remove('d-none');\r\n }\r\n \r\n\r\n return html.join('');\r\n },\r\n templateFiltroOptions(dados,tipoDadosNome){\r\n const html = [];\r\n\r\n if(dados.length > 0){\r\n let count = 0;\r\n dados.forEach(dado => {\r\n html.push(`\r\n <div class=\"col gy-2\">\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input dropdown-check-filtra\" type=\"checkbox\" name=\"${tipoDadosNome}\" value=\"${dado.id}\" id=\"${tipoDadosNome}_${count}\">\r\n <label style=\"overflow-wrap: anywhere;\" class=\"form-check-label\" for=\"${tipoDadosNome}_${count}\">\r\n ${dado.nome}\r\n </label>\r\n </div>\r\n </div>\r\n `);\r\n count++;\r\n });\r\n }\r\n else{\r\n html.push(`\r\n <div class=\"alert alert-info flex-fill\" role=\"alert\">\r\n <div class=\"d-flex w-100 gap-2 flex-row justify-content-center align-items-center h-100\">\r\n <i class=\"bi bi-info-circle-fill\"></i>\r\n <span>Nenhum filtro encontrado para esse termo</span>\r\n </div>\r\n </div>\r\n `);\r\n }\r\n\r\n return html.join(\"\");\r\n },\r\n },\r\n Helpers:{\r\n scrollToCustom(targetElement,offset){\r\n \r\n const parentElement = targetElement.offsetParent;\r\n const targetOffsetTop = targetElement.offsetTop + parentElement.offsetTop;\r\n\r\n window.scrollTo({\r\n top: targetOffsetTop - offset,\r\n behavior: 'smooth'\r\n });\r\n },\r\n truncateString(string, maxLength){\r\n if (string.length > maxLength) \r\n return string.substring(0, maxLength - 3) + \"...\";\r\n else \r\n return string;\r\n },\r\n createStringFiltroFromObject(obj){\r\n return Object.keys(obj).map(key => `&${key}=${obj[key]}`).join('');\r\n },\r\n },\r\n Splides: {\r\n splideTabs() {\r\n const splideOptions = {\r\n start: 0,\r\n perPage: 3,\r\n focus: \"start\",\r\n trimSpace: true,\r\n arrows: false,\r\n pagination: false,\r\n isNavigation: true,\r\n autoWidth: true,\r\n gap: \"2rem\"\r\n };\r\n \r\n const splidesTabs = document.getElementById(\"tabs\");\r\n let splide = new Splide(`#${splidesTabs.id}`, splideOptions);\r\n splide.mount();\r\n return splide;\r\n },\r\n splideCursos() {\r\n const splideOptions = {\r\n start: 0,\r\n perPage: 3,\r\n focus: \"start\",\r\n trimSpace: true,\r\n arrows: true,\r\n pagination: false,\r\n autoWidth: true,\r\n omitEnd: true,\r\n gap: \"2rem\"\r\n };\r\n \r\n const splidesCursos = document.getElementById(\"cursos-splide\");\r\n \r\n if(!splidesCursos)\r\n return\r\n let splide = new Splide(`#${splidesCursos.id}`, splideOptions);\r\n splide.mount();\r\n\r\n splide.on( 'move', function () {\r\n \r\n const btnsVerMenos = splidesCursos.querySelectorAll('.btn-ver-menos-curso');\r\n btnsVerMenos.forEach(btn => {\r\n if(!btn.classList.contains('d-none')){\r\n btn.click();\r\n }\r\n });\r\n } );\r\n\r\n },\r\n splideVagas() {\r\n const splideOptions = {\r\n start: 0,\r\n perPage: 1,\r\n focus: \"start\",\r\n trimSpace: true,\r\n arrows: true,\r\n pagination: false,\r\n autoWidth: true,\r\n omitEnd: true,\r\n gap: \"2rem\"\r\n };\r\n \r\n const splidesVagas = document.getElementById(\"vagas-splide\");\r\n let splide = new Splide(`#${splidesVagas.id}`, splideOptions);\r\n splide.mount();\r\n },\r\n init() {\r\n // this.splideTabs();\r\n // this.splideVagas();\r\n this.splideCursos();\r\n },\r\n },\r\n Navegacao:{\r\n scrollComOffset(element){\r\n const targetId = element.getAttribute('href').substring(1);\r\n const targetElement = document.getElementById(targetId);\r\n\r\n let offset = 100;\r\n\r\n if(targetId == \"accordion-id\")\r\n offset = 130;\r\n\r\n page.Helpers.scrollToCustom(targetElement, offset)\r\n },\r\n moveParaSectionComOffsetAoClicar(){\r\n const navTabs = document.querySelector(\"#header-navbar\").querySelector(\".nav-tabs\");\r\n const btnsNav = navTabs.querySelectorAll('.nav-link');\r\n\r\n btnsNav.forEach(btn => {\r\n btn.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n this.scrollComOffset(btn);\r\n });\r\n });\r\n\r\n const linksNavegacao = document.querySelectorAll(\".link-navegacao\");\r\n\r\n linksNavegacao.forEach(btn => {\r\n btn.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n this.scrollComOffset(btn);\r\n });\r\n });\r\n },\r\n ajustaSombraHeaders(){\r\n const headersPrincipais = document.querySelectorAll(\".header-empregare\");\r\n const headerNavegacao = document.querySelector(\"#nav-sticker\");\r\n const heroSection = document.querySelector(\"#hero-section\");\r\n\r\n function ajustarSombras(Ajustar){\r\n if(Ajustar){\r\n headersPrincipais.forEach(headerPrincipal => {\r\n headerPrincipal.classList.remove(\"sombra-1\");\r\n });\r\n\r\n headerNavegacao.classList.add(\"sombra-1\");\r\n }\r\n\r\n else{\r\n headersPrincipais.forEach(headerPrincipal => {\r\n headerPrincipal.classList.add(\"sombra-1\");\r\n });\r\n\r\n headerNavegacao.classList.remove(\"sombra-1\");\r\n }\r\n }\r\n\r\n const addObserver = function(element) {\r\n const observer = new IntersectionObserver(\r\n (entries) => {\r\n entries.forEach((entry) => {\r\n if (entry.isIntersecting) \r\n ajustarSombras(false);\r\n else \r\n ajustarSombras(true);\r\n });\r\n },\r\n { root: null, threshold: 0.1, rootMargin: `0px` }\r\n );\r\n\r\n observer.observe(element);\r\n };\r\n\r\n addObserver(heroSection);\r\n },\r\n ativaTabAoEntrarNaSection(){\r\n const headerNav = document.querySelector(\"#header-navbar\");\r\n const pagina = document.querySelector(\"#page-wraper\");\r\n const tabsNavegacao = headerNav.querySelector(\"#tabs\").querySelectorAll(\".nav-link\");\r\n const splide = page.Splides.splideTabs();\r\n\r\n const scrollSpy = new bootstrap.ScrollSpy(pagina, {\r\n target: headerNav,\r\n // threshold: [0.4,1],\r\n // rootMargin: \"-30px\"\r\n });\r\n\r\n document.body.addEventListener('activate.bs.scrollspy', (e) => {\r\n\r\n const activateTab = document.querySelector(\".nav-link.active\");\r\n let index = 0;\r\n\r\n for (let i = 0; i < tabsNavegacao.length; i++) {\r\n if(tabsNavegacao[i] == activateTab)\r\n index = i;\r\n }\r\n\r\n splide.go(index);\r\n });\r\n \r\n\r\n },\r\n init(){\r\n this.moveParaSectionComOffsetAoClicar();\r\n this.ajustaSombraHeaders();\r\n this.ativaTabAoEntrarNaSection();\r\n }\r\n },\r\n Vagas:{\r\n regexFiltros: /(?:[?&])([^&=]+)(?:=([^&]*))/g,\r\n async carregaVagas(filtrosAdicionais = \"\"){\r\n const sectionVagas = document.querySelector('#section-vagas');\r\n const splideVagas = sectionVagas.querySelector(\"#vagas-splide\");\r\n const splideList = splideVagas.querySelector(\"ul.splide__list\");\r\n const profissaoInput = sectionVagas.querySelector('#nome-profissao');\r\n const skeletonCol = sectionVagas.querySelector('.skeleton-loading-col');\r\n\r\n const nomeProfissao = profissaoInput.value;\r\n const quantidadeVagas = 20;\r\n\r\n let filtros = `pagina=1&itensPagina=${quantidadeVagas}&query=` + nomeProfissao + filtrosAdicionais;\r\n\r\n const url = URL_API + 'vagas/buscar-novo?' + filtros.replace('?', '&');\r\n\r\n const callbackSucesso = (resultados) => {\r\n skeletonCol.classList.add('d-none');\r\n splideVagas.classList.remove('d-none');\r\n const vagas = resultados.model.dados;\r\n\r\n splideList.innerHTML = page.Templates.templateVagas(vagas);\r\n\r\n const btnMaisVagas = splideList.querySelector('.btn-mais-vagas');\r\n\r\n if(btnMaisVagas)\r\n btnMaisVagas.addEventListener('mousedown', (e) => {e.preventDefault(); this.eventBtnMaisVagas(e);});\r\n\r\n this.configuraFiltros(resultados.model.facets);\r\n\r\n page.Splides.splideVagas();\r\n };\r\n\r\n splideList.innerHTML = page.Templates.templateVagasSkeletonLoading();\r\n\r\n await getFetch(url, callbackSucesso);\r\n },\r\n configuraFiltros(facet){\r\n const sectionVagas = document.querySelector(\"#section-vagas\");\r\n const filtroStringInput = sectionVagas.querySelector('#stringFiltro');\r\n\r\n // Gera uma array dos Filtros pela String\r\n const filtroString = filtroStringInput.value;\r\n\r\n const valores = [];\r\n \r\n filtroString.replace(this.regexFiltros, function (_, chave, valor) {\r\n const obj= {};\r\n obj[chave] = valor;\r\n valores.push(obj);\r\n });\r\n\r\n // Adiciona Filtros Disponives\r\n Object.keys(facet).forEach(key => {\r\n let filterName = key;\r\n\r\n // Nome do filtro esta diferente no objeto facets doque e realmente no filtro de vagas em si\r\n if(key == 'uf') \r\n filterName = 'estado';\r\n\r\n if(key == 'remoto') \r\n filterName = 'modalidade';\r\n\r\n // Compara os filtros na string de filtros com os redebidos pelo facets\r\n if(valores && valores.length > 0){\r\n let estaPresente = true;\r\n\r\n valores.forEach(valor => {\r\n const keyValor = Object.keys(valor)[0];\r\n\r\n if(keyValor == filterName){\r\n for (let i = 0; i < facet[key].length; i++) {\r\n if(facet[key][i].id == valor[keyValor]){\r\n estaPresente = true;\r\n break;\r\n }\r\n else{\r\n estaPresente = false;\r\n }\r\n }\r\n // Remove o filtro da string se ele nao esta mais presente no facets\r\n if(!estaPresente){\r\n const removeObj = {};\r\n removeObj[keyValor] = valor[keyValor];\r\n \r\n const stringToRemove = page.Helpers.createStringFiltroFromObject(removeObj);\r\n\r\n if(filtroStringInput.value.includes(stringToRemove)){\r\n console.log('stringToRemove', stringToRemove);\r\n filtroStringInput.value = filtroStringInput.value.replace(stringToRemove, '');\r\n }\r\n }\r\n }\r\n });\r\n }\r\n \r\n const dropdownMenu = sectionVagas.querySelector(`.filtro-${filterName}`);\r\n const offCanvasFilter = sectionVagas.querySelector(`.filtro-${filterName}-offcanvas`);\r\n \r\n if(dropdownMenu){\r\n dropdownMenu.innerHTML = page.Templates.templateFiltroOptions(facet[key], filterName);\r\n this.fixLabelClosingDropdownMenu(dropdownMenu);\r\n }\r\n\r\n if(offCanvasFilter)\r\n offCanvasFilter.innerHTML = page.Templates.templateFiltroOptions(facet[key], filterName);\r\n });\r\n\r\n this.addQuantidadeFiltrosStyleOffcanvas();\r\n this.addQuantidadeFiltrosStyleDesktop();\r\n\r\n // Marca os CheckBoxs dos Filtros Ativos\r\n const checkboxInputs = sectionVagas.querySelectorAll('.dropdown-check-filtra');\r\n\r\n valores.forEach(valor => {\r\n const key = Object.keys(valor)[0];\r\n checkboxInputs.forEach(checkbox => {\r\n if(checkbox.value == valor[key])\r\n checkbox.checked = true;\r\n });\r\n });\r\n\r\n },\r\n fixLabelClosingDropdownMenu(dropdownMenu){\r\n const labels = dropdownMenu.querySelectorAll('.form-check-label');\r\n\r\n labels.forEach(label => {\r\n label.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n\r\n const checkbox = label.parentElement.querySelector('.form-check-input');\r\n\r\n if(checkbox.id == label.getAttribute('for'))\r\n checkbox.checked = !checkbox.checked;\r\n\r\n });\r\n });\r\n },\r\n addQuantidadeFiltrosStyleDesktop(){\r\n const verificaQuantidadeFiltros = (btnTarget, quantidadeFiltrosG) =>{\r\n const btnDropdownCount = btnTarget.querySelector(\".dropdown-filtros-count\");\r\n\r\n if(quantidadeFiltrosG >= 1){\r\n btnTarget.classList.add(\"active\");\r\n btnDropdownCount.innerHTML = `(${quantidadeFiltrosG})`;\r\n }\r\n\r\n if(quantidadeFiltrosG == 0){\r\n btnTarget.classList.remove(\"active\");\r\n btnDropdownCount.innerHTML = '';\r\n }\r\n };\r\n\r\n const sectionVagas = document.querySelector('#section-vagas');\r\n const containerFormVagas = sectionVagas.querySelector('#form-visualizar-vagas');\r\n const btnsFiltrosDesktop = containerFormVagas.querySelectorAll('.dropdown-toggle');\r\n const filtroString = sectionVagas.querySelector('#stringFiltro').value;\r\n\r\n const filtros = [];\r\n\r\n filtroString.replace(this.regexFiltros, function (_, chave, valor) {\r\n const obj = {};\r\n obj[chave] = valor;\r\n filtros.push(obj);\r\n });\r\n\r\n btnsFiltrosDesktop.forEach(btnFiltro => {\r\n let quantidadeFiltrosTotal = 0;\r\n\r\n filtros.forEach(filtro => {\r\n if(btnFiltro.classList.contains(`dropdown-${Object.keys(filtro)[0]}`))\r\n quantidadeFiltrosTotal++;\r\n });\r\n\r\n verificaQuantidadeFiltros(btnFiltro, quantidadeFiltrosTotal);\r\n \r\n btnFiltro.closest(\".dropdown\").querySelector('.dropdown-menu').classList.remove(\"show\");\r\n });\r\n },\r\n addQuantidadeFiltrosStyleOffcanvas(){\r\n const sectionVagas = document.querySelector('#section-vagas');\r\n const offcanvas = document.querySelector('#offcanvasTodosOsFiltros');\r\n const btn = sectionVagas.querySelector(\".btn-todos-filtros\");\r\n const quantideFiltros = btn.querySelector('.text-quantidade-filtros-selecionados');\r\n const filtroString = sectionVagas.querySelector('#stringFiltro').value;\r\n\r\n\r\n const mySet = new Set();\r\n\r\n filtroString.replace(this.regexFiltros, function (_, chave, valor) {\r\n mySet.add(chave);\r\n });\r\n\r\n quantideFiltros.textContent = mySet.size;\r\n \r\n \r\n const offcanvasFiltros = bootstrap.Offcanvas.getInstance(offcanvas);\r\n\r\n if(offcanvasFiltros)\r\n offcanvasFiltros.hide();\r\n },\r\n redirecionarParaMaisVagas(filtroAdicional = \"\"){\r\n const nomeProfissao = document.querySelector('#section-vagas').querySelector('#nome-profissao').value;\r\n\r\n window.location.href = \"/pt-br/vagas?query=\" + nomeProfissao + filtroAdicional;\r\n },\r\n eventBtnMaisVagas(e){\r\n if(e.button === 1 || e.button === 0){\r\n const filtroAdicional = document.querySelector(\"#section-vagas\").querySelector('#stringFiltro').value;\r\n this.redirecionarParaMaisVagas(filtroAdicional);\r\n }\r\n },\r\n addBtnsEvents(){\r\n const sectionVagas = document.querySelector(\"#section-vagas\");\r\n const btnsAplicarFiltros = sectionVagas.querySelectorAll(\".btn-aplicar-filtros\");\r\n const btnsEliminarFiltros = sectionVagas.querySelectorAll(\".btn-eliminar-filtros\");\r\n const btnsAplicarFiltrosOffCanvas = sectionVagas.querySelector(\".btn-aplicar-filtros-offcanvas\");\r\n const btnsEliminarFiltrosOffCanvas = sectionVagas.querySelector(\".btn-eliminar-filtros-offcanvas\");\r\n const btnMaisVagas = sectionVagas.querySelector(\".btn-mais-vagas\");\r\n const filtroStringInput = sectionVagas.querySelector('#stringFiltro');\r\n\r\n const removeTodosFiltrosCheckbox = (inputs) =>{\r\n inputs.forEach(input => {\r\n // unchecks all\r\n input.checked = false;\r\n\r\n const obj = {};\r\n obj[input.name] = input.value;\r\n \r\n const filtroString = page.Helpers.createStringFiltroFromObject(obj);\r\n\r\n if(filtroStringInput.value.includes(filtroString))\r\n filtroStringInput.value = filtroStringInput.value.replace(filtroString,\"\");\r\n });\r\n };\r\n\r\n const adicionaTodosFiltrosCheckbox = (inputs) =>{\r\n inputs.forEach(input => {\r\n if(!isNullOrEmpty(input.value)){\r\n if(input.checked){\r\n const obj = {};\r\n obj[input.name] = input.value;\r\n\r\n const filtroString =page.Helpers.createStringFiltroFromObject(obj);\r\n\r\n if(!filtroStringInput.value.includes(filtroString))\r\n filtroStringInput.value += filtroString;\r\n }\r\n else{\r\n const obj = {};\r\n obj[input.name] = input.value;\r\n\r\n const filtroString = page.Helpers.createStringFiltroFromObject(obj);\r\n\r\n if(filtroStringInput.value.includes(filtroString))\r\n filtroStringInput.value = filtroStringInput.value.replace(filtroString, \"\");\r\n }\r\n }\r\n });\r\n\r\n };\r\n\r\n btnsAplicarFiltros.forEach(btn => {\r\n btn.addEventListener('click', (e)=>{\r\n e.preventDefault();\r\n\r\n const form = btn.closest('form');\r\n const inputs = form.querySelectorAll('input');\r\n\r\n adicionaTodosFiltrosCheckbox(inputs);\r\n \r\n this.carregaVagas(filtroStringInput.value);\r\n });\r\n });\r\n\r\n btnsEliminarFiltros.forEach(btn => {\r\n btn.addEventListener('click', (e)=>{\r\n e.preventDefault();\r\n\r\n const form = btn.closest('form');\r\n const inputs = form.querySelectorAll('input');\r\n\r\n removeTodosFiltrosCheckbox(inputs);\r\n\r\n this.carregaVagas(filtroStringInput.value);\r\n });\r\n });\r\n \r\n btnsAplicarFiltrosOffCanvas.addEventListener('click', (e)=>{\r\n e.preventDefault();\r\n const formFilterOffcanvas = btnsAplicarFiltrosOffCanvas.closest('.offcanvas').querySelector('#formFilter');\r\n const inputs = formFilterOffcanvas.querySelectorAll('input');\r\n \r\n adicionaTodosFiltrosCheckbox(inputs);\r\n\r\n this.carregaVagas(filtroStringInput.value);\r\n });\r\n\r\n btnsEliminarFiltrosOffCanvas.addEventListener('click', (e)=>{\r\n e.preventDefault();\r\n const formFilterOffcanvas = btnsAplicarFiltrosOffCanvas.closest('.offcanvas').querySelector('#formFilter');\r\n const inputs = formFilterOffcanvas.querySelectorAll('input');\r\n\r\n removeTodosFiltrosCheckbox(inputs);\r\n\r\n this.carregaVagas(filtroStringInput.value);\r\n });\r\n\r\n if(btnMaisVagas)\r\n btnMaisVagas.addEventListener('mousedown', (e) => {e.preventDefault(); this.eventBtnMaisVagas(e);});\r\n },\r\n init(){\r\n document.querySelectorAll(\".btn-fechar-dropdown\").forEach(btn => btn.addEventListener(\"click\", () => btn.closest(\".dropdown-menu\").classList.remove(\"show\")));\r\n this.carregaVagas();\r\n this.addBtnsEvents();\r\n }\r\n },\r\n Accordion:{\r\n configAccordion() {\r\n const accordionSection = document.querySelector(\"#section-accordion\");\r\n const accordionElement = accordionSection.querySelector(\".accordion-custom\");\r\n const accordionTabs = accordionElement.querySelectorAll(\".accordion-tab\");\r\n const accordionContents = accordionSection.querySelectorAll(\".accordion-content\");\r\n const accordionCol = accordionSection.querySelector(\".accordion-col\");\r\n const heighOriginalAccordionCol = accordionCol.offsetHeight;\r\n \r\n const ajustaEstilosAccordion = (tab) => {\r\n const accordionTabContent = tab.closest('li').querySelector('.accordion-content');\r\n const newHeight = accordionTabContent.offsetHeight < heighOriginalAccordionCol ? heighOriginalAccordionCol : accordionTabContent.offsetHeight;\r\n \r\n const cssText = `\r\n #section-accordion .accordion-col {\r\n height: ${newHeight}px;\r\n }\r\n @media (max-width: 767px) {\r\n #section-accordion .accordion-tab.active .accordion-side-line:after {\r\n height: ${accordionTabContent.offsetHeight + tab.offsetHeight + 20}px !important;\r\n }\r\n }\r\n `;\r\n \r\n const styleTemp = document.querySelector('.style-temp');\r\n if(styleTemp)\r\n styleTemp.remove();\r\n \r\n const style = document.createElement('style');\r\n style.classList.add('style-temp');\r\n style.textContent = cssText;\r\n \r\n document.head.appendChild(style);\r\n };\r\n \r\n accordionTabs.forEach(tab => {\r\n if(tab.classList.contains(\"active\"))\r\n ajustaEstilosAccordion(tab); \r\n \r\n tab.addEventListener(\"click\", ()=>{\r\n \r\n if(tab.classList.contains(\"active\"))\r\n return;\r\n \r\n accordionTabs.forEach(tab => {\r\n tab.classList.remove(\"active\");\r\n });\r\n \r\n tab.classList.add(\"active\");\r\n \r\n accordionContents.forEach(content => {\r\n content.classList.add(\"d-none\");\r\n const target = content.getAttribute(\"tab-target\");\r\n \r\n if(target == tab.id){\r\n content.classList.remove(\"d-none\");\r\n }\r\n });\r\n \r\n ajustaEstilosAccordion(tab);\r\n \r\n // SETTING Scroll WHEN OPEN\r\n const offset = 130;\r\n \r\n if(window.innerWidth < 768)\r\n page.Helpers.scrollToCustom(tab, offset)\r\n else\r\n page.Helpers.scrollToCustom(accordionCol, offset + 20)\r\n \r\n // Ensure correct Navtab is active when focus accordion tab\r\n const navTabs = document.querySelector(\"#header-navbar\").querySelector(\".nav-tabs\");\r\n const btnsNav = navTabs.querySelectorAll('.nav-link');\r\n \r\n btnsNav.forEach(nav => {\r\n nav.classList.remove('active');\r\n });\r\n \r\n navTabs.querySelector('#accordion-tab').classList.add('active');\r\n \r\n });\r\n });\r\n\r\n window.addEventListener('resize', () => {\r\n setTimeout(() => {\r\n const tab = accordionElement.querySelector('.accordion-tab.active');\r\n ajustaEstilosAccordion(tab); \r\n }, 500);\r\n \r\n });\r\n },\r\n abrirTabAccordionOnScrollMobile(){\r\n const accordionSection = document.querySelector(\"#section-accordion\");\r\n const headerNav = document.querySelector(\"#header-navbar\");\r\n const accordionElement = accordionSection.querySelector(\".accordion-custom\");\r\n const accordionTabs = accordionElement.querySelectorAll(\".accordion-tab\");\r\n\r\n const abrirTabOnScroll = (accordionTab) => {\r\n const observer = new IntersectionObserver(\r\n (entries) => {\r\n entries.forEach((entry) => {\r\n if (entry.isIntersecting) {\r\n console.log('Visivel');\r\n \r\n if (entry.boundingClientRect.y < entry.rootBounds.y) {\r\n //Elemento está acima do observador\r\n console.log('acima' , accordionTab);\r\n \r\n } else {\r\n //Elemento está abaixo do observador\r\n console.log('abaixo' , accordionTab);\r\n // accordionTabs.forEach(tab => {\r\n // tab.classList.remove('active');\r\n // tab.closest('li').querySelector('.accordion-content').classList.add('d-none');\r\n // });\r\n // accordionTab.querySelector('.accordion-tab').classList.add('active');\r\n // accordionTab.querySelector('.accordion-content').classList.remove('d-none');\r\n\r\n // accordionTab.click();\r\n\r\n\r\n }\r\n } else {\r\n // Elemento de destino não está visÃvel\r\n\r\n console.log('Nao visivel' , accordionTab);\r\n }\r\n });\r\n },\r\n { root: null, threshold: 1, rootMargin: `0px` }\r\n );\r\n\r\n observer.observe(accordionTab);\r\n return observer;\r\n };\r\n\r\n if(window.innerWidth < 768){\r\n accordionTabs.forEach(accordionTab => {\r\n abrirTabOnScroll(accordionTab.closest('li'));\r\n });\r\n }\r\n\r\n },\r\n init(){\r\n this.configAccordion();\r\n // this.abrirTabAccordionOnScrollMobile();\r\n }\r\n },\r\n adicionarVerMaisCursos(){\r\n const cursosSection = document.querySelector(\"#section-cursos\");\r\n\r\n if(!cursosSection)\r\n return;\r\n\r\n const cardsCursos = cursosSection.querySelectorAll(\".card-cursos\"); \r\n\r\n cardsCursos.forEach(cardCurso => {\r\n const textos = cardCurso.querySelectorAll('.select-texto-cursos');\r\n const btnVerMais = cardCurso.querySelector('.btn-ver-mais-curso');\r\n const btnVerMenos = cardCurso.querySelector('.btn-ver-menos-curso');\r\n let conteudoTodosTextos = '';\r\n\r\n textos.forEach((texto) => {\r\n conteudoTodosTextos += texto.textContent + \"<br>\";\r\n texto.remove();\r\n });\r\n\r\n cardCurso.querySelector('h6').insertAdjacentHTML('afterend', `<p class=\"texto-curso-card\"> ${conteudoTodosTextos} </p>`);\r\n\r\n const textoCard = cardCurso.querySelector('.texto-curso-card');\r\n\r\n if (textoCard.textContent.length > 274)\r\n {\r\n const textoCompleto = textoCard.textContent;\r\n const textoTruncado = this.Helpers.truncateString(textoCard.textContent, 274);\r\n textoCard.textContent = textoTruncado;\r\n\r\n btnVerMais.classList.remove(\"d-none\");\r\n\r\n btnVerMais.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n btnVerMais.classList.add(\"d-none\");\r\n btnVerMenos.classList.remove(\"d-none\");\r\n cardCurso.style.cssText = \"height:auto;\";\r\n textoCard.textContent = textoCompleto;\r\n\r\n });\r\n\r\n btnVerMenos.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n btnVerMenos.classList.add(\"d-none\");\r\n btnVerMais.classList.remove(\"d-none\");\r\n cardCurso.style.cssText = \"\";\r\n textoCard.textContent = textoTruncado;\r\n });\r\n }\r\n });\r\n },\r\n profissaoDetalhes(){\r\n\r\n const profissaoID = document.getElementById('ProfissaoID').value; \r\n\r\n const _insights = async function () { \r\n let formData = new FormData();\r\n formData.append('ProfissaoID', profissaoID);\r\n formData.append('Origem', obterOrigem());\r\n formData.append('Url', window.location.hostname);\r\n formData.append('Dispositivo', obterDispositivo());\r\n\r\n await fetch(`/${CULTURE_EMPREGARE}/Profissao/SalvarVisualizacao`, {\r\n method: 'POST',\r\n body: formData\r\n });\r\n addTrack('Visualizar Profissao', { profissaoID: profissaoID, referer: obterOrigem(), origem: obterCookie('origemCadastro') });\r\n };\r\n \r\n const _definirOrigemCadastro = async function () {\r\n let source = '';\r\n\r\n source = obterQueryString().campanha;\r\n if (isNullOrEmpty(source)) {\r\n source = obterQueryString().source;\r\n }\r\n if (isNullOrEmpty(source)) {\r\n return;\r\n }\r\n salvarCookie('origemCadastro', source, 1);\r\n };\r\n\r\n\r\n\r\n const init = function () {\r\n _definirOrigemCadastro();\r\n _insights();\r\n \r\n };\r\n\r\n return init();\r\n },\r\n async alertaVagas(){\r\n const profissaoTitulo = document.getElementById('ProfissaoTitulo').value; \r\n\r\n const url = `/${CULTURE_EMPREGARE}/Profissao/VerificarAlertaVagas/?titulo=${profissaoTitulo}`;\r\n\r\n const callbackSucesso = (data) => {\r\n const blocoBtns = document.getElementById('bloco-vagas-btns');\r\n \r\n const profissaoID = document.getElementById('ProfissaoID')?.value; \r\n const profissaoTitulo = document.getElementById('ProfissaoTitulo')?.value; \r\n\r\n blocoBtns.insertAdjacentHTML(\"afterbegin\", templateBtnAlertaVagas(data.data, profissaoTitulo, profissaoID));\r\n\r\n for (const botao of document.getElementsByClassName('botao-alerta')) {\r\n new AlertaVaga(botao);\r\n }\r\n };\r\n\r\n await getFetch(url, callbackSucesso);\r\n },\r\n Init(){\r\n inicializarInternacionalizacao();\r\n\r\n this.profissaoDetalhes();\r\n this.Splides.init();\r\n this.Navegacao.init();\r\n this.Vagas.init();\r\n this.Accordion.init();\r\n this.adicionarVerMaisCursos();\r\n this.alertaVagas();\r\n \r\n }\r\n}\r\n\r\npage.Init();\r\n\r\n\r\n","import i18next from 'i18next';import resource_0 from \"./alertaVaga.ptbr.json\" assert { type: 'JSON' };import resource_1 from \"./alertaVaga.es.json\" assert { type: 'JSON' };import resource_2 from \"./alertaVaga.en.json\" assert { type: 'JSON' };import { inicializarInternacionalizacao as inicializarGlobal } from '../global/global';const cultura = CULTURE_EMPREGARE.replace('-', '');export const inicializarInternacionalizacao = () => {inicializarGlobal();if (!i18next.isInitialized) {i18next.init({ lng:cultura, debug:true, defaultNS:'translation', resources: {}, fallbackLng: (code) => [ code.slice(0,2), 'ptbr' ]});}i18next.addResources('ptbr', 'translation', resource_0);i18next.addResources('es', 'translation', resource_1);i18next.addResources('en', 'translation', resource_2);}","import { loadFullPage } from \"./loadFullPage\";\r\nimport { postFetch } from \"./postFetch\"; \r\nimport { tomSelectBuscaLocalizacao } from \"./eventoBuscarVagaRedirect\"; \r\nimport { toastErroCarregar } from \"./toastErroCarregar\";\r\nimport { toastSucesso } from './toastSucesso'\r\nimport JustValidate from \"just-validate\";\r\nimport { Confirm } from \"notiflix/build/notiflix-confirm-aio\";\r\nimport { isNullOrEmpty } from \"./isNullOrEmpty\";\r\nimport { inicializarInternacionalizacao } from \"../localizacao/alertaVaga/alertaVaga\";\r\nimport i18next from 'i18next';\r\n\r\nexport class AlertaVaga {\r\n constructor(botao) {\r\n this.botao = botao;\r\n this.modalGenerico = document.getElementById('modal-generico');\r\n this.vagaID = this.botao.getAttribute('data-vaga-id');\r\n this.profissaoID = this.botao.getAttribute('data-profissao-id');\r\n this.adicionais = this.botao.getAttribute('data-edicao') ?? false;\r\n this.alertaID = this.botao.getAttribute('data-alerta-id') ?? 0;\r\n this.localidade = this.botao.getAttribute('data-localidade')?.split('|');\r\n this.recarregar = this.botao.getAttribute('data-recarregar') == 'true';\r\n this.cargos = this.botao.getAttribute('data-cargo')?.split('|');\r\n\r\n this.init = this.init.bind(this);\r\n this.submitForm = this.submitForm.bind(this);\r\n this.excluir = this.excluir.bind(this);\r\n botao.addEventListener('click', this.init)\r\n }\r\n\r\n async init() {\r\n\r\n try {\r\n loadFullPage.mostrar();\r\n inicializarInternacionalizacao();\r\n if(!this.cargos)\r\n this.cargos = \"\";\r\n\r\n if(!this.alertaID)\r\n this.alertaID = 0;\r\n\r\n const resultado = await fetch(`/${CULTURE_EMPREGARE}/PainelAlertaVaga/ModalAlerta?id=${this.alertaID}&adicionais=${this.adicionais}&cargo=${this.cargos}`);\r\n if (!resultado.ok) {\r\n loadFullPage.esconder();\r\n toastErroCarregar(i18next.t('ErroGenerico'));\r\n return;\r\n }\r\n \r\n this.modalGenerico.innerHTML = await resultado.text();\r\n this.modalGenerico.addEventListener('hidden.bs.modal', () => this.modalGenerico.innerHTML = '');\r\n this.alertaID = this.modalGenerico.querySelector('#alerta-id-modal')?.value;\r\n\r\n const formValidar = new JustValidate(this.modalGenerico.querySelector('#form-alerta-vaga'), {\r\n errorFieldCssClass: 'is-invalid',\r\n focusInvalidField: true,\r\n lockForm: true\r\n }); \r\n\r\n formValidar\r\n .addField('#CargosAlerta', [{ rule: 'required', errorMessage: i18next.t('ErrorMessageCargo') }])\r\n // .addField('#CidadeAlerta', [{ rule: 'required', errorMessage: 'Informe pelo menos uma cidade' }])\r\n .onSuccess(this.submitForm);\r\n \r\n \r\n if ((this.vagaID || this.profissaoID) && !this.alertaID) {\r\n //this.modalGenerico.querySelector('#container-input-cargos').remove();\r\n formValidar.removeField('#CargosAlerta');\r\n }\r\n \r\n\r\n if (!isNullOrEmpty(this.cargos) && this.cargos.length > 0) {\r\n\r\n // this.modalGenerico.querySelector('#texto-descritivo-alerta').innerHTML = ` de <b> ${this.cargos} </b>`;\r\n\r\n const contagemOptions = this.modalGenerico.querySelector('#container-input-cargos').querySelectorAll(`option`).length;\r\n \r\n this.cargos.forEach(value => {\r\n const option = this.modalGenerico.querySelector(`option[value='${value}']`);\r\n \r\n if (option && !option.selected) {\r\n option.remove();\r\n }\r\n });\r\n \r\n const html = [];\r\n\r\n for (const cargo of this.cargos) {\r\n html.push(`<option value=\"${cargo}\" ${contagemOptions > 0 ? '' : 'selected'}>${cargo}</option>`)\r\n }\r\n \r\n this.modalGenerico.querySelector('#CargosAlerta').innerHTML += html;\r\n }\r\n\r\n if (this.localidade != null && this.localidade.length > 0) {\r\n const contagemOptions = this.modalGenerico.querySelector('#CidadeAlerta').querySelectorAll(`option`).length;\r\n \r\n this.localidade.forEach(value => {\r\n const option = this.modalGenerico.querySelector(`option[value='${value}']`);\r\n \r\n if (option && !option.selected) {\r\n option.remove();\r\n }\r\n });\r\n \r\n const html = [];\r\n for (const cidade of this.localidade) {\r\n html.push(`<option value=\"${cidade}\" ${contagemOptions > 0 ? '' : 'selected'}>${cidade}</option>`)\r\n }\r\n \r\n this.modalGenerico.querySelector('#CidadeAlerta').innerHTML += html;\r\n }\r\n \r\n import('tom-select').then(({ default: TomSelect }) => {\r\n new TomSelect('#CargosAlerta', {\r\n plugins: ['clear_button'],\r\n maxItems: 5, \r\n create: true, // Cria uma nova opção caso não exista\r\n persist: false, // As tags não são “persistidas†como opções fixas\r\n createOnBlur: true, // Ao sair do campo, cria a tag com o texto digitado\r\n searchField: [],\r\n createFilter: function(input) {\r\n if (input.length > 150) {\r\n toastErroCarregar(i18next.t(\"AlertaVagaErro150Caracteres\"));\r\n return false; // Bloqueia a criação\r\n }\r\n return true; // Permite criar\r\n },\r\n render: {\r\n no_results: function(data, escape) {\r\n // Retorna string vazia para não mostrar \"No results found\"\r\n return '';\r\n },\r\n option_create: function (data, escape) {\r\n // somente remove o texto “Add†\r\n return `<div class=\"create\"><strong>${escape(data.input)}</strong></div>`;\r\n }\r\n },\r\n onInitialize: function() {\r\n // Se já existem itens selecionados, remove placeholder\r\n if (this.getValue().length > 0) {\r\n this.settings.placeholder = '';\r\n this.control_input.setAttribute('placeholder', '');\r\n }\r\n\r\n this.clearOptions();\r\n },\r\n \r\n onChange: function(values) {\r\n if (values.length > 0) {\r\n // Remove placeholder\r\n this.settings.placeholder = '';\r\n this.control_input.setAttribute('placeholder', '');\r\n } else {\r\n // Reexibe placeholder\r\n this.settings.placeholder = i18next.t('inputCargosPlaceholder');\r\n this.control_input.setAttribute('placeholder', i18next.t('inputCargosPlaceholder'));\r\n }\r\n }\r\n });\r\n });\r\n\r\n await tomSelectBuscaLocalizacao('#CidadeAlerta')\r\n this.modalGenerico.querySelector('#alerta-vaga-excluir')?.addEventListener('click', this.excluir)\r\n //this.modalGenerico.querySelector('#form-alerta-vaga').addEventListener('submit', this.submitForm);\r\n \r\n const isBtnCriarAlerta = this.botao.classList.contains(\"btn-criar-alerta\");\r\n\r\n if ((!this.localidade || this.localidade?.length == 1) && !this.alertaID && !isBtnCriarAlerta) {\r\n loadFullPage.esconder();\r\n this.modalGenerico.querySelector('#form-alerta-vaga').dispatchEvent(new Event('submit'));\r\n return;\r\n }\r\n \r\n this.modalBootstrap = new bootstrap.Modal(this.modalGenerico, { backdrop: \"static\" });\r\n \r\n this.modalBootstrap.show();\r\n loadFullPage.esconder();\r\n } catch {\r\n \r\n loadFullPage.esconder();\r\n this.modalBootstrap.hide();\r\n toastErroCarregar(i18next.t('ErroGenerico'));\r\n }\r\n }\r\n\r\n async excluir() {\r\n Confirm.init({\r\n className: \"confirm-empregare\",\r\n titleColor: \"#EA1F1F\",\r\n okButtonColor: \"#f8f8f8\",\r\n okButtonBackground: \"#EA1F1F\",\r\n cancelButtonColor: \"#f8f8f8\",\r\n });\r\n\r\n const callbackSucesso = resultado => {\r\n \r\n if (this.recarregar) {\r\n location.reload();\r\n }\r\n\r\n this.modalBootstrap.hide();\r\n loadFullPage.esconder();\r\n this.botao.dispatchEvent(new Event('alerta-excluido', { bubbles: true }));\r\n this.alertaID = 0;\r\n this.adicionais = false;\r\n this.botao.innerHTML = `<i class=\"bi bi-bell\"></i> ${i18next.t('BtnAtivar')}`;\r\n this.botao.setAttribute('data-alerta-id', 0);\r\n\r\n toastSucesso(i18next.t('AlertaExcluido')) \r\n };\r\n\r\n const callbackErro = resultado => {\r\n toastErroCarregar(resultado.mensagem);\r\n loadFullPage.esconder();\r\n this.modalBootstrap.hide();\r\n }\r\n \r\n Confirm.show(\r\n i18next.t('ConfirmarExcluirTitulo'),\r\n i18next.t('ConfirmarExcluirTexto'),\r\n i18next.t('ConfirmarExcluirBtnConfirmar'),\r\n i18next.t('ConfirmarExcluirBtnCancelar'),\r\n async () => {\r\n loadFullPage.mostrar(i18next.t('ExcluindoAlerta'));\r\n await postFetch(`/${CULTURE_EMPREGARE}/PainelAlertaVaga/Excluir/${this.alertaID}`, null, callbackSucesso, callbackErro, callbackErro);\r\n }\r\n );\r\n }\r\n \r\n async submitForm(event) {\r\n console.log('event', event);\r\n \r\n event.preventDefault();\r\n loadFullPage.mostrar(i18next.t('LoadSalvandoAlerta'))\r\n \r\n const callbackSucesso = resultado => {\r\n toastSucesso(i18next.t('AlertaSalvo')) \r\n if (this.recarregar) {\r\n location.reload();\r\n }\r\n\r\n this.modalBootstrap?.hide();\r\n loadFullPage.esconder();\r\n this.alertaID = resultado.alertaID;\r\n this.adicionais = true;\r\n this.botao.innerHTML = '<i class=\"bi bi-gear\"></i> ' + i18next.t('btnEditar');\r\n this.botao.setAttribute('data-alerta-id', resultado.alertaID);\r\n\r\n this.botao.dispatchEvent(new Event('alerta-salvo', { bubbles: true }));\r\n }\r\n \r\n const callBackErro = resultado => {\r\n //this.modalBootstrap?.hide();\r\n loadFullPage.esconder();\r\n \r\n if (resultado?.mensagem != null) { \r\n if (resultado.erroAutenticacao) {\r\n document.querySelector('.btn-login').click();\r\n return;\r\n }\r\n toastErroCarregar(resultado.mensagem);\r\n return;\r\n }\r\n \r\n toastErroCarregar(i18next.t('ErroGenerico'));\r\n }\r\n \r\n const formData = new FormData(event.target);\r\n \r\n formData.append('VagaID', this.vagaID);\r\n formData.append('ProfissaoID', this.profissaoID);\r\n formData.append('ID', this.alertaID);\r\n\r\n if (!formData.get('Localidades') && this.localidade) {\r\n formData.delete('Localidades');\r\n if(this.profissaoID || this.vagaID){\r\n for (const localidade of this.localidade) {\r\n \r\n formData.append('Localidades', localidade);\r\n }\r\n }\r\n }\r\n \r\n if (!formData.get('Cargos') && this.cargos && !isNullOrEmpty(this.cargos)) {\r\n formData.delete('Cargos');\r\n for (const cargo of this.cargos) {\r\n \r\n formData.append('Cargos', cargo);\r\n }\r\n }\r\n\r\n await postFetch(`/${CULTURE_EMPREGARE}/PainelAlertaVaga/Salvar`, formData, callbackSucesso, callBackErro, callBackErro, false, false);\r\n }\r\n}\r\n","import i18next from 'i18next';import resource_0 from \"./eventoBuscarVagaRedirect.ptbr.json\" assert { type: 'JSON' };import resource_1 from \"./eventoBuscarVagaRedirect.es.json\" assert { type: 'JSON' };import resource_2 from \"./eventoBuscarVagaRedirect.en.json\" assert { type: 'JSON' };import { inicializarInternacionalizacao as inicializarGlobal } from '../global/global';const cultura = CULTURE_EMPREGARE.replace('-', '');export const inicializarInternacionalizacao = () => {inicializarGlobal();if (!i18next.isInitialized) {i18next.init({ lng:cultura, debug:true, defaultNS:'translation', resources: {}, fallbackLng: (code) => [ code.slice(0,2), 'ptbr' ]});}i18next.addResources('ptbr', 'translation', resource_0);i18next.addResources('es', 'translation', resource_1);i18next.addResources('en', 'translation', resource_2);}","import { uuid } from '../utilidades/uuid.js';\r\nimport { inicializarInternacionalizacao } from '../localizacao/eventoBuscarVagaRedirect/eventoBuscarVagaRedirect.js'\r\nimport i18next from 'i18next';\r\nimport { isNullOrEmpty } from './isNullOrEmpty.js';\r\nimport { getFetch } from './getFetch.js';\r\n\r\nconst chaveLocalStorageBuscasRecentesCargo = 'vagasBuscasRecentesCargo';\r\nconst chaveLocalStorageBuscasRecentesLocalizacao = 'vagasBuscasRecentesLocalizacao';\r\nconst chaveLocalStorageCidadesSugestoes = 'sugestoesCidade';\r\ninicializarInternacionalizacao();\r\n\r\nconsole.log('eventoBuscarVagaRedirect');\r\n\r\nconst sugestoesCidadesPadrao = [\r\n { nome: i18next.t('SugestoesCidadesPadraoRemoto') },\r\n { nome: 'BrasÃlia, DF' },\r\n { nome: 'São Paulo, SP' },\r\n { nome: 'São José do Rio Preto, SP' },\r\n { nome: 'Cuiabá, MT' },\r\n { nome: 'Maringá, PR' },\r\n { nome: 'Natal, RN' },\r\n { nome: 'Belo Horizonte, MG' },\r\n { nome: 'Taguatinga - BrasÃlia, DF' },\r\n { nome: 'Rio de Janeiro, RJ' },\r\n { nome: 'Ribeirão Preto, SP' }\r\n];\r\n\r\n\r\nexport async function obterSugestoesCidades(cb = null) {\r\n let cacheSugestoesCidades = [];\r\n if (sessionStorage.getItem(chaveLocalStorageCidadesSugestoes)) {\r\n cacheSugestoesCidades = JSON.parse(sessionStorage.getItem(chaveLocalStorageCidadesSugestoes));\r\n }\r\n\r\n const { getGeoData } = await import('../utilidades/geoData');\r\n let retorno = cacheSugestoesCidades;\r\n const geoData = getGeoData();\r\n\r\n try {\r\n if (cacheSugestoesCidades.length == 0) {\r\n const baseURLAPI = URL_API + 'vagas/buscar-novo';\r\n const hotSiteEmpresaID = document.getElementById(\"hotSiteEmpresaID\");\r\n const hotSiteUrl = document.getElementById('hotSiteUrl');\r\n\r\n const parametrosURL = new URLSearchParams();\r\n parametrosURL.append('pagina', 1);\r\n parametrosURL.append('itensPagina', 1);\r\n parametrosURL.append('ordenacao', 'Relevancia');\r\n \r\n if (hotSiteEmpresaID != undefined && hotSiteUrl != undefined) {\r\n parametrosURL.append('empresa', hotSiteEmpresaID.value);\r\n parametrosURL.append('hotSiteUrl', hotSiteUrl.value);\r\n }\r\n\r\n const request = await fetch(`${baseURLAPI}?${parametrosURL.toString()}`);\r\n\r\n const response = await request.json();\r\n\r\n if (response.sucesso) {\r\n if (!response.model.facets || !response.model.facets.cidade) {\r\n retorno = sugestoesCidadesPadrao;\r\n } else {\r\n const topCidades = response.model.facets.cidade.splice(0, 10);\r\n\r\n const possuiRemoto = response.model.facets.remoto?.filter(x => x.nome.includes('Remoto'))?.length > 0;\r\n if (possuiRemoto) {\r\n retorno.push({ nome: i18next.t('SugestoesCidadesPadraoRemoto') });\r\n }\r\n\r\n for (const cidadeObject of topCidades) {\r\n if (retorno.find(x => x.nome.includes(cidadeObject.nome)) || cidadeObject.nome.includes('Brasil') || cidadeObject.nome.includes('Remoto')) {\r\n continue;\r\n }\r\n\r\n retorno.push(cidadeObject);\r\n }\r\n }\r\n\r\n sessionStorage.setItem(chaveLocalStorageCidadesSugestoes, JSON.stringify(retorno));\r\n } else {\r\n retorno = sugestoesCidadesPadrao;\r\n }\r\n }\r\n }\r\n catch {\r\n //Caso dê algum erro com o request, coloca as sugestões padrões\r\n retorno = sugestoesCidadesPadrao;\r\n }\r\n\r\n if (geoData.existe) {\r\n //Filtra a lista para não ter a mesma cidade repetida para add no topo\r\n retorno = retorno.filter(x => !x.nome.includes(geoData.cidadeCompleta));\r\n retorno.unshift({ nome: geoData.cidadeCompleta });\r\n }\r\n\r\n //Callback para indicar apenas que finalizou toda operação de request\r\n if (cb != null) { cb(); }\r\n\r\n return retorno;\r\n}\r\n\r\nexport function adicionarSugestaoCidade(nome, adicionarNoTopoLista = false){\r\n if(nome == null || nome.trim().length == 0){\r\n return;\r\n }\r\n \r\n let arrayDados = [];\r\n const dadoParaInserir = { nome }; \r\n const dadosSalvos = obterSugestoesCidades();\r\n\r\n if(dadosSalvos != null && dadosSalvos.length > 0)\r\n {\r\n //Se houver um dado igual não adiciona\r\n if(dadosSalvos.filter(dado => dado.nome.includes(dadoParaInserir.nome)).length > 0){\r\n return;\r\n }\r\n arrayDados = dadosSalvos;\r\n }\r\n\r\n if(adicionarNoTopoLista){\r\n arrayDados.unshift(dadoParaInserir);\r\n }else {\r\n arrayDados.push(dadoParaInserir);\r\n }\r\n localStorage.setItem(chaveLocalStorageCidadesSugestoes, JSON.stringify(arrayDados));\r\n}\r\n\r\nexport function removerSugestaoCidade(nome){\r\n const dadosSalvos = obterSugestoesCidades();\r\n\r\n if(dadosSalvos == null || dadosSalvos.length == 0)\r\n {\r\n return;\r\n }\r\n const dadosSalvosNovo = dadosSalvos.filter(x => x.nome != nome);\r\n localStorage.setItem(chaveLocalStorageCidadesSugestoes, JSON.stringify(dadosSalvosNovo));\r\n}\r\n\r\nconst templatesVagaBuscasRecentes = {\r\n headerListagem(container){\r\n const info = document.createElement('div');\r\n info.setAttribute(\"class\", \"d-flex justify-content-between px-4 pt-3 pb-2\");\r\n info.innerHTML = `\r\n <span class=\"text-muted\" style=\"text-overflow: ellipsis; white-space: nowrap; overflow: hidden;\">\r\n <small>${i18next.t('TemplateVagaBuscasRecentes')}</small>\r\n </span>\r\n `;\r\n container.prepend(info);\r\n },\r\n async itemCargoListagem(elemento, data){ \r\n elemento.setAttribute('class', `busca_${data.value.id}`);\r\n elemento.style = \"display: flex; justify-content: space-between;\";\r\n elemento.innerHTML = `\r\n <span style=\"text-overflow: ellipsis; white-space: nowrap; overflow: hidden;\">\r\n <small>${data.match}</small>\r\n </span>\r\n <span style=\"margin-right: -15px; display: flex; align-items: center; font-size: 13px; font-weight: 100; text-transform: uppercase; color: rgba(0,0,0,.2);\">\r\n <button data-id=\"${data.value.id}\" type=\"button\" class=\"fechar-modal btn-remove-busca-recente\"><i class=\"bi bi-x-circle\"></i></button>\r\n </span>`\r\n ;\r\n elemento.querySelectorAll('.btn-remove-busca-recente').forEach(el => el.addEventListener('click', () => {\r\n //Remove do localStorage baseado na busca id\r\n const buscaId = el.dataset.id;\r\n vagasBuscasRecentesCargoRemover(buscaId);\r\n document.querySelector(`.busca_${buscaId}`).remove();\r\n }));\r\n\r\n },\r\n async itemLocalizacaoListagem(elemento, data){\r\n let htmlElemento = '';\r\n\r\n elemento.style = \"display: flex; justify-content: space-between;\";\r\n elemento.innerHTML = `\r\n <span style=\"text-overflow: ellipsis; white-space: nowrap; overflow: hidden;\">\r\n <small>${data.match}</small>\r\n </span>`;\r\n\r\n //Se for um elemento que seja de busca recente (para nao confundir com a listagem de cidades normal) adiciona botão de remover\r\n if(data.value.buscaRecente != undefined && data.value.buscaRecente){\r\n elemento.setAttribute('class', `busca_${data.value.id}`);\r\n elemento.innerHTML += ` \r\n <span style=\"margin-right: -15px; display: flex; align-items: center; font-size: 13px; font-weight: 100; text-transform: uppercase; color: rgba(0,0,0,.2);\">\r\n <button data-id=\"${data.value.id}\" type=\"button\" class=\"fechar-modal btn-remove-busca-recente-localizacao\"><i class=\"bi bi-x-circle\"></i></button>\r\n </span>\r\n `;\r\n elemento.querySelectorAll('.btn-remove-busca-recente-localizacao').forEach(el => el.addEventListener('click', () => {\r\n //Remove do localStorage baseado na busca id\r\n const buscaId = el.dataset.id;\r\n vagasBuscasRecentesLocalizacaoRemover(buscaId);\r\n document.querySelector(`.busca_${buscaId}`).remove();\r\n }));\r\n }\r\n }\r\n};\r\n\r\nexport async function autocompleteBuscaRecenteLocalizacao(formHeaderBuscarVagas, seletorInput = '#localizacao', sugestoes = []) {\r\n\r\n const { default: autoComplete } = await import('@tarekraafat/autocomplete.js');\r\n\r\n let sugestoesCidades = [];\r\n let buscasRecentesLocalizacao = vagasBuscasRecentesLocalizacaoObter();\r\n\r\n let exibirSugestoesCidades = true;\r\n let exibindoCidadesAPI = false;\r\n\r\n const autoCompleteLocalizacao = new autoComplete({\r\n diacritics: true, //entender sinais agudos e etc\r\n submit: true,\r\n selector: seletorInput,\r\n placeHolder: i18next.t('AutocompletePlaceholder'),\r\n threshold: 0,\r\n debounce: 500,\r\n data: {\r\n src: async (query) => {\r\n try {\r\n let retorno = [];\r\n let querySemAcentos = query.toLowerCase();\r\n querySemAcentos = querySemAcentos.normalize(\"NFD\").replace(/\\p{Diacritic}/gu, \"\");\r\n\r\n function _dadosDoLocalStorage(){\r\n\r\n exibindoCidadesAPI = false;\r\n\r\n buscasRecentesLocalizacao = vagasBuscasRecentesLocalizacaoObter().filter(item => {\r\n let nomeSemAcentos = item.nome.toLowerCase();\r\n nomeSemAcentos = nomeSemAcentos.normalize(\"NFD\").replace(/\\p{Diacritic}/gu, \"\");\r\n return nomeSemAcentos.includes(querySemAcentos);\r\n });\r\n\r\n retorno = buscasRecentesLocalizacao;\r\n return (buscasRecentesLocalizacao != null && buscasRecentesLocalizacao.length > 0);\r\n }\r\n\r\n /*function _possuiEmSugestoesCidades(){\r\n // console.log('analisando de sugestões de cidades');\r\n\r\n const sugestoesCidadesFiltrada = sugestoesCidades.filter(item => {\r\n let nomeSemAcentos = item.nome.toLowerCase();\r\n nomeSemAcentos = nomeSemAcentos.normalize(\"NFD\").replace(/\\p{Diacritic}/gu, \"\");\r\n return nomeSemAcentos.includes(querySemAcentos);\r\n });\r\n\r\n return (sugestoesCidadesFiltrada != null && sugestoesCidadesFiltrada.length > 0);\r\n }*/\r\n\r\n if(query.length >= 3){\r\n //console.log('buscando da API'); \r\n \r\n exibindoCidadesAPI = true;\r\n exibirSugestoesCidades = false;\r\n\r\n const requestCidades = await fetch(`${URL_API}variaveis/cidades/buscarV2?query=${query}`);\r\n const data = await requestCidades.json();\r\n retorno = data.dados;\r\n\r\n if(retorno == null || Object.keys(retorno).length == 0){\r\n exibirSugestoesCidades = true;\r\n _dadosDoLocalStorage();\r\n } \r\n\r\n }else{\r\n exibirSugestoesCidades = true;\r\n _dadosDoLocalStorage();\r\n }\r\n\r\n // console.log({retorno, query});\r\n\r\n return retorno;\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n },\r\n keys: [\"nome\"]\r\n },\r\n resultsList: {\r\n noResults: true, //Caso não tenha itens, permite abrir a listagem contendo as sugestões de cidade\r\n maxResults: 20,\r\n element: (list, data) => {\r\n let temBuscasRecentes = false;\r\n list.setAttribute('class', 'listagem-localizacao');\r\n // console.log(list);\r\n\r\n //Exibe a header de buscas recentes somente quando o termo em questão está na lista\r\n if (buscasRecentesLocalizacao.length > 0 && !exibindoCidadesAPI) {\r\n temBuscasRecentes = true;\r\n templatesVagaBuscasRecentes.headerListagem(list);\r\n }\r\n\r\n //Cidades destaques\r\n if(exibirSugestoesCidades){\r\n\r\n if(temBuscasRecentes){\r\n const linhaSeparadora = document.createElement(\"hr\");\r\n linhaSeparadora.setAttribute(\"style\", \"margin: 5px 0 0 0;\");\r\n list.append(linhaSeparadora);\r\n }\r\n\r\n const headerSugestoes = document.createElement('div');\r\n headerSugestoes.setAttribute(\"class\", \"d-flex justify-content-between px-4 pt-3 pb-2\");\r\n headerSugestoes.innerHTML = `\r\n <span class=\"text-muted\" style=\"text-overflow: ellipsis; white-space: nowrap; overflow: hidden;\">\r\n <small>${i18next.t('ResultsListSugestoes')}</small>\r\n </span>\r\n `;\r\n list.append(headerSugestoes);\r\n sugestoesCidades = sugestoesCidades.concat(sugestoes);\r\n sugestoesCidades.reverse()\r\n\r\n // remove cidades duplicadas\r\n sugestoesCidades = sugestoesCidades.filter((seenIds => obj => !seenIds.has(obj.id) && seenIds.add(obj.id))(new Set())); \r\n\r\n for(let i = 0; i < sugestoesCidades.length; ++i){\r\n const info = document.createElement('li');\r\n info.setAttribute(\"style\", \"display: flex; justify-content: space-between;\");\r\n info.innerHTML = `\r\n <span style=\"text-overflow: ellipsis; white-space: nowrap; overflow: hidden;\">\r\n <small class=\"cidade-destaque-item\">${sugestoesCidades[i].nome}</small>\r\n </span>\r\n `;\r\n list.append(info);\r\n }\r\n }\r\n }\r\n },\r\n resultItem: {\r\n element: (item, data) => {\r\n templatesVagaBuscasRecentes.itemLocalizacaoListagem(item, data);\r\n },\r\n highlight: true\r\n },\r\n events: {\r\n input: { \r\n selection: (event) => {\r\n //Se for um item que não seja preenchido em 'data'\r\n if(event.detail.selection.value == undefined){\r\n autoCompleteLocalizacao.input.value = event.target.nextSibling.querySelectorAll('.cidade-destaque-item')[event.detail.selection.index - buscasRecentesLocalizacao.length].textContent;\r\n }\r\n else {\r\n const objetoSelecionado = event.detail.selection.value;\r\n autoCompleteLocalizacao.input.value = objetoSelecionado.nome;\r\n } \r\n },\r\n focus: async (event) => {\r\n //Ao dar focus no input, inicia o autocomplete com uma pesquisa em branco carregando todas as suas buscas recentes\r\n const inputLocalizacao = document.querySelector(seletorInput);\r\n const valorAntesLoading = inputLocalizacao.value;\r\n inputLocalizacao.value = i18next.t('SugestoesCidadesCarregando');\r\n\r\n sugestoesCidades = await obterSugestoesCidades(() => {\r\n inputLocalizacao.value = valorAntesLoading;\r\n autoCompleteLocalizacao.start();\r\n });\r\n }\r\n }\r\n }\r\n });\r\n\r\n if(formHeaderBuscarVagas != null){\r\n //Evento que ao pesquisar no form header vai redirecionar para a tela de vagas\r\n formHeaderBuscarVagas.addEventListener('submit', eventoBuscarVagaRedirect);\r\n }\r\n\r\n return autoCompleteLocalizacao;\r\n}\r\n\r\nexport async function tomSelectBuscaLocalizacao(selector, multiple) {\r\n const module = await import('tom-select');\r\n const TomSelect = module.default;\r\n new TomSelect(selector, {\r\n plugins: ['clear_button'],\r\n valueField: 'nome',\r\n labelField: 'Localizacao',\r\n searchField: [],\r\n maxItems: 5,\r\n preload: true,\r\n load: async (query, callback) => {\r\n try {\r\n let retorno = [];\r\n let buscasRecentesLocalizacao = vagasBuscasRecentesLocalizacaoObter();\r\n function _dadosDoLocalStorage(){\r\n const querySemAcentos = query.toLowerCase().normalize(\"NFD\").replace(/\\p{Diacritic}/gu, \"\");\r\n \r\n buscasRecentesLocalizacao = vagasBuscasRecentesLocalizacaoObter().filter(item => {\r\n let nomeSemAcentos = item.nome.toLowerCase();\r\n nomeSemAcentos = nomeSemAcentos.normalize(\"NFD\").replace(/\\p{Diacritic}/gu, \"\");\r\n return nomeSemAcentos.includes(querySemAcentos);\r\n });\r\n\r\n retorno = buscasRecentesLocalizacao;\r\n return (buscasRecentesLocalizacao != null && buscasRecentesLocalizacao.length > 0);\r\n }\r\n\r\n if(query.length >= 3){\r\n const requestCidades = await fetch(`${URL_API}variaveis/cidades/buscar/${query}`);\r\n const data = await requestCidades.json();\r\n retorno = data.dados;\r\n\r\n if(retorno == null || Object.keys(retorno).length == 0){\r\n _dadosDoLocalStorage();\r\n } \r\n\r\n } else \r\n _dadosDoLocalStorage();\r\n\r\n callback(retorno);\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n },\r\n onInitialize: function() {\r\n // Se já houver algum valor selecionado, remove o placeholder\r\n // Lembrando que para \"multiple\" esse valor será array.\r\n const currentValue = this.getValue();\r\n \r\n const hasValue = Array.isArray(currentValue)\r\n ? currentValue.length > 0\r\n : !!currentValue; // para single\r\n \r\n if (hasValue) {\r\n this.settings.placeholder = '';\r\n this.control_input.setAttribute('placeholder', '');\r\n }\r\n },\r\n onChange: function(value) {\r\n\r\n let hasValue = false;\r\n\r\n if (Array.isArray(value)) {\r\n hasValue = value.length > 0;\r\n } else {\r\n hasValue = !!value;\r\n }\r\n\r\n if (hasValue) {\r\n this.settings.placeholder = '';\r\n this.control_input.setAttribute('placeholder', '');\r\n } else {\r\n this.settings.placeholder = 'Procurar cidade...';\r\n this.control_input.setAttribute('placeholder', 'Procurar cidade...');\r\n }\r\n\r\n if (isNullOrEmpty(value) && (typeof avisoAssuntoSelecionado !== 'undefined' && avisoAssuntoSelecionado)) {\r\n avisoAssuntoSelecionado?.classList.add('d-none');\r\n todoFormulario?.classList.add('d-none');\r\n document.getElementById('row-assunto-subcategoria')?.classList.add('d-none');\r\n return;\r\n }\r\n getFetch(`/${CULTURE_EMPREGARE}/PaginasEstaticas/ObterAssuntoSubcategorias?assuntoCategoriaID=` + value,\r\n (resultado) => {\r\n\r\n if(!resultado.dados)\r\n return;\r\n\r\n let opcoesSubcategorias = resultado.dados;\r\n\r\n\r\n if (opcoesSubcategorias.length > 0 && (typeof selectAssuntoSubcategoria !== 'undefined' && selectAssuntoSubcategoria)) {\r\n\r\n selectAssuntoSubcategoria.clear(); //atual seleção\r\n selectAssuntoSubcategoria.clearOptions();\r\n selectAssuntoSubcategoria.addOptions(opcoesSubcategorias);\r\n\r\n if (opcoesSubcategorias.length == 1) {\r\n document.getElementById('row-assunto-subcategoria').classList.add('d-none');\r\n selectAssuntoSubcategoria.setValue(opcoesSubcategorias[0].ID);\r\n } else {\r\n document.getElementById('row-assunto-subcategoria').classList.remove('d-none');\r\n todoFormulario.classList.add('d-none');\r\n avisoAssuntoSelecionado.classList.add('d-none');\r\n }\r\n }\r\n\r\n },\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n },\r\n onItemAdd: function(value, item) {\r\n\r\n function clearDynamicOptions(tomSelectInstance) {\r\n // Pega todas as chaves (valores) das opções carregadas.\r\n const allOptionKeys = Object.keys(tomSelectInstance.options);\r\n \r\n // Pega os itens selecionados. Pode vir como string (single) ou array (multiple).\r\n let selectedKeys = tomSelectInstance.getValue();\r\n \r\n // Garante que `selectedKeys` seja um array para comparar.\r\n if (!Array.isArray(selectedKeys)) {\r\n selectedKeys = selectedKeys ? [selectedKeys] : [];\r\n }\r\n \r\n for (const key of allOptionKeys) {\r\n const opt = tomSelectInstance.options[key];\r\n \r\n if (opt.ispermanent !== \"true\") {\r\n // ...e NÃO está selecionado, removemos.\r\n if (!selectedKeys.includes(key)) {\r\n tomSelectInstance.removeOption(key);\r\n }\r\n }\r\n }\r\n }\r\n // Limpa o texto que sobrou\r\n this.setTextboxValue('');\r\n this.close();\r\n\r\n clearDynamicOptions(this);\r\n },\r\n render: {\r\n option: function (data, escape) {\r\n console.log(data)\r\n return `\r\n <div class=\"\">\r\n <p class=\"mb-0\">${escape(data.nome)}</p>\r\n </div>\r\n `;\r\n },\r\n item: function (data, escape) {\r\n console.log(data)\r\n return '<div title=\"' + escape(data.nome) + '\">' + escape(data.nome) + '</div>';\r\n }\r\n }\r\n });\r\n}\r\n\r\nexport async function autocompleteBuscaRecenteCargo(form, seletorInput = 'input[name=\"cargo\"]'){\r\n const { default: autoComplete } = await import('@tarekraafat/autocomplete.js');\r\n \r\n const autocompleteCargo = new autoComplete({\r\n diacritics: true,\r\n submit: true,\r\n selector: () => form.querySelector(seletorInput),\r\n threshold: 0,\r\n data: {\r\n src: async (query) => {\r\n try {\r\n //console.log(query);\r\n const dadosBuscasRecentes = vagasBuscasRecentesCargoObter();\r\n const listaFiltradaBuscasRecentes = dadosBuscasRecentes.filter(x => x.cargo.includes(query));\r\n return listaFiltradaBuscasRecentes;\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n },\r\n keys: ['cargo']\r\n // cache: true,\r\n },\r\n resultsList: {\r\n element: (list, data) => {\r\n if (vagasBuscasRecentesCargoObter().length > 0) {\r\n templatesVagaBuscasRecentes.headerListagem(list);\r\n }\r\n }\r\n },\r\n resultItem: {\r\n element: (item, data) => {\r\n templatesVagaBuscasRecentes.itemCargoListagem(item, data);\r\n },\r\n highlight: true,\r\n },\r\n events: {\r\n input: {\r\n selection: (event) => {\r\n const objetoSelecionado = event.detail.selection.value;\r\n autocompleteCargo.input.value = objetoSelecionado.cargo;\r\n },\r\n focus: (event) => {\r\n //Ao dar focus no input, inicia o autocomplete com uma pesquisa em branco carregando todas as suas buscas recentes\r\n autocompleteCargo.start('');\r\n }\r\n }\r\n }\r\n });\r\n\r\n}\r\n\r\nfunction vagasBuscasRecentesCargoObter()\r\n{\r\n const dadosSalvos = localStorage.getItem(chaveLocalStorageBuscasRecentesCargo);\r\n if(dadosSalvos == null || dadosSalvos == undefined){\r\n return [];\r\n }\r\n return JSON.parse(dadosSalvos) ?? [];\r\n}\r\n\r\nfunction vagasBuscasRecentesLocalizacaoObter()\r\n{\r\n const dadosSalvos = localStorage.getItem(chaveLocalStorageBuscasRecentesLocalizacao);\r\n if(dadosSalvos == null || dadosSalvos == undefined){\r\n return [];\r\n }\r\n return JSON.parse(dadosSalvos) ?? [];\r\n}\r\n\r\nfunction vagasBuscasRecentesCargoRemover(id)\r\n{ \r\n const dadosSalvos = vagasBuscasRecentesCargoObter();\r\n\r\n if(dadosSalvos == null || dadosSalvos.length == 0)\r\n {\r\n return;\r\n }\r\n\r\n const dadosSalvosNovo = dadosSalvos.filter(x => x.id != id);\r\n localStorage.setItem(chaveLocalStorageBuscasRecentesCargo, JSON.stringify(dadosSalvosNovo)); \r\n}\r\n\r\nfunction vagasBuscasRecentesLocalizacaoRemover(id)\r\n{ \r\n const dadosSalvos = vagasBuscasRecentesLocalizacaoObter();\r\n\r\n if(dadosSalvos == null || dadosSalvos.length == 0)\r\n {\r\n return;\r\n }\r\n\r\n const dadosSalvosNovo = dadosSalvos.filter(x => x.id != id);\r\n localStorage.setItem(chaveLocalStorageBuscasRecentesLocalizacao, JSON.stringify(dadosSalvosNovo)); \r\n}\r\n\r\nexport function vagasBuscasRecentesCargoAdicionar(cargo)\r\n{\r\n if(cargo == null || cargo.trim().length == 0){\r\n return;\r\n }\r\n let arrayDados = [];\r\n const dadoParaInserir = { id: uuid(), cargo }; \r\n const dadosSalvos = vagasBuscasRecentesCargoObter();\r\n\r\n if(dadosSalvos != null && dadosSalvos.length > 0)\r\n {\r\n console.log(dadosSalvos.filter(dado => dado.cargo.includes(dadoParaInserir.cargo)));\r\n //Se houver um dado igual não adiciona\r\n if(dadosSalvos.filter(dado => dado.cargo.includes(dadoParaInserir.cargo)).length > 0){\r\n return;\r\n }\r\n arrayDados = dadosSalvos;\r\n }\r\n\r\n arrayDados.push(dadoParaInserir);\r\n localStorage.setItem(chaveLocalStorageBuscasRecentesCargo, JSON.stringify(arrayDados));\r\n}\r\n\r\nexport function vagasBuscasRecentesLocalizacaoAdicionar(localizacao)\r\n{\r\n if(localizacao == null || localizacao.trim().length == 0){\r\n return;\r\n }\r\n let arrayDados = [];\r\n const dadoParaInserir = { id: uuid(), nome: localizacao, buscaRecente: true }; \r\n const dadosSalvos = vagasBuscasRecentesLocalizacaoObter();\r\n\r\n if(dadosSalvos != null && dadosSalvos.length > 0)\r\n {\r\n //Se houver um dado igual não adiciona\r\n if(dadosSalvos.filter(dado => dado.nome.includes(dadoParaInserir.nome)).length > 0){\r\n return;\r\n }\r\n arrayDados = dadosSalvos;\r\n }\r\n\r\n arrayDados.push(dadoParaInserir);\r\n localStorage.setItem(chaveLocalStorageBuscasRecentesLocalizacao, JSON.stringify(arrayDados));\r\n}\r\n\r\nexport function eventoBuscarVagaRedirect(e) {\r\n e.preventDefault();\r\n const inputCargo = e.target.querySelector('input[name=\"cargo\"]').value;\r\n const inputLocalizacao = e.target.querySelector('input[name=\"localizacao\"]').value;\r\n \r\n vagasBuscasRecentesCargoAdicionar(inputCargo);\r\n vagasBuscasRecentesLocalizacaoAdicionar(inputLocalizacao);\r\n \r\n location.href = `/${CULTURE_EMPREGARE}/vagas?query=${inputCargo}&localidade=${inputLocalizacao}`;\r\n}\r\n","import { validarResultado } from \"./validarResultado\";\r\n\r\nexport async function getFetch(url, callbackSucesso, callbackErro, callbackErroConexao, exibirToastErroConexao, exibirToastErroServidor) {\r\n const retorno = await fetch(url, {\r\n method: \"GET\",\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n }\r\n });\r\n\r\n return validarResultado(retorno, callbackSucesso, callbackErro, callbackErroConexao, exibirToastErroConexao, exibirToastErroServidor);\r\n}\r\n","export function isNullOrEmpty(value) {\r\n if (typeof value == 'undefined') {\r\n return true;\r\n }\r\n if (value == '' || value == null || value == 'null') {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n","export const loadFullPage = {\r\n mostrar(mensagem = 'Aguarde...') {\r\n let html = '';\r\n const _setLoader = function () {\r\n html = '<div id=\"loader-site\"><div id=\"loader-overlay\" tabindex=\"-1\" style=\"opacity: 1.03;\"></div><div id=\"loader-msg\" tabindex=\"-1\">';\r\n html += '<div class=\"modal\" style=\"display:block;z-index:2000\"><div class=\"modal-dialog modal-sm text-center\"><div class=\"modal-content\"><div class=\"modal-body\" style=\"padding-top: 30px;padding-bottom: 30px;\"><div class=\"spinner-border\" style=\"margin-bottom: -8px;margin-right: 10px;\" role=\"status\"><span class=\"visually-hidden\">Loading...</span></div> ' + mensagem + '</div></div></div></div>';\r\n\r\n document.body.insertAdjacentHTML(\"afterbegin\", html);\r\n\r\n };\r\n const init = function () {\r\n _setLoader();\r\n }\r\n return init();\r\n },\r\n esconder() {\r\n const _removeLoader = function () {\r\n let findLoader = document.getElementById('loader-site');\r\n if (document.contains(findLoader)) {\r\n findLoader.remove();\r\n }\r\n };\r\n const init = function () {\r\n _removeLoader();\r\n }\r\n\r\n return init();\r\n }\r\n};\r\n","export function obterCookie(name) {\r\n var nameEQ = name + \"=\";\r\n var ca = document.cookie.split(';');\r\n for (var i = 0; i < ca.length; i++) {\r\n var c = ca[i];\r\n while (c.charAt(0) == ' ') c = c.substring(1, c.length);\r\n if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);\r\n }\r\n return null;\r\n}\r\n","export function obterDispositivo() {\r\n if (navigator.userAgent.match(/Tablet|iPad/i)) {\r\n return 'Tablet';\r\n } else if (navigator.userAgent.match(/Mobile|Windows Phone|Lumia|Android|webOS|iPhone|iPod|Blackberry|PlayBook|BB10|Opera Mini|\\bCrMo\\/|Opera Mobi/i)) {\r\n return 'Mobile';\r\n } else {\r\n return 'Desktop';\r\n }\r\n}","import { isNullOrEmpty } from \"./isNullOrEmpty\";\r\nimport { obterQueryString } from \"./obterQueryString\";\r\n\r\nexport function obterOrigem() {\r\n let origem = document.referrer.split('/')[2];\r\n if (isNullOrEmpty(origem)) {\r\n origem = obterQueryString().source;\r\n }\r\n if (isNullOrEmpty(origem)) {\r\n origem = obterQueryString()['utm_source'];\r\n }\r\n return origem;\r\n}","export function obterQueryString() {\r\n const params = new Proxy(new URLSearchParams(window.location.search), {\r\n get: (searchParams, prop) => {\r\n if (prop == 'getAll') {\r\n const array = []\r\n\r\n for (const iterator of searchParams.keys()) {\r\n array[iterator] = searchParams.getAll(iterator);\r\n }\r\n\r\n return array;\r\n }\r\n\r\n return searchParams.get(prop);\r\n }\r\n });\r\n\r\n return params;\r\n}\r\n","import { validarResultado } from \"./validarResultado\";\r\n\r\nexport async function postFetch(url, body, callbackSucesso, callbackErro, callbackErroConexao, exibirToastErroConexao, exibirToastErroServidor, headers = { }) {\r\n const retorno = await fetch(url, {\r\n method: 'POST',\r\n body: body,\r\n headers,\r\n });\r\n\r\n return validarResultado(retorno, callbackSucesso, callbackErro, callbackErroConexao, exibirToastErroConexao, exibirToastErroServidor);\r\n}\r\n","export function salvarCookie(name, value, days) {\r\n var expires = \"\";\r\n if (days) {\r\n var date = new Date();\r\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\r\n expires = \"; expires=\" + date.toUTCString();\r\n }\r\n document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\r\n}","import { Notify } from \"notiflix/build/notiflix-notify-aio\";\r\n\r\n\r\nexport async function toastErroCarregar(mensagem) {\r\n Notify.failure(mensagem);\r\n}\r\n","import { Notify } from \"notiflix/build/notiflix-notify-aio\";\r\n\r\nexport async function toastSucesso(mensagem) {\r\n Notify.success(mensagem);\r\n}\r\n","import { obterDispositivo } from './obterDispositivo';\r\n/**\r\n * Insere um novo track de evento.\r\n * @param {string} name - Nome do evento.\r\n * @param {object} data - Informa��o do evento.\r\n */\r\nexport function addTrack(name, data = {}) {\r\n if (!window.mixpanel) {\r\n return;\r\n }\r\n if (data == null || data == undefined) { data = {}; }\r\n\r\n const hotSiteEmpresaID = document.getElementById(\"hotSiteEmpresaID\");\r\n const hotSiteUrl = document.getElementById('hotSiteUrl');\r\n if (hotSiteEmpresaID != undefined && hotSiteUrl != undefined)\r\n {\r\n data.empresaID = hotSiteEmpresaID.value;\r\n data.hotsite = hotSiteUrl.value;\r\n }\r\n else {\r\n data.hotsite = 'empregare';\r\n }\r\n data.dispositivo = obterDispositivo();\r\n\r\n mixpanel.track(name, data);\r\n}","export function uuid(){\r\n var dt = new Date().getTime();\r\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\r\n var r = (dt + Math.random()*16)%16 | 0;\r\n dt = Math.floor(dt/16);\r\n return (c=='x' ? r :(r&0x3|0x8)).toString(16);\r\n });\r\n return uuid;\r\n}","import { toastErroCarregar } from \"./toastErroCarregar\";\r\nimport { inicializarInternacionalizacao } from \"../localizacao/global/global\";\r\nimport i18next from \"i18next\";\r\n\r\nexport async function validarResultado(retorno, callbackSucesso, callbackErro, callbackErroConexao, exibirToastErroConexao = true, exibirToastErroServidor = true) {\r\n if (retorno.status != 200) {\r\n\r\n if (exibirToastErroConexao) {\r\n inicializarInternacionalizacao()\r\n toastErroCarregar(i18next.t('ErroConexaoGenerico'));\r\n }\r\n\r\n return callbackErroConexao ? callbackErroConexao() : null;\r\n }\r\n\r\n const resultados = await retorno.json();\r\n\r\n if (resultados.sucesso || resultados.Sucesso) {\r\n return callbackSucesso(resultados);\r\n }\r\n\r\n\r\n if (exibirToastErroServidor)\r\n toastErroCarregar(resultados.mensagem);\r\n\r\n return callbackErro ? callbackErro(resultados) : null;\r\n\r\n\r\n\r\n}\r\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nconst EMAIL_REGEXP = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\nconst NUMBER_REGEXP = /^[0-9]+$/;\nconst PASSWORD_REGEXP = /^(?=.*[A-Za-z])(?=.*\\d).{8,}$/;\nconst STRONG_PASSWORD_REGEXP = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,}$/;\nconst isEmpty = (value) => {\n let newVal = value;\n if (typeof value === \"string\") {\n newVal = value.trim();\n }\n return !newVal;\n};\nconst isEmail = (value) => {\n return EMAIL_REGEXP.test(value);\n};\nconst isLengthMoreThanMax = (value, len) => {\n return value.length > len;\n};\nconst isLengthLessThanMin = (value, len) => {\n return value.length < len;\n};\nconst isNumber = (value) => {\n return NUMBER_REGEXP.test(value);\n};\nconst isPassword = (value) => {\n return PASSWORD_REGEXP.test(value);\n};\nconst isStrongPassword = (value) => {\n return STRONG_PASSWORD_REGEXP.test(value);\n};\nconst isNumberMoreThanMax = (value, len) => {\n return value > len;\n};\nconst isNumberLessThanMin = (value, len) => {\n return value < len;\n};\nvar Rules = /* @__PURE__ */ ((Rules2) => {\n Rules2[\"Required\"] = \"required\";\n Rules2[\"Email\"] = \"email\";\n Rules2[\"MinLength\"] = \"minLength\";\n Rules2[\"MaxLength\"] = \"maxLength\";\n Rules2[\"Password\"] = \"password\";\n Rules2[\"Number\"] = \"number\";\n Rules2[\"MaxNumber\"] = \"maxNumber\";\n Rules2[\"MinNumber\"] = \"minNumber\";\n Rules2[\"StrongPassword\"] = \"strongPassword\";\n Rules2[\"CustomRegexp\"] = \"customRegexp\";\n Rules2[\"MinFilesCount\"] = \"minFilesCount\";\n Rules2[\"MaxFilesCount\"] = \"maxFilesCount\";\n Rules2[\"Files\"] = \"files\";\n return Rules2;\n})(Rules || {});\nvar GroupRules = /* @__PURE__ */ ((GroupRules2) => {\n GroupRules2[\"Required\"] = \"required\";\n return GroupRules2;\n})(GroupRules || {});\nvar CustomStyleTagIds = /* @__PURE__ */ ((CustomStyleTagIds2) => {\n CustomStyleTagIds2[\"Label\"] = \"label\";\n CustomStyleTagIds2[\"LabelArrow\"] = \"labelArrow\";\n return CustomStyleTagIds2;\n})(CustomStyleTagIds || {});\nconst defaultDictionary = [\n {\n key: Rules.Required,\n dict: {\n en: \"The field is required\"\n }\n },\n {\n key: Rules.Email,\n dict: {\n en: \"Email has invalid format\"\n }\n },\n {\n key: Rules.MaxLength,\n dict: {\n en: \"The field must contain a maximum of :value characters\"\n }\n },\n {\n key: Rules.MinLength,\n dict: {\n en: \"The field must contain a minimum of :value characters\"\n }\n },\n {\n key: Rules.Password,\n dict: {\n en: \"Password must contain minimum eight characters, at least one letter and one number\"\n }\n },\n {\n key: Rules.StrongPassword,\n dict: {\n en: \"Password should contain minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character\"\n }\n },\n {\n key: Rules.Number,\n dict: {\n en: \"Value should be a number\"\n }\n },\n {\n key: Rules.MaxNumber,\n dict: {\n en: \"Number should be less or equal than :value\"\n }\n },\n {\n key: Rules.MinNumber,\n dict: {\n en: \"Number should be more or equal than :value\"\n }\n },\n {\n key: Rules.MinFilesCount,\n dict: {\n en: \"Files count should be more or equal than :value\"\n }\n },\n {\n key: Rules.MaxFilesCount,\n dict: {\n en: \"Files count should be less or equal than :value\"\n }\n },\n {\n key: Rules.Files,\n dict: {\n en: \"Uploaded files have one or several invalid properties (extension/size/type etc).\"\n }\n }\n];\nconst DEFAULT_ERROR_FIELD_MESSAGE = \"Value is incorrect\";\nconst isPromise = (val) => typeof val === \"object\" && val !== null && \"then\" in val && typeof val.then === \"function\";\nconst getNodeParents = (el) => {\n let elem = el;\n const els = [];\n while (elem) {\n els.unshift(elem);\n elem = elem.parentNode;\n }\n return els;\n};\nconst getClosestParent = (groups, parents) => {\n const reversedParents = [...parents].reverse();\n for (let i = 0, len = reversedParents.length; i < len; ++i) {\n const parent = reversedParents[i];\n for (const key in groups) {\n const group = groups[key];\n if (group.groupElem === parent) {\n return [key, group];\n }\n }\n }\n return null;\n};\nconst getClassList = (classList) => {\n if (Array.isArray(classList)) {\n return classList.filter((cls) => cls.length > 0);\n }\n if (typeof classList === \"string\" && classList.trim()) {\n return [...classList.split(\" \").filter((cls) => cls.length > 0)];\n }\n return [];\n};\nconst isElement = (element) => {\n return element instanceof Element || element instanceof HTMLDocument;\n};\nconst errorLabelCss = `.just-validate-error-label[data-tooltip=true]{position:fixed;padding:4px 8px;background:#423f3f;color:#fff;white-space:nowrap;z-index:10;border-radius:4px;transform:translateY(-5px)}.just-validate-error-label[data-tooltip=true]:before{content:'';width:0;height:0;border-left:solid 5px transparent;border-right:solid 5px transparent;border-bottom:solid 5px #423f3f;position:absolute;z-index:3;display:block;bottom:-5px;transform:rotate(180deg);left:calc(50% - 5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]{transform:translateX(-5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]:before{right:-7px;bottom:auto;left:auto;top:calc(50% - 2px);transform:rotate(90deg)}.just-validate-error-label[data-tooltip=true][data-direction=right]{transform:translateX(5px)}.just-validate-error-label[data-tooltip=true][data-direction=right]:before{right:auto;bottom:auto;left:-7px;top:calc(50% - 2px);transform:rotate(-90deg)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]{transform:translateY(5px)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]:before{right:auto;bottom:auto;left:calc(50% - 5px);top:-5px;transform:rotate(0)}`;\nconst TOOLTIP_ARROW_HEIGHT = 5;\nconst defaultGlobalConfig = {\n errorFieldStyle: {\n color: \"#b81111\",\n border: \"1px solid #B81111\"\n },\n errorFieldCssClass: \"just-validate-error-field\",\n successFieldCssClass: \"just-validate-success-field\",\n errorLabelStyle: {\n color: \"#b81111\"\n },\n errorLabelCssClass: \"just-validate-error-label\",\n successLabelCssClass: \"just-validate-success-label\",\n focusInvalidField: true,\n lockForm: true,\n testingMode: false,\n validateBeforeSubmitting: false\n};\nclass JustValidate {\n constructor(form, globalConfig, dictLocale) {\n __publicField(this, \"form\", null);\n __publicField(this, \"fields\", {});\n __publicField(this, \"groupFields\", {});\n __publicField(this, \"errors\", {});\n __publicField(this, \"isValid\", false);\n __publicField(this, \"isSubmitted\", false);\n __publicField(this, \"globalConfig\", defaultGlobalConfig);\n __publicField(this, \"errorLabels\", {});\n __publicField(this, \"successLabels\", {});\n __publicField(this, \"eventListeners\", []);\n __publicField(this, \"dictLocale\", defaultDictionary);\n __publicField(this, \"currentLocale\", \"en\");\n __publicField(this, \"customStyleTags\", {});\n __publicField(this, \"onSuccessCallback\");\n __publicField(this, \"onFailCallback\");\n __publicField(this, \"tooltips\", []);\n __publicField(this, \"lastScrollPosition\");\n __publicField(this, \"isScrollTick\");\n __publicField(this, \"fieldIds\", /* @__PURE__ */ new Map());\n __publicField(this, \"getKeyByFieldSelector\", (field) => {\n return this.fieldIds.get(field);\n });\n __publicField(this, \"getFieldSelectorByKey\", (key) => {\n for (const [fieldSelector, k] of this.fieldIds) {\n if (key === k) {\n return fieldSelector;\n }\n }\n return void 0;\n });\n __publicField(this, \"setKeyByFieldSelector\", (field) => {\n if (this.fieldIds.has(field)) {\n return this.fieldIds.get(field);\n }\n const key = String(this.fieldIds.size + 1);\n this.fieldIds.set(field, key);\n return key;\n });\n __publicField(this, \"refreshAllTooltips\", () => {\n this.tooltips.forEach((item) => {\n item.refresh();\n });\n });\n __publicField(this, \"handleDocumentScroll\", () => {\n this.lastScrollPosition = window.scrollY;\n if (!this.isScrollTick) {\n window.requestAnimationFrame(() => {\n this.refreshAllTooltips();\n this.isScrollTick = false;\n });\n this.isScrollTick = true;\n }\n });\n __publicField(this, \"formSubmitHandler\", (ev) => {\n ev.preventDefault();\n this.isSubmitted = true;\n this.validateHandler(ev);\n });\n __publicField(this, \"handleFieldChange\", (target) => {\n let foundKey;\n for (const key in this.fields) {\n const field = this.fields[key];\n if (field.elem === target) {\n foundKey = key;\n break;\n }\n }\n if (!foundKey) {\n return;\n }\n this.validateField(foundKey, true);\n });\n __publicField(this, \"handleGroupChange\", (target) => {\n let currentGroup;\n let foundKey;\n for (const key in this.groupFields) {\n const group = this.groupFields[key];\n if (group.elems.find((elem) => elem === target)) {\n currentGroup = group;\n foundKey = key;\n break;\n }\n }\n if (!currentGroup || !foundKey) {\n return;\n }\n this.validateGroup(foundKey, currentGroup);\n });\n __publicField(this, \"handlerChange\", (ev) => {\n if (!ev.target) {\n return;\n }\n this.handleFieldChange(ev.target);\n this.handleGroupChange(ev.target);\n this.renderErrors();\n });\n this.initialize(form, globalConfig, dictLocale);\n }\n initialize(form, globalConfig, dictLocale) {\n this.form = null;\n this.errors = {};\n this.isValid = false;\n this.isSubmitted = false;\n this.globalConfig = defaultGlobalConfig;\n this.errorLabels = {};\n this.successLabels = {};\n this.eventListeners = [];\n this.customStyleTags = {};\n this.tooltips = [];\n this.currentLocale = \"en\";\n if (typeof form === \"string\") {\n const elem = document.querySelector(form);\n if (!elem) {\n throw Error(\n `Form with ${form} selector not found! Please check the form selector`\n );\n }\n this.setForm(elem);\n } else if (form instanceof HTMLFormElement) {\n this.setForm(form);\n } else {\n throw Error(\n `Form selector is not valid. Please specify a string selector or a DOM element.`\n );\n }\n this.globalConfig = { ...defaultGlobalConfig, ...globalConfig };\n if (dictLocale) {\n this.dictLocale = [...dictLocale, ...defaultDictionary];\n }\n if (this.isTooltip()) {\n const styleTag = document.createElement(\"style\");\n styleTag.textContent = errorLabelCss;\n this.customStyleTags[CustomStyleTagIds.Label] = document.head.appendChild(styleTag);\n this.addListener(\"scroll\", document, this.handleDocumentScroll);\n }\n }\n getLocalisedString(rule, ruleValue, customMsg) {\n var _a;\n const search = customMsg != null ? customMsg : rule;\n let localisedStr = (_a = this.dictLocale.find((item) => item.key === search)) == null ? void 0 : _a.dict[this.currentLocale];\n if (!localisedStr) {\n if (customMsg) {\n localisedStr = customMsg;\n }\n }\n if (localisedStr && ruleValue !== void 0) {\n switch (rule) {\n case Rules.MaxLength:\n case Rules.MinLength:\n case Rules.MaxNumber:\n case Rules.MinNumber:\n case Rules.MinFilesCount:\n case Rules.MaxFilesCount:\n localisedStr = localisedStr.replace(\":value\", String(ruleValue));\n }\n }\n return localisedStr || customMsg || DEFAULT_ERROR_FIELD_MESSAGE;\n }\n getFieldErrorMessage(fieldRule, elem) {\n const msg = typeof fieldRule.errorMessage === \"function\" ? fieldRule.errorMessage(this.getElemValue(elem), this.fields) : fieldRule.errorMessage;\n return this.getLocalisedString(fieldRule.rule, fieldRule.value, msg);\n }\n getFieldSuccessMessage(successMessage, elem) {\n const msg = typeof successMessage === \"function\" ? successMessage(this.getElemValue(elem), this.fields) : successMessage;\n return this.getLocalisedString(void 0, void 0, msg);\n }\n getGroupErrorMessage(groupRule) {\n return this.getLocalisedString(\n groupRule.rule,\n void 0,\n groupRule.errorMessage\n );\n }\n getGroupSuccessMessage(groupRule) {\n if (!groupRule.successMessage) {\n return void 0;\n }\n return this.getLocalisedString(\n void 0,\n void 0,\n groupRule.successMessage\n );\n }\n setFieldInvalid(key, fieldRule) {\n this.fields[key].isValid = false;\n this.fields[key].errorMessage = this.getFieldErrorMessage(\n fieldRule,\n this.fields[key].elem\n );\n }\n setFieldValid(key, successMessage) {\n this.fields[key].isValid = true;\n if (successMessage !== void 0) {\n this.fields[key].successMessage = this.getFieldSuccessMessage(\n successMessage,\n this.fields[key].elem\n );\n }\n }\n setGroupInvalid(key, groupRule) {\n this.groupFields[key].isValid = false;\n this.groupFields[key].errorMessage = this.getGroupErrorMessage(groupRule);\n }\n setGroupValid(key, groupRule) {\n this.groupFields[key].isValid = true;\n this.groupFields[key].successMessage = this.getGroupSuccessMessage(groupRule);\n }\n getElemValue(elem) {\n switch (elem.type) {\n case \"checkbox\":\n return elem.checked;\n case \"file\":\n return elem.files;\n default:\n return elem.value;\n }\n }\n validateGroupRule(key, elems, groupRule) {\n switch (groupRule.rule) {\n case GroupRules.Required: {\n if (elems.every((elem) => !elem.checked)) {\n this.setGroupInvalid(key, groupRule);\n } else {\n this.setGroupValid(key, groupRule);\n }\n }\n }\n }\n validateFieldRule(key, elem, fieldRule, afterInputChanged = false) {\n const ruleValue = fieldRule.value;\n const elemValue = this.getElemValue(elem);\n if (fieldRule.plugin) {\n const result = fieldRule.plugin(\n elemValue,\n this.fields\n );\n if (!result) {\n this.setFieldInvalid(key, fieldRule);\n }\n return;\n }\n switch (fieldRule.rule) {\n case Rules.Required: {\n if (isEmpty(elemValue)) {\n this.setFieldInvalid(key, fieldRule);\n }\n break;\n }\n case Rules.Email: {\n if (typeof elemValue !== \"string\") {\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (!isEmail(elemValue)) {\n this.setFieldInvalid(key, fieldRule);\n }\n break;\n }\n case Rules.MaxLength: {\n if (ruleValue === void 0) {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field is not defined. The field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (typeof ruleValue !== \"number\") {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] should be a number. The field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (typeof elemValue !== \"string\") {\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (elemValue === \"\") {\n break;\n }\n if (isLengthMoreThanMax(elemValue, ruleValue)) {\n this.setFieldInvalid(key, fieldRule);\n }\n break;\n }\n case Rules.MinLength: {\n if (ruleValue === void 0) {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field is not defined. The field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (typeof ruleValue !== \"number\") {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] should be a number. The field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (typeof elemValue !== \"string\") {\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (elemValue === \"\") {\n break;\n }\n if (isLengthLessThanMin(elemValue, ruleValue)) {\n this.setFieldInvalid(key, fieldRule);\n }\n break;\n }\n case Rules.Password: {\n if (typeof elemValue !== \"string\") {\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (elemValue === \"\") {\n break;\n }\n if (!isPassword(elemValue)) {\n this.setFieldInvalid(key, fieldRule);\n }\n break;\n }\n case Rules.StrongPassword: {\n if (typeof elemValue !== \"string\") {\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (elemValue === \"\") {\n break;\n }\n if (!isStrongPassword(elemValue)) {\n this.setFieldInvalid(key, fieldRule);\n }\n break;\n }\n case Rules.Number: {\n if (typeof elemValue !== \"string\") {\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (elemValue === \"\") {\n break;\n }\n if (!isNumber(elemValue)) {\n this.setFieldInvalid(key, fieldRule);\n }\n break;\n }\n case Rules.MaxNumber: {\n if (ruleValue === void 0) {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field is not defined. The field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (typeof ruleValue !== \"number\") {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field should be a number. The field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (typeof elemValue !== \"string\") {\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (elemValue === \"\") {\n break;\n }\n const num = +elemValue;\n if (Number.isNaN(num) || isNumberMoreThanMax(num, ruleValue)) {\n this.setFieldInvalid(key, fieldRule);\n }\n break;\n }\n case Rules.MinNumber: {\n if (ruleValue === void 0) {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field is not defined. The field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (typeof ruleValue !== \"number\") {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field should be a number. The field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (typeof elemValue !== \"string\") {\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (elemValue === \"\") {\n break;\n }\n const num = +elemValue;\n if (Number.isNaN(num) || isNumberLessThanMin(num, ruleValue)) {\n this.setFieldInvalid(key, fieldRule);\n }\n break;\n }\n case Rules.CustomRegexp: {\n if (ruleValue === void 0) {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field is not defined. This field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n return;\n }\n let regexp;\n try {\n regexp = new RegExp(ruleValue);\n } catch (e) {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] should be a valid regexp. This field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n const str = String(elemValue);\n if (str !== \"\" && !regexp.test(str)) {\n this.setFieldInvalid(key, fieldRule);\n }\n break;\n }\n case Rules.MinFilesCount: {\n if (ruleValue === void 0) {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field is not defined. This field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (typeof ruleValue !== \"number\") {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field should be a number. The field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (Number.isFinite(elemValue == null ? void 0 : elemValue.length) && elemValue.length < ruleValue) {\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n break;\n }\n case Rules.MaxFilesCount: {\n if (ruleValue === void 0) {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field is not defined. This field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (typeof ruleValue !== \"number\") {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field should be a number. The field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n if (Number.isFinite(elemValue == null ? void 0 : elemValue.length) && elemValue.length > ruleValue) {\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n break;\n }\n case Rules.Files: {\n if (ruleValue === void 0) {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field is not defined. This field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n return;\n }\n if (typeof ruleValue !== \"object\") {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field should be an object. This field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n return;\n }\n const filesConfig = ruleValue.files;\n if (typeof filesConfig !== \"object\") {\n console.error(\n `Value for ${fieldRule.rule} rule for [${key}] field should be an object with files array. This field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n return;\n }\n const isFilePropsInvalid = (file, fileConfig) => {\n const minSizeInvalid = Number.isFinite(fileConfig.minSize) && file.size < fileConfig.minSize;\n const maxSizeInvalid = Number.isFinite(fileConfig.maxSize) && file.size > fileConfig.maxSize;\n const nameInvalid = Array.isArray(fileConfig.names) && !fileConfig.names.includes(file.name);\n const extInvalid = Array.isArray(fileConfig.extensions) && !fileConfig.extensions.includes(\n file.name.split(\".\")[file.name.split(\".\").length - 1]\n );\n const typeInvalid = Array.isArray(fileConfig.types) && !fileConfig.types.includes(file.type);\n return minSizeInvalid || maxSizeInvalid || nameInvalid || extInvalid || typeInvalid;\n };\n if (typeof elemValue === \"object\" && elemValue !== null) {\n for (let fileIdx = 0, len = elemValue.length; fileIdx < len; ++fileIdx) {\n const file = elemValue.item(fileIdx);\n if (!file) {\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n const filesInvalid = isFilePropsInvalid(file, filesConfig);\n if (filesInvalid) {\n this.setFieldInvalid(key, fieldRule);\n break;\n }\n }\n }\n break;\n }\n default: {\n if (typeof fieldRule.validator !== \"function\") {\n console.error(\n `Validator for custom rule for [${key}] field should be a function. This field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n return;\n }\n const result = fieldRule.validator(\n elemValue,\n this.fields\n );\n if (typeof result !== \"boolean\" && typeof result !== \"function\") {\n console.error(\n `Validator return value for [${key}] field should be boolean or function. It will be cast to boolean.`\n );\n }\n if (typeof result === \"function\") {\n if (afterInputChanged) {\n this.fields[key].asyncCheckPending = true;\n } else {\n this.fields[key].asyncCheckPending = false;\n const promise = result();\n if (!isPromise(promise)) {\n console.error(\n `Validator function for custom rule for [${key}] field should return a Promise. This field will be always invalid.`\n );\n this.setFieldInvalid(key, fieldRule);\n return;\n }\n return promise.then((resp) => {\n if (!resp) {\n this.setFieldInvalid(key, fieldRule);\n }\n }).catch(() => {\n this.setFieldInvalid(key, fieldRule);\n });\n }\n }\n if (!result) {\n this.setFieldInvalid(key, fieldRule);\n }\n }\n }\n }\n validateField(key, afterInputChanged = false) {\n var _a;\n const field = this.fields[key];\n field.isValid = true;\n const promises = [];\n [...field.rules].reverse().forEach((rule) => {\n const res = this.validateFieldRule(\n key,\n field.elem,\n rule,\n afterInputChanged\n );\n if (isPromise(res)) {\n promises.push(res);\n }\n });\n if (field.isValid) {\n this.setFieldValid(key, (_a = field.config) == null ? void 0 : _a.successMessage);\n }\n return Promise.allSettled(promises);\n }\n revalidateField(fieldSelector) {\n if (typeof fieldSelector !== \"string\" && !isElement(fieldSelector)) {\n throw Error(\n `Field selector is not valid. Please specify a string selector or a valid DOM element.`\n );\n }\n const key = this.getKeyByFieldSelector(fieldSelector);\n if (!key || !this.fields[key]) {\n console.error(`Field not found. Check the field selector.`);\n return Promise.reject();\n }\n return new Promise((resolve) => {\n this.validateField(key, true).finally(() => {\n this.clearFieldStyle(key);\n this.clearFieldLabel(key);\n this.renderFieldError(key);\n resolve(!!this.fields[key].isValid);\n });\n });\n }\n validateGroup(key, group) {\n const promises = [];\n [...group.rules].reverse().forEach((rule) => {\n const res = this.validateGroupRule(key, group.elems, rule);\n if (isPromise(res)) {\n promises.push(res);\n }\n });\n return Promise.allSettled(promises);\n }\n focusInvalidField() {\n for (const key in this.fields) {\n const field = this.fields[key];\n if (!field.isValid) {\n setTimeout(() => field.elem.focus(), 0);\n break;\n }\n }\n }\n afterSubmitValidation(forceRevalidation = false) {\n this.renderErrors(forceRevalidation);\n if (this.globalConfig.focusInvalidField) {\n this.focusInvalidField();\n }\n }\n validate(forceRevalidation = false) {\n return new Promise((resolve) => {\n const promises = [];\n Object.keys(this.fields).forEach((key) => {\n const promise = this.validateField(key);\n if (isPromise(promise)) {\n promises.push(promise);\n }\n });\n Object.keys(this.groupFields).forEach((key) => {\n const group = this.groupFields[key];\n const promise = this.validateGroup(key, group);\n if (isPromise(promise)) {\n promises.push(promise);\n }\n });\n if (promises.length) {\n Promise.allSettled(promises).then(() => {\n this.afterSubmitValidation(forceRevalidation);\n resolve(true);\n });\n } else {\n this.afterSubmitValidation(forceRevalidation);\n resolve(false);\n }\n });\n }\n revalidate() {\n return new Promise((resolve) => {\n this.validateHandler(void 0, true).finally(() => {\n if (this.globalConfig.focusInvalidField) {\n this.focusInvalidField();\n }\n resolve(this.isValid);\n });\n });\n }\n validateHandler(ev, forceRevalidation = false) {\n if (this.globalConfig.lockForm) {\n this.lockForm();\n }\n return this.validate(forceRevalidation).finally(() => {\n var _a, _b;\n if (this.globalConfig.lockForm) {\n this.unlockForm();\n }\n if (this.isValid) {\n (_a = this.onSuccessCallback) == null ? void 0 : _a.call(this, ev);\n } else {\n (_b = this.onFailCallback) == null ? void 0 : _b.call(this, this.fields, this.groupFields);\n }\n });\n }\n setForm(form) {\n this.form = form;\n this.form.setAttribute(\"novalidate\", \"novalidate\");\n this.removeListener(\"submit\", this.form, this.formSubmitHandler);\n this.addListener(\"submit\", this.form, this.formSubmitHandler);\n }\n addListener(type, elem, handler) {\n elem.addEventListener(type, handler);\n this.eventListeners.push({ type, elem, func: handler });\n }\n removeListener(type, elem, handler) {\n elem.removeEventListener(type, handler);\n this.eventListeners = this.eventListeners.filter(\n (item) => item.type !== type || item.elem !== elem\n );\n }\n addField(fieldSelector, rules, config) {\n if (typeof fieldSelector !== \"string\" && !isElement(fieldSelector)) {\n throw Error(\n `Field selector is not valid. Please specify a string selector or a valid DOM element.`\n );\n }\n let elem;\n if (typeof fieldSelector === \"string\") {\n elem = this.form.querySelector(fieldSelector);\n } else {\n elem = fieldSelector;\n }\n if (!elem) {\n throw Error(\n `Field doesn't exist in the DOM! Please check the field selector.`\n );\n }\n if (!Array.isArray(rules) || !rules.length) {\n throw Error(\n `Rules argument should be an array and should contain at least 1 element.`\n );\n }\n rules.forEach((item) => {\n if (!(\"rule\" in item || \"validator\" in item || \"plugin\" in item)) {\n throw Error(\n `Rules argument must contain at least one rule or validator property.`\n );\n }\n if (!item.validator && !item.plugin && (!item.rule || !Object.values(Rules).includes(item.rule))) {\n throw Error(\n `Rule should be one of these types: ${Object.values(Rules).join(\n \", \"\n )}. Provided value: ${item.rule}`\n );\n }\n });\n const key = this.setKeyByFieldSelector(fieldSelector);\n this.fields[key] = {\n elem,\n rules,\n isValid: void 0,\n config\n };\n this.setListeners(elem);\n if (this.isSubmitted) {\n this.validate();\n }\n return this;\n }\n removeField(fieldSelector) {\n if (typeof fieldSelector !== \"string\" && !isElement(fieldSelector)) {\n throw Error(\n `Field selector is not valid. Please specify a string selector or a valid DOM element.`\n );\n }\n const key = this.getKeyByFieldSelector(fieldSelector);\n if (!key || !this.fields[key]) {\n console.error(`Field not found. Check the field selector.`);\n return this;\n }\n const type = this.getListenerType(this.fields[key].elem.type);\n this.removeListener(type, this.fields[key].elem, this.handlerChange);\n this.clearErrors();\n delete this.fields[key];\n return this;\n }\n removeGroup(group) {\n if (typeof group !== \"string\") {\n throw Error(\n `Group selector is not valid. Please specify a string selector.`\n );\n }\n const key = this.getKeyByFieldSelector(group);\n if (!key || !this.groupFields[key]) {\n console.error(`Group not found. Check the group selector.`);\n return this;\n }\n this.groupFields[key].elems.forEach((elem) => {\n const type = this.getListenerType(elem.type);\n this.removeListener(type, elem, this.handlerChange);\n });\n this.clearErrors();\n delete this.groupFields[key];\n return this;\n }\n addRequiredGroup(groupField, errorMessage, config, successMessage) {\n if (typeof groupField !== \"string\") {\n throw Error(\n `Group selector is not valid. Please specify a string selector.`\n );\n }\n const elem = this.form.querySelector(groupField);\n if (!elem) {\n throw Error(\n `Group with ${groupField} selector not found! Please check the group selector.`\n );\n }\n const inputs = elem.querySelectorAll(\"input\");\n const childrenInputs = Array.from(inputs).filter((input) => {\n const parent = getClosestParent(this.groupFields, getNodeParents(input));\n if (!parent) {\n return true;\n }\n return parent[1].elems.find((elem2) => elem2 !== input);\n });\n const key = this.setKeyByFieldSelector(groupField);\n this.groupFields[key] = {\n rules: [\n {\n rule: GroupRules.Required,\n errorMessage,\n successMessage\n }\n ],\n groupElem: elem,\n elems: childrenInputs,\n isDirty: false,\n isValid: void 0,\n config\n };\n inputs.forEach((input) => {\n this.setListeners(input);\n });\n return this;\n }\n getListenerType(type) {\n switch (type) {\n case \"checkbox\":\n case \"select-one\":\n case \"file\":\n case \"radio\": {\n return \"change\";\n }\n default: {\n return \"input\";\n }\n }\n }\n setListeners(elem) {\n const type = this.getListenerType(elem.type);\n this.removeListener(type, elem, this.handlerChange);\n this.addListener(type, elem, this.handlerChange);\n }\n clearFieldLabel(key) {\n var _a, _b;\n (_a = this.errorLabels[key]) == null ? void 0 : _a.remove();\n (_b = this.successLabels[key]) == null ? void 0 : _b.remove();\n }\n clearFieldStyle(key) {\n var _a, _b, _c, _d;\n const field = this.fields[key];\n const errorStyle = ((_a = field.config) == null ? void 0 : _a.errorFieldStyle) || this.globalConfig.errorFieldStyle;\n Object.keys(errorStyle).forEach((key2) => {\n field.elem.style[key2] = \"\";\n });\n const successStyle = ((_b = field.config) == null ? void 0 : _b.successFieldStyle) || this.globalConfig.successFieldStyle || {};\n Object.keys(successStyle).forEach((key2) => {\n field.elem.style[key2] = \"\";\n });\n field.elem.classList.remove(\n ...getClassList(\n ((_c = field.config) == null ? void 0 : _c.errorFieldCssClass) || this.globalConfig.errorFieldCssClass\n ),\n ...getClassList(\n ((_d = field.config) == null ? void 0 : _d.successFieldCssClass) || this.globalConfig.successFieldCssClass\n )\n );\n }\n clearErrors() {\n var _a, _b;\n Object.keys(this.errorLabels).forEach(\n (key) => this.errorLabels[key].remove()\n );\n Object.keys(this.successLabels).forEach(\n (key) => this.successLabels[key].remove()\n );\n for (const key in this.fields) {\n this.clearFieldStyle(key);\n }\n for (const key in this.groupFields) {\n const group = this.groupFields[key];\n const errorStyle = ((_a = group.config) == null ? void 0 : _a.errorFieldStyle) || this.globalConfig.errorFieldStyle;\n Object.keys(errorStyle).forEach((key2) => {\n group.elems.forEach((elem) => {\n var _a2;\n elem.style[key2] = \"\";\n elem.classList.remove(\n ...getClassList(\n ((_a2 = group.config) == null ? void 0 : _a2.errorFieldCssClass) || this.globalConfig.errorFieldCssClass\n )\n );\n });\n });\n const successStyle = ((_b = group.config) == null ? void 0 : _b.successFieldStyle) || this.globalConfig.successFieldStyle || {};\n Object.keys(successStyle).forEach((key2) => {\n group.elems.forEach((elem) => {\n var _a2;\n elem.style[key2] = \"\";\n elem.classList.remove(\n ...getClassList(\n ((_a2 = group.config) == null ? void 0 : _a2.successFieldCssClass) || this.globalConfig.successFieldCssClass\n )\n );\n });\n });\n }\n this.tooltips = [];\n }\n isTooltip() {\n return !!this.globalConfig.tooltip;\n }\n lockForm() {\n const elems = this.form.querySelectorAll(\n \"input, textarea, button, select\"\n );\n for (let i = 0, len = elems.length; i < len; ++i) {\n elems[i].setAttribute(\n \"data-just-validate-fallback-disabled\",\n elems[i].disabled ? \"true\" : \"false\"\n );\n elems[i].setAttribute(\"disabled\", \"disabled\");\n elems[i].style.pointerEvents = \"none\";\n elems[i].style.webkitFilter = \"grayscale(100%)\";\n elems[i].style.filter = \"grayscale(100%)\";\n }\n }\n unlockForm() {\n const elems = this.form.querySelectorAll(\n \"input, textarea, button, select\"\n );\n for (let i = 0, len = elems.length; i < len; ++i) {\n if (elems[i].getAttribute(\"data-just-validate-fallback-disabled\") !== \"true\") {\n elems[i].removeAttribute(\"disabled\");\n }\n elems[i].style.pointerEvents = \"\";\n elems[i].style.webkitFilter = \"\";\n elems[i].style.filter = \"\";\n }\n }\n renderTooltip(elem, errorLabel, position) {\n var _a;\n const { top, left, width, height } = elem.getBoundingClientRect();\n const errorLabelRect = errorLabel.getBoundingClientRect();\n const pos = position || ((_a = this.globalConfig.tooltip) == null ? void 0 : _a.position);\n switch (pos) {\n case \"left\": {\n errorLabel.style.top = `${top + height / 2 - errorLabelRect.height / 2}px`;\n errorLabel.style.left = `${left - errorLabelRect.width - TOOLTIP_ARROW_HEIGHT}px`;\n break;\n }\n case \"top\": {\n errorLabel.style.top = `${top - errorLabelRect.height - TOOLTIP_ARROW_HEIGHT}px`;\n errorLabel.style.left = `${left + width / 2 - errorLabelRect.width / 2}px`;\n break;\n }\n case \"right\": {\n errorLabel.style.top = `${top + height / 2 - errorLabelRect.height / 2}px`;\n errorLabel.style.left = `${left + width + TOOLTIP_ARROW_HEIGHT}px`;\n break;\n }\n case \"bottom\": {\n errorLabel.style.top = `${top + height + TOOLTIP_ARROW_HEIGHT}px`;\n errorLabel.style.left = `${left + width / 2 - errorLabelRect.width / 2}px`;\n break;\n }\n }\n errorLabel.dataset.direction = pos;\n const refresh = () => {\n this.renderTooltip(elem, errorLabel, position);\n };\n return {\n refresh\n };\n }\n createErrorLabelElem(key, errorMessage, config) {\n const errorLabel = document.createElement(\"div\");\n errorLabel.innerHTML = errorMessage;\n const customErrorLabelStyle = this.isTooltip() ? config == null ? void 0 : config.errorLabelStyle : (config == null ? void 0 : config.errorLabelStyle) || this.globalConfig.errorLabelStyle;\n Object.assign(errorLabel.style, customErrorLabelStyle);\n errorLabel.classList.add(\n ...getClassList(\n (config == null ? void 0 : config.errorLabelCssClass) || this.globalConfig.errorLabelCssClass\n ),\n \"just-validate-error-label\"\n );\n if (this.isTooltip()) {\n errorLabel.dataset.tooltip = \"true\";\n }\n if (this.globalConfig.testingMode) {\n errorLabel.dataset.testId = `error-label-${key}`;\n }\n this.errorLabels[key] = errorLabel;\n return errorLabel;\n }\n createSuccessLabelElem(key, successMessage, config) {\n if (successMessage === void 0) {\n return null;\n }\n const successLabel = document.createElement(\"div\");\n successLabel.innerHTML = successMessage;\n const customSuccessLabelStyle = (config == null ? void 0 : config.successLabelStyle) || this.globalConfig.successLabelStyle;\n Object.assign(successLabel.style, customSuccessLabelStyle);\n successLabel.classList.add(\n ...getClassList(\n (config == null ? void 0 : config.successLabelCssClass) || this.globalConfig.successLabelCssClass\n ),\n \"just-validate-success-label\"\n );\n if (this.globalConfig.testingMode) {\n successLabel.dataset.testId = `success-label-${key}`;\n }\n this.successLabels[key] = successLabel;\n return successLabel;\n }\n renderErrorsContainer(label, errorsContainer) {\n const container = errorsContainer || this.globalConfig.errorsContainer;\n if (typeof container === \"string\") {\n const elem = this.form.querySelector(container);\n if (elem) {\n elem.appendChild(label);\n return true;\n } else {\n console.error(\n `Error container with ${container} selector not found. Errors will be rendered as usual`\n );\n }\n }\n if (container instanceof Element) {\n container.appendChild(label);\n return true;\n }\n if (container !== void 0) {\n console.error(\n `Error container not found. It should be a string or existing Element. Errors will be rendered as usual`\n );\n }\n return false;\n }\n renderGroupLabel(elem, label, errorsContainer, isSuccess) {\n if (!isSuccess) {\n const renderedInErrorsContainer = this.renderErrorsContainer(\n label,\n errorsContainer\n );\n if (renderedInErrorsContainer) {\n return;\n }\n }\n elem.appendChild(label);\n }\n renderFieldLabel(elem, label, errorsContainer, isSuccess) {\n var _a, _b, _c, _d, _e, _f, _g;\n if (!isSuccess) {\n const renderedInErrorsContainer = this.renderErrorsContainer(\n label,\n errorsContainer\n );\n if (renderedInErrorsContainer) {\n return;\n }\n }\n if (elem.type === \"checkbox\" || elem.type === \"radio\") {\n const labelElem = document.querySelector(\n `label[for=\"${elem.getAttribute(\"id\")}\"]`\n );\n if (((_b = (_a = elem.parentElement) == null ? void 0 : _a.tagName) == null ? void 0 : _b.toLowerCase()) === \"label\") {\n (_d = (_c = elem.parentElement) == null ? void 0 : _c.parentElement) == null ? void 0 : _d.appendChild(label);\n } else if (labelElem) {\n (_e = labelElem.parentElement) == null ? void 0 : _e.appendChild(label);\n } else {\n (_f = elem.parentElement) == null ? void 0 : _f.appendChild(label);\n }\n } else {\n (_g = elem.parentElement) == null ? void 0 : _g.appendChild(label);\n }\n }\n showLabels(fields, isError) {\n Object.keys(fields).forEach((fieldName, i) => {\n const error = fields[fieldName];\n const key = this.getKeyByFieldSelector(fieldName);\n if (!key || !this.fields[key]) {\n console.error(`Field not found. Check the field selector.`);\n return;\n }\n const field = this.fields[key];\n field.isValid = !isError;\n this.clearFieldStyle(key);\n this.clearFieldLabel(key);\n this.renderFieldError(key, error);\n if (i === 0 && this.globalConfig.focusInvalidField) {\n setTimeout(() => field.elem.focus(), 0);\n }\n });\n }\n showErrors(fields) {\n if (typeof fields !== \"object\") {\n throw Error(\n \"[showErrors]: Errors should be an object with key: value format\"\n );\n }\n this.showLabels(fields, true);\n }\n showSuccessLabels(fields) {\n if (typeof fields !== \"object\") {\n throw Error(\n \"[showSuccessLabels]: Labels should be an object with key: value format\"\n );\n }\n this.showLabels(fields, false);\n }\n renderFieldError(key, message) {\n var _a, _b, _c, _d, _e, _f;\n const field = this.fields[key];\n if (field.isValid === void 0) {\n return;\n }\n if (field.isValid) {\n if (!field.asyncCheckPending) {\n const successLabel = this.createSuccessLabelElem(\n key,\n message !== void 0 ? message : field.successMessage,\n field.config\n );\n if (successLabel) {\n this.renderFieldLabel(\n field.elem,\n successLabel,\n (_a = field.config) == null ? void 0 : _a.errorsContainer,\n true\n );\n }\n field.elem.classList.add(\n ...getClassList(\n ((_b = field.config) == null ? void 0 : _b.successFieldCssClass) || this.globalConfig.successFieldCssClass\n )\n );\n }\n return;\n }\n this.isValid = false;\n field.elem.classList.add(\n ...getClassList(\n ((_c = field.config) == null ? void 0 : _c.errorFieldCssClass) || this.globalConfig.errorFieldCssClass\n )\n );\n const errorLabel = this.createErrorLabelElem(\n key,\n message !== void 0 ? message : field.errorMessage,\n field.config\n );\n this.renderFieldLabel(\n field.elem,\n errorLabel,\n (_d = field.config) == null ? void 0 : _d.errorsContainer\n );\n if (this.isTooltip()) {\n this.tooltips.push(\n this.renderTooltip(\n field.elem,\n errorLabel,\n (_f = (_e = field.config) == null ? void 0 : _e.tooltip) == null ? void 0 : _f.position\n )\n );\n }\n }\n renderGroupError(key) {\n var _a, _b, _c, _d;\n const group = this.groupFields[key];\n if (group.isValid === void 0) {\n return;\n }\n if (group.isValid) {\n group.elems.forEach((elem) => {\n var _a2, _b2;\n Object.assign(\n elem.style,\n ((_a2 = group.config) == null ? void 0 : _a2.successFieldStyle) || this.globalConfig.successFieldStyle\n );\n elem.classList.add(\n ...getClassList(\n ((_b2 = group.config) == null ? void 0 : _b2.successFieldCssClass) || this.globalConfig.successFieldCssClass\n )\n );\n });\n const successLabel = this.createSuccessLabelElem(\n key,\n group.successMessage,\n group.config\n );\n if (successLabel) {\n this.renderGroupLabel(\n group.groupElem,\n successLabel,\n (_a = group.config) == null ? void 0 : _a.errorsContainer,\n true\n );\n }\n return;\n }\n this.isValid = false;\n group.elems.forEach((elem) => {\n var _a2, _b2;\n Object.assign(\n elem.style,\n ((_a2 = group.config) == null ? void 0 : _a2.errorFieldStyle) || this.globalConfig.errorFieldStyle\n );\n elem.classList.add(\n ...getClassList(\n ((_b2 = group.config) == null ? void 0 : _b2.errorFieldCssClass) || this.globalConfig.errorFieldCssClass\n )\n );\n });\n const errorLabel = this.createErrorLabelElem(\n key,\n group.errorMessage,\n group.config\n );\n this.renderGroupLabel(\n group.groupElem,\n errorLabel,\n (_b = group.config) == null ? void 0 : _b.errorsContainer\n );\n if (this.isTooltip()) {\n this.tooltips.push(\n this.renderTooltip(\n group.groupElem,\n errorLabel,\n (_d = (_c = group.config) == null ? void 0 : _c.tooltip) == null ? void 0 : _d.position\n )\n );\n }\n }\n renderErrors(forceRevalidation = false) {\n if (!this.isSubmitted && !forceRevalidation && !this.globalConfig.validateBeforeSubmitting) {\n return;\n }\n this.clearErrors();\n this.isValid = true;\n for (const key in this.groupFields) {\n this.renderGroupError(key);\n }\n for (const key in this.fields) {\n this.renderFieldError(key);\n }\n }\n destroy() {\n this.eventListeners.forEach((event) => {\n this.removeListener(event.type, event.elem, event.func);\n });\n Object.keys(this.customStyleTags).forEach((key) => {\n this.customStyleTags[key].remove();\n });\n this.clearErrors();\n if (this.globalConfig.lockForm) {\n this.unlockForm();\n }\n }\n refresh() {\n this.destroy();\n if (!this.form) {\n console.error(\"Cannot initialize the library! Form is not defined\");\n } else {\n this.initialize(this.form, this.globalConfig);\n Object.keys(this.fields).forEach((key) => {\n const fieldSelector = this.getFieldSelectorByKey(key);\n if (fieldSelector) {\n this.addField(\n fieldSelector,\n [...this.fields[key].rules],\n this.fields[key].config\n );\n }\n });\n }\n }\n setCurrentLocale(locale) {\n if (typeof locale !== \"string\" && locale !== void 0) {\n console.error(\"Current locale should be a string\");\n return;\n }\n this.currentLocale = locale;\n if (this.isSubmitted) {\n this.validate();\n }\n }\n onSuccess(callback) {\n this.onSuccessCallback = callback;\n return this;\n }\n onFail(callback) {\n this.onFailCallback = callback;\n return this;\n }\n}\nexport {\n CustomStyleTagIds,\n GroupRules,\n Rules,\n JustValidate as default\n};\n","/*\n* Notiflix Confirm AIO (https://notiflix.github.io)\n* Description: This file has been created automatically that using \"notiflix.js\", and \"notiflix.css\" files.\n* Version: 3.2.6\n* Author: Furkan (https://github.com/furcan)\n* Copyright 2019 - 2023 Notiflix, MIT Licence (https://opensource.org/licenses/MIT)\n*/\n\n/* global define */\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], function () {\n return factory(root);\n });\n } else if (typeof module === 'object' && typeof module.exports === 'object') {\n module.exports = factory(root);\n } else {\n root.Notiflix = factory(root);\n }\n})(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this, function (window) {\n\n 'use strict';\n\n // COMMON: SSR check: begin\n if (typeof window === 'undefined' && typeof window.document === 'undefined') {\n return false;\n }\n // COMMON: SSR check: end\n\n // COMMON: Variables: begin\n var notiflixNamespace = 'Notiflix';\n var notiflixConsoleDocs = '\\n\\nVisit documentation page to learn more: https://notiflix.github.io/documentation';\n var defaultFontFamily = '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif';\n // COMMON: Variables: end\n\n // CONFIRM: Default Settings: begin\n var typesConfirm = {\n Show: 'Show',\n Ask: 'Ask',\n Prompt: 'Prompt',\n };\n var newConfirmSettings;\n var confirmSettings = {\n ID: 'NotiflixConfirmWrap', // can not customizable\n className: 'notiflix-confirm',\n width: '300px',\n zindex: 4003,\n position: 'center', // 'center' - 'center-top' - 'center-bottom' - 'right-top' - 'right-center' - 'right-bottom' - 'left-top' - 'left-center' - 'left-bottom'\n distance: '10px',\n backgroundColor: '#f8f8f8',\n borderRadius: '25px',\n backOverlay: true,\n backOverlayColor: 'rgba(0,0,0,0.5)',\n rtl: false,\n fontFamily: 'Quicksand',\n cssAnimation: true,\n cssAnimationDuration: 300,\n cssAnimationStyle: 'fade', // 'zoom' - 'fade'\n plainText: true,\n\n titleColor: '#32c682',\n titleFontSize: '16px',\n titleMaxLength: 34,\n\n messageColor: '#1e1e1e',\n messageFontSize: '14px',\n messageMaxLength: 110,\n\n buttonsFontSize: '15px',\n buttonsMaxLength: 34,\n okButtonColor: '#f8f8f8',\n okButtonBackground: '#32c682',\n cancelButtonColor: '#f8f8f8',\n cancelButtonBackground: '#a9a9a9',\n };\n // CONFIRM: Default Settings: end\n\n // COMMON: Console Error: begin\n var commonConsoleError = function (message) {\n return console.error('%c ' + notiflixNamespace + ' Error ', 'padding:2px;border-radius:20px;color:#fff;background:#ff5549', '\\n' + message + notiflixConsoleDocs);\n };\n // COMMON: Console Error: end\n\n // COMMON: Check Head or Body: begin\n var commonCheckHeadOrBody = function (element) {\n if (!element) { element = 'head'; }\n if (window.document[element] === null) {\n commonConsoleError('\\nNotiflix needs to be appended to the \"<' + element + '>\" element, but you called it before the \"<' + element + '>\" element has been created.');\n return false;\n }\n return true;\n };\n // COMMON: Check Head or Body: end\n\n // COMMON: Set Internal CSS Codes: begin\n var commonSetInternalCSSCodes = function (getInternalCSSCodes, styleElementId) {\n // check doc head\n if (!commonCheckHeadOrBody('head')) { return false; }\n\n // internal css\n if (getInternalCSSCodes() !== null && !window.document.getElementById(styleElementId)) {\n var internalCSS = window.document.createElement('style');\n internalCSS.id = styleElementId;\n internalCSS.innerHTML = getInternalCSSCodes();\n window.document.head.appendChild(internalCSS);\n }\n };\n // COMMON: Set Internal CSS Codes: end\n\n // COMMON: Extend Options: begin\n var commonExtendOptions = function () {\n // variables\n var extended = {};\n var deep = false;\n var i = 0;\n // check if a deep merge\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\n deep = arguments[0];\n i++;\n }\n // merge the object into the extended object\n var merge = function (obj) {\n for (var prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n // if property is an object, merge properties\n if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {\n extended[prop] = commonExtendOptions(extended[prop], obj[prop]);\n } else {\n extended[prop] = obj[prop];\n }\n }\n }\n };\n // loop through each object and conduct a merge\n for (; i < arguments.length; i++) {\n merge(arguments[i]);\n }\n return extended;\n };\n // COMMON: Extend Options: end\n\n // COMMON: Get Plaintext: begin\n var commonGetPlaintext = function (html) {\n var htmlPool = window.document.createElement('div');\n htmlPool.innerHTML = html;\n return htmlPool.textContent || htmlPool.innerText || '';\n };\n // COMMON: Get Plaintext: end\n\n // CONFIRM: Get Internal CSS Codes: begin\n var confirmGetInternalCSSCodes = function () {\n var confirmCSS = '[id^=NotiflixConfirmWrap]{position:fixed;z-index:4003;width:100%;height:100%;left:0;top:0;padding:10px;-webkit-box-sizing:border-box;box-sizing:border-box;background:transparent;font-family:\"Quicksand\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[id^=NotiflixConfirmWrap].nx-position-center-top{-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}[id^=NotiflixConfirmWrap].nx-position-center-bottom{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[id^=NotiflixConfirmWrap].nx-position-left-top{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}[id^=NotiflixConfirmWrap].nx-position-left-center{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}[id^=NotiflixConfirmWrap].nx-position-left-bottom{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[id^=NotiflixConfirmWrap].nx-position-right-top{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}[id^=NotiflixConfirmWrap].nx-position-right-center{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}[id^=NotiflixConfirmWrap].nx-position-right-bottom{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[id^=NotiflixConfirmWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixConfirmWrap]>div[class*=\"-overlay\"]{width:100%;height:100%;left:0;top:0;background:rgba(255,255,255,.5);position:fixed;z-index:0}[id^=NotiflixConfirmWrap]>div[class*=\"-overlay\"].nx-with-animation{-webkit-animation:confirm-overlay-animation .3s ease-in-out 0s normal;animation:confirm-overlay-animation .3s ease-in-out 0s normal}@-webkit-keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}@keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].nx-remove>div[class*=\"-overlay\"].nx-with-animation{opacity:0;-webkit-animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal;animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal}@-webkit-keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}@keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]{width:300px;max-width:100%;max-height:96vh;overflow-x:hidden;overflow-y:auto;border-radius:25px;padding:10px;margin:0;-webkit-filter:drop-shadow(0 0 5px rgba(0,0,0,0.05));filter:drop-shadow(0 0 5px rgba(0, 0, 0, .05));background:#f8f8f8;color:#1e1e1e;position:relative;z-index:1;text-align:center}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]{float:left;width:100%;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]>h5{float:left;width:100%;margin:0;padding:0 0 10px;border-bottom:1px solid rgba(0,0,0,.1);color:#32c682;font-family:inherit!important;font-size:16px;line-height:1.4;font-weight:500;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]>div{font-family:inherit!important;margin:15px 0 20px;padding:0 10px;float:left;width:100%;font-size:14px;line-height:1.4;font-weight:normal;color:inherit;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]>div>div{font-family:inherit!important;float:left;width:100%;margin:15px 0 0;padding:0}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]>div>div>input{font-family:inherit!important;float:left;width:100%;height:40px;margin:0;padding:0 15px;border:1px solid rgba(0,0,0,.1);border-radius:25px;font-size:14px;font-weight:normal;line-height:1;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;text-align:left}[id^=NotiflixConfirmWrap].nx-rtl-on>div[class*=\"-content\"]>div[class*=\"-head\"]>div>div>input{text-align:right}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]>div>div>input:hover{border-color:rgba(0,0,0,.1)}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]>div>div>input:focus{border-color:rgba(0,0,0,.3)}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]>div>div>input.nx-validation-failure{border-color:#ff5549}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]>div>div>input.nx-validation-success{border-color:#32c682}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:inherit;float:left;width:100%;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a{cursor:pointer;font-family:inherit!important;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;float:left;width:48%;padding:9px 5px;border-radius:inherit!important;font-weight:500;font-size:15px;line-height:1.4;color:#f8f8f8;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a.nx-confirm-button-ok{margin:0 2% 0 0;background:#32c682}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a.nx-confirm-button-cancel{margin:0 0 0 2%;background:#a9a9a9}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a.nx-full{margin:0;width:100%}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a:hover{-webkit-box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25);box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25)}[id^=NotiflixConfirmWrap].nx-rtl-on>div[class*=\"-content\"]>div[class*=\"-buttons\"],[id^=NotiflixConfirmWrap].nx-rtl-on>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}[id^=NotiflixConfirmWrap].nx-with-animation.nx-fade>div[class*=\"-content\"]{-webkit-animation:confirm-animation-fade .3s ease-in-out 0s normal;animation:confirm-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].nx-with-animation.nx-zoom>div[class*=\"-content\"]{-webkit-animation:confirm-animation-zoom .3s ease-in-out 0s normal;animation:confirm-animation-zoom .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes confirm-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}[id^=NotiflixConfirmWrap].nx-with-animation.nx-fade.nx-remove>div[class*=\"-content\"]{opacity:0;-webkit-animation:confirm-animation-fade-remove .3s ease-in-out 0s normal;animation:confirm-animation-fade-remove .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap].nx-with-animation.nx-zoom.nx-remove>div[class*=\"-content\"]{opacity:0;-webkit-animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal;animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}@keyframes confirm-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}';\n return confirmCSS || null;\n };\n // CONFIRM: Get Internal CSS Codes: end\n\n // CONFIRM: Create: begin\n var confirmCreate = function (confirmType, title, messageOrQuestion, answer, okButtonText, cancelButtonText, okButtonCallback, cancelButtonCallback, options) {\n // check doc body\n if (!commonCheckHeadOrBody('body')) { return false; }\n\n // if not initialized pretend like init\n if (!newConfirmSettings) {\n Notiflix.Confirm.init({});\n }\n\n // create a backup for new settings\n var newConfirmSettingsBackup = commonExtendOptions(true, newConfirmSettings, {});\n\n // check the \"options\": begin\n if (typeof options === 'object' && !Array.isArray(options)) {\n // extend new settings with the new options\n newConfirmSettings = commonExtendOptions(true, newConfirmSettings, options);\n }\n // check the \"options\": end\n\n // check the arguments: begin\n if (typeof title !== 'string') { title = 'Notiflix Confirm'; }\n if (typeof messageOrQuestion !== 'string') { messageOrQuestion = 'Do you agree with me?'; }\n if (typeof okButtonText !== 'string') { okButtonText = 'Yes'; }\n if (typeof cancelButtonText !== 'string') { cancelButtonText = 'No'; }\n if (typeof okButtonCallback !== 'function') { okButtonCallback = undefined; }\n if (typeof cancelButtonCallback !== 'function') { cancelButtonCallback = undefined; }\n // check the arguments: end\n\n // if plainText is true => HTML tags not allowed: begin\n if (newConfirmSettings.plainText) {\n title = commonGetPlaintext(title);\n messageOrQuestion = commonGetPlaintext(messageOrQuestion);\n okButtonText = commonGetPlaintext(okButtonText);\n cancelButtonText = commonGetPlaintext(cancelButtonText);\n }\n // if plainText is true => HTML tags not allowed: end\n\n // if plainText is false but the contents length more than ***MaxLength => Possible HTML tags error: begin\n if (!newConfirmSettings.plainText) {\n if (title.length > newConfirmSettings.titleMaxLength) {\n title = 'Possible HTML Tags Error';\n messageOrQuestion = 'The \"plainText\" option is \"false\" and the title content length is more than \"titleMaxLength\" option.';\n okButtonText = 'Okay';\n cancelButtonText = '...';\n }\n if (messageOrQuestion.length > newConfirmSettings.messageMaxLength) {\n title = 'Possible HTML Tags Error';\n messageOrQuestion = 'The \"plainText\" option is \"false\" and the message content length is more than \"messageMaxLength\" option.';\n okButtonText = 'Okay';\n cancelButtonText = '...';\n }\n if ((okButtonText.length || cancelButtonText.length) > newConfirmSettings.buttonsMaxLength) {\n title = 'Possible HTML Tags Error';\n messageOrQuestion = 'The \"plainText\" option is \"false\" and the buttons content length is more than \"buttonsMaxLength\" option.';\n okButtonText = 'Okay';\n cancelButtonText = '...';\n }\n }\n // if plainText is false but the contents length more than ***MaxLength => Possible HTML tags error: end\n\n // max length: begin\n if (title.length > newConfirmSettings.titleMaxLength) {\n title = title.substring(0, newConfirmSettings.titleMaxLength) + '...';\n }\n if (messageOrQuestion.length > newConfirmSettings.messageMaxLength) {\n messageOrQuestion = messageOrQuestion.substring(0, newConfirmSettings.messageMaxLength) + '...';\n }\n if (okButtonText.length > newConfirmSettings.buttonsMaxLength) {\n okButtonText = okButtonText.substring(0, newConfirmSettings.buttonsMaxLength) + '...';\n }\n if (cancelButtonText.length > newConfirmSettings.buttonsMaxLength) {\n cancelButtonText = cancelButtonText.substring(0, newConfirmSettings.buttonsMaxLength) + '...';\n }\n // max length: end\n\n // if cssAnimaion is false => duration: begin\n if (!newConfirmSettings.cssAnimation) {\n newConfirmSettings.cssAnimationDuration = 0;\n }\n // if cssAnimaion is false => duration: end\n\n // confirm wrap: begin\n var ntflxConfirmWrap = window.document.createElement('div');\n ntflxConfirmWrap.id = confirmSettings.ID;\n ntflxConfirmWrap.className = newConfirmSettings.className + (newConfirmSettings.cssAnimation ? ' nx-with-animation nx-' + newConfirmSettings.cssAnimationStyle : '');\n ntflxConfirmWrap.style.zIndex = newConfirmSettings.zindex;\n ntflxConfirmWrap.style.padding = newConfirmSettings.distance;\n\n // rtl: begin\n if (newConfirmSettings.rtl) {\n ntflxConfirmWrap.setAttribute('dir', 'rtl');\n ntflxConfirmWrap.classList.add('nx-rtl-on');\n }\n // rtl: end\n\n // position: begin\n var confirmPosition = typeof newConfirmSettings.position === 'string' ? newConfirmSettings.position.trim() : 'center';\n ntflxConfirmWrap.classList.add('nx-position-' + confirmPosition);\n // position: end\n\n // font-family\n ntflxConfirmWrap.style.fontFamily = '\"' + newConfirmSettings.fontFamily + '\", ' + defaultFontFamily;\n\n // if background overlay is true: begin\n var confirmOverlay = '';\n if (newConfirmSettings.backOverlay) {\n confirmOverlay = '<div class=\"' + newConfirmSettings.className + '-overlay' + (newConfirmSettings.cssAnimation ? ' nx-with-animation' : '') + '\" style=\"background:' + newConfirmSettings.backOverlayColor + ';animation-duration:' + newConfirmSettings.cssAnimationDuration + 'ms;\"></div>';\n }\n // if background overlay is true: end\n\n // if have a callback => add cancel button: begin\n var cancelButtonHTML = '';\n if (typeof okButtonCallback === 'function') {\n cancelButtonHTML = '<a id=\"NXConfirmButtonCancel\" class=\"nx-confirm-button-cancel\" style=\"color:' + newConfirmSettings.cancelButtonColor + ';background:' + newConfirmSettings.cancelButtonBackground + ';font-size:' + newConfirmSettings.buttonsFontSize + ';\">' + cancelButtonText + '</a>';\n }\n // if have a callback => add cancel button: end\n\n // check the validation module: begin\n var setValidationInput = '';\n var theExpectedAnswer = null;\n var theClientAnswer = undefined;\n if (confirmType === typesConfirm.Ask || confirmType === typesConfirm.Prompt) {\n theExpectedAnswer = answer || '';\n var inputMaxLength = (confirmType === typesConfirm.Ask) ? Math.ceil(theExpectedAnswer.length * 1.5) : (theExpectedAnswer.length > 200 ? Math.ceil(theExpectedAnswer.length * 1.5) : 250);\n var inputDefaultValueAttr = confirmType === typesConfirm.Prompt ? ('value=\"' + theExpectedAnswer + '\"') : '';\n setValidationInput = '<div><input id=\"NXConfirmValidationInput\" type=\"text\" ' + inputDefaultValueAttr + ' maxlength=\"' + inputMaxLength + '\" style=\"font-size:' + newConfirmSettings.messageFontSize + ';border-radius: ' + newConfirmSettings.borderRadius + ';\" autocomplete=\"off\" spellcheck=\"false\" autocapitalize=\"none\" /></div>';\n }\n // check the validation module: end\n\n // confirm wrap content: begin\n ntflxConfirmWrap.innerHTML = confirmOverlay +\n '<div class=\"' + newConfirmSettings.className + '-content\" style=\"width:' + newConfirmSettings.width + '; background:' + newConfirmSettings.backgroundColor + '; animation-duration:' + newConfirmSettings.cssAnimationDuration + 'ms; border-radius: ' + newConfirmSettings.borderRadius + ';\">' +\n '<div class=\"' + newConfirmSettings.className + '-head\">' +\n '<h5 style=\"color:' + newConfirmSettings.titleColor + ';font-size:' + newConfirmSettings.titleFontSize + ';\">' + title + '</h5>' +\n '<div style=\"color:' + newConfirmSettings.messageColor + ';font-size:' + newConfirmSettings.messageFontSize + ';\">' + messageOrQuestion + setValidationInput + '</div>' +\n '</div>' +\n '<div class=\"' + newConfirmSettings.className + '-buttons\">' +\n '<a id=\"NXConfirmButtonOk\" class=\"nx-confirm-button-ok' + (typeof okButtonCallback === 'function' ? '' : ' nx-full') + '\" style=\"color:' + newConfirmSettings.okButtonColor + ';background:' + newConfirmSettings.okButtonBackground + ';font-size:' + newConfirmSettings.buttonsFontSize + ';\">' + okButtonText + '</a>' +\n cancelButtonHTML +\n '</div>' +\n '</div>';\n // confirm wrap content: end\n // confirm wrap: end\n\n // if there is no confirm box: begin\n if (!window.document.getElementById(ntflxConfirmWrap.id)) {\n window.document.body.appendChild(ntflxConfirmWrap);\n\n // buttons && input listener: begin\n var confirmCloseWrap = window.document.getElementById(ntflxConfirmWrap.id);\n var okButton = window.document.getElementById('NXConfirmButtonOk');\n\n // validation input listener: begin\n var validationInput = window.document.getElementById('NXConfirmValidationInput');\n if (validationInput) {\n validationInput.focus();\n validationInput.setSelectionRange(0, (validationInput.value || '').length);\n validationInput.addEventListener('keyup', function (event) {\n var thisValue = event.target.value;\n if (\n (confirmType === typesConfirm.Ask) &&\n (thisValue !== theExpectedAnswer)\n ) {\n event.preventDefault();\n validationInput.classList.add('nx-validation-failure');\n validationInput.classList.remove('nx-validation-success');\n } else {\n if (confirmType === typesConfirm.Ask) {\n validationInput.classList.remove('nx-validation-failure');\n validationInput.classList.add('nx-validation-success');\n }\n var isEnter = (event.key || '').toLocaleLowerCase('en') === 'enter' || event.keyCode === 13;\n if (isEnter) {\n okButton.dispatchEvent(new Event('click'));\n }\n }\n });\n }\n // validation input listener: end\n\n // ok button listener: begin\n okButton.addEventListener('click', function (event) {\n // check the answer if the type is \"Ask\": begin\n if (confirmType === typesConfirm.Ask && theExpectedAnswer && validationInput) {\n var inputValue = (validationInput.value || '').toString();\n if (inputValue !== theExpectedAnswer) {\n validationInput.focus();\n validationInput.classList.add('nx-validation-failure');\n event.stopPropagation();\n event.preventDefault();\n event.returnValue = false;\n event.cancelBubble = true;\n return false;\n } else {\n validationInput.classList.remove('nx-validation-failure');\n }\n }\n // check the answer if the type is \"Ask\": end\n\n // if ok callback && if ok callback is a function\n if (typeof okButtonCallback === 'function') {\n if (confirmType === typesConfirm.Prompt && validationInput) {\n theClientAnswer = validationInput.value || '';\n }\n okButtonCallback(theClientAnswer);\n }\n confirmCloseWrap.classList.add('nx-remove');\n\n var timeout = setTimeout(function () {\n if (confirmCloseWrap.parentNode !== null) {\n confirmCloseWrap.parentNode.removeChild(confirmCloseWrap);\n clearTimeout(timeout);\n }\n }, newConfirmSettings.cssAnimationDuration);\n });\n // ok button listener: end\n\n // if ok callback && if ok callback a function => add Cancel Button listener: begin\n if (typeof okButtonCallback === 'function') {\n // cancel button listener: begin\n var cancelButton = window.document.getElementById('NXConfirmButtonCancel');\n cancelButton.addEventListener('click', function () {\n // if cancel callback && if cancel callback a function\n if (typeof cancelButtonCallback === 'function') {\n if (confirmType === typesConfirm.Prompt && validationInput) {\n theClientAnswer = validationInput.value || '';\n }\n cancelButtonCallback(theClientAnswer);\n }\n confirmCloseWrap.classList.add('nx-remove');\n\n var timeout = setTimeout(function () {\n if (confirmCloseWrap.parentNode !== null) {\n confirmCloseWrap.parentNode.removeChild(confirmCloseWrap);\n clearTimeout(timeout);\n }\n }, newConfirmSettings.cssAnimationDuration);\n });\n // cancel button listener: end\n }\n // if ok callback && if ok callback a function => add Cancel Button listener: end\n // buttons && input listener: end\n }\n // if there is no confirm box: end\n\n // extend new settings with the backup settings\n newConfirmSettings = commonExtendOptions(true, newConfirmSettings, newConfirmSettingsBackup);\n };\n // CONFIRM: Create: end\n\n var Notiflix = {\n Confirm: {\n // Init\n init: function (userConfirmOptions) {\n // extend options\n newConfirmSettings = commonExtendOptions(true, confirmSettings, userConfirmOptions);\n // internal css if exist\n commonSetInternalCSSCodes(confirmGetInternalCSSCodes, 'NotiflixConfirmInternalCSS');\n },\n // Merge First Init\n merge: function (userConfirmExtendOptions) {\n // if initialized already\n if (newConfirmSettings) {\n newConfirmSettings = commonExtendOptions(true, newConfirmSettings, userConfirmExtendOptions);\n }\n // initialize first\n else {\n commonConsoleError('You have to initialize the Confirm module before call Merge function.');\n return false;\n }\n },\n // Show\n show: function (title, message, okButtonText, cancelButtonText, okButtonCallback, cancelButtonCallback, options) {\n confirmCreate(typesConfirm.Show, title, message, null, okButtonText, cancelButtonText, okButtonCallback, cancelButtonCallback, options);\n },\n // Ask\n ask: function (title, question, answer, okButtonText, cancelButtonText, okButtonCallback, cancelButtonCallback, options) {\n confirmCreate(typesConfirm.Ask, title, question, answer, okButtonText, cancelButtonText, okButtonCallback, cancelButtonCallback, options);\n },\n // Prompt\n prompt: function (title, question, defaultAnswer, okButtonText, cancelButtonText, okButtonCallback, cancelButtonCallback, options) {\n confirmCreate(typesConfirm.Prompt, title, question, defaultAnswer, okButtonText, cancelButtonText, okButtonCallback, cancelButtonCallback, options);\n },\n },\n };\n\n if (typeof window.Notiflix === 'object') {\n return commonExtendOptions(true, window.Notiflix, { Confirm: Notiflix.Confirm });\n } else {\n return { Confirm: Notiflix.Confirm };\n }\n\n});"],"names":["templateBtnAlertaVagas","data","cargo","tipoPaginaID","localidadesSeparadas","btnAlertaVagas","exibirAlertaVagas","possuiAlertaVagas","ID","templateCardAlertaVagas","localidadesSeparadasVirgula","cultura","CULTURE_EMPREGARE","replace","inicializarInternacionalizacao","i18next","isInitialized","lng","debug","defaultNS","resources","fallbackLng","code","slice","addResources","page","Templates","templateVagasSkeletonLoading","html","i","push","join","templateVagas","vagas","sectionVagas","document","querySelector","colSplide","colAlert","length","classList","remove","add","forEach","vaga","stringCidades","cidades","template","logoThumb","empresa","titulo","trabalhoRemoto","trabalhoRemotoTexto","isNullOrEmpty","salario","url","verMais","templateFiltroOptions","dados","tipoDadosNome","count","dado","id","nome","Helpers","scrollToCustom","targetElement","offset","parentElement","offsetParent","targetOffsetTop","offsetTop","window","scrollTo","top","behavior","truncateString","string","maxLength","substring","createStringFiltroFromObject","obj","Object","keys","map","key","Splides","splideTabs","splidesTabs","getElementById","splide","start","perPage","focus","trimSpace","arrows","pagination","isNavigation","autoWidth","gap","mount","splideCursos","splidesCursos","omitEnd","on","querySelectorAll","btn","contains","click","splideVagas","splidesVagas","init","this","Navegacao","scrollComOffset","element","targetId","getAttribute","moveParaSectionComOffsetAoClicar","addEventListener","e","preventDefault","ajustaSombraHeaders","headersPrincipais","headerNavegacao","ajustarSombras","Ajustar","headerPrincipal","IntersectionObserver","entries","entry","isIntersecting","root","threshold","rootMargin","observe","ativaTabAoEntrarNaSection","headerNav","pagina","tabsNavegacao","bootstrap","ScrollSpy","target","body","activateTab","index","go","Vagas","regexFiltros","carregaVagas","filtrosAdicionais","splideList","profissaoInput","skeletonCol","nomeProfissao","value","URL_API","innerHTML","getFetch","resultados","model","btnMaisVagas","eventBtnMaisVagas","configuraFiltros","facets","facet","filtroStringInput","filtroString","valores","_","chave","valor","filterName","estaPresente","keyValor","removeObj","stringToRemove","includes","console","log","dropdownMenu","offCanvasFilter","fixLabelClosingDropdownMenu","addQuantidadeFiltrosStyleOffcanvas","addQuantidadeFiltrosStyleDesktop","checkboxInputs","checkbox","checked","label","btnsFiltrosDesktop","filtros","btnFiltro","quantidadeFiltrosTotal","filtro","btnTarget","quantidadeFiltrosG","btnDropdownCount","verificaQuantidadeFiltros","closest","offcanvas","quantideFiltros","mySet","Set","textContent","size","offcanvasFiltros","Offcanvas","getInstance","hide","redirecionarParaMaisVagas","filtroAdicional","location","href","button","addBtnsEvents","btnsAplicarFiltros","btnsEliminarFiltros","btnsAplicarFiltrosOffCanvas","btnsEliminarFiltrosOffCanvas","removeTodosFiltrosCheckbox","inputs","input","name","adicionaTodosFiltrosCheckbox","Accordion","configAccordion","accordionSection","accordionElement","accordionTabs","accordionContents","accordionCol","heighOriginalAccordionCol","offsetHeight","ajustaEstilosAccordion","tab","accordionTabContent","cssText","styleTemp","style","createElement","head","appendChild","content","innerWidth","navTabs","nav","setTimeout","abrirTabAccordionOnScrollMobile","accordionTab","boundingClientRect","y","rootBounds","abrirTabOnScroll","adicionarVerMaisCursos","cursosSection","cardCurso","textos","btnVerMais","btnVerMenos","conteudoTodosTextos","texto","insertAdjacentHTML","textoCard","textoCompleto","textoTruncado","profissaoDetalhes","profissaoID","async","source","obterQueryString","campanha","salvarCookie","_definirOrigemCadastro","formData","FormData","append","obterOrigem","hostname","obterDispositivo","fetch","method","referer","origem","obterCookie","o","_insights","alertaVagas","profissaoTitulo","blocoBtns","botao","getElementsByClassName","Init","AlertaVaga","constructor","modalGenerico","vagaID","adicionais","alertaID","localidade","split","recarregar","cargos","bind","submitForm","excluir","loadFullPage","mostrar","resultado","ok","esconder","toastErroCarregar","text","formValidar","errorFieldCssClass","focusInvalidField","lockForm","addField","rule","errorMessage","onSuccess","removeField","contagemOptions","option","selected","cidade","then","default","TomSelect","plugins","maxItems","create","persist","createOnBlur","searchField","createFilter","render","no_results","escape","option_create","onInitialize","getValue","settings","placeholder","control_input","setAttribute","clearOptions","onChange","values","isBtnCriarAlerta","dispatchEvent","Event","modalBootstrap","Modal","backdrop","show","Confirm","className","titleColor","okButtonColor","okButtonBackground","cancelButtonColor","callbackSucesso","reload","bubbles","toastSucesso","callbackErro","mensagem","postFetch","event","callBackErro","erroAutenticacao","get","delete","chaveLocalStorageBuscasRecentesCargo","chaveLocalStorageBuscasRecentesLocalizacao","chaveLocalStorageCidadesSugestoes","sugestoesCidadesPadrao","templatesVagaBuscasRecentes","headerListagem","container","info","prepend","itemCargoListagem","elemento","match","el","buscaId","dataset","dadosSalvos","vagasBuscasRecentesCargoObter","dadosSalvosNovo","filter","x","localStorage","setItem","JSON","stringify","vagasBuscasRecentesCargoRemover","itemLocalizacaoListagem","undefined","buscaRecente","vagasBuscasRecentesLocalizacaoObter","vagasBuscasRecentesLocalizacaoRemover","autocompleteBuscaRecenteLocalizacao","formHeaderBuscarVagas","seletorInput","sugestoes","autoComplete","sugestoesCidades","buscasRecentesLocalizacao","exibirSugestoesCidades","exibindoCidadesAPI","autoCompleteLocalizacao","diacritics","submit","selector","placeHolder","debounce","src","query","retorno","querySemAcentos","toLowerCase","_dadosDoLocalStorage","item","nomeSemAcentos","normalize","requestCidades","json","error","resultsList","noResults","maxResults","list","temBuscasRecentes","linhaSeparadora","headerSugestoes","concat","reverse","seenIds","has","resultItem","highlight","events","selection","detail","nextSibling","objetoSelecionado","inputLocalizacao","valorAntesLoading","cb","cacheSugestoesCidades","sessionStorage","getItem","parse","getGeoData","geoData","baseURLAPI","hotSiteEmpresaID","hotSiteUrl","parametrosURL","URLSearchParams","request","toString","response","sucesso","topCidades","splice","remoto","cidadeObject","find","existe","cidadeCompleta","unshift","obterSugestoesCidades","eventoBuscarVagaRedirect","tomSelectBuscaLocalizacao","multiple","valueField","labelField","preload","load","callback","currentValue","Array","isArray","hasValue","avisoAssuntoSelecionado","todoFormulario","opcoesSubcategorias","selectAssuntoSubcategoria","clear","addOptions","setValue","erro","onItemAdd","setTextboxValue","close","tomSelectInstance","allOptionKeys","options","selectedKeys","ispermanent","removeOption","clearDynamicOptions","autocompleteBuscaRecenteCargo","form","autocompleteCargo","vagasBuscasRecentesCargoAdicionar","trim","arrayDados","dadoParaInserir","uuid","vagasBuscasRecentesLocalizacaoAdicionar","localizacao","inputCargo","callbackErroConexao","exibirToastErroConexao","exibirToastErroServidor","headers","findLoader","_removeLoader","nameEQ","ca","cookie","c","charAt","indexOf","navigator","userAgent","referrer","Proxy","search","searchParams","prop","array","iterator","getAll","days","expires","date","Date","setTime","getTime","toUTCString","Notify","failure","success","addTrack","mixpanel","empresaID","hotsite","dispositivo","track","dt","r","Math","random","floor","validarResultado","status","Sucesso","__defProp","defineProperty","__publicField","enumerable","configurable","writable","__defNormalProp","EMAIL_REGEXP","NUMBER_REGEXP","PASSWORD_REGEXP","STRONG_PASSWORD_REGEXP","Rules","Rules2","GroupRules","GroupRules2","CustomStyleTagIds","CustomStyleTagIds2","defaultDictionary","Required","dict","en","Email","MaxLength","MinLength","Password","StrongPassword","Number","MaxNumber","MinNumber","MinFilesCount","MaxFilesCount","Files","isPromise","val","getClassList","cls","isElement","Element","HTMLDocument","defaultGlobalConfig","errorFieldStyle","color","border","successFieldCssClass","errorLabelStyle","errorLabelCssClass","successLabelCssClass","testingMode","validateBeforeSubmitting","JustValidate","globalConfig","dictLocale","Map","field","fieldIds","fieldSelector","k","String","set","tooltips","refresh","lastScrollPosition","scrollY","isScrollTick","requestAnimationFrame","refreshAllTooltips","ev","isSubmitted","validateHandler","foundKey","fields","elem","validateField","currentGroup","groupFields","group","elems","validateGroup","handleFieldChange","handleGroupChange","renderErrors","initialize","errors","isValid","errorLabels","successLabels","eventListeners","customStyleTags","currentLocale","Error","setForm","HTMLFormElement","isTooltip","styleTag","Label","addListener","handleDocumentScroll","getLocalisedString","ruleValue","customMsg","_a","localisedStr","getFieldErrorMessage","fieldRule","msg","getElemValue","getFieldSuccessMessage","successMessage","getGroupErrorMessage","groupRule","getGroupSuccessMessage","setFieldInvalid","setFieldValid","setGroupInvalid","setGroupValid","type","files","validateGroupRule","every","validateFieldRule","afterInputChanged","elemValue","plugin","newVal","isEmpty","test","len","isLengthMoreThanMax","isLengthLessThanMin","isPassword","isStrongPassword","isNumber","num","isNaN","isNumberMoreThanMax","isNumberLessThanMin","CustomRegexp","regexp","RegExp","str","isFinite","filesConfig","isFilePropsInvalid","file","fileConfig","minSizeInvalid","minSize","maxSizeInvalid","maxSize","nameInvalid","names","extInvalid","extensions","typeInvalid","types","fileIdx","validator","result","asyncCheckPending","promise","resp","catch","promises","rules","res","config","Promise","allSettled","revalidateField","getKeyByFieldSelector","resolve","finally","clearFieldStyle","clearFieldLabel","renderFieldError","reject","afterSubmitValidation","forceRevalidation","validate","revalidate","_b","unlockForm","onSuccessCallback","call","onFailCallback","removeListener","formSubmitHandler","handler","func","removeEventListener","setKeyByFieldSelector","setListeners","getListenerType","handlerChange","clearErrors","removeGroup","addRequiredGroup","groupField","childrenInputs","from","parent","groups","parents","reversedParents","groupElem","getClosestParent","els","parentNode","getNodeParents","elem2","isDirty","_c","_d","errorStyle","key2","successStyle","successFieldStyle","_a2","tooltip","disabled","pointerEvents","webkitFilter","removeAttribute","renderTooltip","errorLabel","position","left","width","height","getBoundingClientRect","errorLabelRect","pos","direction","createErrorLabelElem","customErrorLabelStyle","assign","testId","createSuccessLabelElem","successLabel","customSuccessLabelStyle","successLabelStyle","renderErrorsContainer","errorsContainer","renderGroupLabel","isSuccess","renderFieldLabel","_e","_f","_g","labelElem","tagName","showLabels","isError","fieldName","showErrors","showSuccessLabels","message","renderGroupError","_b2","destroy","getFieldSelectorByKey","setCurrentLocale","locale","onFail","g","newConfirmSettings","typesConfirm","confirmSettings","zindex","distance","backgroundColor","borderRadius","backOverlay","backOverlayColor","rtl","fontFamily","cssAnimation","cssAnimationDuration","cssAnimationStyle","plainText","titleFontSize","titleMaxLength","messageColor","messageFontSize","messageMaxLength","buttonsFontSize","buttonsMaxLength","cancelButtonBackground","commonConsoleError","commonCheckHeadOrBody","commonExtendOptions","extended","deep","prototype","arguments","merge","hasOwnProperty","commonGetPlaintext","htmlPool","innerText","confirmGetInternalCSSCodes","confirmCreate","confirmType","title","messageOrQuestion","answer","okButtonText","cancelButtonText","okButtonCallback","cancelButtonCallback","Notiflix","newConfirmSettingsBackup","ntflxConfirmWrap","zIndex","padding","confirmPosition","confirmOverlay","cancelButtonHTML","setValidationInput","theExpectedAnswer","theClientAnswer","inputMaxLength","ceil","confirmCloseWrap","okButton","validationInput","setSelectionRange","thisValue","toLocaleLowerCase","keyCode","stopPropagation","returnValue","cancelBubble","timeout","removeChild","clearTimeout","userConfirmOptions","getInternalCSSCodes","styleElementId","internalCSS","commonSetInternalCSSCodes","userConfirmExtendOptions","ask","question","prompt","defaultAnswer","factory"],"sourceRoot":""}