siesa-ui-kit 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1451,7 +1451,7 @@
1451
1451
  `,children:[e.jsxs("p",{className:"leading-[12px] text-ellipsis overflow-hidden",children:["Mesa ",t]}),u]})]})},Bo=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),To=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),zo=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),Do=({onSubmit:t,onForgotPassword:r,onSignUp:s,isLoading:n=!1,errorMessage:o,className:a="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=b.useState(""),[d,f]=b.useState(""),[m,p]=b.useState(!1),[g,h]=b.useState(""),x=j=>{if(j.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){h("Por favor ingresa un email válido");return}h(""),t?.(c,d)},v=j=>{u(j.target.value),g&&h("")},w=()=>{p(!m)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",a].join(" "),children:[i&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Iniciar Sesión"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Inicia sesión ingresando con tu correo electrónico y contraseña."})]}),o&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:o}),e.jsxs("form",{onSubmit:x,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Bo,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:c,onChange:v,disabled:n,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",g?"border-error-border!":""].filter(Boolean).join(" ")})]}),g&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:g})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("button",{type:"button",onClick:r,className:"text-[12px] leading-4 font-bold text-primary-custom-600 dark:text-[#93d1fd] hover:underline transition-all duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm px-1",children:"Olvidé mi Contraseña"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(To,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:m?"text":"password",placeholder:"••••••••",value:d,onChange:j=>f(j.target.value),disabled:n,required:!0,autoComplete:"current-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:w,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":m?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(zo,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:n||!c||!d,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:n?"Iniciando sesión...":"Iniciar Sesión"})]}),e.jsx("button",{type:"button",onClick:s,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"¿No tienes una cuenta?"})]})]})},_o=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0Zm-5-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 9c-1.825 0-3.422.977-4.295 2.437A5.49 5.49 0 0 0 8 13.5a5.49 5.49 0 0 0 4.294-2.063A4.997 4.997 0 0 0 8 9Z",clipRule:"evenodd"})}),Po=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),Vo=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),Fo=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),Zo=({onSubmit:t,onSignIn:r,onTermsClick:s,onPrivacyClick:n,isLoading:o=!1,errorMessage:a,className:i="",showBackground:l=!0,variant:c="responsive"})=>{const[u,d]=b.useState(""),[f,m]=b.useState(""),[p,g]=b.useState(""),[h,x]=b.useState(!1),[v,w]=b.useState(""),j=N=>{if(N.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)){w("Por favor ingresa un email válido");return}w(""),t?.(u,f,p)},C=N=>{m(N.target.value),v&&w("")},k=()=>{x(!h)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",i].join(" "),children:[l&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...c==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:c==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Crear Cuenta"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Ingresa todos los datos para crear tu cuenta."})]}),a&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:a}),e.jsxs("form",{onSubmit:j,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"name-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Nombre ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(_o,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"name-input",type:"text",placeholder:"Juan Pérez",value:u,onChange:N=>d(N.target.value),disabled:o,required:!0,autoComplete:"name",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Po,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:f,onChange:C,disabled:o,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",v?"border-error-border!":""].filter(Boolean).join(" ")})]}),v&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:v})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Vo,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:h?"text":"password",placeholder:"••••••••",value:p,onChange:N=>g(N.target.value),disabled:o,required:!0,autoComplete:"new-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:k,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":h?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(Fo,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:o||!u||!f||!p,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:o?"Registrando...":"Registrarse"})]}),e.jsx("button",{type:"button",onClick:r,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"Ya tengo una cuenta"}),e.jsx("div",{className:"w-full text-center",children:e.jsxs("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:["Al registrarse, estás aceptando nuestras"," ",e.jsx("button",{type:"button",onClick:s,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Condiciones de Uso"})," ","y nuestras"," ",e.jsx("button",{type:"button",onClick:n,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Políticas de Privacidad"}),"."]})})]})]})};const Ho=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wo=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,n)=>n?n.toUpperCase():s.toLowerCase()),Zr=t=>{const r=Wo(t);return r.charAt(0).toUpperCase()+r.slice(1)},Ln=(...t)=>t.filter((r,s,n)=>!!r&&r.trim()!==""&&n.indexOf(r)===s).join(" ").trim(),Uo=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var Go={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"};const qo=b.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...l},c)=>b.createElement("svg",{ref:c,...Go,width:r,height:r,stroke:t,strokeWidth:n?Number(s)*24/Number(r):s,className:Ln("lucide",o),...!a&&!Uo(l)&&{"aria-hidden":"true"},...l},[...i.map(([u,d])=>b.createElement(u,d)),...Array.isArray(a)?a:[a]]));const At=(t,r)=>{const s=b.forwardRef(({className:n,...o},a)=>b.createElement(qo,{ref:a,iconNode:r,className:Ln(`lucide-${Ho(Zr(t))}`,`lucide-${t}`,n),...o}));return s.displayName=Zr(t),s};const Ko=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xo=At("chevron-down",Ko);const Yo=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Hr=At("loader-circle",Yo);const Qo=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Jo=At("search",Qo);const ea=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$n=At("x",ea);function On(t){var r,s,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(s=On(t[r]))&&(n&&(n+=" "),n+=s)}else for(s in t)t[s]&&(n&&(n+=" "),n+=s);return n}function ta(){for(var t,r,s=0,n="",o=arguments.length;s<o;s++)(t=arguments[s])&&(r=On(t))&&(n&&(n+=" "),n+=r);return n}const ra=(t,r)=>{const s=new Array(t.length+r.length);for(let n=0;n<t.length;n++)s[n]=t[n];for(let n=0;n<r.length;n++)s[t.length+n]=r[n];return s},na=(t,r)=>({classGroupId:t,validator:r}),Bn=(t=new Map,r=null,s)=>({nextPart:t,validators:r,classGroupId:s}),Nt="-",Wr=[],sa="arbitrary..",oa=t=>{const r=ia(t),{conflictingClassGroups:s,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return aa(i);const l=i.split(Nt),c=l[0]===""&&l.length>1?1:0;return Tn(l,c,r)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=n[i],u=s[i];return c?u?ra(u,c):c:u||Wr}return s[i]||Wr}}},Tn=(t,r,s)=>{if(t.length-r===0)return s.classGroupId;const o=t[r],a=s.nextPart.get(o);if(a){const u=Tn(t,r+1,a);if(u)return u}const i=s.validators;if(i===null)return;const l=r===0?t.join(Nt):t.slice(r).join(Nt),c=i.length;for(let u=0;u<c;u++){const d=i[u];if(d.validator(l))return d.classGroupId}},aa=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=t.slice(1,-1),s=r.indexOf(":"),n=r.slice(0,s);return n?sa+n:void 0})(),ia=t=>{const{theme:r,classGroups:s}=t;return la(s,r)},la=(t,r)=>{const s=Bn();for(const n in t){const o=t[n];pr(o,s,n,r)}return s},pr=(t,r,s,n)=>{const o=t.length;for(let a=0;a<o;a++){const i=t[a];ca(i,r,s,n)}},ca=(t,r,s,n)=>{if(typeof t=="string"){da(t,r,s);return}if(typeof t=="function"){ua(t,r,s,n);return}fa(t,r,s,n)},da=(t,r,s)=>{const n=t===""?r:zn(r,t);n.classGroupId=s},ua=(t,r,s,n)=>{if(ma(t)){pr(t(n),r,s,n);return}r.validators===null&&(r.validators=[]),r.validators.push(na(s,t))},fa=(t,r,s,n)=>{const o=Object.entries(t),a=o.length;for(let i=0;i<a;i++){const[l,c]=o[i];pr(c,zn(r,l),s,n)}},zn=(t,r)=>{let s=t;const n=r.split(Nt),o=n.length;for(let a=0;a<o;a++){const i=n[a];let l=s.nextPart.get(i);l||(l=Bn(),s.nextPart.set(i,l)),s=l}return s},ma=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,pa=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,s=Object.create(null),n=Object.create(null);const o=(a,i)=>{s[a]=i,r++,r>t&&(r=0,n=s,s=Object.create(null))};return{get(a){let i=s[a];if(i!==void 0)return i;if((i=n[a])!==void 0)return o(a,i),i},set(a,i){a in s?s[a]=i:o(a,i)}}},rr="!",Ur=":",ha=[],Gr=(t,r,s,n,o)=>({modifiers:t,hasImportantModifier:r,baseClassName:s,maybePostfixModifierPosition:n,isExternal:o}),xa=t=>{const{prefix:r,experimentalParseClassName:s}=t;let n=o=>{const a=[];let i=0,l=0,c=0,u;const d=o.length;for(let h=0;h<d;h++){const x=o[h];if(i===0&&l===0){if(x===Ur){a.push(o.slice(c,h)),c=h+1;continue}if(x==="/"){u=h;continue}}x==="["?i++:x==="]"?i--:x==="("?l++:x===")"&&l--}const f=a.length===0?o:o.slice(c);let m=f,p=!1;f.endsWith(rr)?(m=f.slice(0,-1),p=!0):f.startsWith(rr)&&(m=f.slice(1),p=!0);const g=u&&u>c?u-c:void 0;return Gr(a,p,m,g)};if(r){const o=r+Ur,a=n;n=i=>i.startsWith(o)?a(i.slice(o.length)):Gr(ha,!1,i,void 0,!0)}if(s){const o=n;n=a=>s({className:a,parseClassName:o})}return n},ga=t=>{const r=new Map;return t.orderSensitiveModifiers.forEach((s,n)=>{r.set(s,1e6+n)}),s=>{const n=[];let o=[];for(let a=0;a<s.length;a++){const i=s[a],l=i[0]==="[",c=r.has(i);l||c?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},ba=t=>({cache:pa(t.cacheSize),parseClassName:xa(t),sortModifiers:ga(t),...oa(t)}),va=/\s+/,ka=(t,r)=>{const{parseClassName:s,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=r,i=[],l=t.trim().split(va);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:m,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:h}=s(d);if(f){c=d+(c.length>0?" "+c:c);continue}let x=!!h,v=n(x?g.substring(0,h):g);if(!v){if(!x){c=d+(c.length>0?" "+c:c);continue}if(v=n(g),!v){c=d+(c.length>0?" "+c:c);continue}x=!1}const w=m.length===0?"":m.length===1?m[0]:a(m).join(":"),j=p?w+rr:w,C=j+v;if(i.indexOf(C)>-1)continue;i.push(C);const k=o(v,x);for(let N=0;N<k.length;++N){const A=k[N];i.push(j+A)}c=d+(c.length>0?" "+c:c)}return c},ya=(...t)=>{let r=0,s,n,o="";for(;r<t.length;)(s=t[r++])&&(n=Dn(s))&&(o&&(o+=" "),o+=n);return o},Dn=t=>{if(typeof t=="string")return t;let r,s="";for(let n=0;n<t.length;n++)t[n]&&(r=Dn(t[n]))&&(s&&(s+=" "),s+=r);return s},wa=(t,...r)=>{let s,n,o,a;const i=c=>{const u=r.reduce((d,f)=>f(d),t());return s=ba(u),n=s.cache.get,o=s.cache.set,a=l,l(c)},l=c=>{const u=n(c);if(u)return u;const d=ka(c,s);return o(c,d),d};return a=i,(...c)=>a(ya(...c))},ja=[],J=t=>{const r=s=>s[t]||ja;return r.isThemeGetter=!0,r},_n=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Na=/^\d+\/\d+$/,Ca=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ra=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ea=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ia=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fe=t=>Na.test(t),W=t=>!!t&&!Number.isNaN(Number(t)),Re=t=>!!t&&Number.isInteger(Number(t)),Kt=t=>t.endsWith("%")&&W(t.slice(0,-1)),je=t=>Ca.test(t),Aa=()=>!0,Ma=t=>Sa.test(t)&&!Ra.test(t),Vn=()=>!1,La=t=>Ea.test(t),$a=t=>Ia.test(t),Oa=t=>!$(t)&&!O(t),Ba=t=>Ue(t,Hn,Vn),$=t=>_n.test(t),$e=t=>Ue(t,Wn,Ma),Xt=t=>Ue(t,Pa,W),qr=t=>Ue(t,Fn,Vn),Ta=t=>Ue(t,Zn,$a),gt=t=>Ue(t,Un,La),O=t=>Pn.test(t),Qe=t=>Ge(t,Wn),za=t=>Ge(t,Va),Kr=t=>Ge(t,Fn),Da=t=>Ge(t,Hn),_a=t=>Ge(t,Zn),bt=t=>Ge(t,Un,!0),Ue=(t,r,s)=>{const n=_n.exec(t);return n?n[1]?r(n[1]):s(n[2]):!1},Ge=(t,r,s=!1)=>{const n=Pn.exec(t);return n?n[1]?r(n[1]):s:!1},Fn=t=>t==="position"||t==="percentage",Zn=t=>t==="image"||t==="url",Hn=t=>t==="length"||t==="size"||t==="bg-size",Wn=t=>t==="length",Pa=t=>t==="number",Va=t=>t==="family-name",Un=t=>t==="shadow",Fa=()=>{const t=J("color"),r=J("font"),s=J("text"),n=J("font-weight"),o=J("tracking"),a=J("leading"),i=J("breakpoint"),l=J("container"),c=J("spacing"),u=J("radius"),d=J("shadow"),f=J("inset-shadow"),m=J("text-shadow"),p=J("drop-shadow"),g=J("blur"),h=J("perspective"),x=J("aspect"),v=J("ease"),w=J("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...C(),O,$],N=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],I=()=>[O,$,c],S=()=>[Fe,"full","auto",...I()],y=()=>[Re,"none","subgrid",O,$],B=()=>["auto",{span:["full",Re,O,$]},Re,O,$],T=()=>[Re,"auto",O,$],D=()=>["auto","min","max","fr",O,$],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...I()],z=()=>[Fe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],R=()=>[t,O,$],q=()=>[...C(),Kr,qr,{position:[O,$]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ie=()=>["auto","cover","contain",Da,Ba,{size:[O,$]}],Z=()=>[Kt,Qe,$e],L=()=>["","none","full",u,O,$],G=()=>["",W,Qe,$e],se=()=>["solid","dashed","dotted","double"],De=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[W,Kt,Kr,qr],Ne=()=>["","none",g,O,$],ee=()=>["none",W,O,$],de=()=>["none",W,O,$],oe=()=>[W,O,$],re=()=>[Fe,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[je],breakpoint:[je],color:[Aa],container:[je],"drop-shadow":[je],ease:["in","out","in-out"],font:[Oa],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[je],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[je],shadow:[je],spacing:["px",W],text:[je],"text-shadow":[je],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Fe,$,O,x]}],container:["container"],columns:[{columns:[W,$,O,l]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:S()}],"inset-x":[{"inset-x":S()}],"inset-y":[{"inset-y":S()}],start:[{start:S()}],end:[{end:S()}],top:[{top:S()}],right:[{right:S()}],bottom:[{bottom:S()}],left:[{left:S()}],visibility:["visible","invisible","collapse"],z:[{z:[Re,"auto",O,$]}],basis:[{basis:[Fe,"full","auto",l,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[W,Fe,"auto","initial","none",$]}],grow:[{grow:["",W,O,$]}],shrink:[{shrink:["",W,O,$]}],order:[{order:[Re,"first","last","none",O,$]}],"grid-cols":[{"grid-cols":y()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":y()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[l,"screen",...z()]}],"min-w":[{"min-w":[l,"screen","none",...z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",s,Qe,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,O,Xt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Kt,$]}],"font-family":[{font:[za,$,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,O,$]}],"line-clamp":[{"line-clamp":[W,"none",O,Xt]}],leading:[{leading:[a,...I()]}],"list-image":[{"list-image":["none",O,$]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,$]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[W,"from-font","auto",O,$e]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[W,"auto",O,$]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",O,$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Re,O,$],radial:["",O,$],conic:[Re,O,$]},_a,Ta]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[W,O,$]}],"outline-w":[{outline:["",W,Qe,$e]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",d,bt,gt]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",f,bt,gt]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[W,$e]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",m,bt,gt]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[W,O,$]}],"mix-blend":[{"mix-blend":[...De(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":De()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[W]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[O,$]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[W]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",O,$]}],filter:[{filter:["","none",O,$]}],blur:[{blur:Ne()}],brightness:[{brightness:[W,O,$]}],contrast:[{contrast:[W,O,$]}],"drop-shadow":[{"drop-shadow":["","none",p,bt,gt]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",W,O,$]}],"hue-rotate":[{"hue-rotate":[W,O,$]}],invert:[{invert:["",W,O,$]}],saturate:[{saturate:[W,O,$]}],sepia:[{sepia:["",W,O,$]}],"backdrop-filter":[{"backdrop-filter":["","none",O,$]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[W,O,$]}],"backdrop-contrast":[{"backdrop-contrast":[W,O,$]}],"backdrop-grayscale":[{"backdrop-grayscale":["",W,O,$]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,O,$]}],"backdrop-invert":[{"backdrop-invert":["",W,O,$]}],"backdrop-opacity":[{"backdrop-opacity":[W,O,$]}],"backdrop-saturate":[{"backdrop-saturate":[W,O,$]}],"backdrop-sepia":[{"backdrop-sepia":["",W,O,$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,$]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[W,"initial",O,$]}],ease:[{ease:["linear","initial",v,O,$]}],delay:[{delay:[W,O,$]}],animate:[{animate:["none",w,O,$]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,O,$]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[O,$,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",O,$]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",O,$]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[W,Qe,$e,Xt]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Za=wa(Fa);function tt(...t){return Za(ta(t))}function Ha(t,r){return t.replace(/\{(\w+)\}/g,(s,n)=>{const o=r[n];return o!=null?String(o):""})}function Wa(t){return Array.isArray(t)&&t.every(Array.isArray)}function Gn(t){return Object.entries(t).map(([r,s])=>[{[r]:s}])}function nr(t){if(t)return Wa(t)?t:Gn(t)}function Ua(...t){return t.filter(Boolean).flat()}const Ga=300;function qa(t,r=Ga){const[s,n]=b.useState(t);return b.useEffect(()=>{const o=setTimeout(()=>{n(t)},r);return()=>{clearTimeout(o)}},[t,r]),s}function Ka(t){const{records:r,isOpen:s,onSelect:n,onClose:o,onEscape:a,onClear:i,searchQuery:l}=t,[c,u]=b.useState(-1),d=b.useCallback(f=>{if(s)switch(f.key){case"ArrowDown":{if(f.preventDefault(),r.length===0)return;u(m=>m>=r.length-1?0:m+1);break}case"ArrowUp":{if(f.preventDefault(),r.length===0)return;u(m=>m<=0?r.length-1:m-1);break}case"Home":{if(f.preventDefault(),r.length===0)return;u(0);break}case"End":{if(f.preventDefault(),r.length===0)return;u(r.length-1);break}case"Enter":{f.preventDefault(),c>=0&&c<r.length&&n(r[c]);break}case"Escape":{f.preventDefault(),a();break}case"Backspace":{l===""&&i();break}case"Tab":{o();break}}},[s,r,c,n,o,a,i,l]);return{highlightedIndex:c,setHighlightedIndex:u,handleKeyDown:d}}const Xa=(t,r,s,n)=>{const o=[s,{code:r,...n||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(o,"warn","react-i18next::",!0);Be(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...o):console?.warn&&console.warn(...o)},Xr={},qn=(t,r,s,n)=>{Be(s)&&Xr[s]||(Be(s)&&(Xr[s]=new Date),Xa(t,r,s,n))},Kn=(t,r)=>()=>{if(t.isInitialized)r();else{const s=()=>{setTimeout(()=>{t.off("initialized",s)},0),r()};t.on("initialized",s)}},sr=(t,r,s)=>{t.loadNamespaces(r,Kn(t,s))},Yr=(t,r,s,n)=>{if(Be(s)&&(s=[s]),t.options.preload&&t.options.preload.indexOf(r)>-1)return sr(t,s,n);s.forEach(o=>{t.options.ns.indexOf(o)<0&&t.options.ns.push(o)}),t.loadLanguages(r,Kn(t,n))},Ya=(t,r,s={})=>!r.languages||!r.languages.length?(qn(r,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:r.languages}),!0):r.hasLoadedNamespace(t,{lng:s.lng,precheck:(n,o)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!o(n.isLanguageChangingTo,t))return!1}}),Be=t=>typeof t=="string",Qa=t=>typeof t=="object"&&t!==null,Ja=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ei={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},ti=t=>ei[t],ri=t=>t.replace(Ja,ti);let ni={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ri,transDefaultProps:void 0};const si=()=>ni;let oi;const ai=()=>oi,ii=b.createContext();class li{constructor(){this.usedNamespaces={}}addUsedNamespaces(r){r.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var vt={exports:{}},Yt={};var Qr;function ci(){if(Qr)return Yt;Qr=1;var t=b;function r(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var s=typeof Object.is=="function"?Object.is:r,n=t.useState,o=t.useEffect,a=t.useLayoutEffect,i=t.useDebugValue;function l(f,m){var p=m(),g=n({inst:{value:p,getSnapshot:m}}),h=g[0].inst,x=g[1];return a(function(){h.value=p,h.getSnapshot=m,c(h)&&x({inst:h})},[f,p,m]),o(function(){return c(h)&&x({inst:h}),f(function(){c(h)&&x({inst:h})})},[f]),i(p),p}function c(f){var m=f.getSnapshot;f=f.value;try{var p=m();return!s(f,p)}catch{return!0}}function u(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return Yt.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Yt}var Qt={};var Jr;function di(){return Jr||(Jr=1,process.env.NODE_ENV!=="production"&&(function(){function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function r(p,g){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=g();if(!f){var x=g();a(h,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}x=i({inst:{value:h,getSnapshot:g}});var v=x[0].inst,w=x[1];return c(function(){v.value=h,v.getSnapshot=g,s(v)&&w({inst:v})},[p,h,g]),l(function(){return s(v)&&w({inst:v}),p(function(){s(v)&&w({inst:v})})},[p]),u(h),h}function s(p){var g=p.getSnapshot;p=p.value;try{var h=g();return!a(p,h)}catch{return!0}}function n(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=b,a=typeof Object.is=="function"?Object.is:t,i=o.useState,l=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:r;Qt.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Qt}var en;function ui(){return en||(en=1,process.env.NODE_ENV==="production"?vt.exports=ci():vt.exports=di()),vt.exports}var fi=ui();const mi=(t,r)=>Be(r)?r:Qa(r)&&Be(r.defaultValue)?r.defaultValue:Array.isArray(t)?t[t.length-1]:t,pi={t:mi,ready:!1},hi=()=>()=>{},xi=(t,r={})=>{const{i18n:s}=r,{i18n:n,defaultNS:o}=b.useContext(ii)||{},a=s||n||ai();a&&!a.reportNamespaces&&(a.reportNamespaces=new li),a||qn(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const i=b.useMemo(()=>({...si(),...a?.options?.react,...r}),[a,r]),{useSuspense:l,keyPrefix:c}=i,u=t,d=Be(u)?[u]:u,f=b.useMemo(()=>d,d);a?.reportNamespaces?.addUsedNamespaces?.(f);const m=b.useRef(0),p=b.useCallback(S=>{if(!a)return hi;const{bindI18n:y,bindI18nStore:B}=i,T=()=>{m.current+=1,S()};return y&&a.on(y,T),B&&a.store.on(B,T),()=>{y&&y.split(" ").forEach(D=>a.off(D,T)),B&&B.split(" ").forEach(D=>a.store.off(D,T))}},[a,i]),g=b.useRef(),h=b.useCallback(()=>{if(!a)return pi;const S=!!(a.isInitialized||a.initializedStoreOnce)&&f.every(_=>Ya(_,a,i)),y=r.lng||a.language,B=m.current,T=g.current;if(T&&T.ready===S&&T.lng===y&&T.keyPrefix===c&&T.revision===B)return T;const H={t:a.getFixedT(y,i.nsMode==="fallback"?f:f[0],c),ready:S,lng:y,keyPrefix:c,revision:B};return g.current=H,H},[a,f,c,i,r.lng]),[x,v]=b.useState(0),{t:w,ready:j}=fi.useSyncExternalStore(p,h,h);b.useEffect(()=>{if(a&&!j&&!l){const S=()=>v(y=>y+1);r.lng?Yr(a,r.lng,f,S):sr(a,f,S)}},[a,r.lng,f,j,l,x]);const C=a||{},k=b.useRef(null),N=b.useRef(),A=S=>{const y=Object.getOwnPropertyDescriptors(S);y.__original&&delete y.__original;const B=Object.create(Object.getPrototypeOf(S),y);if(!Object.prototype.hasOwnProperty.call(B,"__original"))try{Object.defineProperty(B,"__original",{value:S,writable:!1,enumerable:!1,configurable:!1})}catch{}return B},I=b.useMemo(()=>{const S=C,y=S?.language;let B=S;S&&(k.current&&k.current.__original===S?N.current!==y?(B=A(S),k.current=B,N.current=y):B=k.current:(B=A(S),k.current=B,N.current=y));const T=[w,B,j];return T.t=w,T.i18n=B,T.ready=j,T},[w,C,j,C.resolvedLanguage,C.language,C.languages]);if(a&&l&&!j)throw new Promise(S=>{const y=()=>S();r.lng?Yr(a,r.lng,f,y):sr(a,f,y)});return I},gi={placeholder:"Select...",searchPlaceholder:"Search...",noResults:"No results found",loading:"Loading...",minChars:"Type at least {{count}} characters",error:"An error occurred",notFound:"[Record not found]",clear:"Clear selection",open:"Open dropdown",close:"Close dropdown","announcements.loading":"Loading results","announcements.noResults":"No results found","announcements.cleared":"Selection cleared","announcements.opened":"Dropdown opened, {{count}} results available","announcements.closed":"Dropdown closed","announcements.selected":"{{value}} selected","announcements.resultsLoaded":"{{count}} results loaded","validation.required":"This field is required","validation.requiredIndicator":"*"};function bi(t,r){return r?t.replace(/\{\{(\w+)\}\}/g,(s,n)=>String(r[n]??"")):t}function vi(){try{const{t,i18n:r}=xi("lookupField");if(!r.isInitialized)throw new Error("i18n not initialized");return{t:(s,n)=>n?t(s,n):t(s),i18n:r}}catch{return{t:(r,s)=>{const n=gi[r]??r;return bi(n,s)},i18n:null}}}function ki(t,r,s=!0){const n=b.useCallback(o=>{t.current&&!t.current.contains(o.target)&&r(o)},[t,r]);b.useEffect(()=>{if(s)return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[n,s])}function Mt(){return typeof window<"u"}function qe(t){return Xn(t)?(t.nodeName||"").toLowerCase():"#document"}function ce(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function be(t){var r;return(r=(Xn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function Xn(t){return Mt()?t instanceof Node||t instanceof ce(t).Node:!1}function ne(t){return Mt()?t instanceof Element||t instanceof ce(t).Element:!1}function ge(t){return Mt()?t instanceof HTMLElement||t instanceof ce(t).HTMLElement:!1}function tn(t){return!Mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ce(t).ShadowRoot}const yi=new Set(["inline","contents"]);function at(t){const{overflow:r,overflowX:s,overflowY:n,display:o}=pe(t);return/auto|scroll|overlay|hidden|clip/.test(r+n+s)&&!yi.has(o)}const wi=new Set(["table","td","th"]);function ji(t){return wi.has(qe(t))}const Ni=[":popover-open",":modal"];function Lt(t){return Ni.some(r=>{try{return t.matches(r)}catch{return!1}})}const Ci=["transform","translate","scale","rotate","perspective"],Si=["transform","translate","scale","rotate","perspective","filter"],Ri=["paint","layout","strict","content"];function hr(t){const r=xr(),s=ne(t)?pe(t):t;return Ci.some(n=>s[n]?s[n]!=="none":!1)||(s.containerType?s.containerType!=="normal":!1)||!r&&(s.backdropFilter?s.backdropFilter!=="none":!1)||!r&&(s.filter?s.filter!=="none":!1)||Si.some(n=>(s.willChange||"").includes(n))||Ri.some(n=>(s.contain||"").includes(n))}function Ei(t){let r=Ae(t);for(;ge(r)&&!We(r);){if(hr(r))return r;if(Lt(r))return null;r=Ae(r)}return null}function xr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ii=new Set(["html","body","#document"]);function We(t){return Ii.has(qe(t))}function pe(t){return ce(t).getComputedStyle(t)}function $t(t){return ne(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ae(t){if(qe(t)==="html")return t;const r=t.assignedSlot||t.parentNode||tn(t)&&t.host||be(t);return tn(r)?r.host:r}function Yn(t){const r=Ae(t);return We(r)?t.ownerDocument?t.ownerDocument.body:t.body:ge(r)&&at(r)?r:Yn(r)}function rt(t,r,s){var n;r===void 0&&(r=[]),s===void 0&&(s=!0);const o=Yn(t),a=o===((n=t.ownerDocument)==null?void 0:n.body),i=ce(o);if(a){const l=or(i);return r.concat(i,i.visualViewport||[],at(o)?o:[],l&&s?rt(l):[])}return r.concat(o,rt(o,[],s))}function or(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const nt=Math.min,fe=Math.max,Ct=Math.round,kt=Math.floor,xe=t=>({x:t,y:t}),Ai={left:"right",right:"left",bottom:"top",top:"bottom"},Mi={start:"end",end:"start"};function Ot(t,r){return typeof t=="function"?t(r):t}function Te(t){return t.split("-")[0]}function it(t){return t.split("-")[1]}function Li(t){return t==="x"?"y":"x"}function Qn(t){return t==="y"?"height":"width"}const $i=new Set(["top","bottom"]);function Ee(t){return $i.has(Te(t))?"y":"x"}function Jn(t){return Li(Ee(t))}function Oi(t,r,s){s===void 0&&(s=!1);const n=it(t),o=Jn(t),a=Qn(o);let i=o==="x"?n===(s?"end":"start")?"right":"left":n==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=St(i)),[i,St(i)]}function Bi(t){const r=St(t);return[ar(t),r,ar(r)]}function ar(t){return t.replace(/start|end/g,r=>Mi[r])}const rn=["left","right"],nn=["right","left"],Ti=["top","bottom"],zi=["bottom","top"];function Di(t,r,s){switch(t){case"top":case"bottom":return s?r?nn:rn:r?rn:nn;case"left":case"right":return r?Ti:zi;default:return[]}}function _i(t,r,s,n){const o=it(t);let a=Di(Te(t),s==="start",n);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(ar)))),a}function St(t){return t.replace(/left|right|bottom|top/g,r=>Ai[r])}function Pi(t){return{top:0,right:0,bottom:0,left:0,...t}}function Vi(t){return typeof t!="number"?Pi(t):{top:t,right:t,bottom:t,left:t}}function Rt(t){const{x:r,y:s,width:n,height:o}=t;return{width:n,height:o,top:s,left:r,right:r+n,bottom:s+o,x:r,y:s}}var Fi=typeof document<"u",Zi=function(){},ir=Fi?b.useLayoutEffect:Zi;const Hi={...M},Wi=Hi.useInsertionEffect,Ui=Wi||(t=>t());function Gi(t){const r=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ui(()=>{r.current=t}),M.useCallback(function(){for(var s=arguments.length,n=new Array(s),o=0;o<s;o++)n[o]=arguments[o];return r.current==null?void 0:r.current(...n)},[])}function sn(t,r,s){let{reference:n,floating:o}=t;const a=Ee(r),i=Jn(r),l=Qn(i),c=Te(r),u=a==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,m=n[l]/2-o[l]/2;let p;switch(c){case"top":p={x:d,y:n.y-o.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(it(r)){case"start":p[i]-=m*(s&&u?-1:1);break;case"end":p[i]+=m*(s&&u?-1:1);break}return p}const qi=async(t,r,s)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=s,l=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(r));let u=await i.getElementRects({reference:t,floating:r,strategy:o}),{x:d,y:f}=sn(u,n,c),m=n,p={},g=0;for(let h=0;h<l.length;h++){const{name:x,fn:v}=l[h],{x:w,y:j,data:C,reset:k}=await v({x:d,y:f,initialPlacement:n,placement:m,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:t,floating:r}});d=w??d,f=j??f,p={...p,[x]:{...p[x],...C}},k&&g<=50&&(g++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(u=k.rects===!0?await i.getElementRects({reference:t,floating:r,strategy:o}):k.rects),{x:d,y:f}=sn(u,m,c)),h=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:p}};async function es(t,r){var s;r===void 0&&(r={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=Ot(r,t),g=Vi(p),x=l[m?f==="floating"?"reference":"floating":f],v=Rt(await a.getClippingRect({element:(s=await(a.isElement==null?void 0:a.isElement(x)))==null||s?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),w=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,j=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),C=await(a.isElement==null?void 0:a.isElement(j))?await(a.getScale==null?void 0:a.getScale(j))||{x:1,y:1}:{x:1,y:1},k=Rt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:j,strategy:c}):w);return{top:(v.top-k.top+g.top)/C.y,bottom:(k.bottom-v.bottom+g.bottom)/C.y,left:(v.left-k.left+g.left)/C.x,right:(k.right-v.right+g.right)/C.x}}const Ki=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var s,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:c,elements:u}=r,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...x}=Ot(t,r);if((s=a.arrow)!=null&&s.alignmentOffset)return{};const v=Te(o),w=Ee(l),j=Te(l)===l,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=m||(j||!h?[St(l)]:Bi(l)),N=g!=="none";!m&&N&&k.push(..._i(l,h,g,C));const A=[l,...k],I=await es(r,x),S=[];let y=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&S.push(I[v]),f){const H=Oi(o,i,C);S.push(I[H[0]],I[H[1]])}if(y=[...y,{placement:o,overflows:S}],!S.every(H=>H<=0)){var B,T;const H=(((B=a.flip)==null?void 0:B.index)||0)+1,_=A[H];if(_&&(!(f==="alignment"?w!==Ee(_):!1)||y.every(R=>Ee(R.placement)===w?R.overflows[0]>0:!0)))return{data:{index:H,overflows:y},reset:{placement:_}};let E=(T=y.filter(z=>z.overflows[0]<=0).sort((z,R)=>z.overflows[1]-R.overflows[1])[0])==null?void 0:T.placement;if(!E)switch(p){case"bestFit":{var D;const z=(D=y.filter(R=>{if(N){const q=Ee(R.placement);return q===w||q==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(q=>q>0).reduce((q,F)=>q+F,0)]).sort((R,q)=>R[1]-q[1])[0])==null?void 0:D[0];z&&(E=z);break}case"initialPlacement":E=l;break}if(o!==E)return{reset:{placement:E}}}return{}}}},Xi=new Set(["left","top"]);async function Yi(t,r){const{placement:s,platform:n,elements:o}=t,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Te(s),l=it(s),c=Ee(s)==="y",u=Xi.has(i)?-1:1,d=a&&c?-1:1,f=Ot(r,t);let{mainAxis:m,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(p=l==="end"?g*-1:g),c?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const Qi=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var s,n;const{x:o,y:a,placement:i,middlewareData:l}=r,c=await Yi(r,t);return i===((s=l.offset)==null?void 0:s.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},Ji=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var s,n;const{placement:o,rects:a,platform:i,elements:l}=r,{apply:c=()=>{},...u}=Ot(t,r),d=await es(r,u),f=Te(o),m=it(o),p=Ee(o)==="y",{width:g,height:h}=a.floating;let x,v;f==="top"||f==="bottom"?(x=f,v=m===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(v=f,x=m==="end"?"top":"bottom");const w=h-d.top-d.bottom,j=g-d.left-d.right,C=nt(h-d[x],w),k=nt(g-d[v],j),N=!r.middlewareData.shift;let A=C,I=k;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(I=j),(n=r.middlewareData.shift)!=null&&n.enabled.y&&(A=w),N&&!m){const y=fe(d.left,0),B=fe(d.right,0),T=fe(d.top,0),D=fe(d.bottom,0);p?I=g-2*(y!==0||B!==0?y+B:fe(d.left,d.right)):A=h-2*(T!==0||D!==0?T+D:fe(d.top,d.bottom))}await c({...r,availableWidth:I,availableHeight:A});const S=await i.getDimensions(l.floating);return g!==S.width||h!==S.height?{reset:{rects:!0}}:{}}}};function ts(t){const r=pe(t);let s=parseFloat(r.width)||0,n=parseFloat(r.height)||0;const o=ge(t),a=o?t.offsetWidth:s,i=o?t.offsetHeight:n,l=Ct(s)!==a||Ct(n)!==i;return l&&(s=a,n=i),{width:s,height:n,$:l}}function gr(t){return ne(t)?t:t.contextElement}function He(t){const r=gr(t);if(!ge(r))return xe(1);const s=r.getBoundingClientRect(),{width:n,height:o,$:a}=ts(r);let i=(a?Ct(s.width):s.width)/n,l=(a?Ct(s.height):s.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const el=xe(0);function rs(t){const r=ce(t);return!xr()||!r.visualViewport?el:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function tl(t,r,s){return r===void 0&&(r=!1),!s||r&&s!==ce(t)?!1:r}function ze(t,r,s,n){r===void 0&&(r=!1),s===void 0&&(s=!1);const o=t.getBoundingClientRect(),a=gr(t);let i=xe(1);r&&(n?ne(n)&&(i=He(n)):i=He(t));const l=tl(a,s,n)?rs(a):xe(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(a){const m=ce(a),p=n&&ne(n)?ce(n):n;let g=m,h=or(g);for(;h&&n&&p!==g;){const x=He(h),v=h.getBoundingClientRect(),w=pe(h),j=v.left+(h.clientLeft+parseFloat(w.paddingLeft))*x.x,C=v.top+(h.clientTop+parseFloat(w.paddingTop))*x.y;c*=x.x,u*=x.y,d*=x.x,f*=x.y,c+=j,u+=C,g=ce(h),h=or(g)}}return Rt({width:d,height:f,x:c,y:u})}function Bt(t,r){const s=$t(t).scrollLeft;return r?r.left+s:ze(be(t)).left+s}function ns(t,r){const s=t.getBoundingClientRect(),n=s.left+r.scrollLeft-Bt(t,s),o=s.top+r.scrollTop;return{x:n,y:o}}function rl(t){let{elements:r,rect:s,offsetParent:n,strategy:o}=t;const a=o==="fixed",i=be(n),l=r?Lt(r.floating):!1;if(n===i||l&&a)return s;let c={scrollLeft:0,scrollTop:0},u=xe(1);const d=xe(0),f=ge(n);if((f||!f&&!a)&&((qe(n)!=="body"||at(i))&&(c=$t(n)),ge(n))){const p=ze(n);u=He(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}const m=i&&!f&&!a?ns(i,c):xe(0);return{width:s.width*u.x,height:s.height*u.y,x:s.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:s.y*u.y-c.scrollTop*u.y+d.y+m.y}}function nl(t){return Array.from(t.getClientRects())}function sl(t){const r=be(t),s=$t(t),n=t.ownerDocument.body,o=fe(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),a=fe(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight);let i=-s.scrollLeft+Bt(t);const l=-s.scrollTop;return pe(n).direction==="rtl"&&(i+=fe(r.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:l}}const on=25;function ol(t,r){const s=ce(t),n=be(t),o=s.visualViewport;let a=n.clientWidth,i=n.clientHeight,l=0,c=0;if(o){a=o.width,i=o.height;const d=xr();(!d||d&&r==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=Bt(n);if(u<=0){const d=n.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(n.clientWidth-f.clientWidth-p);g<=on&&(a-=g)}else u<=on&&(a+=u);return{width:a,height:i,x:l,y:c}}const al=new Set(["absolute","fixed"]);function il(t,r){const s=ze(t,!0,r==="fixed"),n=s.top+t.clientTop,o=s.left+t.clientLeft,a=ge(t)?He(t):xe(1),i=t.clientWidth*a.x,l=t.clientHeight*a.y,c=o*a.x,u=n*a.y;return{width:i,height:l,x:c,y:u}}function an(t,r,s){let n;if(r==="viewport")n=ol(t,s);else if(r==="document")n=sl(be(t));else if(ne(r))n=il(r,s);else{const o=rs(t);n={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return Rt(n)}function ss(t,r){const s=Ae(t);return s===r||!ne(s)||We(s)?!1:pe(s).position==="fixed"||ss(s,r)}function ll(t,r){const s=r.get(t);if(s)return s;let n=rt(t,[],!1).filter(l=>ne(l)&&qe(l)!=="body"),o=null;const a=pe(t).position==="fixed";let i=a?Ae(t):t;for(;ne(i)&&!We(i);){const l=pe(i),c=hr(i);!c&&l.position==="fixed"&&(o=null),(a?!c&&!o:!c&&l.position==="static"&&!!o&&al.has(o.position)||at(i)&&!c&&ss(t,i))?n=n.filter(d=>d!==i):o=l,i=Ae(i)}return r.set(t,n),n}function cl(t){let{element:r,boundary:s,rootBoundary:n,strategy:o}=t;const i=[...s==="clippingAncestors"?Lt(r)?[]:ll(r,this._c):[].concat(s),n],l=i[0],c=i.reduce((u,d)=>{const f=an(r,d,o);return u.top=fe(f.top,u.top),u.right=nt(f.right,u.right),u.bottom=nt(f.bottom,u.bottom),u.left=fe(f.left,u.left),u},an(r,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function dl(t){const{width:r,height:s}=ts(t);return{width:r,height:s}}function ul(t,r,s){const n=ge(r),o=be(r),a=s==="fixed",i=ze(t,!0,a,r);let l={scrollLeft:0,scrollTop:0};const c=xe(0);function u(){c.x=Bt(o)}if(n||!n&&!a)if((qe(r)!=="body"||at(o))&&(l=$t(r)),n){const p=ze(r,!0,a,r);c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}else o&&u();a&&!n&&o&&u();const d=o&&!n&&!a?ns(o,l):xe(0),f=i.left+l.scrollLeft-c.x-d.x,m=i.top+l.scrollTop-c.y-d.y;return{x:f,y:m,width:i.width,height:i.height}}function Jt(t){return pe(t).position==="static"}function ln(t,r){if(!ge(t)||pe(t).position==="fixed")return null;if(r)return r(t);let s=t.offsetParent;return be(t)===s&&(s=s.ownerDocument.body),s}function os(t,r){const s=ce(t);if(Lt(t))return s;if(!ge(t)){let o=Ae(t);for(;o&&!We(o);){if(ne(o)&&!Jt(o))return o;o=Ae(o)}return s}let n=ln(t,r);for(;n&&ji(n)&&Jt(n);)n=ln(n,r);return n&&We(n)&&Jt(n)&&!hr(n)?s:n||Ei(t)||s}const fl=async function(t){const r=this.getOffsetParent||os,s=this.getDimensions,n=await s(t.floating);return{reference:ul(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ml(t){return pe(t).direction==="rtl"}const pl={convertOffsetParentRelativeRectToViewportRelativeRect:rl,getDocumentElement:be,getClippingRect:cl,getOffsetParent:os,getElementRects:fl,getClientRects:nl,getDimensions:dl,getScale:He,isElement:ne,isRTL:ml};function as(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function hl(t,r){let s=null,n;const o=be(t);function a(){var l;clearTimeout(n),(l=s)==null||l.disconnect(),s=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=t.getBoundingClientRect(),{left:d,top:f,width:m,height:p}=u;if(l||r(),!m||!p)return;const g=kt(f),h=kt(o.clientWidth-(d+m)),x=kt(o.clientHeight-(f+p)),v=kt(d),j={rootMargin:-g+"px "+-h+"px "+-x+"px "+-v+"px",threshold:fe(0,nt(1,c))||1};let C=!0;function k(N){const A=N[0].intersectionRatio;if(A!==c){if(!C)return i();A?i(!1,A):n=setTimeout(()=>{i(!1,1e-7)},1e3)}A===1&&!as(u,t.getBoundingClientRect())&&i(),C=!1}try{s=new IntersectionObserver(k,{...j,root:o.ownerDocument})}catch{s=new IntersectionObserver(k,j)}s.observe(t)}return i(!0),a}function xl(t,r,s,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=gr(t),d=o||a?[...u?rt(u):[],...rt(r)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",s,{passive:!0}),a&&v.addEventListener("resize",s)});const f=u&&l?hl(u,s):null;let m=-1,p=null;i&&(p=new ResizeObserver(v=>{let[w]=v;w&&w.target===u&&p&&(p.unobserve(r),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var j;(j=p)==null||j.observe(r)})),s()}),u&&!c&&p.observe(u),p.observe(r));let g,h=c?ze(t):null;c&&x();function x(){const v=ze(t);h&&!as(h,v)&&s(),h=v,g=requestAnimationFrame(x)}return s(),()=>{var v;d.forEach(w=>{o&&w.removeEventListener("scroll",s),a&&w.removeEventListener("resize",s)}),f?.(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const gl=Qi,bl=Ki,vl=Ji,kl=(t,r,s)=>{const n=new Map,o={platform:pl,...s},a={...o.platform,_c:n};return qi(t,r,{...o,platform:a})};var yl=typeof document<"u",wl=function(){},yt=yl?b.useLayoutEffect:wl;function Et(t,r){if(t===r)return!0;if(typeof t!=typeof r)return!1;if(typeof t=="function"&&t.toString()===r.toString())return!0;let s,n,o;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(s=t.length,s!==r.length)return!1;for(n=s;n--!==0;)if(!Et(t[n],r[n]))return!1;return!0}if(o=Object.keys(t),s=o.length,s!==Object.keys(r).length)return!1;for(n=s;n--!==0;)if(!{}.hasOwnProperty.call(r,o[n]))return!1;for(n=s;n--!==0;){const a=o[n];if(!(a==="_owner"&&t.$$typeof)&&!Et(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}function is(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function cn(t,r){const s=is(t);return Math.round(r*s)/s}function er(t){const r=M.useRef(t);return yt(()=>{r.current=t}),r}function jl(t){t===void 0&&(t={});const{placement:r="bottom",strategy:s="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,f]=M.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[m,p]=M.useState(n);Et(m,n)||p(n);const[g,h]=M.useState(null),[x,v]=M.useState(null),w=M.useCallback(R=>{R!==N.current&&(N.current=R,h(R))},[]),j=M.useCallback(R=>{R!==A.current&&(A.current=R,v(R))},[]),C=a||g,k=i||x,N=M.useRef(null),A=M.useRef(null),I=M.useRef(d),S=c!=null,y=er(c),B=er(o),T=er(u),D=M.useCallback(()=>{if(!N.current||!A.current)return;const R={placement:r,strategy:s,middleware:m};B.current&&(R.platform=B.current),kl(N.current,A.current,R).then(q=>{const F={...q,isPositioned:T.current!==!1};H.current&&!Et(I.current,F)&&(I.current=F,$s.flushSync(()=>{f(F)}))})},[m,r,s,B,T]);yt(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[u]);const H=M.useRef(!1);yt(()=>(H.current=!0,()=>{H.current=!1}),[]),yt(()=>{if(C&&(N.current=C),k&&(A.current=k),C&&k){if(y.current)return y.current(C,k,D);D()}},[C,k,D,y,S]);const _=M.useMemo(()=>({reference:N,floating:A,setReference:w,setFloating:j}),[w,j]),E=M.useMemo(()=>({reference:C,floating:k}),[C,k]),z=M.useMemo(()=>{const R={position:s,left:0,top:0};if(!E.floating)return R;const q=cn(E.floating,d.x),F=cn(E.floating,d.y);return l?{...R,transform:"translate("+q+"px, "+F+"px)",...is(E.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:q,top:F}},[s,l,E.floating,d.x,d.y]);return M.useMemo(()=>({...d,update:D,refs:_,elements:E,floatingStyles:z}),[d,D,_,E,z])}const Nl=(t,r)=>({...gl(t),options:[t,r]}),Cl=(t,r)=>({...bl(t),options:[t,r]}),Sl=(t,r)=>({...vl(t),options:[t,r]}),Rl={...M};let dn=!1,El=0;const un=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+El++;function Il(){const[t,r]=M.useState(()=>dn?un():void 0);return ir(()=>{t==null&&r(un())},[]),M.useEffect(()=>{dn=!0},[]),t}const Al=Rl.useId,Ml=Al||Il;let lr;process.env.NODE_ENV!=="production"&&(lr=new Set);function Ll(){for(var t,r=arguments.length,s=new Array(r),n=0;n<r;n++)s[n]=arguments[n];const o="Floating UI: "+s.join(" ");if(!((t=lr)!=null&&t.has(o))){var a;(a=lr)==null||a.add(o),console.error(o)}}function $l(){const t=new Map;return{emit(r,s){var n;(n=t.get(r))==null||n.forEach(o=>o(s))},on(r,s){t.has(r)||t.set(r,new Set),t.get(r).add(s)},off(r,s){var n;(n=t.get(r))==null||n.delete(s)}}}const Ol=M.createContext(null),Bl=M.createContext(null),Tl=()=>{var t;return((t=M.useContext(Ol))==null?void 0:t.id)||null},zl=()=>M.useContext(Bl);function Dl(t){const{open:r=!1,onOpenChange:s,elements:n}=t,o=Ml(),a=M.useRef({}),[i]=M.useState(()=>$l()),l=Tl()!=null;if(process.env.NODE_ENV!=="production"){const p=n.reference;p&&!ne(p)&&Ll("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=M.useState(n.reference),d=Gi((p,g,h)=>{a.current.openEvent=p?g:void 0,i.emit("openchange",{open:p,event:g,reason:h,nested:l}),s?.(p,g,h)}),f=M.useMemo(()=>({setPositionReference:u}),[]),m=M.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return M.useMemo(()=>({dataRef:a,open:r,onOpenChange:d,elements:m,events:i,floatingId:o,refs:f}),[r,d,m,i,o,f])}function _l(t){t===void 0&&(t={});const{nodeId:r}=t,s=Dl({...t,elements:{reference:null,floating:null,...t.elements}}),n=t.rootContext||s,o=n.elements,[a,i]=M.useState(null),[l,c]=M.useState(null),d=o?.domReference||a,f=M.useRef(null),m=zl();ir(()=>{d&&(f.current=d)},[d]);const p=jl({...t,elements:{...o,...l&&{reference:l}}}),g=M.useCallback(j=>{const C=ne(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),getClientRects:()=>j.getClientRects(),contextElement:j}:j;c(C),p.refs.setReference(C)},[p.refs]),h=M.useCallback(j=>{(ne(j)||j===null)&&(f.current=j,i(j)),(ne(p.refs.reference.current)||p.refs.reference.current===null||j!==null&&!ne(j))&&p.refs.setReference(j)},[p.refs]),x=M.useMemo(()=>({...p.refs,setReference:h,setPositionReference:g,domReference:f}),[p.refs,h,g]),v=M.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),w=M.useMemo(()=>({...p,...n,refs:x,elements:v,nodeId:r}),[p,x,v,r,n]);return ir(()=>{n.dataRef.current.floatingContext=w;const j=m?.nodesRef.current.find(C=>C.id===r);j&&(j.context=w)}),M.useMemo(()=>({...p,context:w,refs:x,elements:v}),[p,x,v,w])}function Pl({placement:t="bottom-start",offsetPx:r=4,enabled:s=!0}={}){const{refs:n,floatingStyles:o,context:a}=_l({placement:t,middleware:[Nl(r),Cl({fallbackAxisSideDirection:"end",padding:8}),Sl({apply({rects:i,elements:l}){Object.assign(l.floating.style,{minWidth:`${i.reference.width}px`})},padding:8})],whileElementsMounted:s?xl:void 0});return{refs:n,floatingStyles:o,context:a}}function Ze(t,r,s){let n=s.initialDeps??[],o,a=!0;function i(){var l,c,u;let d;s.key&&((l=s.debug)!=null&&l.call(s))&&(d=Date.now());const f=t();if(!(f.length!==n.length||f.some((g,h)=>n[h]!==g)))return o;n=f;let p;if(s.key&&((c=s.debug)!=null&&c.call(s))&&(p=Date.now()),o=r(...f),s.key&&((u=s.debug)!=null&&u.call(s))){const g=Math.round((Date.now()-d)*100)/100,h=Math.round((Date.now()-p)*100)/100,x=h/16,v=(w,j)=>{for(w=String(w);w.length<j;)w=" "+w;return w};console.info(`%c⏱ ${v(h,5)} /${v(g,5)} ms`,`
