Files
boc/landvex-site/assets/VerifyIdentity-CVO73JZ2.js
T

8 lines
31 KiB
JavaScript
Raw Normal View History

import{x as he,a as ge,r as d,j as e,y as b,z as N,v as m,X as ke,w as P,u as je,aQ as ye,aR as be,p as Ne,a9 as ve}from"./index-CZD3_4lD.js";import{S as W}from"./shield-DIM7u0gp.js";import{F as _e}from"./file-text-I90VDyBK.js";import{C as Se}from"./clock-CHYQgZWG.js";import{S as $}from"./SecureCamera-0VtB9UCG.js";import{C as we}from"./credit-card-C9X53A_j.js";import{A as Y}from"./arrow-left-DyClWdEf.js";import{A as Ce}from"./index-DXB3_sFe.js";import{C as Q}from"./circle-check-60AjePHB.js";import{R as Ie}from"./refresh-cw-CCL0Gd2i.js";import{C as De}from"./circle-alert-DFiBooaQ.js";import"./check-CCL32zXH.js";/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Te=he("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),ee={light:()=>{"vibrate"in navigator&&navigator.vibrate(10)},medium:()=>{"vibrate"in navigator&&navigator.vibrate([15,50,15])},heavy:()=>{"vibrate"in navigator&&navigator.vibrate([20,30,20,30,20])},success:()=>{"vibrate"in navigator&&navigator.vibrate([10,50,20])}},Re="1.0.0",se="qz_anon_session_id";function Ae(){let u=localStorage.getItem(se);return u||(u=crypto.randomUUID(),localStorage.setItem(se,u)),u}function Me({onConsent:u,onDecline:S}){const{t:k}=ge(),[i,z]=d.useState(!1),[l,w]=d.useState(!1),[h,K]=d.useState(!1),[g,r]=d.useState(!1),U=async()=>{if(!g){P.error("Du måste bekräfta att du är minst 18 år");return}if(!h){P.error("Du måste godkänna villkoren för att fortsätta");return}w(!0);try{const x=localStorage.getItem("qz_token"),D={"Content-Type":"application/json"};x&&(D.Authorization=`Bearer ${x}`);const H={consent_type:"biometric_collection",text_version:Re,retention_days:30};x||(H.anon_session_id=Ae());const M=await fetch("https://api.quixzoom.com/api/qz/identity/consent",{method:"POST",headers:D,body:JSON.stringify(H)});if(!M.ok){const v=await M.json().catch(()=>({}));throw new Error(v.error??"Kunde inte spara samtycke")}const{consentRef:V}=await M.json();u(V)}catch(x){P.error(x.message)}finally{w(!1)}};return e.jsx("div",{className:"p-4 space-y-4",children:e.jsx(b,{className:"border-primary/30",children:e.jsxs(N,{className:"pt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center",children:e.jsx(W,{className:"w-6 h-6 text-primary"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-semibold text-lg",children:"Samtycke till biometrisk insamling"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Krävs innan verifiering kan påbörjas"})]})]}),e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(_e,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),e.jsxs("p",{children:[e.jsx("strong",{children:"Vad samlas in:"})," Foto på ID-handling (framsida) samt selfie för ansiktsmatchning."]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Se,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),e.jsxs("p",{children:[e.jsx("strong",{children:"Lagringstid:"})," Bilderna raderas automatiskt efter 30 dagar. Endast verifieringsresultatet (godkänd/nekad) sparas längre."]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(W,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),e.jsxs("p",{children:[e.jsx("strong",{children:"Rättslig grund:"})," Ditt uttryckliga samtycke (GDPR Art. 9.2.a). Du kan återkalla samtycket när som helst via dina kontoinställningar."]})]})]}),e.jsx("div",{className:"text-center",children:e.jsx("a",{href:"/identity-disclaimer",target:"_blank",className:"text-xs text-primary underline underline-offset-2",children:"Läs fullständiga villkor →"})}),e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:g,onChange:x=>r(x.target.checked),className:"mt-1 w-4 h-4"}),e.jsxs("span",{className:"text-sm font-medium",children:["Jag bekräftar att jag är minst ",e.jsx("strong",{children:"18 år"})," och har legal handlingsförmåga att ingå detta avtal."]})]}),e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:h,onChange:x=>K(x.target.checked),className:"mt-1 w-4 h-4"}),e.jsx("span",{className:"text-sm",children:"Jag förstår och samtycker till insamling och bearbetning av biometrisk data för identitetsverifiering enligt villkoren ovan."})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs(m,{variant:"outline",onClick:S,className:"flex-1",disabled:l,children:[e.jsx(ke,{className:"w-4 h-4 mr-2"}),"Avböj"
//# sourceMappingURL=VerifyIdentity-CVO73JZ2.js.map