PageSourceSearch

https://www.cazuz.net/assets/AccountData-Bb-hb4KY.js

js cazuz.net collected 2026-09-24 15:06:34 UTC 5,900 bytes, 1 lines download raw bytes

1import{j as e,L as m,a as k,u as T,r as n,av as E,aw as A,ax as f,ay as z,az as L,aA as P}from"./index-xAcnt55L.js";import{c as Y}from"./billing-CAQ7E4YD.js";import{u as B}from"./useToast-wEOjbbgr.js";const j="DELETE";function O(a){const t=new Date(a);return Number.isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{day:"numeric",month:"long",year:"numeric"})}function g(a){return a instanceof Error?a.message:String(a)}function $(){const{toast:a,showToast:t}=B();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ac-header",children:[e.jsx("h1",{children:"Data & privacy"}),e.jsx("p",{className:"ac-sub",children:"What we keep, and how to delete it."})]}),e.jsxs("section",{className:"ac-card",children:[e.jsx("h2",{className:"ac-card-title",children:"Student privacy"}),e.jsx("p",{className:"ac-card-desc",children:"Students join as guests. Cazuz stores no student accounts, emails or passwords — a student types a nickname, plays, and that nickname is all that reaches your report. Nothing identifies them outside your own classroom."}),e.jsxs("p",{className:"ac-card-desc",style:{marginBottom:0},children:["The full detail is in our"," ",e.jsx(m,{className:"ac-link",to:"/privacy",children:"Privacy policy"})," and"," ",e.jsx(m,{className:"ac-link",to:"/terms",children:"Terms"}),"."]})]}),e.jsxs("section",{className:"ac-card",children:[e.jsx("h2",{className:"ac-card-title",children:"Your data"}),e.jsx("p",{className:"ac-card-desc",children:"Your activities, your reports and your profile belong to you. Ask us for a copy and we will send it to the email on your account."}),e.jsx("div",{className:"ac-actions ac-actions--start",children:e.jsx(m,{className:"ac-btn-ghost",to:"/feedback?topic=data&from=account",children:"Request a copy of your data"})})]}),e.jsx(R,{onToast:t}),a&&e.jsx("div",{className:`ac-toast${a.tone==="error"?" is-error":""}`,role:"status","aria-live":"polite",children:a.text})]})}function R({onToast:a}){const{user:t,plan:N,planLoading:o,signOut:v}=k(),b=T(),[i,d]=n.useState(null),[D,p]=n.useState(!1),[y,u]=n.useState(""),[c,l]=n.useState(!1),[x,r]=n.useState(null),h=!o&&E(N);n.useEffect(()=>{if(!t){d(null);return}let s=!1;return(async()=>{try{const S=await A();s||d(S)}catch{s||d({state:"active"})}})(),()=>{s=!0}},[t]);const C=async()=>{if(!o){r(null),l(!0);try{if(h)try{await Y("Account deleted from Cazuz.")}catch{r("We couldn't cancel your paid plan — cancel it under Plan & billing first, then delete."),l(!1);return}await L(),t!=null&&t.id&&P(t.id),await v(),b("/login",{replace:!0})}catch(s){r(`Couldn't schedule the deletion — ${g(s)}`),l(!1)}}},w=async()=>{l(!0);try{await z(),d({state:"active"}),a("Deletion cancelled. Your account is active again.")}catch(s){a(`Couldn't cancel the deletion — ${g(s)}`,"error")}finally{l(!1)}};return(i==null?void 0:i.state)==="scheduled"?e.jsxs("section",{className:"ac-card ac-danger-card",children:[e.jsx("h2",{className:"ac-card-title",children:"Delete account"}),e.jsx("div",{className:"ac-banner is-amber",style:{marginBottom:16},children:e.jsxs("span",{className:"ac-banner-text",children:["Your account is scheduled for deletion on"," ",e.jsx("strong",{children:O(i.scheduledDeleteAt)}),". On that date your account, every activity you have created and every report tied to them are removed for good."]})}),e.jsx("div",{className:"ac-actions ac-actions--start",children:e.jsxs("button",{type:"button",className:"ac-btn-primary",onClick:w,disabled:c,children:[c&&e.jsx("span",{className:"ac-spin","aria-hidden":!0}),c?"Cancelling":"Cancel deletion"]})})]}):e.jsxs("section",{className:"ac-card ac-danger-card",children:[e.jsx("h2",{className:"ac-card-title",children:"Delete account"}),e.jsxs("p",{className:"ac-card-desc",children:["Deleting is permanent after ",f," days. Until then you can undo it just by signing back in."]}),h&&e.jsx("div",{className:"ac-banner is-amber",style:{marginBottom:16},children:e.jsx("span",{className:"ac-banner-text",children:"You have an active paid plan. Deleting your account cancels it at the end of the current period; you will not be charged again."})}),D?e.jsxs("div",{className:"ac-confirm",children:[e.jsx("h3",{className:"ac-card-title",children:"Delete your account?"}),e.jsx("p",{className:"ac-card-desc",style:{marginBottom:10},children:"This removes:"}),e.jsxs("ul",{className:"ac-list",children:[e.jsx("li",{children:"your Cazuz account and profile"}),e.jsx("li",{children:"every activity you have created — Live Quiz, Tug of War, Self-paced and Carnival"}),e.jsx("li",{children:"every report and every student result tied to them"}),h&&e.jsx("li",{children:"your paid plan, cancelled at the end of the peri
1od you already paid for"})]}),e.jsxs("p",{className:"ac-card-desc",children:["Scheduled for deletion in ",f," days. Sign in again before then to cancel. You will be signed out as soon as you confirm."]}),e.jsxs("div",{className:"ac-row",children:[e.jsxs("label",{className:"ac-label",htmlFor:"ac-del-confirm",children:["Type ",j," to confirm"]}),e.jsx("input",{id:"ac-del-confirm",className:"ac-input",type:"text",value:y,onChange:s=>u(s.target.value),autoComplete:"off",autoCapitalize:"characters",spellCheck:!1,disabled:c})]}),x&&e.jsx("p",{className:"ac-hint is-error",role:"alert",children:x}),e.jsxs("div",{className:"ac-actions",children:[e.jsx("button",{type:"button",className:"ac-btn-ghost",onClick:()=>{p(!1),u(""),r(null)},disabled:c,children:"Keep my account"}),e.jsxs("button",{type:"button",className:"ac-btn-danger-ghost",onClick:C,disabled:c||o||y.trim()!==j,children:[c&&e.jsx("span",{className:"ac-spin","aria-hidden":!0}),c?"Scheduling":"Delete my account"]})]})]}):e.jsx("div",{className:"ac-actions ac-actions--start",children:e.jsx("button",{type:"button",className:"ac-btn-danger-ghost",onClick:()=>{p(!0),u(""),r(null)},disabled:!i||o,children:"Delete my account"})})]})}export{$ as AccountData,$ 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.