import{f as L,e as M,g as p,b as S,p as Q,c as v,s as w,t as A,a as R,r as h}from"./CwuLZfOX.js";import{c as V,a as _,d as W,f as z}from"./8V7BUHOp.js";import{s as E}from"./CaaTB9LM.js";import{i as I}from"./ChcH33Yj.js";import{I as D,f as T,r as X,a as Y,s as k}from"./_j5m0PhM.js";import{b as Z}from"./CR2j1Dvc.js";import{l as U,s as F,p as r}from"./CNkT2fMe.js";import{i as $}from"./CN__mP6c.js";import"./Ct62Q5nz.js";function ee(t,e){const i=U(e,["children","$$slots","$$events","$$legacy"]);/**
 * @license lucide-svelte v0.511.0 - ISC
 *
 * ISC License
 *
 * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 *
 */const a=[["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"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["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"}],["path",{d:"m2 2 20 20"}]];D(t,F({name:"eye-off"},()=>i,{get iconNode(){return a},children:(n,c)=>{var o=V(),l=L(o);T(l,e,"default",{}),_(n,o)},$$slots:{default:!0}}))}function te(t,e){const i=U(e,["children","$$slots","$$events","$$legacy"]);/**
 * @license lucide-svelte v0.511.0 - ISC
 *
 * ISC License
 *
 * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 *
 */const a=[["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"}],["circle",{cx:"12",cy:"12",r:"3"}]];D(t,F({name:"eye"},()=>i,{get iconNode(){return a},children:(n,c)=>{var o=V(),l=L(o);T(l,e,"default",{}),_(n,o)},$$slots:{default:!0}}))}let P=S("dark");const ae={get value(){return p(P)},update(){const t=localStorage.getItem("theme");t==="system"?M(P,window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",!0):t&&M(P,t,!0)}};ae.update();function se(t,e){M(e,!p(e))}function re(t,e,i,a,n,c,o,l,m){var f;e()?i($.password(e(),a(),n(),c(),o(),l())):i(""),(f=m.checkErrors)==null||f.call(m)}var ie=z('<p class="text-error text-sm mt-1"> </p>'),oe=z('<div class="block text-sm font-medium"> </div> <div><input class="grow bg-transparent focus:outline-none"/> <button type="button" class="btn btn-ghost btn-sm" tabindex="-1"><!></button></div> <!>',1);function pe(t,e){Q(e,!0);let i=r(e,"password",15),a=r(e,"error",15),n=r(e,"header",3,"Password"),c=r(e,"placeholder",3,""),o=r(e,"disabled",3,!1),l=r(e,"minLength",3,10),m=r(e,"maxLength",3,512),f=r(e,"minUpper",3,1),j=r(e,"minDigits",3,1),q=r(e,"minSymbols",3,1),g=S(!1);var N=oe(),b=L(N),B=v(b,!0);h(b);var u=w(b,2),d=v(u);X(d),d.__input=[re,i,a,l,m,f,j,q,e];var y=w(d,2);y.__click=[se,g];var C=v(y);{var G=s=>{te(s,{})},H=s=>{ee(s,{})};I(C,s=>{p(g)?s(G):s(H,!1)})}h(y),h(u);var J=w(u,2);{var K=s=>{var x=ie(),O=v(x,!0);h(x),A(()=>E(O,a())),_(s,x)};I(J,s=>{a()&&s(K)})}A(()=>{E(B,n()),Y(u,1,`input input-bordered flex items-center gap-2 mt-1 ${a()?"input-error":""}`),k(d,"type",p(g)?"text":"password"),k(d,"placeholder",c()),k(d,"aria-disabled",o())}),Z(d,i),_(t,N),R()}W(["input","click"]);export{ae as A,pe as P};
