import{Ft as e,H as t,It as n,Mt as r,O as i,Q as a,W as o,Z as ee,_t as s,at as c,c as l,d as te,ft as u,ht as d,jt as ne,l as f,mt as p,ot as m,pt as h,s as g,st as _,x as v,yt as y}from"../chunks/BA99CCI5.js";import{t as b}from"../chunks/BJ4akexL.js";import"../chunks/xihTtKlq.js";import"../chunks/DGo8yE5j.js";import{t as x}from"../chunks/BDqLURZS.js";import{t as S}from"../chunks/3rupxGJ5.js";import{t as C}from"../chunks/BjTZeLXW.js";import{t as w}from"../chunks/B66v-P2b.js";import{t as T}from"../chunks/BDIVGy2g.js";import{t as E}from"../chunks/BJGxfzgf2.js";import{n as re}from"../chunks/DCkiND_92.js";import{t as ie}from"../chunks/DCohNkHF.js";import{t as D}from"../chunks/qMgSkqkC.js";var O=new Set([`$$slots`,`$$events`,`$$legacy`]);function ae(e,t){let n=l(t,O),r=[[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`}]];S(e,f({name:`shield-off`},()=>n,{get iconNode(){return r}}))}var k=new Set([`$$slots`,`$$events`,`$$legacy`]);function A(e,t){let n=l(t,k),r=[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`9`,cy:`7`,r:`4`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`}]];S(e,f({name:`user-plus`},()=>n,{get iconNode(){return r}}))}var j=o(`<!> <div class="flex min-h-screen items-center justify-center bg-neutral-100 p-4 dark:bg-neutral-900"><div class="flex w-full max-w-3xl flex-col gap-8 md:flex-row md:gap-12"><div class="flex flex-col space-y-6 md:flex-1"><div class="flex items-center gap-4"><img alt="Profilarr logo" class="h-12 w-12"/> <div><h1 class="text-xl font-bold text-neutral-900 dark:text-neutral-50">Welcome to Profilarr</h1> <p class="text-sm text-neutral-600 dark:text-neutral-400">Create your admin account to get started.</p></div></div> <div class="hidden rounded-xl border border-neutral-200/60 bg-white/50 p-5 shadow-sm backdrop-blur-sm md:block dark:border-neutral-700/60 dark:bg-neutral-800/50"><p class="text-xs font-medium text-neutral-700 dark:text-neutral-300">Configure authentication via the <code class="rounded bg-neutral-200 px-1 py-0.5 text-[11px] dark:bg-neutral-700">AUTH</code> environment variable:</p> <ul class="mt-3 space-y-2 text-xs text-neutral-600 dark:text-neutral-400"><li class="flex items-center gap-2"><!> <code class="font-mono text-neutral-800 dark:text-neutral-200">on</code> <span>— Full authentication</span> <span class="text-neutral-400 dark:text-neutral-500">(default)</span></li> <li class="flex items-center gap-2"><!> <code class="font-mono text-neutral-800 dark:text-neutral-200">local</code> <span>— Skip auth for local network</span></li> <li class="flex items-center gap-2"><!> <code class="font-mono text-neutral-800 dark:text-neutral-200">oidc</code> <span>— Use external provider</span></li> <li class="flex items-center gap-2"><!> <code class="font-mono text-neutral-800 dark:text-neutral-200">off</code> <span>— For reverse proxy setups</span></li></ul></div></div> <div class="w-full md:flex-1"><form method="POST" class="space-y-6"><!> <!> <!> <!></form></div></div></div>`,1);function M(o,l){r(l,!1);let f=g(l,`form`,8),S=d(!1),O=d(f()?.username??``),k=d(``),M=d(``);c(()=>(ee(f()),b),()=>{f()?.error&&b.add(`error`,f().error)}),m(),te();var N=j(),P=h(N);ie(P,{title:`Setup`});var F=p(P,2),I=u(F),L=u(I),R=u(L),z=u(R);e(2),n(R);var B=p(R,2),V=p(u(B),2),H=u(V),U=u(H);T(U,{size:12,class:`text-neutral-400`}),e(6),n(H);var W=p(H,2),G=u(W);E(G,{size:12,class:`text-neutral-400`}),e(4),n(W);var K=p(W,2),q=u(K);C(q,{size:12,class:`text-neutral-400`}),e(4),n(K);var J=p(K,2);ae(u(J),{size:12,class:`text-neutral-400`}),e(4),n(J),n(V),n(B),n(L);var Y=p(L,2),X=u(Y),Z=u(X);D(Z,{name:`username`,label:`Username`,hideLabel:!0,type:`text`,placeholder:`admin`,autocomplete:`username`,get value(){return a(O)},set value(e){s(O,e)},$$legacy:!0});var Q=p(Z,2);D(Q,{name:`password`,label:`Password`,hideLabel:!0,type:`password`,placeholder:`Minimum 8 characters`,autocomplete:`new-password`,private_:!0,get value(){return a(k)},set value(e){s(k,e)},$$legacy:!0});var $=p(Q,2);D($,{name:`confirmPassword`,label:`Confirm Password`,hideLabel:!0,type:`password`,placeholder:`Re-enter your password`,autocomplete:`new-password`,private_:!0,get value(){return a(M)},set value(e){s(M,e)},$$legacy:!0});var oe=p($,2);{let e=y(()=>a(S)?`Creating Account...`:`Create Account`);w(oe,{type:`submit`,variant:`primary`,size:`md`,fullWidth:!0,get icon(){return A},get text(){return a(e)},get disabled(){return a(S)}})}n(X),i(X,(e,t)=>re?.(e,t),()=>()=>(s(S,!0),async({update:e})=>{await e({reset:!1}),s(S,!1)})),n(Y),n(I),n(F),_(()=>v(z,`src`,x)),t(o,N),ne()}export{M as component};