PageSourceSearch

https://www.nube.com.br/assets/ModalTermoPrivacidade-NDe6LckQ.js

js nube.com.br collected 2026-10-02 15:10:47 UTC 3,153 bytes, 1 lines download raw bytes

1import{a as h}from"./rolldown-runtime-M0oDzQ_3.js";import{$ as y,H as n,St as w,g as a,h as k,nt as C,o as T,pt as d,t as P,v as I,w as M,x as _,y as u}from"./vue-runtime-9C-mtgys.js";import{o as S}from"./vue-vendor-CgubV_Jm.js";import{n as A,t as B}from"./axios-BLb1gsSW.js";import{a as E,c as L,o as N,r as D,s as H}from"./index-DZrIbYXQ.js";import{t as V}from"./nprogress-CBv5KM4Q.js";P();var f=h(V(),1);async function O(){return(await B.post("/api/portal/gravar_aceite_termo")).data?.param?.termo_assinado===!0}var j={key:0,class:"fixed inset-0 bg-black/60 z-[60] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"modal-termo-titulo"},z={class:"bg-white dark:bg-gray-600 dark:text-white rounded-2xl overflow-hidden shadow-lg w-full max-w-[700px] max-h-[90vh] flex flex-col"},F={class:"p-5 sm:p-8 overflow-y-auto flex-1"},R={key:0,class:"bg-gray-100 dark:bg-gray-800 p-8 rounded-lg my-5"},q=["innerHTML"],U={class:"p-5 border-t dark:border-gray-500"},W={class:"flex items-start gap-2 cursor-pointer mb-4"},$=["disabled"],c="PoliticaPrivacidade",G="/politica-uso-privacidade",J=M({__name:"ModalTermoPrivacidade",setup(K){const i=D(),m=E(),b=S(),p=k(()=>!b.path.startsWith(G)&&i.isLoggedIn&&i.tipoLogin==="estudante"&&i.session?.termo_assinado===!1),t=d(""),l=d(!1),o=d(!1),r=d(!1),v=async()=>{if(!t.value){l.value=!0;try{const s=await N(c);if(s?.conteudo)t.value=s.conteudo;else{const e=await A.get("/api/portal/buscar-politica-privacidade/json");e.data.status===200&&e.data.param&&(t.value=e.data.param.conteudo,L(c,e.data.param,"3600"))}}catch{m.show("Erro ao carregar a política de privacidade. Tente novamente.","error","Erro")}finally{l.value=!1}}},g=async()=>{if(!(r.value||!o.value)){r.value=!0,f.default.start();try{if(await O()){await i.fetchSession();return}m.show("Não foi possível registrar o aceite.","error","Termo de uso"),t.value="",await H(c),v()}finally{r.value=!1,f.default.done()}}};return y(p,s=>{s&&v()},{immediate:!0}),(s,e)=>p.value?(n(),u("div",j,[a("div",z,[e[3]||(e[3]=a("header",{class:"p-5 bg-orange-600"},[a("h1",{id:"modal-termo-titulo",class:"text-center font-bold md:text-2xl text-white"}," Mudamos o nosso termo de política de uso e privacidade de dados ")],-1)),a("div",F,[l.value?(n(),u("div",R,[...e[1]||(e[1]=[a("p",{class:"text-center font-bold"},"Carregando política...",-1)])])):(n(),u("div",{key:1,class:"prose max-w-none dark:prose-invert text-sm",innerHTML:t.value},null,8,q))]),a("div",U,[a("label",W,[C(a("input",{"onUpdate:modelValue":e[0]||(e[0]=x=>o.value=x),type:"checkbox",class:"mt-1 bg-white dark:text-black"},null,512),[[T,o.value]]),e[2]||(e[2]=a("span",null,[_(" Estou ciente das mudanças na "),a("a",{class:"font-bold text-orange-600 underline",href:"/politica-uso-privacidade",target:"_blank",rel:"noopener"}," Política de uso e privacidade de dados "),_(" do portal do Nube. ")],-1))]),a("button",{type:"button",disabled:!o.value||r.value,class:w([!o.value||r.value?"bg-gray-600 cursor-not-allowed":"bg-green-600","btn w-full text-white font-bold py-3 rounded-lg"]),onClick:g}," Continuar ",10,$)])])])):I("",!0)}}),ie=J;export{ie as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.