PageSourceSearch

https://securis.ai/_next/static/chunks/1kbinvnef0ccq.js?dpl=dpl_8GkKFZKtQZ5prYEhyeAacg6Rb2r4

js securis.ai collected 2026-10-05 15:08:49 UTC 33,212 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63855,e=>{"use strict";var t=e.i(83999);function r(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let a=r(0,t.useTranslations);r(0,t.useFormatter),e.s(["useTranslations",0,a])},4495,e=>{"use strict";let t=(0,e.i(89689).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,t],4495)},81617,e=>{"use strict";e.s(["mergeClasses",0,(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()])},96275,34346,e=>{"use strict";e.s(["default",0,{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}],96275),e.s(["hasA11yProp",0,e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1}],34346)},4563,e=>{"use strict";var t=e.i(94099),r=e.i(96275),a=e.i(34346),s=e.i(81617);let i=(0,t.createContext)({}),n=(0,t.forwardRef)(({color:e,size:n,strokeWidth:o,absoluteStrokeWidth:l,className:d="",children:c,iconNode:u,...g},m)=>{let{size:h=24,strokeWidth:x=2,absoluteStrokeWidth:p=!1,color:y="currentColor",className:f=""}=(0,t.useContext)(i)??{},b=l??p?24*Number(o??x)/Number(n??h):o??x;return(0,t.createElement)("svg",{ref:m,...r.default,width:n??h??r.default.width,height:n??h??r.default.height,stroke:e??y,strokeWidth:b,className:(0,s.mergeClasses)("lucide",f,d),...!c&&!(0,a.hasA11yProp)(g)&&{"aria-hidden":"true"},...g},[...u.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(c)?c:[c]])});e.s(["default",0,n],4563)}
1,89689,e=>{"use strict";var t=e.i(94099),r=e.i(81617);let a=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var s=e.i(4563);e.s(["default",0,(e,i)=>{let n=(0,t.forwardRef)(({className:n,...o},l)=>(0,t.createElement)(s.default,{ref:l,iconNode:i,className:(0,r.mergeClasses)(`lucide-${a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...o}));return n.displayName=a(e),n}],89689)},21753,e=>{"use strict";let t=(0,e.i(89689).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],21753)},80827,e=>{"use strict";let t=null;function r(){return t||(t=fetch("/api/auth/me",{cache:"no-store"}).finally(()=>{t=null})),t.then(e=>e.clone())}async function a(e,t){let a=await fetch(e,t);return 401===a.status&&(await r()).ok?fetch(e,t):a}e.s(["fetchAuthSession",0,r,"fetchWithAuthRetry",0,a])},142,e=>{"use strict";let t=(0,e.i(89689).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",0,t],142)},91071,e=>{"use strict";let t=(0,e.i(89689).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],91071)},24377,e=>{"use strict";let t=(0,e.i(89689).default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,t],24377)},6617,e=>{"use strict";let t=(0,e.i(89689).default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);e.s(["KeyRound",0,t],6617)},33127,e=>{"use strict";let t=(0,e.i(89689).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,t],33127)},84744,73351,e=>{"use strict";var t=e.i(89689);let r=(0,t.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,r],84744);let a=(0,t.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",0,a],73351)},35787,e=>{"use strict";e.i(38040);var t=e.i(71608),r=e.i(4346),a=e.i(4495),s=e.i(142),i=e.i(89689);let n=(0,i.default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var o=e.i(33127),l=e.i(94099),d=e.i(90072);function c(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim()}function u({value:e,onChange:r,options:i,label:g,placeholder:m,searchPlaceholder:h,emptyMessage:x,helperText:p,clearable:y=!1}){let[f,b]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[v,j]=(0,l.useState)(0),C=(0,l.useRef)(null),N=(0,l.useRef)(null),E=(0,l.useRef)(null),S=(0,l.useRef)(null),L=(0,l.useId)(),A=(0,l.useId)(),[P,z]=(0,l.useState)({left:0,top:0,width:280}),T=i.find(t=>t.value===e)||null,M=c(w),R=(0,l.useMemo)(()=>M?i.filter(e=>c([e.value,e.label,e.description,...e.keywords||[]].filter(Boolean).join(" ")).includes(M)):i,[M,i]),D=Math.min(v,Math.max(R.length-1,0));(0,l.useEffect)(()=>{let e=e=>{let t=e.target;C.current?.contains(t)||N.current?.contains(t)||(b(!1),k(""))};return document.addEventListener("pointerdown",e),()=>document.removeEventListener("pointerdown",e)},[]),(0,l.useEffect)(()=>{if(!f||!E.current)return;let e=()=>{let e=E.current?.getBoundingClientRect();if(!e)return;let t=window.innerHeight-e.bottom-12,r=e.top-12,a=Math.min(Math.max(e.width,280),window.innerWidth-24),s=Math.min(Math.max(e.left,12),Math.max(12,window.innerWidth-a-12));z(t<370&&r>t?{left:s,bottom:window.innerHeight-e.top+8,width:a}:{left:s,top:e.bottom+8,width:a})};return e(),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[f]),(0,l.useEffect)(()=>
1{if(!f)return;let e=window.requestAnimationFrame(()=>S.current?.focus());return()=>window.cancelAnimationFrame(e)},[f]),(0,l.useEffect)(()=>{f&&R[D]&&document.getElementById(`${L}-${R[D].value}`)?.scrollIntoView({block:"nearest"})},[R,f,L,D]);let O=(e=!1)=>{b(!1),k(""),e&&window.requestAnimationFrame(()=>E.current?.focus())},$=e=>{r(e.value),O(!0)};return(0,t.jsxs)("div",{ref:C,className:"relative",children:[(0,t.jsx)("span",{id:A,className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-200",children:g}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("button",{ref:E,type:"button",onClick:()=>f?O():void(k(""),j(Math.max(i.findIndex(t=>t.value===e),0)),b(!0)),"aria-labelledby":A,"aria-haspopup":"listbox","aria-expanded":f,"aria-controls":L,className:"flex min-h-12 w-full items-center gap-3 rounded-lg border border-gray-300 bg-white px-3 py-2 pr-20 text-left text-sm text-gray-950 shadow-sm transition hover:border-gray-500 focus:border-gray-950 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:border-gray-700 dark:bg-gray-900 dark:text-white dark:hover:border-gray-500 dark:focus:border-white dark:focus:ring-gray-800",children:[T?.leading&&(0,t.jsx)("span",{className:"shrink-0 text-lg leading-none","aria-hidden":"true",children:T.leading}),(0,t.jsx)("span",{className:"min-w-0 flex-1",children:T?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"block truncate font-medium",children:T.label}),T.description&&(0,t.jsx)("span",{className:"block truncate text-xs text-gray-500 dark:text-gray-400",children:T.description})]}):(0,t.jsx)("span",{className:"text-gray-400 dark:text-gray-500",children:m})}),T&&(0,t.jsx)("span",{className:"shrink-0 rounded-md bg-gray-100 px-2 py-1 font-mono text-[11px] font-semibold uppercase tracking-wide text-gray-600 dark:bg-gray-800 dark:text-gray-300",children:T.value})]}),y&&T&&(0,t.jsx)("button",{type:"button",onClick:()=>{r(""),k(""),E.current?.focus()},"aria-label":`Clear ${g.toLowerCase()}`,className:"absolute right-10 top-1/2 z-10 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-md text-gray-400 transition hover:bg-gray-100 hover:text-gray-800 dark:text-gray-500 dark:hover:bg-gray-800 dark:hover:text-white",children:(0,t.jsx)(o.X,{size:15})}),(0,t.jsx)(s.ChevronDown,{size:17,"aria-hidden":"true",className:`pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 transition-transform ${f?"rotate-180":""}`})]}),p&&(0,t.jsx)("p",{className:"mt-1.5 text-xs leading-5 text-gray-500 dark:text-gray-400",children:p}),f&&"u">typeof document&&(0,d.createPortal)((0,t.jsxs)("div",{ref:N,className:"fixed z-[220] overflow-hidden rounded-xl border border-gray-200 bg-white shadow-2xl dark:border-gray-700 dark:bg-gray-950",style:P,children:[(0,t.jsx)("div",{className:"border-b border-gray-200 p-3 dark:border-gray-800",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(n,{size:16,"aria-hidden":"true",className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),(0,t.jsx)("input",{ref:S,type:"text",role:"combobox",value:w,onChange:e=>{k(e.target.value),j(0)},onKeyDown:e=>{if("Escape"===e.key){e.preventDefault(),e.stopPropagation(),O(!0);return}if("Home"===e.key&&R.length>0){e.preventDefault(),j(0);return}if("End"===e.key&&R.length>0){e.preventDefault(),j(R.length-1);return}if("ArrowDown"===e.key&&R.length>0){e.preventDefault(),j(e=>Math.min(e+1,R.length-1));return}if("ArrowUp"===e.key&&R.length>0){e.preventDefault(),j(e=>Math.max(e-1,0));return}"Enter"===e.key&&R[D]&&(e.preventDefault(),$(R[D]))},"aria-label":h,"aria-expanded":f,"aria-autocomplete":"list","aria-controls":L,"aria-activedescendant":R[D]?`${L}-${R[D].value}`:void 0,autoComplete:"off",placeholder:h,className:"w-full rounded-lg border border-gray-300 bg-gray-50 py-2.5 pl-10 pr-3 text-sm text-gray-950 outline-none transition placeholder:text-gray-400 focus:border-gray-950 focus:ring-2 focus:ring-gray-200 dark:border-gray-700 dark:bg-gray-900 dark:text-white dark:focus:border-white dark:focus:ring-gray-800"})]})}),(0,t.jsx)("div",{id:L,role:"listbox","aria-labelledby":A,className:"max-h-64 overflow-y-auto p-1",children:0===R.length?(0,t.jsx)("div",{className:"px-4 py-6 text-center text-sm text-gray-500 dark:text-gray-400",children:x}):R.map((r,s)=>{let i=r.value===e,n=s===D;return(0,t.jsxs)("button",{id:`${L}-${r.value}`,type:"button",role:"option",tabIndex:-1,"aria-selected":i,onMouseEnter:()=>j(s),onClick:()=>$(r),className:`flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left text-sm transition ${i?"bg-gray-950 text-white dark:bg-white dark:text-gray-950":n?"bg-gray-100 text-gray-950 dark:bg-gray-800 dark:text-white":"text-gray-700 hover:bg-gray-50 dark:text-gray-200 dark:hover:bg-gray-900"}`,children:[r.leading&&(0,t.jsx)("span",{className:"shrink-0 text-lg leading-none","aria-hidden":"true",children:r.leading}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block truncate font-medium",children:r.label}),r.description&&(0,t.jsx)("span",{className:`block truncate text-xs ${i?"text-white/70 dark:text-gray-600":"text-gray-500 dark:text-gray-400"}`,children:r.description})]}),(0,t.jsx)("span",{className:`shrink-0 font-mono text-[11px] font-semibold uppercase ${i?"text-white/70 dark:text-gray-600":"text-gray-400"}`,children:r.value}),(0,t.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:i&&(0,t.jsx)(a.Check,{size:16})})]},r.value)})})]}),document.body)]})}var g=e.i(44705),m=e.i(80827),h=e.i(40085),x=e.i(91071);let p=(0,i.default)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var y=e.i(84744),f=e.i(73351),b=e.i(6617),w=e.i(21753),k=e.i(54029);let v=(0,i.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),j=(0,i.default)("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);var C=e.i(24377),N=e.i(39331),E=e.i(83999),S=e.i(63855);let L={permissionCode:"",email:"",username:"",password:"",mainLanguageCode:"",registerFromCountryCode:"",sessionToken:"",otpCode:""},A={email:"",sessionToken:"",otpCode:"",newPassword:""};function P(e){return e.toUpperCase().replace(/[^A-Z]/g,"").slice(0,6)}async function z(e,t){let r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),a=await r.json();if(!r.ok||!1===a.success)throw Error(a.error?.message||"Request failed");return a}function T({label:e,characterLabel:r,value:a,onChange:s}){let i=(0,l.useRef)([]),n=Array.from({length:6},(e,t)=>a[t]||"");return(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-200",children:e}),(0,t.jsx)("div",{className:"grid grid-cols-6 gap-2 sm:gap-3",children:n.map((e,a)=>(0,t.jsx)("input",{ref:e=>{i.current[a]=e}
1,value:e,onChange:e=>{let t,r=P(e.target.value);if(r.length>1){s(r),i.current[Math.min(r.length,6)-1]?.focus();return}(t=n.slice())[a]=r,s(P(t.join(""))),r&&a<5&&i.current[a+1]?.focus()},onKeyDown:t=>{"Backspace"===t.key&&!e&&a>0&&i.current[a-1]?.focus()},onPaste:e=>{e.preventDefault();let t=P(e.clipboardData.getData("text"));t&&(s(t),i.current[Math.min(t.length,6)-1]?.focus())},className:"h-12 rounded-lg border border-gray-300 bg-white text-center text-lg font-semibold uppercase text-gray-950 shadow-sm transition focus:border-gray-950 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:border-gray-700 dark:bg-gray-900 dark:text-white dark:focus:border-white dark:focus:ring-gray-800 sm:h-14 sm:text-xl",inputMode:"text",autoCapitalize:"characters",autoComplete:0===a?"one-time-code":"off","aria-label":`${r} ${a+1}`,maxLength:6,required:!0},a))})]})}function M({score:e,labels:r}){return 0===e?null:(0,t.jsxs)("div",{className:"-mt-2",children:[(0,t.jsx)("div",{className:"h-2 overflow-hidden rounded-full bg-gray-100 dark:bg-gray-800",children:(0,t.jsx)("div",{className:`h-full ${e<3?"bg-red-500":e<5?"bg-amber-500":"bg-emerald-500"}`,style:{width:`${16.66*Math.min(e,6)}%`}})}),(0,t.jsx)("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:r[Math.max(0,e-1)]})]})}function R({label:e,resetKey:a,siteKey:s,onVerify:i}){return(0,t.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 p-3 dark:border-gray-800 dark:bg-gray-900/60",children:[(0,t.jsx)("p",{className:"mb-2 text-xs font-medium uppercase tracking-[0.12em] text-gray-500 dark:text-gray-400",children:e}),(0,t.jsx)(r.Turnstile,{siteKey:s,onVerify:i},a)]})}function D({icon:e,label:r,children:a}){return(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-200",children:r}),(0,t.jsxs)("span",{className:"flex min-h-12 items-center gap-3 rounded-lg border border-gray-300 bg-white px-3 text-gray-500 transition focus-within:border-gray-950 focus-within:ring-2 focus-within:ring-gray-200 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-400 dark:focus-within:border-white dark:focus-within:ring-gray-800",children:[e,a]})]})}function O({label:e,value:r,showPassword:a,onToggle:s,onChange:i,autoComplete:n,placeholder:o,showLabel:l,hideLabel:d}){return(0,t.jsxs)(D,{icon:(0,t.jsx)(k.LockKeyhole,{size:18}),label:e,children:[(0,t.jsx)("input",{type:a?"text":"password",value:r,onChange:e=>i(e.target.value),className:"account-input",autoComplete:n,placeholder:o,required:!0}),(0,t.jsx)("button",{type:"button",onClick:s,className:"rounded-md p-1 text-gray-500 transition hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white","aria-label":a?d:l,children:a?(0,t.jsx)(f.EyeOff,{size:18}):(0,t.jsx)(y.Eye,{size:18})})]})}function $({label:e,value:r,onChange:a}){return(0,t.jsx)(D,{icon:(0,t.jsx)(b.KeyRound,{size:18}),label:e,children:(0,t.jsx)("input",{value:r,onChange:e=>a(e.target.value.replace(/\D/g,"").slice(0,6)),className:"account-input tracking-[0.35em]",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000000",required:!0})})}function U({children:e,isLoading:r,disabled:a=!1}){return(0,t.jsxs)("button",{type:"submit",disabled:r||a,className:"flex min-h-12 w-full items-center justify-center gap-2 rounded-lg bg-gray-950 px-4 py-3 text-sm font-semibold text-white transition hover:bg-gray-800 disabled:cursor-not-allowed disabled:bg-gray-400 dark:bg-white dark:text-gray-950 dark:hover:bg-gray-200 dark:disabled:bg-gray-700 dark:disabled:text-gray-400",children:[r&&(0,t.jsx)(w.Loader2,{size:17,className:"animate-spin"}),e]})}e.s(["AuthPage",0,function({presentation:e="page",initialMode:r="login",onAuthenticated:s,redirectTo:i="/account/dashboard",redirectAuthenticated:n="page"===e}={}){let o=(0,g.useRouter)(),d=(0,E.useLocale)(),c=(0,S.useTranslations)("account.auth"),y=(0,h.normalizeMainLanguageCode)(d),[f,k]=(0,l.useState)(r),[q,K]=(0,l.useState)("details"),[F,I]=(0,l.useState)(!1),[_,V]=(0,l.useState)(!1),[B,W]=(0,l.useState)(!1),[Z,G]=(0,l.useState)("email"),[H,J]=(0,l.useState)(!1),[X,Y]=(0,l.useState)("0x4AAAAAABA5xUwhWzBpVuN5"),[Q,ee]=(0,l.useState)(""),[et,er]=(0,l.useState)(0),[ea,es]=(0,l.useState)(!1),[ei,en]=(0,l.useState)(""),[eo,el]=(0,l.useState)(""),[ed,ec]=(0,l.useState)({usernameOrEmail:"",password:""}),[eu,eg]=(0,l.useState)(L),[em,eh]=(0,l.useState)(A),[ex,ep]=(0,l.useState)(null),[ey,ef]=(0,l.useState)(!1),eb=eu.mainLanguageCode||y;(0,l.useEffect)(()=>{let e=new URLSearchParams(window.location.search);if("register"===e.get("mode")){k("register");let t=e.get("email");t&&eg(e=>({...e,email:t}))}else n&&(0,m.fetchAuthSession)().then(e=>{e.ok&&o.replace(i)}).catch(()=>void 0)},[n,i,o]),(0,l.useEffect)(()=>
1{if("register"!==f||"details"!==q||eu.username.length<4)return void ep(null);let e=window.setTimeout(async()=>{ef(!0);try{let e=await fetch("/api/auth/check-username-available",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:eu.username})}),t=await e.json();ep(t.data?.content?.[0]?.available===!0)}catch{ep(!1)}finally{ef(!1)}},450);return()=>window.clearTimeout(e)},[f,eu.username,q]),(0,l.useEffect)(()=>{if("register"!==f)return;let e=!0;return I(!1),V(!1),W(!1),fetch("/api/auth/register/config",{cache:"no-store"}).then(async e=>{let t=await e.json();if(!e.ok||!1===t.success)throw Error(t.error?.message||"Unable to load register settings");return t}).then(t=>{if(!e)return;let r=t.data?.content?.[0],a=r?.requiresRegisterCode===!0;V(a),W(!a),K(a?"permission":"details"),I(!0)}).catch(t=>{e&&(V(!0),W(!1),K("permission"),I(!0),el(t instanceof Error?t.message:c("errors.registerSettings")))}),()=>{e=!1}},[f,c]);let ew=(0,l.useMemo)(()=>{let e="register"===f?eu.password:em.newPassword,t=0;return e.length>=8&&(t+=1),e.length>=12&&(t+=1),/[a-z]/.test(e)&&(t+=1),/[A-Z]/.test(e)&&(t+=1),/\d/.test(e)&&(t+=1),/[^a-zA-Z0-9]/.test(e)&&(t+=1),t},[em.newPassword,f,eu.password]),ek=(0,l.useMemo)(()=>"register"===f?F?"permission"===q?c("titles.permissionCode"):"details"===q?c("titles.createAccount"):c("titles.verifyEmail"):c("titles.createAccount"):"forgot"===f?"email"===Z?c("titles.resetPassword"):"verify"===Z?c("titles.checkInbox"):c("titles.newPassword"):c("titles.welcomeBack"),[Z,f,F,q,c]),ev=(0,l.useMemo)(()=>"register"===f?F?"permission"===q?c("subtitles.permissionCode"):"details"===q?c("subtitles.accountDetails"):c("subtitles.verifyEmail"):c("subtitles.checkingRequirements"):"forgot"===f?"email"===Z?c("subtitles.resetEmail"):"verify"===Z?c("subtitles.resetVerify"):c("subtitles.resetPassword"):c("subtitles.login"),[Z,f,F,q,c]),ej=()=>{el(""),en("")},eC=e=>{ej(),ee(""),er(e=>e+1),k(e),I("register"!==e),V(!1),W(!1),K("details"),G("email")},eN=!X||!!Q,eE=()=>{ee(""),er(e=>e+1)},eS=async e=>{e.preventDefault(),ej(),es(!0);try{await z("/api/auth/login",{...ed,turnstileToken:Q}),s?s():o.push(i)}catch(e){eE(),el(e instanceof Error?e.message:c("errors.login"))}finally{es(!1)}},eL=async e=>{e.preventDefault(),ej();let t=P(eu.permissionCode);if(eg(e=>({...e,permissionCode:t})),!/^[A-Z]{6}$/.test(t))return void el(c("feedback.invalidPermissionCode"));es(!0);try{await z("/api/auth/register/code/verify",{code:t}),W(!0),K("details"),en(c("feedback.permissionCodeVerified"))}catch(e){el(e instanceof Error?e.message:c("errors.permissionCode"))}finally{es(!1)}},eA=async e=>{if(e.preventDefault(),ej(),_&&!B){K("permission"),el(c("feedback.permissionCodeRequired"));return}es(!0);try{let e=await z("/api/auth/register/start",{email:eu.email,username:eu.username||void 0,password:eu.password,mainLanguageCode:(0,h.normalizeMainLanguageCode)(eb),registerFromCountryCode:(0,h.normalizeCountryCode)(eu.registerFromCountryCode)||void 0,registerCode:_?eu.permissionCode:void 0,turnstileToken:Q}),t=e.data?.content?.[0]?.sessionToken;eg(e=>({...e,sessionToken:"string"==typeof t?t:e.sessionToken})),K("verify"),en(c("feedback.verificationCodeSent"))}catch(e){eE(),el(e instanceof Error?e.message:c("errors.registration"))}finally{es(!1)}},eP=async e=>{e.preventDefault(),ej(),es(!0);try{let e=await z("/api/auth/register/verify",{sessionToken:eu.sessionToken,otpCode:eu.otpCode}),t=e.data?.content?.[0]?.status;"REGISTRATION_PENDING_PLATFORM_APPROVAL"===t?en(c("feedback.awaitingApproval")):s?s():o.push(i)}catch(e){el(e instanceof Error?e.message:c("errors.verification"))}finally{es(!1)}},ez=async e=>{e.preventDefault(),ej(),es(!0);try{let e=await z("/api/auth/forgot-password",{email:em.email}),t=e.data?.content?.[0]?.sessionToken;eh(e=>({...e,sessionToken:"string"==typeof t?t:e.sessionToken})),G("verify"),en(c("feedback.resetCodeSent"))}catch(e){el(e instanceof Error?e.message:c("errors.passwordReset"))}finally{es(!1)}},eT=async e=>{e.preventDefault(),ej(),es(!0);try{await z("/api/auth/forgot-password/verify",{sessionToken:em.sessionToken,otpCode:em.otpCode}),G("reset"),en(c("feedback.resetCodeVerified"))}catch(e){el(e instanceof Error?e.message:c("errors.verification"))}finally{es(!1)}},eM=async e=>{e.preventDefault(),ej(),es(!0);try{await z("/api/auth/forgot-password/reset",{sessionToken:em.sessionToken,otpCode:em.otpCode,newPassword:em.newPassword}),k("login"),G("email"),en(c("feedback.passwordUpdated"))}catch(e){el(e instanceof Error?e.message:c("errors.passwordUpdate"))}finally{es(!1)}},eR=async()=>{ej(),es(!0);try{await z("/api/auth/resend-otp",{email:eu.email}),en(c("feedback.verificationCodeResent"))}catch(e){el(e instanceof Error?e.message:c("errors.resendCode"))}finally{es(!1)}};return(0,t.jsx)("section",{className:"modal"===e?"w-full":"w-full py-8 md:py-14",children:(0,t.jsxs)("div",{className:"modal"===e?"mx-auto w-full max-w-xl":"mx-auto grid w-full max-w-6xl gap-8 lg:grid-cols-[0.92fr_1.08fr] lg:items-center",children:["page"===e&&(0,t.jsx)("div",{className:"hidden lg:block",children:(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full border border-gray-200 bg-white px-4 py-2 text-sm font-medium text-gray-700 shadow-sm dark:border-gray-800 dark:bg-gray-900 dark:text-gray-200",children:[(0,t.jsx)(C.ShieldCheck,{size:17}),c("intro.badge")]}
1),(0,t.jsxs)("div",{className:"max-w-md space-y-4",children:[(0,t.jsx)("h1",{className:"text-4xl font-semibold tracking-normal text-gray-950 dark:text-white",children:c("intro.title")}),(0,t.jsx)("p",{className:"text-base leading-7 text-gray-600 dark:text-gray-300",children:c("intro.description")})]}),(0,t.jsx)("div",{className:"grid max-w-lg grid-cols-2 gap-3",children:["privateProfile","protectedSessions","businessCard","billingReady"].map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3 py-3 text-sm font-medium text-gray-700 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-200",children:[(0,t.jsx)(a.Check,{size:16,className:"text-emerald-600 dark:text-emerald-400"}),c(`intro.features.${e}`)]},e))})]})}),(0,t.jsxs)("div",{className:"modal"===e?"mx-auto w-full bg-white p-5 dark:bg-gray-950 sm:p-8":"mx-auto w-full max-w-xl rounded-lg border border-gray-200 bg-white p-5 shadow-2xl shadow-gray-200/70 dark:border-gray-800 dark:bg-gray-950 dark:shadow-black/30 sm:p-8",children:[(0,t.jsxs)("div",{className:"mb-7 space-y-2",children:["login"!==f&&(0,t.jsxs)("button",{type:"button",onClick:()=>eC("login"),className:"mb-3 inline-flex items-center gap-2 text-sm font-medium text-gray-500 transition hover:text-gray-950 dark:text-gray-400 dark:hover:text-white",children:[(0,t.jsx)(x.ArrowLeft,{size:16}),c("actions.backToLogin")]}),(0,t.jsx)("h2",{className:"text-2xl font-semibold text-gray-950 dark:text-white",children:ek}),(0,t.jsx)("p",{className:"text-sm leading-6 text-gray-600 dark:text-gray-300",children:ev})]}),ei&&(0,t.jsx)("div",{className:"mb-5 rounded-lg border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm text-emerald-800 dark:border-emerald-900/70 dark:bg-emerald-950/40 dark:text-emerald-200",children:ei}),eo&&(0,t.jsx)("div",{className:"mb-5 rounded-lg border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700 dark:border-red-900/70 dark:bg-red-950/40 dark:text-red-200",children:eo}),"login"===f&&(0,t.jsxs)("form",{className:"space-y-4",onSubmit:eS,children:[(0,t.jsx)(D,{icon:(0,t.jsx)(N.UserRound,{size:18}),label:c("fields.usernameOrEmail"),children:(0,t.jsx)("input",{value:ed.usernameOrEmail,onChange:e=>ec(t=>({...t,usernameOrEmail:e.target.value})),className:"account-input",autoComplete:"username",placeholder:c("placeholders.usernameOrEmail"),required:!0})}),(0,t.jsx)(O,{label:c("fields.password"),value:ed.password,showPassword:H,onToggle:()=>J(e=>!e),onChange:e=>ec(t=>({...t,password:e})),autoComplete:"current-password",placeholder:c("placeholders.password"),showLabel:c("actions.showPassword"),hideLabel:c("actions.hidePassword")}),X&&(0,t.jsx)(R,{label:c("fields.securityCheck"),resetKey:et,siteKey:X,onVerify:ee}),(0,t.jsx)("div",{className:"flex items-center justify-between gap-3",children:(0,t.jsx)("button",{type:"button",onClick:()=>eC("forgot"),className:"text-sm font-medium text-gray-600 underline underline-offset-4 transition hover:text-gray-950 dark:text-gray-300 dark:hover:text-white",children:c("actions.forgotPassword")})}),(0,t.jsx)(U,{isLoading:ea,disabled:!eN,children:c("actions.login")}),(0,t.jsxs)("p",{className:"text-center text-sm text-gray-600 dark:text-gray-300",children:[c("prompts.noAccount")," ",(0,t.jsx)("button",{type:"button",onClick:()=>eC("register"),className:"font-semibold text-gray-950 underline underline-offset-4 dark:text-white",children:c("actions.register")})]})]}),"register"===f&&!F&&(0,t.jsxs)("div",{className:"flex min-h-40 items-center justify-center rounded-lg border border-gray-200 bg-gray-50 text-sm font-medium text-gray-600 dark:border-gray-800 dark:bg-gray-900/50 dark:text-gray-300",children:[(0,t.jsx)(w.Loader2,{size:18,className:"mr-2 animate-spin"}),c("status.checkingAccess")]}),"register"===f&&F&&"permission"===q&&(0,t.jsxs)("form",{className:"space-y-5",onSubmit:eL,children:[(0,t.jsx)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 p-4 dark:border-gray-800 dark:bg-gray-900/50",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-gray-950 text-white dark:bg-white dark:text-gray-950",children:(0,t.jsx)(b.KeyRound,{size:18})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-gray-950 dark:text-white",children:c("fields.permissionCode")}),(0,t.jsxs)("span",{className:"group relative inline-flex",children:[(0,t.jsx)(p,{size:16,className:"text-gray-500 dark:text-gray-400"}),(0,t.jsx)("span",{className:"pointer-events-none absolute left-1/2 top-6 z-20 w-64 -translate-x-1/2 roun
1ded-lg border border-gray-200 bg-white px-3 py-2 text-xs leading-5 text-gray-600 opacity-0 shadow-xl transition group-hover:opacity-100 dark:border-gray-800 dark:bg-gray-950 dark:text-gray-300",children:c("help.permissionCodeTooltip")})]})]}),(0,t.jsx)("p",{className:"mt-1 text-sm leading-6 text-gray-600 dark:text-gray-300",children:c("help.permissionCodeDescription")})]})]})}),(0,t.jsx)(T,{label:c("fields.enterCode"),characterLabel:c("fields.permissionCodeCharacter"),value:eu.permissionCode,onChange:e=>eg(t=>({...t,permissionCode:e}))}),(0,t.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-4 text-sm leading-6 text-gray-600 dark:border-gray-800 dark:bg-gray-950 dark:text-gray-300",children:[c("help.privateEnvironment"),(0,t.jsxs)("button",{type:"button",onClick:()=>{window.dispatchEvent(new CustomEvent("securis:open-contact"))},className:"mt-3 inline-flex min-h-10 items-center gap-2 rounded-lg bg-gray-950 px-4 py-2 text-sm font-semibold text-white transition hover:bg-gray-800 dark:bg-white dark:text-gray-950 dark:hover:bg-gray-200",children:[(0,t.jsx)(j,{size:16}),c("actions.contactUs")]})]}),(0,t.jsx)(U,{isLoading:ea,disabled:6!==eu.permissionCode.length,children:c("actions.verifyCode")})]}),"register"===f&&F&&"details"===q&&(0,t.jsxs)("form",{className:"space-y-4",onSubmit:eA,children:[(0,t.jsx)(D,{icon:(0,t.jsx)(v,{size:18}),label:c("fields.email"),children:(0,t.jsx)("input",{type:"email",value:eu.email,onChange:e=>eg(t=>({...t,email:e.target.value})),className:"account-input",autoComplete:"email",placeholder:"[email protected]",required:!0})}),(0,t.jsx)(D,{icon:(0,t.jsx)(N.UserRound,{size:18}),label:c("fields.username"),children:(0,t.jsx)("input",{value:eu.username,onChange:e=>eg(t=>({...t,username:e.target.value.toLowerCase().replace(/[^a-z0-9_]/g,"")})),className:"account-input",autoComplete:"username",placeholder:"your_username",pattern:"[a-z0-9_]+",required:!0})}),eu.username.length>=4&&(0,t.jsx)("p",{className:`-mt-2 text-xs ${ex?"text-emerald-600 dark:text-emerald-400":"text-red-600 dark:text-red-400"}`,children:ey?c("status.checkingUsername"):ex?c("status.usernameAvailable"):c("status.usernameUnavailable")}),(0,t.jsx)(u,{value:eb,onChange:e=>eg(t=>({...t,mainLanguageCode:e})),options:h.USER_LANGUAGE_OPTIONS,label:c("fields.mainLanguage"),placeholder:c("placeholders.language"),searchPlaceholder:c("placeholders.searchLanguage"),emptyMessage:c("status.noLanguage"),helperText:c("help.language")}),(0,t.jsx)(u,{value:eu.registerFromCountryCode,onChange:e=>eg(t=>({...t,registerFromCountryCode:e})),options:h.USER_COUNTRY_OPTIONS,label:c("fields.country"),placeholder:c("placeholders.country"),searchPlaceholder:c("placeholders.searchCountry"),emptyMessage:c("status.noCountry"),helperText:c("help.country"),clearable:!0}),(0,t.jsx)(O,{label:c("fields.password"),value:eu.password,showPassword:H,onToggle:()=>J(e=>!e),onChange:e=>eg(t=>({...t,password:e})),autoComplete:"new-password",placeholder:c("placeholders.strongPassword"),showLabel:c("actions.showPassword"),hideLabel:c("actions.hidePassword")}),(0,t.jsx)(M,{score:ew,labels:c.raw("passwordStrength")}),X&&(0,t.jsx)(R,{label:c("fields.securityCheck"),resetKey:et,siteKey:X,onVerify:ee}),(0,t.jsx)(U,{isLoading:ea,disabled:!eN,children:c("actions.continue")})]}),"register"===f&&"verify"===q&&(0,t.jsxs)("form",{className:"space-y-4",onSubmit:eP,children:[(0,t.jsx)($,{label:c("fields.verificationCode"),value:eu.otpCode,onChange:e=>eg(t=>({...t,otpCode:e}))}),(0,t.jsx)("button",{type:"button",onClick:eR,className:"text-sm font-medium text-gray-600 underline underline-offset-4 transition hover:text-gray-950 dark:text-gray-300 dark:hover:text-white",children:c("actions.resendCode")}),(0,t.jsx)(U,{isLoading:ea,children:c("actions.createAccount")})]}),"forgot"===f&&"email"===Z&&(0,t.jsxs)("form",{className:"space-y-4",onSubmit:ez,children:[(0,t.jsx)(D,{icon:(0,t.jsx)(v,{size:18}),label:c("fields.email"),children:(0,t.jsx)("input",{type:"email",value:em.email,onChange:e=>eh(t=>({...t,email:e.target.value})),className:"account-input",autoComplete:"email",placeholder:"[email protected]",required:!0})}),(0,t.jsx)(U,{isLoading:ea,children:c("actions.sendResetCode")})]}),"forgot"===f&&"verify"===Z&&(0,t.jsxs)("form",{className:"space-y-4",onSubmit:eT,children:[(0,t.jsx)($,{label:c("fields.resetCode"),value:em.otpCode,onChange:e=>eh(t=>({...t,otpCode:e}))}),(0,t.jsx)(U,{isLoading:ea,children:c("actions.verifyCode")})]}),"forgot"===f&&"reset"===Z&&(0,t.jsxs)("form",{className:"space-y-4",onSubmit:eM,children:[(0,t.jsx)(O,{label:c("fields.newPassword"),value:em.newPassword,showPassword:H,onToggle:()=>J(e=>!e),onChange:e=>eh(t=>({...t,newPassword:e})),autoComplete:"new-password",placeholder:c("placeholders.newStrongPassword"),showLabel:c("actions.showPassword"),hideLabel:c("actions.hidePassword")}),(0,t.jsx)(M,{score:ew,labels:c.raw("passwordStrength")}),(0,t.jsx)(U,{isLoading:ea,children:c("actions.updatePassword")})]})]})]})})}],35787)}]);

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.