1452
1452
  font-size: .6rem;
1453
1453
  font-weight: bold;
1454
- color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,s?.key)}return s?.onChange&&!(a&&s.skipInitialOnChange)&&s.onChange(o),a=!1,o}return i.updateDeps=l=>{n=l},i}function fn(t,r){if(t===void 0)throw new Error("Unexpected undefined");return t}const Vl=(t,r)=>Math.abs(t-r)<1.01,Fl=(t,r,s)=>{let n;return function(...o){t.clearTimeout(n),n=t.setTimeout(()=>r.apply(this,o),s)}},mn=t=>{const{offsetWidth:r,offsetHeight:s}=t;return{width:r,height:s}},Zl=t=>t,Hl=t=>{const r=Math.max(t.startIndex-t.overscan,0),s=Math.min(t.endIndex+t.overscan,t.count-1),n=[];for(let o=r;o<=s;o++)n.push(o);return n},Wl=(t,r)=>{const s=t.scrollElement;if(!s)return;const n=t.targetWindow;if(!n)return;const o=i=>{const{width:l,height:c}=i;r({width:Math.round(l),height:Math.round(c)})};if(o(mn(s)),!n.ResizeObserver)return()=>{};const a=new n.ResizeObserver(i=>{const l=()=>{const c=i[0];if(c?.borderBoxSize){const u=c.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(mn(s))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return a.observe(s,{box:"border-box"}),()=>{a.unobserve(s)}},pn={passive:!0},hn=typeof window>"u"?!0:"onscrollend"in window,Ul=(t,r)=>{const s=t.scrollElement;if(!s)return;const n=t.targetWindow;if(!n)return;let o=0;const a=t.options.useScrollendEvent&&hn?()=>{}:Fl(n,()=>{r(o,!1)},t.options.isScrollingResetDelay),i=d=>()=>{const{horizontal:f,isRtl:m}=t.options;o=f?s.scrollLeft*(m&&-1||1):s.scrollTop,a(),r(o,d)},l=i(!0),c=i(!1);s.addEventListener("scroll",l,pn);const u=t.options.useScrollendEvent&&hn;return u&&s.addEventListener("scrollend",c,pn),()=>{s.removeEventListener("scroll",l),u&&s.removeEventListener("scrollend",c)}},Gl=(t,r,s)=>{if(r?.borderBoxSize){const n=r.borderBoxSize[0];if(n)return Math.round(n[s.options.horizontal?"inlineSize":"blockSize"])}return t[s.options.horizontal?"offsetWidth":"offsetHeight"]},ql=(t,{adjustments:r=0,behavior:s},n)=>{var o,a;const i=t+r;(a=(o=n.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[n.options.horizontal?"left":"top"]:i,behavior:s})};class Kl{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let s=null;const n=()=>s||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:s=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{const i=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var o;(o=n())==null||o.disconnect(),s=null},observe:o=>{var a;return(a=n())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=n())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=s=>{Object.entries(s).forEach(([n,o])=>{typeof o>"u"&&delete s[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Zl,rangeExtractor:Hl,onChange:()=>{},measureElement:Gl,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...s}},this.notify=s=>{var n,o;(o=(n=this.options).onChange)==null||o.call(n,this,s)},this.maybeNotify=Ze(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),s=>{this.notify(s)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(s=>s()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var s;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((s=this.scrollElement)==null?void 0:s.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=a,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(s,n)=>{const o=new Map,a=new Map;for(let i=n-1;i>=0;i--){const l=s[i];if(o.has(l.lane))continue;const c=a.get(l.lane);if(c==null||l.end>c.end?a.set(l.lane,l):l.end<c.end&&o.set(l.lane,!0),o.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,l)=>i.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurementOptions=Ze(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(s,n,o,a,i,l)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMeasuredCacheIndexes=[],{count:s,paddingStart:n,scrollMargin:o,getItemKey:a,enabled:i,lanes:l}),{key:!1}),this.getMeasurements=Ze(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:s,paddingStart:n,scrollMargin:o,getItemKey:a,enabled:i,lanes:l},c)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>s)for(const m of this.laneAssignments.keys())m>=s&&this.laneAssignments.delete(m);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===s&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,u),f=new Array(l).fill(void 0);for(let m=0;m<u;m++){const p=d[m];p&&(f[p.lane]=m)}for(let m=u;m<s;m++){const p=a(m),g=this.laneAssignments.get(m);let h,x;if(g!==void 0&&this.options.lanes>1){h=g;const C=f[h],k=C!==void 0?d[C]:void 0;x=k?k.end+this.options.gap:n+o}else{const C=this.options.lanes===1?d[m-1]:this.getFurthestMeasurement(d,m);x=C?C.end+this.options.gap:n+o,h=C?C.lane:m%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(m,h)}const v=c.get(p),w=typeof v=="number"?v:this.options.estimateSize(m),j=x+w;d[m]={index:m,start:x,size:w,end:j,key:p,lane:h},f[h]=m}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Ze(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(s,n,o,a)=>this.range=s.length>0&&n>0?Xl({measurements:s,outerSize:n,scrollOffset:o,lanes:a}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Ze(()=>{let s=null,n=null;const o=this.calculateRange();return o&&(s=o.startIndex,n=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,s,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,s,n]},(s,n,o,a,i)=>a===null||i===null?[]:s({startIndex:a,endIndex:i,overscan:n,count:o}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=s=>{const n=this.options.indexAttribute,o=s.getAttribute(n);return o?parseInt(o,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(s,n)=>{const o=this.indexFromElement(s),a=this.measurementsCache[o];if(!a)return;const i=a.key,l=this.elementsCache.get(i);l!==s&&(l&&this.observer.unobserve(l),this.observer.observe(s),this.elementsCache.set(i,s)),s.isConnected&&this.resizeItem(o,this.options.measureElement(s,n,this))},this.resizeItem=(s,n)=>{const o=this.measurementsCache[s];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,i=n-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.measureElement=s=>{if(!s){this.elementsCache.forEach((n,o)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(o))});return}this._measureElement(s,void 0)},this.getVirtualItems=Ze(()=>[this.getVirtualIndexes(),this.getMeasurements()],(s,n)=>{const o=[];for(let a=0,i=s.length;a<i;a++){const l=s[a],c=n[l];o.push(c)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=s=>{const n=this.getMeasurements();if(n.length!==0)return fn(n[ls(0,n.length-1,o=>fn(n[o]).start,s)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const s=this.scrollElement.document.documentElement;return this.options.horizontal?s.scrollWidth-this.scrollElement.innerWidth:s.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(s,n,o=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),i=this.getScrollOffset();n==="auto"&&(n=s>=i+a?"end":"start"),n==="center"?s+=(o-a)/2:n==="end"&&(s-=a);const l=this.getMaxScrollOffset();return Math.max(Math.min(l,s),0)},this.getOffsetForIndex=(s,n="auto")=>{s=Math.max(0,Math.min(s,this.options.count-1));const o=this.measurementsCache[s];if(!o)return;const a=this.getSize(),i=this.getScrollOffset();if(n==="auto")if(o.end>=i+a-this.options.scrollPaddingEnd)n="end";else if(o.start<=i+this.options.scrollPaddingStart)n="start";else return[i,n];if(n==="end"&&s===this.options.count-1)return[this.getMaxScrollOffset(),n];const l=n==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,n,o.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(s,{align:n="start",behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(s,n),{adjustments:void 0,behavior:o})},this.scrollToIndex=(s,{align:n="auto",behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),s=Math.max(0,Math.min(s,this.options.count-1)),this.currentScrollToIndex=s;let a=0;const i=10,l=u=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(s,u);if(!d){console.warn("Failed to get offset for index:",s);return}const[f,m]=d;this._scrollToOffset(f,{adjustments:void 0,behavior:o}),this.targetWindow.requestAnimationFrame(()=>{const p=()=>{if(this.currentScrollToIndex!==s)return;const g=this.getScrollOffset(),h=this.getOffsetForIndex(s,m);if(!h){console.warn("Failed to get offset for index:",s);return}Vl(h[0],g)||c(m)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(p):p()})},c=u=>{this.targetWindow&&this.currentScrollToIndex===s&&(a++,a<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",a,i),this.targetWindow.requestAnimationFrame(()=>l(u))):console.warn(`Failed to scroll to index ${s} after ${i} attempts.`))};l(n)},this.scrollBy=(s,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+s,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var s;const n=this.getMeasurements();let o;if(n.length===0)o=this.options.paddingStart;else if(this.options.lanes===1)o=((s=n[n.length-1])==null?void 0:s.end)??0;else{const a=Array(this.options.lanes).fill(null);let i=n.length-1;for(;i>=0&&a.some(l=>l===null);){const l=n[i];a[l.lane]===null&&(a[l.lane]=l.end),i--}o=Math.max(...a.filter(l=>l!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(s,{adjustments:n,behavior:o})=>{this.options.scrollToFn(s,{behavior:o,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(r)}}const ls=(t,r,s,n)=>{for(;t<=r;){const o=(t+r)/2|0,a=s(o);if(a<n)t=o+1;else if(a>n)r=o-1;else return o}return t>0?t-1:0};function Xl({measurements:t,outerSize:r,scrollOffset:s,lanes:n}){const o=t.length-1,a=c=>t[c].start;if(t.length<=n)return{startIndex:0,endIndex:o};let i=ls(0,o,a,s),l=i;if(n===1)for(;l<o&&t[l].end<s+r;)l++;else if(n>1){const c=Array(n).fill(0);for(;l<o&&c.some(d=>d<s+r);){const d=t[l];c[d.lane]=d.end,l++}const u=Array(n).fill(s+r);for(;i>=0&&u.some(d=>d>=s);){const d=t[i];u[d.lane]=d.start,i--}i=Math.max(0,i-i%n),l=Math.min(o,l+(n-1-l%n))}return{startIndex:i,endIndex:l}}const xn=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Yl({useFlushSync:t=!0,...r}){const s=M.useReducer(()=>({}),{})[1],n={...r,onChange:(a,i)=>{var l;t&&i?gn.flushSync(s):s(),(l=r.onChange)==null||l.call(r,a,i)}},[o]=M.useState(()=>new Kl(n));return o.setOptions(n),xn(()=>o._didMount(),[]),xn(()=>o._willUpdate()),o}function Ql(t){return Yl({observeElementRect:Wl,observeElementOffset:Ul,scrollToFn:ql,...t})}const Jl=36,ec=5;function tc({count:t,parentRef:r,estimateSize:s=Jl,overscan:n=ec,enabled:o=!0}){const a=Ql({count:o?t:0,getScrollElement:()=>r.current,estimateSize:b.useCallback(()=>s,[s]),overscan:n});return{virtualItems:a.getVirtualItems(),totalSize:a.getTotalSize(),scrollToIndex:a.scrollToIndex,measureElement:a.measureElement}}const rc=b.forwardRef(function({value:r,onChange:s,placeholder:n="Search...",className:o,listboxId:a,activeDescendantId:i},l){const c=b.useCallback(()=>{s("")},[s]);return e.jsxs("div",{className:tt("lookup-field__search-container",o),children:[e.jsx(Jo,{className:"lookup-field__search-icon"}),e.jsx("input",{ref:l,type:"text",className:"lookup-field__search",value:r,onChange:u=>s(u.target.value),placeholder:n,"aria-label":n,"aria-autocomplete":"list","aria-controls":a,"aria-activedescendant":i}),r&&e.jsx("button",{type:"button",className:"lookup-field__search-clear",onClick:c,"aria-label":"Clear search",tabIndex:-1,children:e.jsx($n,{className:"h-4 w-4"})})]})});function nc({message:t}){return e.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"lookup-field__live-region",children:t})}const sc=10,oc=50,ac=1;function ic({entity:t,label:r,displayFields:s,value:n,onChange:o,fetcher:a,clearable:i=!0,placeholder:l,className:c,pageSize:u=sc,onError:d,searchFields:f,minChars:m=ac,displayValue:p,displayTemplate:g,renderSelected:h,filters:x,getFilters:v,dependencies:w,orderBy:j,bindFields:C,readOnly:k=!1,disabled:N=!1,error:A=!1,onFocus:I,onBlur:S,onReady:y,onInvalidValue:B,noResultsText:T,searchPlaceholder:D,required:H=!1,showRequiredIndicator:_,validateOnBlur:E=!0,onValidationChange:z,errorText:R},q){const{t:F}=vi(),ie=b.useMemo(()=>j??{field:s[0],direction:"asc"},[j,s]),Z=b.useId(),[L,G]=b.useState(!1),[se,De]=b.useState(!1),[Y,Ne]=b.useState(null),[ee,de]=b.useState([]),[oe,re]=b.useState(null),[K,te]=b.useState(1),[ue,ve]=b.useState(!0),[Me,Ke]=b.useState(!1),ke=b.useRef(null),he=b.useRef(null),br=b.useRef(JSON.stringify(w??[])),Ce=b.useRef(null),Tt=b.useRef(null),lt=b.useRef(null),[_e,Le]=b.useState(""),ye=qa(_e),[fs,me]=b.useState(""),vr=b.useRef(!1),le=b.useRef(null);le.current=oe;const Pe=b.useRef(null),Xe=b.useRef(!1),kr=b.useRef(B);b.useEffect(()=>{kr.current=B},[B]);const ms=b.useCallback(()=>{L&&(Xe.current&&(Xe.current=!1,S?.(le.current)),G(!1),Le(""))},[L,S]);ki(Pe,ms,L);const{refs:yr,floatingStyles:ps}=Pl({enabled:L}),{virtualItems:wr,totalSize:hs}=tc({count:ee.length,parentRef:Ce,enabled:L&&ee.length>0}),[ct,we]=b.useState(!1),[jr,dt]=b.useState(!1),[zt,xs]=b.useState([]),[Nr,gs]=b.useState(0),[Dt,bs]=b.useState(1),[Cr,_t]=b.useState(!1),Sr=b.useRef(""),Pt=b.useRef(!1),Ve=b.useRef(1),Rr=A||jr,vs=_??H,Ye=b.useRef(z);b.useEffect(()=>{Ye.current=z},[z]);const ut=b.useCallback(()=>nr(v?v():x),[x,v]),ft=b.useCallback(async(P="")=>{ke.current&&ke.current.abort();const V=new AbortController;ke.current=V;try{De(!0),Ne(null),me(F("announcements.loading"));const U=ut(),X=[...new Set(["Id",...s,...C??[]])],ae=await a(t,{fields:X,search:P.length>=m?P:"",searchFields:f??s,page:1,pageSize:u,filters:U,orderBy:ie});if(V.signal.aborted)return;de(ae.data),!vr.current&&y&&(vr.current=!0,setTimeout(()=>{y({firstPageLoaded:!0},Ht)},0)),ae.data.length===0?me(F("announcements.noResults")):me(F("announcements.opened",{count:ae.data.length})),ae.data.length<u&&ve(!1)}catch(U){if(U instanceof Error&&U.name==="AbortError")return;const X=U instanceof Error?U:new Error("Unknown error");Ne(X),d?.(X)}finally{V.signal.aborted||De(!1)}},[t,s,C,f,u,m,d,y,ut,ie,a]),Er=b.useCallback(async(P="")=>{if(Pt.current||Me||!ue)return;const V=Ve.current;try{Ke(!0),me(F("announcements.loadingMore"));const U=ut(),X=V+1,ae=[...new Set(["Id",...s,...C??[]])],qt=await a(t,{fields:ae,search:P.length>=m?P:"",searchFields:f??s,page:X,pageSize:u,filters:U,orderBy:ie});de(Ls=>[...Ls,...qt.data]),Ve.current=X,te(X),me(F("announcements.resultsLoaded",{count:qt.data.length})),qt.data.length<u&&ve(!1)}catch(U){if(U instanceof Error&&U.name==="AbortError")return;const X=U instanceof Error?U:new Error("Unknown error");d?.(X)}finally{Ke(!1)}},[t,s,C,f,u,m,Me,ue,d,ut,ie,a,F]),mt=b.useCallback(async P=>{try{const V=[...new Set(["Id",...s,...C??[]])];console.log("[LookupField] fetchAndSetRecordById:",{recordId:P,entity:t,allFields:V});const U=await a(t,{fields:V,filters:[[{Id:P}]],page:1,pageSize:1});return console.log("[LookupField] fetchAndSetRecordById response:",U),U.data[0]??null}catch(V){return console.error("[LookupField] fetchAndSetRecordById error:",V),null}},[t,s,C,a]),pt=b.useCallback(()=>N||k?(dt(!1),Ye.current?.(!0),!0):H&&!le.current?(dt(!0),Ye.current?.(!1),!1):(dt(!1),Ye.current?.(!0),!0),[H,k,N]),ks=b.useCallback(()=>{const P=Ce.current;if(!P||Me||!ue)return;const{scrollTop:V,scrollHeight:U,clientHeight:X}=P;U-V-X<oc&&Er(ye)},[Me,ue,Er,ye]);b.useEffect(()=>{L&&Tt.current&&Tt.current.focus()},[L]),b.useEffect(()=>{L&&(ye.length===0||ye.length>=m)&&(Cr&&Sr.current===ye&&zt.length>0?(Pt.current=!0,de(zt),Ve.current=Dt,te(Dt),ve(!0),requestAnimationFrame(()=>{Ce.current&&(Ce.current.scrollTop=Nr),setTimeout(()=>{Pt.current=!1},0)})):(Ve.current=1,te(1),ve(!0),de([]),ft(ye)))},[L,ye,ft,m,Cr,zt,Dt,Nr]),b.useEffect(()=>(L||(Le(""),Ve.current=1,te(1),ve(!0),Ke(!1)),()=>{ke.current&&ke.current.abort()}),[L]);const Vt=b.useRef(void 0),Ir=b.useRef(mt);Ir.current=mt;const Ar=b.useRef(0);b.useEffect(()=>{const V=Vt.current===void 0||Vt.current!==n;if(Vt.current=n,n===null){we(!1);return}if(!V)return;const U=++Ar.current;Ir.current(n).then(X=>{Ar.current===U&&(X?(re(X),we(!1)):(we(!0),re(null),kr.current?.(n)))})},[n]);const Ft=JSON.stringify(w??[]);b.useEffect(()=>{br.current!==Ft&&(br.current=Ft,ke.current&&ke.current.abort(),_t(!1),de([]),re(null),Ve.current=1,te(1),ve(!0),G(!1),Le(""))},[Ft]);const ht=JSON.stringify(x??[]),Mr=b.useRef(ht);b.useEffect(()=>{Mr.current!==ht&&(Mr.current=ht,_t(!1))},[ht]);const Lr=b.useCallback(P=>{if(h)return h(P);if(g)return Ha(g,P);if(p){const V=P[p];return V!=null?String(V):""}return s.map(V=>{const U=P[V];return U!=null?String(U):""}).join(" - ")},[h,g,p,s]),ys=()=>{N||k||G(P=>!P)},$r=P=>s.map(V=>String(P[V]??"")).join(" - "),Zt=P=>{he.current=oe,re(P),le.current=P,we(!1),jr&&(dt(!1),Ye.current?.(!0)),xs(ee),gs(Ce.current?.scrollTop??0),bs(K),Sr.current=_e,_t(!0),o(P,he.current),Le(""),G(!1),Ne(null),Ut.current=!0,lt.current?.focus();const V=Lr(P);me(F("announcements.selected",{value:V}))},ws=P=>{P.stopPropagation(),he.current=oe,re(null),le.current=null,we(!1),o(null,he.current),me(F("announcements.cleared"))},Or=b.useCallback(()=>{!le.current&&!ct||(he.current=le.current,re(null),le.current=null,we(!1),o(null,he.current),me(F("announcements.cleared")))},[ct,o,F]),js=b.useCallback(()=>{Gt.current=!0,G(!1),Le(""),me(F("announcements.closed")),setTimeout(()=>{if(!Pe.current)return;const V=Array.from(document.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')),U=V.findIndex(ae=>Pe.current?.contains(ae));let X=null;for(let ae=U+1;ae<V.length;ae++)if(!Pe.current?.contains(V[ae])){X=V[ae];break}X&&X.focus()},0)},[F]),Ns=b.useCallback(()=>{G(!1),Le(""),me(F("announcements.closed")),lt.current?.focus()},[F]),Br=b.useCallback(()=>{he.current=le.current,re(null),we(!1),o(null,he.current),me(F("announcements.cleared"))},[o,F]),Ht=b.useMemo(()=>({clear:Br,focus:()=>lt.current?.focus(),reload:()=>ft(ye),getValue:()=>le.current,setValue:async P=>{const V=await mt(P);V?(he.current=le.current,re(V),we(!1),o(V,he.current)):(we(!0),re(null),B?.(P))},open:()=>G(!0),close:()=>G(!1),validate:pt}),[Br,ft,ye,mt,o,B,pt]);b.useImperativeHandle(q,()=>Ht,[Ht]);const{highlightedIndex:Se,setHighlightedIndex:Tr,handleKeyDown:Cs}=Ka({records:ee,isOpen:L,onSelect:Zt,onClose:js,onEscape:Ns,onClear:Or,searchQuery:_e});b.useEffect(()=>{L&&Tr(-1)},[L,ee,Tr]),b.useEffect(()=>{if(Se>=0&&Ce.current){const P=Ce.current.querySelector(`[data-index="${Se}"]`);P?.scrollIntoView&&P.scrollIntoView({block:"nearest",behavior:"smooth"})}},[Se]);const Wt=b.useRef(!1),Ut=b.useRef(!1),Gt=b.useRef(!1),Ss=()=>{Wt.current=!0},Rs=P=>{N||L||P.key==="Backspace"&&i&&!k&&(oe||ct)&&(P.preventDefault(),Or())},Es=()=>{if(!N&&!k){if(Ut.current){Ut.current=!1;return}if(Gt.current){Gt.current=!1;return}if(Wt.current){Wt.current=!1;return}L||G(!0)}},Is=b.useCallback(()=>{N||Xe.current||(Xe.current=!0,I?.(le.current))},[I,N]),As=b.useCallback(P=>{if(N)return;const V=P.relatedTarget;!Pe.current?.contains(V)&&(Xe.current=!1,E&&!k&&pt(),S?.(le.current))},[S,E,k,N,pt]),Ms=()=>{if(_e.length>0&&_e.length<m)return e.jsx("div",{className:"lookup-field__empty",children:F("minChars",{count:m})});if(se)return e.jsxs("div",{className:"lookup-field__loading",children:[e.jsx(Hr,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{children:F("loading")})]});if(Y)return e.jsx("div",{className:"lookup-field__error",children:F("error")});if(ee.length===0)return e.jsx("div",{className:"lookup-field__empty",children:T??F("noResults")});const P=wr.length>0;return e.jsxs("div",{ref:Ce,className:"lookup-field__options",onScroll:ks,children:[P?e.jsx("div",{style:{height:`${hs}px`,width:"100%",position:"relative"},children:wr.map(V=>{const U=ee[V.index],X=V.index;return e.jsx("div",{id:`${Z}-option-${U.Id}`,"data-index":X,className:tt("lookup-field__option",X===Se&&"lookup-field__option--highlighted"),role:"option","aria-selected":oe?.Id===U.Id,tabIndex:-1,onClick:()=>Zt(U),style:{position:"absolute",top:0,left:0,width:"100%",height:`${V.size}px`,transform:`translateY(${V.start}px)`},children:$r(U)},U.Id)})}):ee.map((V,U)=>e.jsx("div",{id:`${Z}-option-${V.Id}`,"data-index":U,className:tt("lookup-field__option",U===Se&&"lookup-field__option--highlighted"),role:"option","aria-selected":oe?.Id===V.Id,tabIndex:-1,onClick:()=>Zt(V),children:$r(V)},V.Id)),Me&&e.jsx("div",{className:"lookup-field__loading-more",children:e.jsx(Hr,{className:"h-4 w-4 animate-spin"})})]})};return e.jsxs("div",{ref:Pe,className:tt("lookup-field",N&&"lookup-field--disabled",k&&"lookup-field--readonly",Rr&&"lookup-field--error",c),role:"combobox","aria-expanded":!N&&L,"aria-haspopup":"listbox","aria-labelledby":`${Z}-label`,"aria-controls":L?`${Z}-listbox`:void 0,"aria-disabled":N||void 0,"aria-readonly":!N&&k||void 0,"aria-invalid":Rr||void 0,"aria-required":H||void 0,onKeyDown:N?void 0:Cs,onFocus:Is,onBlur:As,children:[e.jsx(nc,{message:fs}),e.jsxs("label",{id:`${Z}-label`,htmlFor:Z,className:"lookup-field__label",children:[r,vs&&e.jsx("span",{className:"lookup-field__required-indicator",children:F("validation.requiredIndicator")})]}),e.jsxs("button",{ref:P=>{lt.current=P,yr.setReference(P)},id:Z,type:"button",className:"lookup-field__trigger",onClick:ys,onMouseDown:Ss,onKeyDown:Rs,onFocus:Es,disabled:N,tabIndex:N?-1:0,children:[e.jsx("span",{className:"lookup-field__selected-text",children:ct?F("notFound"):oe?Lr(oe):l??F("placeholder")}),e.jsx(Xo,{className:tt("lookup-field__chevron",L&&"lookup-field__chevron--open"),"aria-hidden":"true"}),i&&oe&&!k&&!N&&e.jsx($n,{className:"lookup-field__clear",onClick:ws,"aria-label":"Clear selection"})]}),R&&e.jsx("span",{className:"lookup-field__error-text",role:"alert",children:R}),L&&e.jsxs("div",{ref:yr.setFloating,style:ps,className:"lookup-field__dropdown",children:[e.jsx(rc,{ref:Tt,value:_e,onChange:Le,placeholder:D??F("searchPlaceholder"),listboxId:`${Z}-listbox`,activeDescendantId:Se>=0&&ee[Se]?`${Z}-option-${ee[Se].Id}`:void 0}),e.jsx("div",{id:`${Z}-listbox`,role:"listbox","aria-label":r,children:Ms()})]})]})}const cs=b.forwardRef(ic);cs.displayName="LookupField";class lc extends Error{constructor(r,s,n){super(r),this.status=s,this.statusText=n,this.name="ApiError"}}const cc={"Content-Type":"application/json"};function dc(t,r){const s={...cc,...r?.headers};return async(n,o)=>{const a=`${t}/${n}/search`,i=o.fields.includes("Id")?o.fields:["Id",...o.fields],l=await fetch(a,{method:"POST",headers:s,body:JSON.stringify({...o,fields:i})});if(!l.ok)throw new lc(`API Error: ${l.status} ${l.statusText}`,l.status,l.statusText);return l.json()}}const uc=({productName:t="Mi Aplicación",siesaLogoPath:r,siesaLogoWidth:s,siesaLogoHeight:n,userDropdown:o,navigationItems:a,children:i,className:l="",contentClassName:c="",navbarProps:u={},navigationRailProps:d={}})=>{const[f,m]=b.useState("collapsed"),p=g=>{g&&m(g)};return e.jsxs("div",{className:["h-screen","w-full","bg-white","dark:bg-dark-bg-primary","flex","flex-col","overflow-hidden",l].join(" ").replace(/\s+/g," ").trim(),children:[e.jsx(ot,{productName:t,userDropdown:o,hideActionButtons:!0,showSiesaLogoLeading:!0,showBusinessLogo:!1,siesaLogo:r?e.jsx("img",{src:r,alt:"Siesa",className:"object-contain",style:{width:s||"100%",height:n||"100%"}}):void 0,className:"bg-white dark:bg-dark-bg-primary",...u}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsx(It,{state:f,items:a,showSearchButton:!1,onStateChange:p,...d}),e.jsx("div",{className:["flex-1","overflow-y-auto","bg-gray-50","dark:bg-dark-bg-primary",c].join(" ").replace(/\s+/g," ").trim(),children:i})]})]})},fc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.543 2.232a.75.75 0 0 0-1.085 0l-5.25 5.5A.75.75 0 0 0 2.75 9H4v4a1 1 0 0 0 1 1h1.5a.5.5 0 0 0 .5-.5v-2a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v2a.5.5 0 0 0 .5.5H12a1 1 0 0 0 1-1V9h1.25a.75.75 0 0 0 .543-1.268l-5.25-5.5Z"})}),mc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0ZM5.37 2.822a6.493 6.493 0 0 0-2.818 3.428h2.103c.088-.907.254-1.778.494-2.595a8.932 8.932 0 0 1 .221-.833ZM1.5 8c0 .522.062 1.03.179 1.516l.135.484h2.49a16.15 16.15 0 0 1 0-4H1.815L1.68 6.484A6.533 6.533 0 0 0 1.5 8Zm.552 2.75A6.493 6.493 0 0 0 5.37 14.18a8.932 8.932 0 0 1-.221-.833 13.2 13.2 0 0 1-.494-2.595H2.552Zm4.058 0c.083.78.23 1.497.429 2.128.197.622.423 1.07.649 1.357.225.286.401.265.312.265.089 0 .265.021.49-.265.226-.287.452-.735.649-1.357.199-.631.346-1.348.429-2.128H6.11Zm4.234 0a13.198 13.198 0 0 1-.494 2.595 8.938 8.938 0 0 1-.22.833 6.493 6.493 0 0 0 2.817-3.428h-2.103Zm2.104-2h-2.48a16.15 16.15 0 0 0 0-4h2.48l.135.484A6.538 6.538 0 0 1 14.5 8a6.538 6.538 0 0 1-.179 1.516l-.135.484h.162Zm-2.818-4.928c.167.251.394.699.221.833.24.817.406 1.688.494 2.595h2.103a6.493 6.493 0 0 0-2.818-3.428ZM9.89 6h-3.78c.083-.78.23-1.497.429-2.128.197-.622.423-1.07.649-1.357.225-.286.401-.265.312-.265.089 0 .265-.021.49.265.226.287.452.735.649 1.357.199.631.346 1.348.429 2.128Zm-4.234 0H3.553a6.493 6.493 0 0 1 2.818-3.428 8.932 8.932 0 0 0-.221.833c-.24.817-.406 1.688-.494 2.595Zm.144 2a14.65 14.65 0 0 0 0 4h4.4a14.65 14.65 0 0 0 0-4H5.8Z"})}),pc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M4 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V6.414A2 2 0 0 0 13.414 5L10 1.586A2 2 0 0 0 8.586 1H4Zm1 5a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1H5Zm-.5 2.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5Zm.5 1.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1H5Z",clipRule:"evenodd"})}),hc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1 9.5A3.5 3.5 0 0 0 4.5 13H12a3 3 0 0 0 .917-5.857 2.503 2.503 0 0 0-3.198-3.019 3.5 3.5 0 0 0-6.628 2.171A3.5 3.5 0 0 0 1 9.5Z"})}),xc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4ZM10 4a2 2 0 0 1 2-2h.5a.5.5 0 0 1 0 1H12a1 1 0 0 0-1 1v.5a.5.5 0 0 1-1 0V4ZM2 12a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v2ZM10.5 8a.5.5 0 0 0-.5.5V10H8.5a.5.5 0 0 0 0 1H10v1.5a.5.5 0 0 0 1 0V11h1.5a.5.5 0 0 0 0-1H11V8.5a.5.5 0 0 0-.5-.5Z"})}),gc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"})}),bc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M2.5 4a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1ZM4.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM4 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 4 8Zm.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM3 8a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-.5 4.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Z",clipRule:"evenodd"})}),vc=({className:t=""})=>e.jsxs("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M14 2H2c-.55 0-.95.538-.75 1.032l3 7.5c.127.318.44.528.783.528h5.934c.343 0 .656-.21.783-.528l3-7.5C14.95 2.538 14.55 2 14 2Z"}),e.jsx("path",{d:"M6 12.25v1.25a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1.25H6Z"})]}),kc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),yc=({className:t=""})=>e.jsxs("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),wc=({title:t="List View",navbarProductName:r="SB Commercial",tableTitle:s="Usuarios",columns:n,data:o,navigationItems:a,quickFilters:i,actionButtons:l,userDropdown:c,notifications:u,environmentBadge:d,showNavigationRail:f=!0,navigationRailState:m="collapsed",onNavigationRailStateChange:p,onNavItemClick:g,onSearch:h,searchPlaceholder:x="Buscar",onSort:v,sortColumn:w,sortDirection:j,pagination:C,loading:k=!1,loadingRows:N=5,emptyMessage:A="No hay datos disponibles",className:I="",onNotificationsClick:S,viewOptions:y,selectedViewOption:B,onViewOptionChange:T})=>{const[D,H]=b.useState(""),[_,E]=b.useState(!1),z=a||[{id:"home",icon:e.jsx(fc,{className:"w-4 h-4"}),label:"Inicio",active:!0},{id:"option1",icon:e.jsx(mc,{className:"w-4 h-4"}),label:"Opción 1"},{id:"option2",icon:e.jsx(pc,{className:"w-4 h-4"}),label:"Opción 2"},{id:"option3",icon:e.jsx(hc,{className:"w-4 h-4"}),label:"Opción 3"},{id:"more",icon:e.jsx(xc,{className:"w-4 h-4"}),label:"Ver más..."}],R=i||[{id:"paid",label:"Facturas Pagadas",color:"lime"},{id:"pending",label:"Facturas Pendientes por Pago",color:"rose"},{id:"orders",label:"Órdenes de Compra",color:"sky"}],q=l||[{id:"audit",label:"Auditoría",leftIcon:e.jsx(bc,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"filter",label:"Filtrar",leftIcon:e.jsx(vc,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"create",label:"Crear",leftIcon:e.jsx(gc,{className:"w-4 h-4"}),type:"default",onClick:()=>{}}],F=Z=>{H(Z.target.value),h?.(Z.target.value)},ie=n.map(Z=>({header:Z.header,accessor:Z.accessor,sortable:Z.sortable,render:Z.render,align:Z.align,width:Z.width}));return e.jsxs("div",{className:["bg-background-secondary","dark:bg-dark-bg-primary","flex","w-full","h-full","min-h-screen",I].join(" "),children:[f&&e.jsx(It,{state:m,items:z,onStateChange:p,onItemClick:g,showSearchButton:!0}),e.jsxs("div",{className:"flex flex-col flex-1 overflow-hidden",children:[e.jsx(ot,{productName:r,environmentBadge:d,userDropdown:c,notifications:u,hideActionButtons:!1,onNotificationsClick:S,className:"bg-background-secondary dark:bg-dark-bg-primary"}),e.jsx("div",{className:"flex items-center gap-2 px-4 py-2 w-full bg-background-secondary dark:bg-dark-bg-primary",children:R.map(Z=>e.jsx(Oe,{color:Z.color,label:Z.label,leftIcon:Z.icon},Z.id))}),e.jsx("div",{className:"flex flex-1 overflow-hidden bg-background-secondary dark:bg-dark-bg-primary",children:e.jsxs("div",{className:"flex flex-col gap-4 flex-1 bg-white dark:bg-dark-bg-primary p-4 rounded-tl-3xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("h2",{className:"font-bold text-xl leading-7 tracking-[-0.5px] text-content-primary dark:text-dark-content-primary",children:t}),e.jsx("div",{className:"flex items-center gap-2",children:q.map(Z=>e.jsx(Q,{type:Z.type,size:"sm",leftIcon:Z.leftIcon,onClick:Z.onClick,children:Z.label},Z.id))})]}),e.jsxs("div",{className:"flex flex-col gap-4 flex-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-xl p-8 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-4 w-full",children:[e.jsx("h3",{className:"flex-1 font-bold text-base leading-6 text-content-primary dark:text-dark-content-primary overflow-hidden text-ellipsis whitespace-nowrap",children:s}),e.jsx(st,{placeholder:x,leftIcon:e.jsx(yc,{className:"w-4 h-4"}),value:D,onChange:F,className:"w-[200px]"}),y&&e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>E(!_),className:"flex items-center gap-3 px-3 py-2 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-lg shadow-xs hover:bg-background-secondary dark:hover:bg-dark-bg-secondary transition-colors",children:[e.jsx("span",{className:"font-bold text-sm text-content-secondary dark:text-content-secondary",children:"Ver"}),e.jsx(kc,{className:"w-5 h-5 text-content-secondary dark:text-content-secondary"})]}),_&&e.jsx("div",{className:"absolute top-full right-0 mt-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-lg shadow-lg z-10 min-w-[150px]",children:y.map(Z=>e.jsx("button",{onClick:()=>{T?.(Z.id),E(!1)},className:["block","w-full","px-4","py-2","text-left","text-sm","hover:bg-background-secondary","dark:hover:bg-dark-bg-secondary",B===Z.id?"bg-primary-custom-100 dark:bg-primary-custom-600/20":""].join(" "),children:Z.label},Z.id))})]})]}),e.jsx(Rn,{columns:ie,data:o,variant:"grid",showBorder:!1,showShadow:!1,loading:k,loadingRows:N,emptyMessage:A,onSort:v,sortColumn:w,sortDirection:j,pagination:C,className:"flex-1"})]})]})})]})]})},jc=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),Nc=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),Cc=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),Sc=({onSubmit:t,onForgotPassword:r,onSignUp:s,isLoading:n=!1,errorMessage:o,className:a="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=b.useState(""),[d,f]=b.useState(""),[m,p]=b.useState(!1),[g,h]=b.useState(""),x=j=>{if(j.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){h("Por favor ingresa un email válido");return}h(""),t?.(c,d)},v=j=>{u(j.target.value),g&&h("")},w=()=>{p(!m)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",a].join(" "),children:[i&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Iniciar Sesión"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Inicia sesión ingresando con tu correo electrónico y contraseña."})]}),o&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:o}),e.jsxs("form",{onSubmit:x,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(jc,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:c,onChange:v,disabled:n,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",g?"border-error-border!":""].filter(Boolean).join(" ")})]}),g&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:g})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("button",{type:"button",onClick:r,className:"text-[12px] leading-4 font-bold text-primary-custom-600 dark:text-[#93d1fd] hover:underline transition-all duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm px-1",children:"Olvidé mi Contraseña"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Nc,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:m?"text":"password",placeholder:"••••••••",value:d,onChange:j=>f(j.target.value),disabled:n,required:!0,autoComplete:"current-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:w,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":m?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(Cc,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:n||!c||!d,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:n?"Iniciando sesión...":"Iniciar Sesión"})]}),e.jsx("button",{type:"button",onClick:s,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"¿No tienes una cuenta?"})]})]})},Rc=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M14 8a.75.75 0 0 1-.75.75H4.56l3.22 3.22a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 1.06L4.56 7.25h8.69A.75.75 0 0 1 14 8Z",clipRule:"evenodd"})}),Ec=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"})}),ds=({tableTitle:t="Mesa 1",changeTableLabel:r="Cambiar Mesa",menusTitle:s="Menús",menus:n=[{id:"1",label:"Corral"},{id:"2",label:"Burguer One"},{id:"3",label:"Andrés Carne de Res"},{id:"4",label:"Aceites"},{id:"5",label:"Kiosco Mac"},{id:"6",label:"Kiosco Qbano"},{id:"7",label:"Premier Dinning"}],selectedMenuId:o="1",onMenuSelect:a,onChangeTable:i,categoryTitle:l="Categoría",categories:c=[],selectedCategoryId:u,onCategorySelect:d,productsTitle:f="Productos",products:m=[],onAddProduct:p,activeTab:g="products",onTabChange:h,orderItems:x=[],onOrderItemQuantityChange:v,onOrderItemDelete:w,subtotal:j="40,000.00",taxes:C="40,000.00",total:k="40,000.00",confirmLabel:N="Confirmar Pedido",onConfirmOrder:A,isLoading:I=!1,errorMessage:S,userAvatar:y,userName:B="Jhonnatan Diaz",userRole:T="Administrador",businessLogo:D,siesaLogo:H,className:_=""})=>e.jsxs("div",{className:`
1454
+ color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,s?.key)}return s?.onChange&&!(a&&s.skipInitialOnChange)&&s.onChange(o),a=!1,o}return i.updateDeps=l=>{n=l},i}function fn(t,r){if(t===void 0)throw new Error("Unexpected undefined");return t}const Vl=(t,r)=>Math.abs(t-r)<1.01,Fl=(t,r,s)=>{let n;return function(...o){t.clearTimeout(n),n=t.setTimeout(()=>r.apply(this,o),s)}},mn=t=>{const{offsetWidth:r,offsetHeight:s}=t;return{width:r,height:s}},Zl=t=>t,Hl=t=>{const r=Math.max(t.startIndex-t.overscan,0),s=Math.min(t.endIndex+t.overscan,t.count-1),n=[];for(let o=r;o<=s;o++)n.push(o);return n},Wl=(t,r)=>{const s=t.scrollElement;if(!s)return;const n=t.targetWindow;if(!n)return;const o=i=>{const{width:l,height:c}=i;r({width:Math.round(l),height:Math.round(c)})};if(o(mn(s)),!n.ResizeObserver)return()=>{};const a=new n.ResizeObserver(i=>{const l=()=>{const c=i[0];if(c?.borderBoxSize){const u=c.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(mn(s))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return a.observe(s,{box:"border-box"}),()=>{a.unobserve(s)}},pn={passive:!0},hn=typeof window>"u"?!0:"onscrollend"in window,Ul=(t,r)=>{const s=t.scrollElement;if(!s)return;const n=t.targetWindow;if(!n)return;let o=0;const a=t.options.useScrollendEvent&&hn?()=>{}:Fl(n,()=>{r(o,!1)},t.options.isScrollingResetDelay),i=d=>()=>{const{horizontal:f,isRtl:m}=t.options;o=f?s.scrollLeft*(m&&-1||1):s.scrollTop,a(),r(o,d)},l=i(!0),c=i(!1);s.addEventListener("scroll",l,pn);const u=t.options.useScrollendEvent&&hn;return u&&s.addEventListener("scrollend",c,pn),()=>{s.removeEventListener("scroll",l),u&&s.removeEventListener("scrollend",c)}},Gl=(t,r,s)=>{if(r?.borderBoxSize){const n=r.borderBoxSize[0];if(n)return Math.round(n[s.options.horizontal?"inlineSize":"blockSize"])}return t[s.options.horizontal?"offsetWidth":"offsetHeight"]},ql=(t,{adjustments:r=0,behavior:s},n)=>{var o,a;const i=t+r;(a=(o=n.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[n.options.horizontal?"left":"top"]:i,behavior:s})};class Kl{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let s=null;const n=()=>s||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:s=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{const i=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var o;(o=n())==null||o.disconnect(),s=null},observe:o=>{var a;return(a=n())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=n())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=s=>{Object.entries(s).forEach(([n,o])=>{typeof o>"u"&&delete s[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Zl,rangeExtractor:Hl,onChange:()=>{},measureElement:Gl,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...s}},this.notify=s=>{var n,o;(o=(n=this.options).onChange)==null||o.call(n,this,s)},this.maybeNotify=Ze(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),s=>{this.notify(s)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(s=>s()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var s;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((s=this.scrollElement)==null?void 0:s.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=a,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(s,n)=>{const o=new Map,a=new Map;for(let i=n-1;i>=0;i--){const l=s[i];if(o.has(l.lane))continue;const c=a.get(l.lane);if(c==null||l.end>c.end?a.set(l.lane,l):l.end<c.end&&o.set(l.lane,!0),o.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,l)=>i.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurementOptions=Ze(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(s,n,o,a,i,l)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMeasuredCacheIndexes=[],{count:s,paddingStart:n,scrollMargin:o,getItemKey:a,enabled:i,lanes:l}),{key:!1}),this.getMeasurements=Ze(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:s,paddingStart:n,scrollMargin:o,getItemKey:a,enabled:i,lanes:l},c)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>s)for(const m of this.laneAssignments.keys())m>=s&&this.laneAssignments.delete(m);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===s&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,u),f=new Array(l).fill(void 0);for(let m=0;m<u;m++){const p=d[m];p&&(f[p.lane]=m)}for(let m=u;m<s;m++){const p=a(m),g=this.laneAssignments.get(m);let h,x;if(g!==void 0&&this.options.lanes>1){h=g;const C=f[h],k=C!==void 0?d[C]:void 0;x=k?k.end+this.options.gap:n+o}else{const C=this.options.lanes===1?d[m-1]:this.getFurthestMeasurement(d,m);x=C?C.end+this.options.gap:n+o,h=C?C.lane:m%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(m,h)}const v=c.get(p),w=typeof v=="number"?v:this.options.estimateSize(m),j=x+w;d[m]={index:m,start:x,size:w,end:j,key:p,lane:h},f[h]=m}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Ze(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(s,n,o,a)=>this.range=s.length>0&&n>0?Xl({measurements:s,outerSize:n,scrollOffset:o,lanes:a}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Ze(()=>{let s=null,n=null;const o=this.calculateRange();return o&&(s=o.startIndex,n=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,s,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,s,n]},(s,n,o,a,i)=>a===null||i===null?[]:s({startIndex:a,endIndex:i,overscan:n,count:o}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=s=>{const n=this.options.indexAttribute,o=s.getAttribute(n);return o?parseInt(o,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(s,n)=>{const o=this.indexFromElement(s),a=this.measurementsCache[o];if(!a)return;const i=a.key,l=this.elementsCache.get(i);l!==s&&(l&&this.observer.unobserve(l),this.observer.observe(s),this.elementsCache.set(i,s)),s.isConnected&&this.resizeItem(o,this.options.measureElement(s,n,this))},this.resizeItem=(s,n)=>{const o=this.measurementsCache[s];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,i=n-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.measureElement=s=>{if(!s){this.elementsCache.forEach((n,o)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(o))});return}this._measureElement(s,void 0)},this.getVirtualItems=Ze(()=>[this.getVirtualIndexes(),this.getMeasurements()],(s,n)=>{const o=[];for(let a=0,i=s.length;a<i;a++){const l=s[a],c=n[l];o.push(c)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=s=>{const n=this.getMeasurements();if(n.length!==0)return fn(n[ls(0,n.length-1,o=>fn(n[o]).start,s)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const s=this.scrollElement.document.documentElement;return this.options.horizontal?s.scrollWidth-this.scrollElement.innerWidth:s.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(s,n,o=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),i=this.getScrollOffset();n==="auto"&&(n=s>=i+a?"end":"start"),n==="center"?s+=(o-a)/2:n==="end"&&(s-=a);const l=this.getMaxScrollOffset();return Math.max(Math.min(l,s),0)},this.getOffsetForIndex=(s,n="auto")=>{s=Math.max(0,Math.min(s,this.options.count-1));const o=this.measurementsCache[s];if(!o)return;const a=this.getSize(),i=this.getScrollOffset();if(n==="auto")if(o.end>=i+a-this.options.scrollPaddingEnd)n="end";else if(o.start<=i+this.options.scrollPaddingStart)n="start";else return[i,n];if(n==="end"&&s===this.options.count-1)return[this.getMaxScrollOffset(),n];const l=n==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,n,o.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(s,{align:n="start",behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(s,n),{adjustments:void 0,behavior:o})},this.scrollToIndex=(s,{align:n="auto",behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),s=Math.max(0,Math.min(s,this.options.count-1)),this.currentScrollToIndex=s;let a=0;const i=10,l=u=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(s,u);if(!d){console.warn("Failed to get offset for index:",s);return}const[f,m]=d;this._scrollToOffset(f,{adjustments:void 0,behavior:o}),this.targetWindow.requestAnimationFrame(()=>{const p=()=>{if(this.currentScrollToIndex!==s)return;const g=this.getScrollOffset(),h=this.getOffsetForIndex(s,m);if(!h){console.warn("Failed to get offset for index:",s);return}Vl(h[0],g)||c(m)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(p):p()})},c=u=>{this.targetWindow&&this.currentScrollToIndex===s&&(a++,a<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",a,i),this.targetWindow.requestAnimationFrame(()=>l(u))):console.warn(`Failed to scroll to index ${s} after ${i} attempts.`))};l(n)},this.scrollBy=(s,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+s,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var s;const n=this.getMeasurements();let o;if(n.length===0)o=this.options.paddingStart;else if(this.options.lanes===1)o=((s=n[n.length-1])==null?void 0:s.end)??0;else{const a=Array(this.options.lanes).fill(null);let i=n.length-1;for(;i>=0&&a.some(l=>l===null);){const l=n[i];a[l.lane]===null&&(a[l.lane]=l.end),i--}o=Math.max(...a.filter(l=>l!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(s,{adjustments:n,behavior:o})=>{this.options.scrollToFn(s,{behavior:o,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(r)}}const ls=(t,r,s,n)=>{for(;t<=r;){const o=(t+r)/2|0,a=s(o);if(a<n)t=o+1;else if(a>n)r=o-1;else return o}return t>0?t-1:0};function Xl({measurements:t,outerSize:r,scrollOffset:s,lanes:n}){const o=t.length-1,a=c=>t[c].start;if(t.length<=n)return{startIndex:0,endIndex:o};let i=ls(0,o,a,s),l=i;if(n===1)for(;l<o&&t[l].end<s+r;)l++;else if(n>1){const c=Array(n).fill(0);for(;l<o&&c.some(d=>d<s+r);){const d=t[l];c[d.lane]=d.end,l++}const u=Array(n).fill(s+r);for(;i>=0&&u.some(d=>d>=s);){const d=t[i];u[d.lane]=d.start,i--}i=Math.max(0,i-i%n),l=Math.min(o,l+(n-1-l%n))}return{startIndex:i,endIndex:l}}const xn=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Yl({useFlushSync:t=!0,...r}){const s=M.useReducer(()=>({}),{})[1],n={...r,onChange:(a,i)=>{var l;t&&i?gn.flushSync(s):s(),(l=r.onChange)==null||l.call(r,a,i)}},[o]=M.useState(()=>new Kl(n));return o.setOptions(n),xn(()=>o._didMount(),[]),xn(()=>o._willUpdate()),o}function Ql(t){return Yl({observeElementRect:Wl,observeElementOffset:Ul,scrollToFn:ql,...t})}const Jl=36,ec=5;function tc({count:t,parentRef:r,estimateSize:s=Jl,overscan:n=ec,enabled:o=!0}){const a=Ql({count:o?t:0,getScrollElement:()=>r.current,estimateSize:b.useCallback(()=>s,[s]),overscan:n});return{virtualItems:a.getVirtualItems(),totalSize:a.getTotalSize(),scrollToIndex:a.scrollToIndex,measureElement:a.measureElement}}const rc=b.forwardRef(function({value:r,onChange:s,placeholder:n="Search...",className:o,listboxId:a,activeDescendantId:i},l){const c=b.useCallback(()=>{s("")},[s]);return e.jsxs("div",{className:tt("lookup-field__search-container",o),children:[e.jsx(Jo,{className:"lookup-field__search-icon"}),e.jsx("input",{ref:l,type:"text",className:"lookup-field__search",value:r,onChange:u=>s(u.target.value),placeholder:n,"aria-label":n,"aria-autocomplete":"list","aria-controls":a,"aria-activedescendant":i}),r&&e.jsx("button",{type:"button",className:"lookup-field__search-clear",onClick:c,"aria-label":"Clear search",tabIndex:-1,children:e.jsx($n,{className:"h-4 w-4"})})]})});function nc({message:t}){return e.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"lookup-field__live-region",children:t})}const sc=10,oc=50,ac=1;function ic({entity:t,label:r,displayFields:s,value:n,onChange:o,fetcher:a,clearable:i=!0,placeholder:l,className:c,pageSize:u=sc,onError:d,searchFields:f,minChars:m=ac,displayValue:p,displayTemplate:g,renderSelected:h,filters:x,getFilters:v,dependencies:w,orderBy:j,bindFields:C,readOnly:k=!1,disabled:N=!1,error:A=!1,onFocus:I,onBlur:S,onReady:y,onInvalidValue:B,noResultsText:T,searchPlaceholder:D,required:H=!1,showRequiredIndicator:_,validateOnBlur:E=!0,onValidationChange:z,errorText:R},q){const{t:F}=vi(),ie=b.useMemo(()=>j??{field:s[0],direction:"asc"},[j,s]),Z=b.useId(),[L,G]=b.useState(!1),[se,De]=b.useState(!1),[Y,Ne]=b.useState(null),[ee,de]=b.useState([]),[oe,re]=b.useState(null),[K,te]=b.useState(1),[ue,ve]=b.useState(!0),[Me,Ke]=b.useState(!1),ke=b.useRef(null),he=b.useRef(null),br=b.useRef(JSON.stringify(w??[])),Ce=b.useRef(null),Tt=b.useRef(null),lt=b.useRef(null),[_e,Le]=b.useState(""),ye=qa(_e),[fs,me]=b.useState(""),vr=b.useRef(!1),le=b.useRef(null);le.current=oe;const Pe=b.useRef(null),Xe=b.useRef(!1),kr=b.useRef(B);b.useEffect(()=>{kr.current=B},[B]);const ms=b.useCallback(()=>{L&&(Xe.current&&(Xe.current=!1,S?.(le.current)),G(!1),Le(""))},[L,S]);ki(Pe,ms,L);const{refs:yr,floatingStyles:ps}=Pl({enabled:L}),{virtualItems:wr,totalSize:hs}=tc({count:ee.length,parentRef:Ce,enabled:L&&ee.length>0}),[ct,we]=b.useState(!1),[jr,dt]=b.useState(!1),[zt,xs]=b.useState([]),[Nr,gs]=b.useState(0),[Dt,bs]=b.useState(1),[Cr,_t]=b.useState(!1),Sr=b.useRef(""),Pt=b.useRef(!1),Ve=b.useRef(1),Rr=A||jr,vs=_??H,Ye=b.useRef(z);b.useEffect(()=>{Ye.current=z},[z]);const ut=b.useCallback(()=>nr(v?v():x),[x,v]),ft=b.useCallback(async(P="")=>{ke.current&&ke.current.abort();const V=new AbortController;ke.current=V;try{De(!0),Ne(null),me(F("announcements.loading"));const U=ut(),X=[...new Set(["Id",...s,...C??[]])],ae=await a(t,{fields:X,search:P.length>=m?P:"",searchFields:f??s,page:1,pageSize:u,filters:U,orderBy:ie});if(V.signal.aborted)return;de(ae.data),!vr.current&&y&&(vr.current=!0,setTimeout(()=>{y({firstPageLoaded:!0},Ht)},0)),ae.data.length===0?me(F("announcements.noResults")):me(F("announcements.opened",{count:ae.data.length})),ae.data.length<u&&ve(!1)}catch(U){if(U instanceof Error&&U.name==="AbortError")return;const X=U instanceof Error?U:new Error("Unknown error");Ne(X),d?.(X)}finally{V.signal.aborted||De(!1)}},[t,s,C,f,u,m,d,y,ut,ie,a]),Er=b.useCallback(async(P="")=>{if(Pt.current||Me||!ue)return;const V=Ve.current;try{Ke(!0),me(F("announcements.loadingMore"));const U=ut(),X=V+1,ae=[...new Set(["Id",...s,...C??[]])],qt=await a(t,{fields:ae,search:P.length>=m?P:"",searchFields:f??s,page:X,pageSize:u,filters:U,orderBy:ie});de(Ls=>[...Ls,...qt.data]),Ve.current=X,te(X),me(F("announcements.resultsLoaded",{count:qt.data.length})),qt.data.length<u&&ve(!1)}catch(U){if(U instanceof Error&&U.name==="AbortError")return;const X=U instanceof Error?U:new Error("Unknown error");d?.(X)}finally{Ke(!1)}},[t,s,C,f,u,m,Me,ue,d,ut,ie,a,F]),mt=b.useCallback(async P=>{try{const V=[...new Set(["Id",...s,...C??[]])];console.log("[LookupField] fetchAndSetRecordById:",{recordId:P,entity:t,allFields:V});const U=await a(t,{fields:V,filters:[[{Id:P}]],page:1,pageSize:1});return console.log("[LookupField] fetchAndSetRecordById response:",U),U.data[0]??null}catch(V){return console.error("[LookupField] fetchAndSetRecordById error:",V),null}},[t,s,C,a]),pt=b.useCallback(()=>N||k?(dt(!1),Ye.current?.(!0),!0):H&&!le.current?(dt(!0),Ye.current?.(!1),!1):(dt(!1),Ye.current?.(!0),!0),[H,k,N]),ks=b.useCallback(()=>{const P=Ce.current;if(!P||Me||!ue)return;const{scrollTop:V,scrollHeight:U,clientHeight:X}=P;U-V-X<oc&&Er(ye)},[Me,ue,Er,ye]);b.useEffect(()=>{L&&Tt.current&&Tt.current.focus()},[L]),b.useEffect(()=>{L&&(ye.length===0||ye.length>=m)&&(Cr&&Sr.current===ye&&zt.length>0?(Pt.current=!0,de(zt),Ve.current=Dt,te(Dt),ve(!0),requestAnimationFrame(()=>{Ce.current&&(Ce.current.scrollTop=Nr),setTimeout(()=>{Pt.current=!1},0)})):(Ve.current=1,te(1),ve(!0),de([]),ft(ye)))},[L,ye,ft,m,Cr,zt,Dt,Nr]),b.useEffect(()=>(L||(Le(""),Ve.current=1,te(1),ve(!0),Ke(!1)),()=>{ke.current&&ke.current.abort()}),[L]);const Vt=b.useRef(void 0),Ir=b.useRef(mt);Ir.current=mt;const Ar=b.useRef(0);b.useEffect(()=>{const V=Vt.current===void 0||Vt.current!==n;if(Vt.current=n,n===null){we(!1);return}if(!V)return;const U=++Ar.current;Ir.current(n).then(X=>{Ar.current===U&&(X?(re(X),we(!1)):(we(!0),re(null),kr.current?.(n)))})},[n]);const Ft=JSON.stringify(w??[]);b.useEffect(()=>{br.current!==Ft&&(br.current=Ft,ke.current&&ke.current.abort(),_t(!1),de([]),re(null),Ve.current=1,te(1),ve(!0),G(!1),Le(""))},[Ft]);const ht=JSON.stringify(x??[]),Mr=b.useRef(ht);b.useEffect(()=>{Mr.current!==ht&&(Mr.current=ht,_t(!1))},[ht]);const Lr=b.useCallback(P=>{if(h)return h(P);if(g)return Ha(g,P);if(p){const V=P[p];return V!=null?String(V):""}return s.map(V=>{const U=P[V];return U!=null?String(U):""}).join(" - ")},[h,g,p,s]),ys=()=>{N||k||G(P=>!P)},$r=P=>s.map(V=>String(P[V]??"")).join(" - "),Zt=P=>{he.current=oe,re(P),le.current=P,we(!1),jr&&(dt(!1),Ye.current?.(!0)),xs(ee),gs(Ce.current?.scrollTop??0),bs(K),Sr.current=_e,_t(!0),o(P,he.current),Le(""),G(!1),Ne(null),Ut.current=!0,lt.current?.focus();const V=Lr(P);me(F("announcements.selected",{value:V}))},ws=P=>{P.stopPropagation(),he.current=oe,re(null),le.current=null,we(!1),o(null,he.current),me(F("announcements.cleared"))},Or=b.useCallback(()=>{!le.current&&!ct||(he.current=le.current,re(null),le.current=null,we(!1),o(null,he.current),me(F("announcements.cleared")))},[ct,o,F]),js=b.useCallback(()=>{Gt.current=!0,G(!1),Le(""),me(F("announcements.closed")),setTimeout(()=>{if(!Pe.current)return;const V=Array.from(document.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')),U=V.findIndex(ae=>Pe.current?.contains(ae));let X=null;for(let ae=U+1;ae<V.length;ae++)if(!Pe.current?.contains(V[ae])){X=V[ae];break}X&&X.focus()},0)},[F]),Ns=b.useCallback(()=>{G(!1),Le(""),me(F("announcements.closed")),lt.current?.focus()},[F]),Br=b.useCallback(()=>{he.current=le.current,re(null),we(!1),o(null,he.current),me(F("announcements.cleared"))},[o,F]),Ht=b.useMemo(()=>({clear:Br,focus:()=>lt.current?.focus(),reload:()=>ft(ye),getValue:()=>le.current,setValue:async P=>{const V=await mt(P);V?(he.current=le.current,re(V),we(!1),o(V,he.current)):(we(!0),re(null),B?.(P))},open:()=>G(!0),close:()=>G(!1),validate:pt}),[Br,ft,ye,mt,o,B,pt]);b.useImperativeHandle(q,()=>Ht,[Ht]);const{highlightedIndex:Se,setHighlightedIndex:Tr,handleKeyDown:Cs}=Ka({records:ee,isOpen:L,onSelect:Zt,onClose:js,onEscape:Ns,onClear:Or,searchQuery:_e});b.useEffect(()=>{L&&Tr(-1)},[L,ee,Tr]),b.useEffect(()=>{if(Se>=0&&Ce.current){const P=Ce.current.querySelector(`[data-index="${Se}"]`);P?.scrollIntoView&&P.scrollIntoView({block:"nearest",behavior:"smooth"})}},[Se]);const Wt=b.useRef(!1),Ut=b.useRef(!1),Gt=b.useRef(!1),Ss=()=>{Wt.current=!0},Rs=P=>{N||L||P.key==="Backspace"&&i&&!k&&(oe||ct)&&(P.preventDefault(),Or())},Es=()=>{if(!N&&!k){if(Ut.current){Ut.current=!1;return}if(Gt.current){Gt.current=!1;return}if(Wt.current){Wt.current=!1;return}L||G(!0)}},Is=b.useCallback(()=>{N||Xe.current||(Xe.current=!0,I?.(le.current))},[I,N]),As=b.useCallback(P=>{if(N)return;const V=P.relatedTarget;!Pe.current?.contains(V)&&(Xe.current=!1,E&&!k&&pt(),S?.(le.current))},[S,E,k,N,pt]),Ms=()=>{if(_e.length>0&&_e.length<m)return e.jsx("div",{className:"lookup-field__empty",children:F("minChars",{count:m})});if(se)return e.jsxs("div",{className:"lookup-field__loading",children:[e.jsx(Hr,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{children:F("loading")})]});if(Y)return e.jsx("div",{className:"lookup-field__error",children:F("error")});if(ee.length===0)return e.jsx("div",{className:"lookup-field__empty",children:T??F("noResults")});const P=wr.length>0;return e.jsxs("div",{ref:Ce,className:"lookup-field__options",onScroll:ks,children:[P?e.jsx("div",{style:{height:`${hs}px`,width:"100%",position:"relative"},children:wr.map(V=>{const U=ee[V.index],X=V.index;return e.jsx("div",{id:`${Z}-option-${U.Id}`,"data-index":X,className:tt("lookup-field__option",X===Se&&"lookup-field__option--highlighted"),role:"option","aria-selected":oe?.Id===U.Id,tabIndex:-1,onClick:()=>Zt(U),style:{position:"absolute",top:0,left:0,width:"100%",height:`${V.size}px`,transform:`translateY(${V.start}px)`},children:$r(U)},U.Id)})}):ee.map((V,U)=>e.jsx("div",{id:`${Z}-option-${V.Id}`,"data-index":U,className:tt("lookup-field__option",U===Se&&"lookup-field__option--highlighted"),role:"option","aria-selected":oe?.Id===V.Id,tabIndex:-1,onClick:()=>Zt(V),children:$r(V)},V.Id)),Me&&e.jsx("div",{className:"lookup-field__loading-more",children:e.jsx(Hr,{className:"h-4 w-4 animate-spin"})})]})};return e.jsxs("div",{ref:Pe,className:tt("lookup-field",N&&"lookup-field--disabled",k&&"lookup-field--readonly",Rr&&"lookup-field--error",c),role:"combobox","aria-expanded":!N&&L,"aria-haspopup":"listbox","aria-labelledby":`${Z}-label`,"aria-controls":L?`${Z}-listbox`:void 0,"aria-disabled":N||void 0,"aria-readonly":!N&&k||void 0,"aria-invalid":Rr||void 0,"aria-required":H||void 0,onKeyDown:N?void 0:Cs,onFocus:Is,onBlur:As,children:[e.jsx(nc,{message:fs}),e.jsxs("label",{id:`${Z}-label`,htmlFor:Z,className:"lookup-field__label",children:[r,vs&&e.jsx("span",{className:"lookup-field__required-indicator",children:F("validation.requiredIndicator")})]}),e.jsxs("button",{ref:P=>{lt.current=P,yr.setReference(P)},id:Z,type:"button",className:"lookup-field__trigger",onClick:ys,onMouseDown:Ss,onKeyDown:Rs,onFocus:Es,disabled:N,tabIndex:N?-1:0,children:[e.jsx("span",{className:"lookup-field__selected-text",children:ct?F("notFound"):oe?Lr(oe):l??F("placeholder")}),e.jsx(Xo,{className:tt("lookup-field__chevron",L&&"lookup-field__chevron--open"),"aria-hidden":"true"}),i&&oe&&!k&&!N&&e.jsx($n,{className:"lookup-field__clear",onClick:ws,"aria-label":"Clear selection"})]}),R&&e.jsx("span",{className:"lookup-field__error-text",role:"alert",children:R}),L&&e.jsxs("div",{ref:yr.setFloating,style:ps,className:"lookup-field__dropdown",children:[e.jsx(rc,{ref:Tt,value:_e,onChange:Le,placeholder:D??F("searchPlaceholder"),listboxId:`${Z}-listbox`,activeDescendantId:Se>=0&&ee[Se]?`${Z}-option-${ee[Se].Id}`:void 0}),e.jsx("div",{id:`${Z}-listbox`,role:"listbox","aria-label":r,children:Ms()})]})]})}const cs=b.forwardRef(ic);cs.displayName="LookupField";class lc extends Error{constructor(r,s,n){super(r),this.status=s,this.statusText=n,this.name="ApiError"}}const cc={"Content-Type":"application/json"};function dc(t,r){const s={...cc,...r?.headers};return async(n,o)=>{const a=`${t}/${n}/search`,i=o.fields.includes("Id")?o.fields:["Id",...o.fields],l=await fetch(a,{method:"POST",headers:s,body:JSON.stringify({...o,fields:i})});if(!l.ok)throw new lc(`API Error: ${l.status} ${l.statusText}`,l.status,l.statusText);return l.json()}}const uc=({productName:t="Mi Aplicación",siesaLogoPath:r,siesaLogoWidth:s,siesaLogoHeight:n,userDropdown:o,navigationItems:a,children:i,className:l="",contentClassName:c="",hideSidebar:u=!1,navbarProps:d={},navigationRailProps:f={}})=>{const[m,p]=b.useState("collapsed"),g=h=>{h&&p(h)};return e.jsxs("div",{className:["h-screen","w-full","bg-white","dark:bg-dark-bg-primary","flex","flex-col","overflow-hidden",l].join(" ").replace(/\s+/g," ").trim(),children:[e.jsx(ot,{productName:t,userDropdown:o,hideActionButtons:!0,showSiesaLogoLeading:!0,showBusinessLogo:!1,siesaLogo:r?e.jsx("img",{src:r,alt:"Siesa",className:"object-contain",style:{width:s||"100%",height:n||"100%"}}):void 0,className:"bg-white dark:bg-dark-bg-primary",...d}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[!u&&e.jsx(It,{state:m,items:a,showSearchButton:!1,onStateChange:g,...f}),e.jsx("div",{className:["flex-1","overflow-y-auto","bg-gray-50","dark:bg-dark-bg-primary",c].join(" ").replace(/\s+/g," ").trim(),children:i})]})]})},fc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.543 2.232a.75.75 0 0 0-1.085 0l-5.25 5.5A.75.75 0 0 0 2.75 9H4v4a1 1 0 0 0 1 1h1.5a.5.5 0 0 0 .5-.5v-2a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v2a.5.5 0 0 0 .5.5H12a1 1 0 0 0 1-1V9h1.25a.75.75 0 0 0 .543-1.268l-5.25-5.5Z"})}),mc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0ZM5.37 2.822a6.493 6.493 0 0 0-2.818 3.428h2.103c.088-.907.254-1.778.494-2.595a8.932 8.932 0 0 1 .221-.833ZM1.5 8c0 .522.062 1.03.179 1.516l.135.484h2.49a16.15 16.15 0 0 1 0-4H1.815L1.68 6.484A6.533 6.533 0 0 0 1.5 8Zm.552 2.75A6.493 6.493 0 0 0 5.37 14.18a8.932 8.932 0 0 1-.221-.833 13.2 13.2 0 0 1-.494-2.595H2.552Zm4.058 0c.083.78.23 1.497.429 2.128.197.622.423 1.07.649 1.357.225.286.401.265.312.265.089 0 .265.021.49-.265.226-.287.452-.735.649-1.357.199-.631.346-1.348.429-2.128H6.11Zm4.234 0a13.198 13.198 0 0 1-.494 2.595 8.938 8.938 0 0 1-.22.833 6.493 6.493 0 0 0 2.817-3.428h-2.103Zm2.104-2h-2.48a16.15 16.15 0 0 0 0-4h2.48l.135.484A6.538 6.538 0 0 1 14.5 8a6.538 6.538 0 0 1-.179 1.516l-.135.484h.162Zm-2.818-4.928c.167.251.394.699.221.833.24.817.406 1.688.494 2.595h2.103a6.493 6.493 0 0 0-2.818-3.428ZM9.89 6h-3.78c.083-.78.23-1.497.429-2.128.197-.622.423-1.07.649-1.357.225-.286.401-.265.312-.265.089 0 .265-.021.49.265.226.287.452.735.649 1.357.199.631.346 1.348.429 2.128Zm-4.234 0H3.553a6.493 6.493 0 0 1 2.818-3.428 8.932 8.932 0 0 0-.221.833c-.24.817-.406 1.688-.494 2.595Zm.144 2a14.65 14.65 0 0 0 0 4h4.4a14.65 14.65 0 0 0 0-4H5.8Z"})}),pc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M4 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V6.414A2 2 0 0 0 13.414 5L10 1.586A2 2 0 0 0 8.586 1H4Zm1 5a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1H5Zm-.5 2.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5Zm.5 1.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1H5Z",clipRule:"evenodd"})}),hc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1 9.5A3.5 3.5 0 0 0 4.5 13H12a3 3 0 0 0 .917-5.857 2.503 2.503 0 0 0-3.198-3.019 3.5 3.5 0 0 0-6.628 2.171A3.5 3.5 0 0 0 1 9.5Z"})}),xc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4ZM10 4a2 2 0 0 1 2-2h.5a.5.5 0 0 1 0 1H12a1 1 0 0 0-1 1v.5a.5.5 0 0 1-1 0V4ZM2 12a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v2ZM10.5 8a.5.5 0 0 0-.5.5V10H8.5a.5.5 0 0 0 0 1H10v1.5a.5.5 0 0 0 1 0V11h1.5a.5.5 0 0 0 0-1H11V8.5a.5.5 0 0 0-.5-.5Z"})}),gc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"})}),bc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M2.5 4a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1ZM4.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM4 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 4 8Zm.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM3 8a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-.5 4.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Z",clipRule:"evenodd"})}),vc=({className:t=""})=>e.jsxs("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M14 2H2c-.55 0-.95.538-.75 1.032l3 7.5c.127.318.44.528.783.528h5.934c.343 0 .656-.21.783-.528l3-7.5C14.95 2.538 14.55 2 14 2Z"}),e.jsx("path",{d:"M6 12.25v1.25a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1.25H6Z"})]}),kc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),yc=({className:t=""})=>e.jsxs("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),wc=({title:t="List View",navbarProductName:r="SB Commercial",tableTitle:s="Usuarios",columns:n,data:o,navigationItems:a,quickFilters:i,actionButtons:l,userDropdown:c,notifications:u,environmentBadge:d,showNavigationRail:f=!0,navigationRailState:m="collapsed",onNavigationRailStateChange:p,onNavItemClick:g,onSearch:h,searchPlaceholder:x="Buscar",onSort:v,sortColumn:w,sortDirection:j,pagination:C,loading:k=!1,loadingRows:N=5,emptyMessage:A="No hay datos disponibles",className:I="",onNotificationsClick:S,viewOptions:y,selectedViewOption:B,onViewOptionChange:T})=>{const[D,H]=b.useState(""),[_,E]=b.useState(!1),z=a||[{id:"home",icon:e.jsx(fc,{className:"w-4 h-4"}),label:"Inicio",active:!0},{id:"option1",icon:e.jsx(mc,{className:"w-4 h-4"}),label:"Opción 1"},{id:"option2",icon:e.jsx(pc,{className:"w-4 h-4"}),label:"Opción 2"},{id:"option3",icon:e.jsx(hc,{className:"w-4 h-4"}),label:"Opción 3"},{id:"more",icon:e.jsx(xc,{className:"w-4 h-4"}),label:"Ver más..."}],R=i||[{id:"paid",label:"Facturas Pagadas",color:"lime"},{id:"pending",label:"Facturas Pendientes por Pago",color:"rose"},{id:"orders",label:"Órdenes de Compra",color:"sky"}],q=l||[{id:"audit",label:"Auditoría",leftIcon:e.jsx(bc,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"filter",label:"Filtrar",leftIcon:e.jsx(vc,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"create",label:"Crear",leftIcon:e.jsx(gc,{className:"w-4 h-4"}),type:"default",onClick:()=>{}}],F=Z=>{H(Z.target.value),h?.(Z.target.value)},ie=n.map(Z=>({header:Z.header,accessor:Z.accessor,sortable:Z.sortable,render:Z.render,align:Z.align,width:Z.width}));return e.jsxs("div",{className:["bg-background-secondary","dark:bg-dark-bg-primary","flex","w-full","h-full","min-h-screen",I].join(" "),children:[f&&e.jsx(It,{state:m,items:z,onStateChange:p,onItemClick:g,showSearchButton:!0}),e.jsxs("div",{className:"flex flex-col flex-1 overflow-hidden",children:[e.jsx(ot,{productName:r,environmentBadge:d,userDropdown:c,notifications:u,hideActionButtons:!1,onNotificationsClick:S,className:"bg-background-secondary dark:bg-dark-bg-primary"}),e.jsx("div",{className:"flex items-center gap-2 px-4 py-2 w-full bg-background-secondary dark:bg-dark-bg-primary",children:R.map(Z=>e.jsx(Oe,{color:Z.color,label:Z.label,leftIcon:Z.icon},Z.id))}),e.jsx("div",{className:"flex flex-1 overflow-hidden bg-background-secondary dark:bg-dark-bg-primary",children:e.jsxs("div",{className:"flex flex-col gap-4 flex-1 bg-white dark:bg-dark-bg-primary p-4 rounded-tl-3xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("h2",{className:"font-bold text-xl leading-7 tracking-[-0.5px] text-content-primary dark:text-dark-content-primary",children:t}),e.jsx("div",{className:"flex items-center gap-2",children:q.map(Z=>e.jsx(Q,{type:Z.type,size:"sm",leftIcon:Z.leftIcon,onClick:Z.onClick,children:Z.label},Z.id))})]}),e.jsxs("div",{className:"flex flex-col gap-4 flex-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-xl p-8 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-4 w-full",children:[e.jsx("h3",{className:"flex-1 font-bold text-base leading-6 text-content-primary dark:text-dark-content-primary overflow-hidden text-ellipsis whitespace-nowrap",children:s}),e.jsx(st,{placeholder:x,leftIcon:e.jsx(yc,{className:"w-4 h-4"}),value:D,onChange:F,className:"w-[200px]"}),y&&e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>E(!_),className:"flex items-center gap-3 px-3 py-2 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-lg shadow-xs hover:bg-background-secondary dark:hover:bg-dark-bg-secondary transition-colors",children:[e.jsx("span",{className:"font-bold text-sm text-content-secondary dark:text-content-secondary",children:"Ver"}),e.jsx(kc,{className:"w-5 h-5 text-content-secondary dark:text-content-secondary"})]}),_&&e.jsx("div",{className:"absolute top-full right-0 mt-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-lg shadow-lg z-10 min-w-[150px]",children:y.map(Z=>e.jsx("button",{onClick:()=>{T?.(Z.id),E(!1)},className:["block","w-full","px-4","py-2","text-left","text-sm","hover:bg-background-secondary","dark:hover:bg-dark-bg-secondary",B===Z.id?"bg-primary-custom-100 dark:bg-primary-custom-600/20":""].join(" "),children:Z.label},Z.id))})]})]}),e.jsx(Rn,{columns:ie,data:o,variant:"grid",showBorder:!1,showShadow:!1,loading:k,loadingRows:N,emptyMessage:A,onSort:v,sortColumn:w,sortDirection:j,pagination:C,className:"flex-1"})]})]})})]})]})},jc=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),Nc=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),Cc=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),Sc=({onSubmit:t,onForgotPassword:r,onSignUp:s,isLoading:n=!1,errorMessage:o,className:a="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=b.useState(""),[d,f]=b.useState(""),[m,p]=b.useState(!1),[g,h]=b.useState(""),x=j=>{if(j.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){h("Por favor ingresa un email válido");return}h(""),t?.(c,d)},v=j=>{u(j.target.value),g&&h("")},w=()=>{p(!m)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",a].join(" "),children:[i&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Iniciar Sesión"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Inicia sesión ingresando con tu correo electrónico y contraseña."})]}),o&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:o}),e.jsxs("form",{onSubmit:x,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(jc,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:c,onChange:v,disabled:n,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",g?"border-error-border!":""].filter(Boolean).join(" ")})]}),g&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:g})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("button",{type:"button",onClick:r,className:"text-[12px] leading-4 font-bold text-primary-custom-600 dark:text-[#93d1fd] hover:underline transition-all duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm px-1",children:"Olvidé mi Contraseña"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Nc,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:m?"text":"password",placeholder:"••••••••",value:d,onChange:j=>f(j.target.value),disabled:n,required:!0,autoComplete:"current-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:w,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":m?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(Cc,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:n||!c||!d,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:n?"Iniciando sesión...":"Iniciar Sesión"})]}),e.jsx("button",{type:"button",onClick:s,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"¿No tienes una cuenta?"})]})]})},Rc=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M14 8a.75.75 0 0 1-.75.75H4.56l3.22 3.22a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 1.06L4.56 7.25h8.69A.75.75 0 0 1 14 8Z",clipRule:"evenodd"})}),Ec=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"})}),ds=({tableTitle:t="Mesa 1",changeTableLabel:r="Cambiar Mesa",menusTitle:s="Menús",menus:n=[{id:"1",label:"Corral"},{id:"2",label:"Burguer One"},{id:"3",label:"Andrés Carne de Res"},{id:"4",label:"Aceites"},{id:"5",label:"Kiosco Mac"},{id:"6",label:"Kiosco Qbano"},{id:"7",label:"Premier Dinning"}],selectedMenuId:o="1",onMenuSelect:a,onChangeTable:i,categoryTitle:l="Categoría",categories:c=[],selectedCategoryId:u,onCategorySelect:d,productsTitle:f="Productos",products:m=[],onAddProduct:p,activeTab:g="products",onTabChange:h,orderItems:x=[],onOrderItemQuantityChange:v,onOrderItemDelete:w,subtotal:j="40,000.00",taxes:C="40,000.00",total:k="40,000.00",confirmLabel:N="Confirmar Pedido",onConfirmOrder:A,isLoading:I=!1,errorMessage:S,userAvatar:y,userName:B="Jhonnatan Diaz",userRole:T="Administrador",businessLogo:D,siesaLogo:H,className:_=""})=>e.jsxs("div",{className:`
1455
1455
  min-h-screen
1456
1456
  w-full
1457
1457
  bg-background-secondary