siesa-ui-kit 1.0.23 → 1.0.24
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.
package/dist/siesa-ui-kit.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("react"),bn=require("react-dom");function vn(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,n.get?n:{enumerable:!0,get:()=>t[s]})}}return r.default=t,Object.freeze(r)}const L=vn(g),$s=vn(bn),Q=({type:t="default",size:r="base",iconOnly:s=!1,leftIcon:n,rightIcon:o,children:a,disabled:i=!1,className:l="",onClick:c,htmlType:u="button",fullWidth:d=!1,ariaLabel:f,badge:m=!1,badgeCount:p,badgeColor:x="red",...h})=>{const b={xs:s?"h-6 w-6 p-1":"h-6 py-1 px-2 gap-2",sm:s?"h-7 w-7 p-1.5":"h-7 py-1 px-2 gap-2",base:s?"h-8 w-8 p-2":"h-8 py-1.5 px-2.5 gap-2",l:s?"h-9 w-9 p-2.5":"h-9 py-2 px-3 gap-3",xl:s?"h-10 w-10 p-3":"h-10 py-2 px-4 gap-3"},v={xs:"w-4 h-4",sm:"w-4 h-4",base:"w-4 h-4",l:"w-4 h-4",xl:"w-4 h-4"},w={xs:"text-xs",sm:"text-sm",base:"text-sm",l:"text-sm",xl:"text-sm"},N={default:`
|
|
2
2
|
bg-primary-custom-600
|
|
3
3
|
text-primary-inverse-content
|
|
4
4
|
border
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
duration-150
|
|
50
50
|
dark:text-dark-content-custom
|
|
51
51
|
dark:hover:bg-hover-overlay-dark
|
|
52
|
-
`},
|
|
52
|
+
`},S=`
|
|
53
53
|
inline-flex
|
|
54
54
|
items-center
|
|
55
55
|
justify-center
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
disabled:opacity-50
|
|
67
67
|
disabled:cursor-not-allowed
|
|
68
68
|
disabled:pointer-events-none
|
|
69
|
-
`,y=d?"w-full":"",C=[
|
|
69
|
+
`,y=d?"w-full":"",C=[S,b[r],N[t],y,l].join(" ").replace(/\s+/g," ").trim(),M=T=>T?e.jsx("span",{className:`inline-flex items-center justify-center ${v[r]}`,children:T}):null,E=()=>s?M(n):e.jsxs(e.Fragment,{children:[n&&M(n),a&&e.jsx("span",{className:w[r],children:a}),o&&M(o)]}),k={zinc:{bg:"bg-zinc-600",text:"text-white"},red:{bg:"bg-red-700",text:"text-white"},orange:{bg:"bg-orange-700",text:"text-white"},amber:{bg:"bg-amber-700",text:"text-white"},yellow:{bg:"bg-yellow-700",text:"text-white"},lime:{bg:"bg-lime-700",text:"text-white"},green:{bg:"bg-green-700",text:"text-white"},emerald:{bg:"bg-emerald-700",text:"text-white"},teal:{bg:"bg-teal-700",text:"text-white"},cyan:{bg:"bg-cyan-700",text:"text-white"},sky:{bg:"bg-sky-700",text:"text-white"},blue:{bg:"bg-blue-700",text:"text-white"},indigo:{bg:"bg-indigo-700",text:"text-white"},violet:{bg:"bg-violet-700",text:"text-white"},purple:{bg:"bg-purple-700",text:"text-white"},fuchsia:{bg:"bg-fuchsia-700",text:"text-white"},pink:{bg:"bg-pink-700",text:"text-white"},rose:{bg:"bg-rose-700",text:"text-white"},primary:{bg:"bg-primary-custom-600",text:"text-white"},secondary:{bg:"bg-zinc-600",text:"text-white"},tertiary:{bg:"bg-zinc-600",text:"text-white"}},j=k[x]||k.red,A=()=>!m&&p===void 0?null:p!==void 0?e.jsx("span",{className:`
|
|
70
70
|
absolute
|
|
71
71
|
-top-1
|
|
72
72
|
-right-1
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
text-[10px]
|
|
81
81
|
font-bold
|
|
82
82
|
leading-none
|
|
83
|
-
${
|
|
84
|
-
${
|
|
83
|
+
${j.bg}
|
|
84
|
+
${j.text}
|
|
85
85
|
pointer-events-none
|
|
86
86
|
`.trim().replace(/\s+/g," "),"aria-label":`${p} notificaciones`,children:p>99?"99+":p}):e.jsx("span",{className:`
|
|
87
87
|
absolute
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
w-2
|
|
91
91
|
h-2
|
|
92
92
|
rounded-full
|
|
93
|
-
${
|
|
93
|
+
${j.bg}
|
|
94
94
|
pointer-events-none
|
|
95
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Notificación"});return e.jsxs("button",{type:u,className:`${C} ${m||p!==void 0?"relative":""}`,disabled:i,onClick:c,"aria-label":f,...h,children:[
|
|
95
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Notificación"});return e.jsxs("button",{type:u,className:`${C} ${m||p!==void 0?"relative":""}`,disabled:i,onClick:c,"aria-label":f,...h,children:[E(),A()]})},st=g.forwardRef(({label:t,labelSecondary:r,helperText:s,error:n=!1,errorMessage:o,leftIcon:a,rightIcon:i,fullWidth:l=!1,className:c="",disabled:u=!1,id:d,...f},m)=>{const p=d||`input-${Math.random().toString(36).substr(2,9)}`,x=`
|
|
96
96
|
w-full
|
|
97
97
|
px-3
|
|
98
98
|
py-1.5
|
|
@@ -134,17 +134,17 @@
|
|
|
134
134
|
dark:border-error-border!
|
|
135
135
|
dark:focus:ring-error-border/30!
|
|
136
136
|
dark:focus:ring-offset-dark-bg-primary!
|
|
137
|
-
`:"",
|
|
137
|
+
`:"",v=l?"w-full":"w-[265px]",w=N=>{if(!N)return null;const S=N.props.className||"";return g.cloneElement(N,{className:`w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary ${S}`})};return e.jsxs("div",{className:`flex flex-col gap-2 ${v} ${c}`,children:[t&&e.jsxs("label",{htmlFor:p,className:"flex items-center w-full font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:[e.jsx("span",{className:"flex-1",children:t}),r&&e.jsx("span",{className:"text-xs leading-4 text-primary-custom-600 dark:text-primary-custom-600",children:r})]}),e.jsxs("div",{className:"relative flex items-center",children:[a&&e.jsx("div",{className:"absolute left-3 pointer-events-none",children:w(a)}),e.jsx("input",{ref:m,id:p,disabled:u,className:`
|
|
138
138
|
${x}
|
|
139
139
|
${h}
|
|
140
140
|
${b}
|
|
141
141
|
${a?"pl-9":""}
|
|
142
142
|
${i?"pr-9":""}
|
|
143
|
-
`.trim().replace(/\s+/g," "),...f}),i&&e.jsx("div",{className:"absolute right-3 pointer-events-none",children:
|
|
143
|
+
`.trim().replace(/\s+/g," "),...f}),i&&e.jsx("div",{className:"absolute right-3 pointer-events-none",children:w(i)})]}),(s||o)&&e.jsx("p",{className:`
|
|
144
144
|
text-xs
|
|
145
145
|
leading-5
|
|
146
146
|
${n?"text-error-content dark:text-error-content":"text-content-tertiary dark:text-dark-content-tertiary"}
|
|
147
|
-
`.trim().replace(/\s+/g," "),children:n&&o?o:s})]})});st.displayName="Input";const
|
|
147
|
+
`.trim().replace(/\s+/g," "),children:n&&o?o:s})]})});st.displayName="Input";const kn=g.forwardRef(({label:t,description:r,helperText:s,error:n=!1,errorMessage:o,fullWidth:a=!1,resize:i="vertical",className:l="",disabled:c=!1,id:u,rows:d=4,...f},m)=>{const p=u||`textarea-${Math.random().toString(36).substr(2,9)}`,x=`
|
|
148
148
|
w-full
|
|
149
149
|
px-3
|
|
150
150
|
pr-1.5
|
|
@@ -183,17 +183,17 @@
|
|
|
183
183
|
dark:border-error-border!
|
|
184
184
|
dark:focus:border-2!
|
|
185
185
|
dark:focus:border-error-border!
|
|
186
|
-
`:"",
|
|
186
|
+
`:"",v=i==="none"?"resize-none":i==="vertical"?"resize-y":i==="horizontal"?"resize-x":"resize",w=a?"w-full":"w-[312px]";return e.jsxs("div",{className:`flex flex-col gap-2 ${w} ${l}`,children:[(t||r)&&e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[t&&e.jsx("label",{htmlFor:p,className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:t}),r&&e.jsx("p",{className:"text-sm leading-5 text-content-secondary dark:text-dark-content-secondary",children:r})]}),e.jsx("textarea",{ref:m,id:p,disabled:c,rows:d,className:`
|
|
187
187
|
${x}
|
|
188
188
|
${h}
|
|
189
189
|
${b}
|
|
190
|
-
${
|
|
190
|
+
${v}
|
|
191
191
|
`.trim().replace(/\s+/g," "),...f}),(s||o)&&e.jsx("p",{className:`
|
|
192
192
|
text-sm
|
|
193
193
|
leading-5
|
|
194
194
|
text-content-tertiary
|
|
195
195
|
dark:text-dark-content-tertiary
|
|
196
|
-
`.trim().replace(/\s+/g," "),children:n&&o?o:s})]})});
|
|
196
|
+
`.trim().replace(/\s+/g," "),children:n&&o?o:s})]})});kn.displayName="Textarea";const yn=g.forwardRef(({label:t,description:r,checked:s=!1,indeterminate:n=!1,disabled:o=!1,className:a="",id:i,onChange:l,...c},u)=>{const d=g.useRef(null),f=u||d,m=i||`checkbox-${Math.random().toString(36).substr(2,9)}`;g.useEffect(()=>{f.current&&(f.current.indeterminate=n)},[n,f]);const b=[`
|
|
197
197
|
w-4
|
|
198
198
|
h-4
|
|
199
199
|
rounded
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
shadow-button-inset
|
|
233
233
|
dark:bg-dark-bg-inverse!
|
|
234
234
|
dark:border-dark-bg-inverse!
|
|
235
|
-
`:"",o?"cursor-not-allowed":"cursor-pointer"].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:`inline-flex gap-3 items-start ${a}`,children:[e.jsxs("div",{className:"flex items-center justify-center h-5 w-4 shrink-0",children:[e.jsx("input",{ref:f,type:"checkbox",id:m,checked:s,disabled:o,onChange:l,className:"peer sr-only",...c}),e.jsxs("label",{htmlFor:m,className:b,children:[s&&!n&&e.jsx("svg",{className:"w-3 h-3 text-primary-inverse-content pointer-events-none",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),n&&e.jsx("svg",{className:"w-3 h-3 text-primary-inverse-content pointer-events-none",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 6H10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})]})]}),(t||r)&&e.jsxs("label",{htmlFor:m,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${o?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:t}),r&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:r})]})]})});
|
|
235
|
+
`:"",o?"cursor-not-allowed":"cursor-pointer"].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:`inline-flex gap-3 items-start ${a}`,children:[e.jsxs("div",{className:"flex items-center justify-center h-5 w-4 shrink-0",children:[e.jsx("input",{ref:f,type:"checkbox",id:m,checked:s,disabled:o,onChange:l,className:"peer sr-only",...c}),e.jsxs("label",{htmlFor:m,className:b,children:[s&&!n&&e.jsx("svg",{className:"w-3 h-3 text-primary-inverse-content pointer-events-none",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),n&&e.jsx("svg",{className:"w-3 h-3 text-primary-inverse-content pointer-events-none",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 6H10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})]})]}),(t||r)&&e.jsxs("label",{htmlFor:m,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${o?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:t}),r&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:r})]})]})});yn.displayName="Checkbox";const wn=g.forwardRef(({label:t,description:r,checked:s=!1,disabled:n=!1,className:o="",id:a,onChange:i,value:l,name:c,...u},d)=>{const f=a||`radio-${Math.random().toString(36).substr(2,9)}`,m=`
|
|
236
236
|
w-4
|
|
237
237
|
h-4
|
|
238
238
|
rounded-full
|
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
${p}
|
|
269
269
|
${x}
|
|
270
270
|
${n?"cursor-not-allowed":"cursor-pointer"}
|
|
271
|
-
`.trim().replace(/\s+/g," "),children:s&&e.jsx("div",{className:"w-1.5 h-1.5 bg-white rounded-full dark:bg-dark-content-inverse"})})]}),(t||r)&&e.jsxs("label",{htmlFor:f,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${n?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:t}),r&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:r})]})]})});
|
|
271
|
+
`.trim().replace(/\s+/g," "),children:s&&e.jsx("div",{className:"w-1.5 h-1.5 bg-white rounded-full dark:bg-dark-content-inverse"})})]}),(t||r)&&e.jsxs("label",{htmlFor:f,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${n?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:t}),r&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:r})]})]})});wn.displayName="Radio";const ir=g.forwardRef(({label:t,description:r,labelPosition:s="leading",checked:n=!1,disabled:o=!1,className:a="",id:i,onChange:l,ariaLabel:c,...u},d)=>{const f=i||`switch-${Math.random().toString(36).substr(2,9)}`,m=`
|
|
272
272
|
w-8
|
|
273
273
|
h-5
|
|
274
274
|
rounded-xl
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
dark:border-dark-border-primary
|
|
312
312
|
dark:peer-hover:border-[#b6b6b9]
|
|
313
313
|
dark:peer-focus:shadow-lg
|
|
314
|
-
`,x=()=>{const
|
|
314
|
+
`,x=()=>{const N=`
|
|
315
315
|
absolute
|
|
316
316
|
w-4
|
|
317
317
|
h-4
|
|
@@ -322,7 +322,7 @@
|
|
|
322
322
|
-translate-y-1/2
|
|
323
323
|
transition-all
|
|
324
324
|
duration-200
|
|
325
|
-
`,
|
|
325
|
+
`,S=n?"left-[13px]":"left-px";return o?`${N} ${S} ${n?"border-primary-inverse-border dark:border-primary-inverse-border":"border-border-primary dark:border-dark-border-primary"}`:`${N} ${S} ${n?`
|
|
326
326
|
border-primary-inverse-border
|
|
327
327
|
peer-hover:border-[#307cc5]
|
|
328
328
|
dark:border-primary-inverse-border
|
|
@@ -332,7 +332,7 @@
|
|
|
332
332
|
peer-hover:border-[#b6b6b9]
|
|
333
333
|
dark:border-dark-border-primary
|
|
334
334
|
dark:peer-hover:border-[#b6b6b9]
|
|
335
|
-
`}`},h=[m,p()].join(" ").replace(/\s+/g," ").trim(),b=x().replace(/\s+/g," ").trim(),
|
|
335
|
+
`}`},h=[m,p()].join(" ").replace(/\s+/g," ").trim(),b=x().replace(/\s+/g," ").trim(),v=t||r?e.jsxs("label",{htmlFor:f,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${o?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:t}),r&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:r})]}):null,w=e.jsxs("div",{className:"flex items-center justify-center shrink-0",children:[e.jsx("input",{ref:d,type:"checkbox",id:f,checked:n,disabled:o,onChange:l,className:"peer sr-only","aria-label":c||t,...u}),e.jsx("label",{htmlFor:f,className:h,"aria-hidden":"true",children:e.jsx("div",{className:b})})]});return e.jsx("div",{className:`flex gap-2 items-center w-[344px] ${a}`,children:s==="leading"?e.jsxs(e.Fragment,{children:[v,w]}):e.jsxs(e.Fragment,{children:[w,v]})})});ir.displayName="Switch";const jn=g.forwardRef(({size:t="10",type:r="circular",src:s,alt:n="",initials:o,className:a="",...i},l)=>{const c={4:"w-5 h-5",6:"w-6 h-6",8:"w-8 h-8",10:"w-10 h-10"},u={4:"text-xs",6:"text-xs",8:"text-sm",10:"text-base"},d={circular:"rounded-full",rounded:"rounded-md"},f=`
|
|
336
336
|
relative
|
|
337
337
|
inline-flex
|
|
338
338
|
items-center
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
bg-background-secondary
|
|
355
355
|
dark:bg-dark-bg-primary
|
|
356
356
|
${a}
|
|
357
|
-
`.trim().replace(/\s+/g," ")})});
|
|
357
|
+
`.trim().replace(/\s+/g," ")})});jn.displayName="Avatar";const Ie=g.forwardRef(({type:t="default",className:r="",...s},n)=>{const i=["w-full h-px border-0",{default:"bg-border-primary dark:bg-dark-border-primary",soft:"bg-border-secondary dark:bg-gray-700"}[t],r].join(" ").replace(/\s+/g," ").trim();return e.jsx("hr",{ref:n,className:i,...s})});Ie.displayName="Divider";const Nn=g.forwardRef(({term:t,details:r,className:s="",...n},o)=>{const a=`
|
|
358
358
|
flex
|
|
359
359
|
flex-wrap
|
|
360
360
|
gap-1
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
border-b
|
|
364
364
|
border-border-secondary
|
|
365
365
|
dark:border-gray-700
|
|
366
|
-
`,i="flex-1 min-w-[180px]",l=[a,s].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:o,className:l,...n,children:[e.jsx("div",{className:i,children:e.jsx("p",{className:"text-sm leading-5 text-content-secondary dark:text-gray-400 font-normal",children:t})}),e.jsx("div",{className:i,children:e.jsx("p",{className:"text-sm leading-5 text-content-primary dark:text-dark-content-primary font-normal",children:r})})]})});
|
|
366
|
+
`,i="flex-1 min-w-[180px]",l=[a,s].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:o,className:l,...n,children:[e.jsx("div",{className:i,children:e.jsx("p",{className:"text-sm leading-5 text-content-secondary dark:text-gray-400 font-normal",children:t})}),e.jsx("div",{className:i,children:e.jsx("p",{className:"text-sm leading-5 text-content-primary dark:text-dark-content-primary font-normal",children:r})})]})});Nn.displayName="DescriptionList";const Cn=g.forwardRef(({title:t,description:r,children:s,actions:n,onCancel:o,onConfirm:a,cancelText:i="Cancelar",confirmText:l="Confirmar",className:c="",...u},d)=>{const f=n||e.jsxs(e.Fragment,{children:[o&&e.jsx(Q,{type:"plain",size:"base",onClick:o,children:i}),a&&e.jsx(Q,{type:"default",size:"base",onClick:a,children:l})]});return e.jsx("div",{ref:d,className:`
|
|
367
367
|
w-[512px]
|
|
368
368
|
bg-white
|
|
369
369
|
dark:bg-dark-bg-primary
|
|
@@ -372,7 +372,7 @@
|
|
|
372
372
|
dark:border-dark-border-primary
|
|
373
373
|
rounded-xl
|
|
374
374
|
${c}
|
|
375
|
-
`.trim().replace(/\s+/g," "),...u,children:e.jsxs("div",{className:"p-6 flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("p",{className:"text-sm leading-5 font-bold text-content-primary dark:text-dark-content-primary",children:t}),r&&e.jsx("p",{className:"text-sm leading-5 font-normal text-content-tertiary dark:text-content-tertiary",children:r})]}),s&&e.jsx("div",{className:"flex flex-col gap-3",children:s}),e.jsx("div",{className:"flex flex-wrap gap-3 items-center justify-end",children:f})]})})});
|
|
375
|
+
`.trim().replace(/\s+/g," "),...u,children:e.jsxs("div",{className:"p-6 flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("p",{className:"text-sm leading-5 font-bold text-content-primary dark:text-dark-content-primary",children:t}),r&&e.jsx("p",{className:"text-sm leading-5 font-normal text-content-tertiary dark:text-content-tertiary",children:r})]}),s&&e.jsx("div",{className:"flex flex-col gap-3",children:s}),e.jsx("div",{className:"flex flex-wrap gap-3 items-center justify-end",children:f})]})})});Cn.displayName="Alert";const Oe=g.forwardRef(({color:t="zinc",leftIcon:r,label:s,count:n,className:o="",...a},i)=>{const c={zinc:{bg:"bg-zinc-100",text:"text-zinc-600",hover:"hover:bg-zinc-200",notificationBg:"bg-zinc-600",notificationText:"text-zinc-100"},red:{bg:"bg-red-100",text:"text-red-700",hover:"hover:bg-red-200",notificationBg:"bg-red-700",notificationText:"text-red-100"},orange:{bg:"bg-orange-100",text:"text-orange-700",hover:"hover:bg-orange-200",notificationBg:"bg-orange-700",notificationText:"text-orange-100"},amber:{bg:"bg-amber-100",text:"text-amber-700",hover:"hover:bg-amber-200",notificationBg:"bg-amber-700",notificationText:"text-amber-100"},yellow:{bg:"bg-yellow-100",text:"text-yellow-700",hover:"hover:bg-yellow-200",notificationBg:"bg-yellow-700",notificationText:"text-yellow-100"},lime:{bg:"bg-lime-100",text:"text-lime-700",hover:"hover:bg-lime-200",notificationBg:"bg-lime-700",notificationText:"text-lime-100"},green:{bg:"bg-green-100",text:"text-green-700",hover:"hover:bg-green-200",notificationBg:"bg-green-700",notificationText:"text-green-100"},emerald:{bg:"bg-emerald-100",text:"text-emerald-700",hover:"hover:bg-emerald-200",notificationBg:"bg-emerald-700",notificationText:"text-emerald-100"},teal:{bg:"bg-teal-100",text:"text-teal-700",hover:"hover:bg-teal-200",notificationBg:"bg-teal-700",notificationText:"text-teal-100"},cyan:{bg:"bg-cyan-100",text:"text-cyan-700",hover:"hover:bg-cyan-200",notificationBg:"bg-cyan-700",notificationText:"text-cyan-100"},sky:{bg:"bg-sky-100",text:"text-sky-700",hover:"hover:bg-sky-200",notificationBg:"bg-sky-700",notificationText:"text-sky-100"},blue:{bg:"bg-blue-100",text:"text-blue-700",hover:"hover:bg-blue-200",notificationBg:"bg-blue-700",notificationText:"text-blue-100"},indigo:{bg:"bg-indigo-100",text:"text-indigo-700",hover:"hover:bg-indigo-200",notificationBg:"bg-indigo-700",notificationText:"text-indigo-100"},violet:{bg:"bg-violet-100",text:"text-violet-700",hover:"hover:bg-violet-200",notificationBg:"bg-violet-700",notificationText:"text-violet-100"},purple:{bg:"bg-purple-100",text:"text-purple-700",hover:"hover:bg-purple-200",notificationBg:"bg-purple-700",notificationText:"text-purple-100"},fuchsia:{bg:"bg-fuchsia-100",text:"text-fuchsia-700",hover:"hover:bg-fuchsia-200",notificationBg:"bg-fuchsia-700",notificationText:"text-fuchsia-100"},pink:{bg:"bg-pink-100",text:"text-pink-700",hover:"hover:bg-pink-200",notificationBg:"bg-pink-700",notificationText:"text-pink-100"},rose:{bg:"bg-rose-100",text:"text-rose-700",hover:"hover:bg-rose-200",notificationBg:"bg-rose-700",notificationText:"text-rose-100"},primary:{bg:"bg-primary-custom-100",text:"text-primary-custom-600",hover:"hover:bg-primary-custom-200",notificationBg:"bg-primary-custom-600",notificationText:"text-primary-custom-100"},secondary:{bg:"bg-zinc-100",text:"text-zinc-600",hover:"hover:bg-zinc-200",notificationBg:"bg-zinc-600",notificationText:"text-zinc-100"},tertiary:{bg:"bg-zinc-100",text:"text-zinc-600",hover:"hover:bg-zinc-200",notificationBg:"bg-zinc-600",notificationText:"text-zinc-100"}}[t],u=f=>{const m=f.props.className||"";return g.cloneElement(f,{className:`w-3 h-3 ${m}`.trim()})},d=["inline-flex","items-center","gap-1","px-1.5","py-1","rounded-md","font-sans",c.bg,c.hover,"transition-colors","duration-200",o].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:i,className:d,...a,children:[r&&e.jsx("div",{className:`flex items-center justify-center ${c.text}`,children:u(r)}),e.jsx("span",{className:`font-sans text-xs leading-4 ${c.text}`,children:s}),n!==void 0&&e.jsx("div",{className:`
|
|
376
376
|
h-3
|
|
377
377
|
flex
|
|
378
378
|
items-center
|
|
@@ -381,7 +381,7 @@
|
|
|
381
381
|
rounded-xs
|
|
382
382
|
min-w-[12px]
|
|
383
383
|
${c.notificationBg}
|
|
384
|
-
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:`font-sans text-xs leading-4 ${c.notificationText}`,children:n})})]})});Oe.displayName="Badge";const
|
|
384
|
+
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:`font-sans text-xs leading-4 ${c.notificationText}`,children:n})})]})});Oe.displayName="Badge";const lr=g.forwardRef(({value:t,defaultValue:r=0,onChange:s,min:n=0,max:o,label:a,linkText:i,onLinkClick:l,helperText:c,error:u=!1,disabled:d=!1,className:f="",...m},p)=>{const[x,h]=g.useState(r),b=t!==void 0,v=b?t:x;g.useEffect(()=>{b||h(r)},[r,b]);const w=T=>{let D=T;n!==void 0&&D<n&&(D=n),o!==void 0&&D>o&&(D=o),b||h(D),s?.(D)},N=()=>{d||w(v-1)},S=()=>{d||w(v+1)},y=d||n!==void 0&&v<=n,C=d||o!==void 0&&v>=o,M=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),E=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8 3V13M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),k=u?"border-error-border dark:border-error-border":"border-border-primary dark:border-dark-border-primary",j=!d&&!u?"hover:border-[#f9f9f9] dark:hover:border-[#f9f9f9]":"",A=!d&&!u?"focus-within:border-2 focus-within:border-[#329cff] dark:focus-within:border-[#329cff]":"";return e.jsxs("div",{ref:p,className:`flex flex-col gap-2 ${f}`.trim(),...m,children:[a&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{className:"text-sm leading-5 font-bold text-content-primary dark:text-dark-content-primary",children:a}),i&&e.jsx("button",{type:"button",onClick:l,disabled:d,className:`
|
|
385
385
|
text-xs leading-4
|
|
386
386
|
text-primary-custom-600
|
|
387
387
|
hover:underline
|
|
@@ -398,14 +398,14 @@
|
|
|
398
398
|
bg-white
|
|
399
399
|
dark:bg-dark-bg-primary
|
|
400
400
|
border
|
|
401
|
-
${
|
|
402
|
-
${
|
|
401
|
+
${k}
|
|
402
|
+
${j}
|
|
403
403
|
${A}
|
|
404
404
|
rounded-lg
|
|
405
405
|
transition-colors
|
|
406
406
|
duration-200
|
|
407
407
|
${d?"opacity-50 cursor-not-allowed":""}
|
|
408
|
-
`.trim().replace(/\s+/g," "),children:[e.jsx("button",{type:"button",onClick:
|
|
408
|
+
`.trim().replace(/\s+/g," "),children:[e.jsx("button",{type:"button",onClick:N,disabled:y,className:`
|
|
409
409
|
flex
|
|
410
410
|
items-center
|
|
411
411
|
justify-center
|
|
@@ -416,8 +416,8 @@
|
|
|
416
416
|
duration-200
|
|
417
417
|
`.trim().replace(/\s+/g," "),"aria-label":"Decrementar",children:e.jsx(M,{})}),e.jsx("div",{className:"flex-1 text-center",children:e.jsx("span",{className:`
|
|
418
418
|
text-base leading-6
|
|
419
|
-
${
|
|
420
|
-
`.trim().replace(/\s+/g," "),children:
|
|
419
|
+
${v===0?"text-content-tertiary dark:text-content-tertiary":"text-content-primary dark:text-dark-content-primary"}
|
|
420
|
+
`.trim().replace(/\s+/g," "),children:v})}),e.jsx("button",{type:"button",onClick:S,disabled:C,className:`
|
|
421
421
|
flex
|
|
422
422
|
items-center
|
|
423
423
|
justify-center
|
|
@@ -426,10 +426,10 @@
|
|
|
426
426
|
${C?"text-content-tertiary dark:text-content-tertiary cursor-not-allowed":"text-content-primary dark:text-dark-content-primary hover:text-content-secondary dark:hover:text-content-secondary cursor-pointer"}
|
|
427
427
|
transition-colors
|
|
428
428
|
duration-200
|
|
429
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Incrementar",children:e.jsx(
|
|
429
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Incrementar",children:e.jsx(E,{})})]}),c&&e.jsx("p",{className:`
|
|
430
430
|
text-sm leading-5
|
|
431
431
|
${u?"text-error-content dark:text-error-content":"text-content-tertiary dark:text-content-tertiary"}
|
|
432
|
-
`.trim().replace(/\s+/g," "),children:c})]})});
|
|
432
|
+
`.trim().replace(/\s+/g," "),children:c})]})});lr.displayName="Quantity";const cr=({icon:t,label:r,selected:s=!1,disabled:n=!1,badge:o=!1,badgeCount:a,onClick:i,onMouseEnter:l,onMouseLeave:c,ariaLabel:u,id:d,showLabelText:f=!0,showIcon:m=!0,className:p=""})=>{const x=["flex","flex-col","items-center","justify-center","px-4","py-1","rounded-full","overflow-hidden","shrink-0",s?"bg-primary-custom-100 dark:bg-primary-custom-600/30":"bg-transparent hover:bg-primary-custom-100 dark:hover:bg-primary-custom-600/20","transition-colors","duration-150"].join(" "),h=["w-4","h-4","shrink-0",s?"text-primary-custom-600 dark:text-white":n?"text-content-tertiary dark:text-content-tertiary":"text-content-primary hover:text-primary-custom-600 dark:text-dark-content-primary dark:hover:text-white","transition-colors","duration-150"].join(" "),b=["text-xs","leading-3","font-bold","text-center","w-full","min-w-full","text-content-primary","dark:text-dark-content-primary","wrap-break-word"].join(" "),v=["relative","flex","flex-col","items-center","gap-1","px-0.5","py-0","w-14","shrink-0",n?"cursor-not-allowed opacity-55 pointer-events-none":"cursor-pointer","focus:outline-hidden","focus-visible:ring-2","focus-visible:ring-primary-custom-400","focus-visible:ring-offset-2","focus-visible:ring-offset-primary-custom-100","dark:focus-visible:ring-dark-border-custom","dark:focus-visible:ring-offset-dark-bg-primary","focus-visible:shadow-lg","dark:focus-visible:shadow-2xl","rounded-lg",p].join(" "),w=()=>!o&&a===void 0?null:a!==void 0?e.jsx("span",{className:`
|
|
433
433
|
absolute
|
|
434
434
|
-top-0.5
|
|
435
435
|
left-8
|
|
@@ -460,7 +460,7 @@
|
|
|
460
460
|
dark:bg-red-700
|
|
461
461
|
pointer-events-none
|
|
462
462
|
select-none
|
|
463
|
-
`,"aria-label":"Notificación","data-badge":!0});return e.jsxs("button",{type:"button",className:k,disabled:n,onClick:i,onMouseEnter:l,onMouseLeave:c,"aria-label":u||r,"aria-current":s?"page":void 0,"aria-disabled":n,"data-item-id":d,"data-testid":`navigation-rail-item-${d}`,children:[m&&e.jsx("div",{className:x,children:e.jsx("span",{className:h,children:t})}),f&&e.jsx("p",{className:b,children:r}),v()]})};wt.displayName="NavigationRailItem";const Os=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"w-4 h-4",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"})}),Je=({variant:t="default",children:r,items:s,open:n,onOpenChange:o,disabled:a=!1,className:i="",menuClassName:l="",ariaLabel:c,placeholder:u="Options",renderTrigger:d})=>{const[f,m]=g.useState(!1),[p,x]=g.useState("bottom-left"),h=g.useRef(null),b=g.useRef(null),k=n!==void 0,v=k?n:f,w=g.useCallback(()=>{if(!h.current)return;const S=h.current.getBoundingClientRect(),N=window.innerWidth,A=window.innerHeight,T=200,D=250,H=A-S.bottom,_=S.top,E=N-S.left,z=S.right,R=H<D&&_>H,q=E<T&&z>E;x(R&&q?"top-right":R?"top-left":q?"bottom-right":"bottom-left")},[]),j=()=>{if(a)return;const S=!v;S&&w(),k||m(S),o?.(S)};g.useEffect(()=>{const S=N=>{h.current&&!h.current.contains(N.target)&&(k||m(!1),o?.(!1))};if(v)return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[v,k,o]),g.useEffect(()=>{const S=N=>{N.key==="Escape"&&v&&(k||m(!1),o?.(!1))};if(v)return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[v,k,o]);const y=S=>{S.disabled||S.isDivider||S.isHeading||(S.onClick&&S.onClick({}),k||m(!1),o?.(!1))},C=["inline-flex","items-center","justify-center","rounded-lg","font-bold","text-sm","whitespace-nowrap","transition-all","duration-150",t==="icon-only"?"w-9 h-9":"gap-2 px-3 py-2","bg-white","text-content-secondary","border","border-border-primary","hover:bg-background-secondary","dark:bg-dark-bg-primary","dark:text-dark-content-primary","dark:border-dark-border-primary","dark:hover:bg-dark-bg-secondary","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","focus:ring-offset-2","dark:focus:ring-dark-border-custom","dark:focus:ring-offset-dark-bg-primary",a&&"opacity-50",a&&"cursor-not-allowed",a&&"pointer-events-none",i].filter(Boolean).join(" ").replace(/\s+/g," ").trim(),I=["absolute",{"bottom-left":"top-full left-0 mt-2","bottom-right":"top-full right-0 mt-2","top-left":"bottom-full left-0 mb-2","top-right":"bottom-full right-0 mb-2"}[p],"min-w-[182px]","rounded-lg","p-1","border","z-50","bg-background-secondary","border-border-primary","dark:bg-dark-bg-primary","dark:border-dark-border-primary","shadow-lg",l].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:h,className:"relative inline-block",children:[d?e.jsx("div",{onClick:j,role:"button",tabIndex:a?-1:0,children:d(v)}):e.jsxs("button",{type:"button",className:C,onClick:j,disabled:a,"aria-label":c||(t==="icon-only"?"Abrir menú":void 0),"aria-haspopup":"true","aria-expanded":v,children:[t==="default"&&e.jsx("span",{children:r||u}),e.jsx(Os,{})]}),v&&e.jsx("div",{ref:b,className:I,children:s.map((S,N)=>S.isDivider?e.jsx(zs,{className:S.className},N):S.isHeading?e.jsx(Ts,{className:S.className,children:S.children},N):e.jsx(Bs,{...S,onClick:()=>y(S)},N))})]})},Bs=({children:t,icon:r,description:s,shortcut:n,disabled:o=!1,selected:a=!1,onClick:i,className:l=""})=>{const c=["flex","items-center","gap-3","px-4","py-2","rounded-lg","text-sm","font-normal","w-full","text-left","text-content-primary",!o&&"hover:bg-bg-primary",a&&"bg-bg-primary","dark:text-dark-content-primary",!o&&"dark:hover:bg-dark-bg-secondary",a&&"dark:bg-dark-bg-secondary",o&&"opacity-50",o&&"cursor-not-allowed",!o&&"cursor-pointer",l].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:c,onClick:i,disabled:o,children:[r&&e.jsx("span",{className:"inline-flex items-center justify-center w-4 h-4 text-content-secondary dark:text-dark-content-secondary",children:r}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-content-primary dark:text-dark-content-primary",children:t}),s&&e.jsx("div",{className:"text-xs text-content-secondary dark:text-dark-content-secondary mt-0.5",children:s})]}),n&&e.jsx("span",{className:"text-xs text-content-secondary dark:text-dark-content-secondary ml-auto whitespace-nowrap",children:n})]})},Ts=({children:t,className:r=""})=>{const s=["px-4","py-1","text-xs","font-normal","text-content-tertiary","dark:text-dark-content-tertiary",r].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{className:s,children:t})},zs=({className:t=""})=>{const r=["px-4","py-1",t].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{className:r,children:e.jsx("div",{className:"h-px bg-border-primary dark:bg-dark-border-primary"})})},Ds=({className:t=""})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),jt=({label:t,icon:r,children:s=[],defaultOpen:n=!1,disabled:o=!1,onOpenChange:a,onClick:i,isCollapsible:l=s.length>0,showHeading:c=!1,headingLabel:u,showDivider:d=!0,selected:f=!1,badge:m=!1,badgeCount:p,badgeColor:x="red",className:h=""})=>{const[b,k]=g.useState(n);g.useEffect(()=>{k(n)},[n]);const v=()=>{if(o||!l)return;const y=!b;k(y),a?.(y)},w=y=>{o||(l?v():i?.(y))},j=y=>C=>{y.disabled||y.onClick?.(C)};return e.jsxs("div",{className:`flex flex-col gap-0.5 w-full ${h}`,children:[c&&u&&e.jsx("div",{className:"flex flex-col gap-0 items-start pb-1 pt-3 px-0 w-full",children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-4 not-italic text-xs text-content-tertiary dark:text-content-tertiary w-full",children:u})}),e.jsxs("button",{onClick:w,disabled:o,className:["flex items-center gap-3 px-4 py-2 w-full","rounded-lg cursor-pointer","transition-all duration-150",f&&!o&&"bg-primary-custom-100 text-primary-custom-600",!f&&!o&&"text-content-primary",!o&&"hover:bg-primary-custom-100",!o&&"hover:text-primary-custom-600",f&&!o&&"dark:bg-dark-bg-custom dark:text-dark-content-custom",!f&&!o&&"dark:text-content-primary",!o&&"dark:hover:bg-dark-bg-custom",!o&&"dark:hover:text-dark-content-custom",!o&&"focus:outline-hidden",!o&&"focus:ring-2",!o&&"focus:ring-offset-2",!o&&"focus:ring-primary-custom-400",!o&&"focus:ring-offset-bg-primary",!o&&"dark:focus:ring-offset-dark-bg-primary",o&&"opacity-50",o&&"cursor-not-allowed"].filter(Boolean).join(" "),"aria-expanded":b&&l,"aria-disabled":o,children:[r&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:r}),e.jsx("div",{className:"flex flex-1 flex-col items-start justify-center gap-0.5",children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-5 not-italic text-sm text-left",children:t})}),(m||p)&&e.jsx("div",{className:"flex items-center justify-center shrink-0",children:p?e.jsx("div",{className:"flex items-center justify-center px-1.5 py-0.5 rounded-full bg-red-500 dark:bg-red-600 text-white text-xs font-bold min-w-6 h-6",children:p>99?"99+":p}):e.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500 dark:bg-red-600 shrink-0"})}),l&&e.jsx("div",{className:["flex items-center justify-center w-4 h-4 shrink-0","text-content-secondary dark:text-content-secondary","transition-transform duration-200",b?"rotate-180":"rotate-0"].join(" "),children:e.jsx(Ds,{className:"w-4 h-4"})})]}),d&&e.jsx("div",{className:"w-full h-px bg-border-primary dark:bg-dark-border-primary"}),b&&l&&s.length>0&&e.jsx("div",{className:"flex flex-col gap-0.5 w-full py-2 px-0",children:s.map((y,C)=>e.jsxs("div",{onClick:j(y),className:["flex gap-3 items-center pl-6 pr-4 py-2 w-full","rounded-lg cursor-pointer","transition-all duration-150",!y.disabled&&"text-content-primary",!y.disabled&&"hover:bg-primary-custom-100",!y.disabled&&"hover:text-primary-custom-600",!y.disabled&&"dark:text-content-primary",!y.disabled&&"dark:hover:bg-dark-bg-custom",!y.disabled&&"dark:hover:text-dark-content-custom",!y.disabled&&"focus:outline-hidden",!y.disabled&&"focus:ring-2",!y.disabled&&"focus:ring-offset-2",!y.disabled&&"focus:ring-primary-custom-400",!y.disabled&&"focus:ring-offset-bg-primary",!y.disabled&&"dark:focus:ring-offset-dark-bg-primary",y.disabled&&"opacity-50",y.disabled&&"cursor-not-allowed",y.className].filter(Boolean).join(" "),children:[y.icon&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:y.icon}),e.jsx("div",{className:"flex flex-1 flex-col items-start justify-center gap-0.5",children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-5 not-italic text-sm text-left",children:y.label})})]},C))})]})},_s=({className:t="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,children:e.jsx("path",{fillRule:"evenodd",d:"M6.455 1.45A.5.5 0 0 1 6.952 1h2.096a.5.5 0 0 1 .497.45l.186 1.858a4.996 4.996 0 0 1 1.466.848l1.703-.769a.5.5 0 0 1 .639.206l1.047 1.814a.5.5 0 0 1-.14.656l-1.517 1.09a5.026 5.026 0 0 1 0 1.694l1.516 1.09a.5.5 0 0 1 .141.656l-1.047 1.814a.5.5 0 0 1-.639.206l-1.703-.768c-.433.36-.928.649-1.466.847l-.186 1.858a.5.5 0 0 1-.497.45H6.952a.5.5 0 0 1-.497-.45l-.186-1.858a4.993 4.993 0 0 1-1.466-.848l-1.703.769a.5.5 0 0 1-.639-.206l-1.047-1.814a.5.5 0 0 1 .14-.656l1.517-1.09a5.033 5.033 0 0 1 0-1.694l-1.516-1.09a.5.5 0 0 1-.141-.656L2.461 3.39a.5.5 0 0 1 .639-.206l1.703.768c.433-.36.928-.649 1.466-.847l.186-1.858ZM8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",clipRule:"evenodd"})}),Ps=({className:t="w-4 h-4"})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,children:[e.jsx("path",{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 1 1-1.06-1.06L12.69 4.22a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}),e.jsx("path",{fillRule:"evenodd",d:"M2.22 9.28a.75.75 0 0 0 0 1.06l2.5 2.5a.75.75 0 1 0 1.06-1.06l-2.5-2.5a.75.75 0 0 0-1.06 0Z",clipRule:"evenodd"})]}),Vs=({className:t="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,children:e.jsx("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})}),Fs=({className:t="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,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"})}),Zs={"cog-6-tooth":_s,check:Ps,x:Vs,"chevron-down":Fs},Hs=(t,r)=>{if(!t)return null;const s=Zs[t];return s?e.jsx(s,{className:r}):(console.warn(`Icon "${t}" not found in iconMap`),null)},ur=({label:t="Label",description:r,showDescription:s=!0,iconName:n="cog-6-tooth",showIcon:o=!0,actionLabel:a,showAction:i=!1,onActionClick:l,className:c="",...u})=>e.jsxs("div",{className:`
|
|
463
|
+
`,"aria-label":"Notificación","data-badge":!0});return e.jsxs("button",{type:"button",className:v,disabled:n,onClick:i,onMouseEnter:l,onMouseLeave:c,"aria-label":u||r,"aria-current":s?"page":void 0,"aria-disabled":n,"data-item-id":d,"data-testid":`navigation-rail-item-${d}`,children:[m&&e.jsx("div",{className:x,children:e.jsx("span",{className:h,children:t})}),f&&e.jsx("p",{className:b,children:r}),w()]})};cr.displayName="NavigationRailItem";const Os=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"w-4 h-4",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"})}),Je=({variant:t="default",children:r,items:s,open:n,onOpenChange:o,disabled:a=!1,className:i="",menuClassName:l="",ariaLabel:c,placeholder:u="Options",renderTrigger:d})=>{const[f,m]=g.useState(!1),[p,x]=g.useState("bottom-left"),h=g.useRef(null),b=g.useRef(null),v=n!==void 0,w=v?n:f,N=g.useCallback(()=>{if(!h.current)return;const k=h.current.getBoundingClientRect(),j=window.innerWidth,A=window.innerHeight,T=200,D=250,H=A-k.bottom,_=k.top,I=j-k.left,z=k.right,R=H<D&&_>H,q=I<T&&z>I;x(R&&q?"top-right":R?"top-left":q?"bottom-right":"bottom-left")},[]),S=()=>{if(a)return;const k=!w;k&&N(),v||m(k),o?.(k)};g.useEffect(()=>{const k=j=>{h.current&&!h.current.contains(j.target)&&(v||m(!1),o?.(!1))};if(w)return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[w,v,o]),g.useEffect(()=>{const k=j=>{j.key==="Escape"&&w&&(v||m(!1),o?.(!1))};if(w)return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[w,v,o]);const y=k=>{k.disabled||k.isDivider||k.isHeading||(k.onClick&&k.onClick({}),v||m(!1),o?.(!1))},C=["inline-flex","items-center","justify-center","rounded-lg","font-bold","text-sm","whitespace-nowrap","transition-all","duration-150",t==="icon-only"?"w-9 h-9":"gap-2 px-3 py-2","bg-white","text-content-secondary","border","border-border-primary","hover:bg-background-secondary","dark:bg-dark-bg-primary","dark:text-dark-content-primary","dark:border-dark-border-primary","dark:hover:bg-dark-bg-secondary","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","focus:ring-offset-2","dark:focus:ring-dark-border-custom","dark:focus:ring-offset-dark-bg-primary",a&&"opacity-50",a&&"cursor-not-allowed",a&&"pointer-events-none",i].filter(Boolean).join(" ").replace(/\s+/g," ").trim(),E=["absolute",{"bottom-left":"top-full left-0 mt-2","bottom-right":"top-full right-0 mt-2","top-left":"bottom-full left-0 mb-2","top-right":"bottom-full right-0 mb-2"}[p],"min-w-[182px]","rounded-lg","p-1","border","z-50","bg-background-secondary","border-border-primary","dark:bg-dark-bg-primary","dark:border-dark-border-primary","shadow-lg",l].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:h,className:"relative inline-block",children:[d?e.jsx("div",{onClick:S,role:"button",tabIndex:a?-1:0,children:d(w)}):e.jsxs("button",{type:"button",className:C,onClick:S,disabled:a,"aria-label":c||(t==="icon-only"?"Abrir menú":void 0),"aria-haspopup":"true","aria-expanded":w,children:[t==="default"&&e.jsx("span",{children:r||u}),e.jsx(Os,{})]}),w&&e.jsx("div",{ref:b,className:E,children:s.map((k,j)=>k.isDivider?e.jsx(zs,{className:k.className},j):k.isHeading?e.jsx(Ts,{className:k.className,children:k.children},j):e.jsx(Bs,{...k,onClick:()=>y(k)},j))})]})},Bs=({children:t,icon:r,description:s,shortcut:n,disabled:o=!1,selected:a=!1,onClick:i,className:l=""})=>{const c=["flex","items-center","gap-3","px-4","py-2","rounded-lg","text-sm","font-normal","w-full","text-left","text-content-primary",!o&&"hover:bg-bg-primary",a&&"bg-bg-primary","dark:text-dark-content-primary",!o&&"dark:hover:bg-dark-bg-secondary",a&&"dark:bg-dark-bg-secondary",o&&"opacity-50",o&&"cursor-not-allowed",!o&&"cursor-pointer",l].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:c,onClick:i,disabled:o,children:[r&&e.jsx("span",{className:"inline-flex items-center justify-center w-4 h-4 text-content-secondary dark:text-dark-content-secondary",children:r}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-content-primary dark:text-dark-content-primary",children:t}),s&&e.jsx("div",{className:"text-xs text-content-secondary dark:text-dark-content-secondary mt-0.5",children:s})]}),n&&e.jsx("span",{className:"text-xs text-content-secondary dark:text-dark-content-secondary ml-auto whitespace-nowrap",children:n})]})},Ts=({children:t,className:r=""})=>{const s=["px-4","py-1","text-xs","font-normal","text-content-tertiary","dark:text-dark-content-tertiary",r].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{className:s,children:t})},zs=({className:t=""})=>{const r=["px-4","py-1",t].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{className:r,children:e.jsx("div",{className:"h-px bg-border-primary dark:bg-dark-border-primary"})})},Ds=({className:t=""})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),dr=({label:t,icon:r,children:s=[],defaultOpen:n=!1,disabled:o=!1,onOpenChange:a,onClick:i,isCollapsible:l=s.length>0,showHeading:c=!1,headingLabel:u,showDivider:d=!0,selected:f=!1,badge:m=!1,badgeCount:p,badgeColor:x="red",className:h=""})=>{const[b,v]=g.useState(n);g.useEffect(()=>{v(n)},[n]);const w=()=>{if(o||!l)return;const y=!b;v(y),a?.(y)},N=y=>{o||(l?w():i?.(y))},S=y=>C=>{y.disabled||y.onClick?.(C)};return e.jsxs("div",{className:`flex flex-col gap-0.5 w-full ${h}`,children:[c&&u&&e.jsx("div",{className:"flex flex-col gap-0 items-start pb-1 pt-3 px-0 w-full",children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-4 not-italic text-xs text-content-tertiary dark:text-content-tertiary w-full",children:u})}),e.jsxs("button",{onClick:N,disabled:o,className:["flex items-center gap-3 px-4 py-2 w-full","rounded-lg cursor-pointer","transition-all duration-150",f&&!o&&"bg-primary-custom-100 text-primary-custom-600",!f&&!o&&"text-content-primary",!o&&"hover:bg-primary-custom-100",!o&&"hover:text-primary-custom-600",f&&!o&&"dark:bg-dark-bg-custom dark:text-dark-content-custom",!f&&!o&&"dark:text-content-primary",!o&&"dark:hover:bg-dark-bg-custom",!o&&"dark:hover:text-dark-content-custom",!o&&"focus:outline-hidden",!o&&"focus:ring-2",!o&&"focus:ring-offset-2",!o&&"focus:ring-primary-custom-400",!o&&"focus:ring-offset-bg-primary",!o&&"dark:focus:ring-offset-dark-bg-primary",o&&"opacity-50",o&&"cursor-not-allowed"].filter(Boolean).join(" "),"aria-expanded":b&&l,"aria-disabled":o,children:[r&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:r}),e.jsx("div",{className:"flex flex-1 flex-col items-start justify-center gap-0.5",children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-5 not-italic text-sm text-left",children:t})}),(m||p)&&e.jsx("div",{className:"flex items-center justify-center shrink-0",children:p?e.jsx("div",{className:"flex items-center justify-center px-1.5 py-0.5 rounded-full bg-red-500 dark:bg-red-600 text-white text-xs font-bold min-w-6 h-6",children:p>99?"99+":p}):e.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500 dark:bg-red-600 shrink-0"})}),l&&e.jsx("div",{className:["flex items-center justify-center w-4 h-4 shrink-0","text-content-secondary dark:text-content-secondary","transition-transform duration-200",b?"rotate-180":"rotate-0"].join(" "),children:e.jsx(Ds,{className:"w-4 h-4"})})]}),d&&e.jsx("div",{className:"w-full h-px bg-border-primary dark:bg-dark-border-primary"}),b&&l&&s.length>0&&e.jsx("div",{className:"flex flex-col gap-0.5 w-full py-2 px-0",children:s.map((y,C)=>e.jsxs("div",{onClick:S(y),className:["flex gap-3 items-center pl-6 pr-4 py-2 w-full","rounded-lg cursor-pointer","transition-all duration-150",!y.disabled&&"text-content-primary",!y.disabled&&"hover:bg-primary-custom-100",!y.disabled&&"hover:text-primary-custom-600",!y.disabled&&"dark:text-content-primary",!y.disabled&&"dark:hover:bg-dark-bg-custom",!y.disabled&&"dark:hover:text-dark-content-custom",!y.disabled&&"focus:outline-hidden",!y.disabled&&"focus:ring-2",!y.disabled&&"focus:ring-offset-2",!y.disabled&&"focus:ring-primary-custom-400",!y.disabled&&"focus:ring-offset-bg-primary",!y.disabled&&"dark:focus:ring-offset-dark-bg-primary",y.disabled&&"opacity-50",y.disabled&&"cursor-not-allowed",y.className].filter(Boolean).join(" "),children:[y.icon&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:y.icon}),e.jsx("div",{className:"flex flex-1 flex-col items-start justify-center gap-0.5",children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-5 not-italic text-sm text-left",children:y.label})})]},C))})]})},_s=({className:t="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,children:e.jsx("path",{fillRule:"evenodd",d:"M6.455 1.45A.5.5 0 0 1 6.952 1h2.096a.5.5 0 0 1 .497.45l.186 1.858a4.996 4.996 0 0 1 1.466.848l1.703-.769a.5.5 0 0 1 .639.206l1.047 1.814a.5.5 0 0 1-.14.656l-1.517 1.09a5.026 5.026 0 0 1 0 1.694l1.516 1.09a.5.5 0 0 1 .141.656l-1.047 1.814a.5.5 0 0 1-.639.206l-1.703-.768c-.433.36-.928.649-1.466.847l-.186 1.858a.5.5 0 0 1-.497.45H6.952a.5.5 0 0 1-.497-.45l-.186-1.858a4.993 4.993 0 0 1-1.466-.848l-1.703.769a.5.5 0 0 1-.639-.206l-1.047-1.814a.5.5 0 0 1 .14-.656l1.517-1.09a5.033 5.033 0 0 1 0-1.694l-1.516-1.09a.5.5 0 0 1-.141-.656L2.461 3.39a.5.5 0 0 1 .639-.206l1.703.768c.433-.36.928-.649 1.466-.847l.186-1.858ZM8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",clipRule:"evenodd"})}),Ps=({className:t="w-4 h-4"})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,children:[e.jsx("path",{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 1 1-1.06-1.06L12.69 4.22a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}),e.jsx("path",{fillRule:"evenodd",d:"M2.22 9.28a.75.75 0 0 0 0 1.06l2.5 2.5a.75.75 0 1 0 1.06-1.06l-2.5-2.5a.75.75 0 0 0-1.06 0Z",clipRule:"evenodd"})]}),Vs=({className:t="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,children:e.jsx("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})}),Fs=({className:t="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,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"})}),Zs={"cog-6-tooth":_s,check:Ps,x:Vs,"chevron-down":Fs},Hs=(t,r)=>{if(!t)return null;const s=Zs[t];return s?e.jsx(s,{className:r}):(console.warn(`Icon "${t}" not found in iconMap`),null)},ur=({label:t="Label",description:r,showDescription:s=!0,iconName:n="cog-6-tooth",showIcon:o=!0,actionLabel:a,showAction:i=!1,onActionClick:l,className:c="",...u})=>e.jsxs("div",{className:`
|
|
464
464
|
flex
|
|
465
465
|
gap-3
|
|
466
466
|
items-center
|
|
@@ -545,7 +545,7 @@
|
|
|
545
545
|
pointer-events-none
|
|
546
546
|
dark:${a.bg}
|
|
547
547
|
${s}
|
|
548
|
-
`.trim().replace(/\s+/g," "),role:"status","aria-label":i})},Us=({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:"M9.78 4.22a.75.75 0 0 1 0 1.06L7.06 8l2.72 2.72a.75.75 0 1 1-1.06 1.06L5.47 8.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"})}),Gs=({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:"M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),qs=({currentPage:t=1,totalPages:r,onPageChange:s,backText:n="Atrás",nextText:o="Siguiente",siblingCount:a=1,showBackButton:i=!0,showNextButton:l=!0,className:c="",ariaLabel:u="Paginación"})=>{const d=g.useMemo(()=>{const h=a*2+3+2;if(r<=h)return Array.from({length:r},(C,M)=>M+1);const b=Math.max(t-a,1),
|
|
548
|
+
`.trim().replace(/\s+/g," "),role:"status","aria-label":i})},Us=({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:"M9.78 4.22a.75.75 0 0 1 0 1.06L7.06 8l2.72 2.72a.75.75 0 1 1-1.06 1.06L5.47 8.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"})}),Gs=({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:"M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),qs=({currentPage:t=1,totalPages:r,onPageChange:s,backText:n="Atrás",nextText:o="Siguiente",siblingCount:a=1,showBackButton:i=!0,showNextButton:l=!0,className:c="",ariaLabel:u="Paginación"})=>{const d=g.useMemo(()=>{const h=a*2+3+2;if(r<=h)return Array.from({length:r},(C,M)=>M+1);const b=Math.max(t-a,1),v=Math.min(t+a,r),w=b>2,N=v<r-1,S=1,y=r;if(!w&&N){const C=3+2*a;return[...Array.from({length:C},(E,k)=>k+1),"...",r]}if(w&&!N){const C=3+2*a,M=Array.from({length:C},(E,k)=>r-C+k+1);return[S,"...",...M]}if(w&&N){const C=Array.from({length:v-b+1},(M,E)=>b+E);return[S,"...",...C,"...",y]}return[]},[t,r,a]),f=x=>{x>=1&&x<=r&&x!==t&&s?.(x)},m=({page:x,isActive:h=!1,disabled:b=!1,onClick:v,ariaLabel:w})=>{const N=x==="...",M=[`
|
|
549
549
|
inline-flex
|
|
550
550
|
items-center
|
|
551
551
|
justify-center
|
|
@@ -558,7 +558,7 @@
|
|
|
558
558
|
whitespace-nowrap
|
|
559
559
|
transition-all
|
|
560
560
|
duration-150
|
|
561
|
-
`,
|
|
561
|
+
`,N?`
|
|
562
562
|
text-primary-custom-600
|
|
563
563
|
dark:text-primary-custom-600
|
|
564
564
|
cursor-default
|
|
@@ -579,7 +579,7 @@
|
|
|
579
579
|
opacity-50
|
|
580
580
|
cursor-not-allowed
|
|
581
581
|
pointer-events-none
|
|
582
|
-
`:""].join(" ").replace(/\s+/g," ").trim();return e.jsx("button",{type:"button",className:M,onClick:
|
|
582
|
+
`:""].join(" ").replace(/\s+/g," ").trim();return e.jsx("button",{type:"button",className:M,onClick:v,disabled:b||N,"aria-label":w,"aria-current":h?"page":void 0,children:x})},p=`
|
|
583
583
|
inline-flex
|
|
584
584
|
items-center
|
|
585
585
|
justify-between
|
|
@@ -623,7 +623,7 @@
|
|
|
623
623
|
transition-all
|
|
624
624
|
duration-150
|
|
625
625
|
${t===r?"opacity-50 cursor-not-allowed pointer-events-none":""}
|
|
626
|
-
`.replace(/\s+/g," ").trim(),onClick:()=>f(t+1),disabled:t===r,"aria-label":`${o} page`,children:[o,e.jsx(Gs,{className:"w-4 h-4"})]})]})};function Ks({title:t,titleId:r,...s},n){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":r},s),t?L.createElement("title",{id:r},t):null,L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Xs=L.forwardRef(Ks);function Ys({title:t,titleId:r,...s},n){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":r},s),t?L.createElement("title",{id:r},t):null,L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9"}))}const Qs=L.forwardRef(Ys);function Js({title:t,titleId:r,...s},n){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":r},s),t?L.createElement("title",{id:r},t):null,L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const eo=L.forwardRef(Js),to=({className:t="size-5"})=>e.jsx(Qs,{className:t,"aria-hidden":"true"}),ro=({className:t="size-4"})=>e.jsx(Xs,{className:t,"aria-hidden":"true"}),no=({options:t=[],value:r,defaultValue:s,placeholder:n="Seleccionar...",disabled:o=!1,error:a=!1,label:i,description:l,showLabel:c=!0,showDescription:u=!0,menuHeader:d,onChange:f,className:m="",triggerClassName:p="",menuClassName:x="",ariaLabel:h,id:b,name:
|
|
626
|
+
`.replace(/\s+/g," ").trim(),onClick:()=>f(t+1),disabled:t===r,"aria-label":`${o} page`,children:[o,e.jsx(Gs,{className:"w-4 h-4"})]})]})};function Ks({title:t,titleId:r,...s},n){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":r},s),t?L.createElement("title",{id:r},t):null,L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Xs=L.forwardRef(Ks);function Ys({title:t,titleId:r,...s},n){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":r},s),t?L.createElement("title",{id:r},t):null,L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9"}))}const Qs=L.forwardRef(Ys);function Js({title:t,titleId:r,...s},n){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":r},s),t?L.createElement("title",{id:r},t):null,L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const eo=L.forwardRef(Js),to=({className:t="size-5"})=>e.jsx(Qs,{className:t,"aria-hidden":"true"}),ro=({className:t="size-4"})=>e.jsx(Xs,{className:t,"aria-hidden":"true"}),no=({options:t=[],value:r,defaultValue:s,placeholder:n="Seleccionar...",disabled:o=!1,error:a=!1,label:i,description:l,showLabel:c=!0,showDescription:u=!0,menuHeader:d,onChange:f,className:m="",triggerClassName:p="",menuClassName:x="",ariaLabel:h,id:b,name:v,required:w=!1,menuPosition:N="bottom",fullWidth:S=!1})=>{const[y,C]=g.useState(!1),[M,E]=g.useState(r!==void 0?r:s),[k,j]=g.useState(-1),A=g.useRef(null),T=g.useRef(null),D=g.useRef(null);g.useEffect(()=>{r!==void 0&&E(r)},[r]),g.useEffect(()=>{const K=te=>{A.current&&!A.current.contains(te.target)&&C(!1)};if(y)return document.addEventListener("mousedown",K),()=>{document.removeEventListener("mousedown",K)}},[y]),g.useEffect(()=>{const K=te=>{if(y)switch(te.key){case"Escape":C(!1),T.current?.focus();break;case"ArrowDown":te.preventDefault(),j(ue=>ue<t.length-1?ue+1:0);break;case"ArrowUp":te.preventDefault(),j(ue=>ue>0?ue-1:t.length-1);break;case"Enter":te.preventDefault(),k>=0&&k<t.length&&I(t[k]);break}};if(y)return document.addEventListener("keydown",K),()=>{document.removeEventListener("keydown",K)}},[y,k,t]);const H=t.find(K=>K.value===M),_=()=>{o||(C(!y),j(-1))},I=K=>{K.disabled||(E(K.value),C(!1),f?.(K.value),setTimeout(()=>{T.current?.focus()},0))},$=[`
|
|
627
627
|
inline-flex
|
|
628
628
|
items-center
|
|
629
629
|
justify-between
|
|
@@ -638,7 +638,7 @@
|
|
|
638
638
|
border
|
|
639
639
|
transition-all
|
|
640
640
|
duration-150
|
|
641
|
-
`,
|
|
641
|
+
`,S?"w-full":"min-w-[200px]",a?`
|
|
642
642
|
border-error-border
|
|
643
643
|
bg-error-bg
|
|
644
644
|
text-content-primary
|
|
@@ -678,7 +678,7 @@
|
|
|
678
678
|
shadow-lg
|
|
679
679
|
transition-all
|
|
680
680
|
duration-150
|
|
681
|
-
`,
|
|
681
|
+
`,N==="top"?"bottom-full mb-1":"top-full mt-1",`
|
|
682
682
|
bg-background-secondary
|
|
683
683
|
border-border-secondary
|
|
684
684
|
dark:bg-dark-bg-primary
|
|
@@ -697,7 +697,7 @@
|
|
|
697
697
|
text-[10px]
|
|
698
698
|
leading-[12px]
|
|
699
699
|
font-bold
|
|
700
|
-
`,de=(K,te)=>{const ue=K.value===M,ve=te===
|
|
700
|
+
`,de=(K,te)=>{const ue=K.value===M,ve=te===k,Me=ve||ue&&ve?"bg-primary-custom-600 text-primary-inverse-content dark:bg-primary-custom-600 dark:text-primary-inverse-content":"text-content-primary dark:text-dark-content-primary",Ke=K.disabled?"":"hover:bg-primary-custom-600 hover:text-primary-inverse-content dark:hover:bg-primary-custom-600 dark:hover:text-primary-inverse-content",ke=K.disabled?"opacity-50 cursor-not-allowed":"";return[ee,Me,Ke,ke].join(" ").replace(/\s+/g," ").trim()},oe=["shrink-0","w-4","h-4","transition-transform","duration-150",y&&"rotate-180",o?"text-content-tertiary dark:text-content-tertiary":"text-content-secondary dark:text-content-secondary"].filter(Boolean).join(" ").replace(/\s+/g," ").trim(),re="shrink-0 w-4 h-4";return e.jsxs("div",{className:`relative ${S?"w-full":""} ${m}`,ref:A,children:[c&&i||u&&l?e.jsxs("div",{className:"flex flex-col gap-1 mb-1 w-full",children:[c&&i&&e.jsxs("label",{htmlFor:b,className:"text-sm font-bold leading-5 text-content-primary dark:text-dark-content-primary",children:[i,w&&e.jsx("span",{className:"ml-1 text-error-content",children:"*"})]}),u&&l&&e.jsx("p",{className:"text-sm font-normal leading-5 text-content-tertiary dark:text-content-tertiary",children:l})]}):null,e.jsxs("button",{ref:T,type:"button",className:$,onClick:_,disabled:o,"aria-label":h||i,"aria-haspopup":"listbox","aria-expanded":y,id:b,children:[e.jsx("span",{className:H?"":"text-content-secondary dark:text-content-secondary",children:H?H.label:n}),e.jsx(to,{className:oe})]}),v&&e.jsx("input",{type:"hidden",name:v,value:M!==void 0?String(M):""}),y&&e.jsxs("div",{ref:D,className:Ne,role:"listbox",children:[d&&e.jsx("div",{className:"flex items-center gap-0.5 px-6 py-0.5 rounded-[5px]",children:e.jsx("span",{className:"text-[10px] font-bold leading-[12px] text-content-tertiary dark:text-content-tertiary",children:d})}),t.length===0&&e.jsx("div",{className:"px-2 py-1.5 text-[10px] leading-[12px] text-content-secondary dark:text-content-secondary",children:"No hay opciones disponibles"}),t.map((K,te)=>e.jsxs("div",{className:de(K,te),onClick:()=>I(K),onMouseEnter:()=>j(te),role:"option","aria-selected":K.value===M,"aria-disabled":K.disabled,children:[e.jsx("div",{className:"w-4 flex items-center justify-center",children:K.value===M&&e.jsx(ro,{className:re})}),K.icon&&e.jsx("span",{className:"shrink-0 w-4 h-4",children:K.icon}),e.jsx("span",{className:"flex-1 text-left",children:K.label})]},K.value))]})]})},so=({icon:t,label:r,selected:s=!1,disabled:n=!1,badge:o=!1,badgeCount:a,onClick:i,ariaLabel:l,id:c})=>{const u=["flex","flex-col","items-center","justify-center","px-4","py-1","rounded-full","overflow-hidden","shrink-0",s?"bg-primary-custom-100 dark:bg-primary-custom-600/30":"bg-transparent hover:bg-primary-custom-100 dark:hover:bg-primary-custom-600/20","transition-colors","duration-150"].join(" "),d=["w-4","h-4","shrink-0",s||!n?s?"text-primary-custom-600 dark:text-white":"text-content-primary hover:text-primary-custom-600 dark:text-dark-content-primary dark:hover:text-white":"text-content-tertiary dark:text-content-tertiary","transition-colors","duration-150"].join(" "),f=["text-[10px]","leading-3","font-bold","text-center","w-full","min-w-full","text-content-primary","dark:text-dark-content-primary"].join(" "),m=["relative","flex","flex-col","items-center","gap-1","px-0.5","py-0","w-14","shrink-0",n?"cursor-not-allowed opacity-50 pointer-events-none":"cursor-pointer","focus:outline-hidden","focus-visible:ring-2","focus-visible:ring-primary-custom-400","focus-visible:ring-offset-2","dark:focus-visible:ring-dark-border-custom","dark:focus-visible:ring-offset-dark-bg-primary","rounded-lg"].join(" "),p=()=>!o&&a===void 0?null:a!==void 0?e.jsx("span",{className:`
|
|
701
701
|
absolute
|
|
702
702
|
-top-0.5
|
|
703
703
|
left-[34px]
|
|
@@ -726,7 +726,7 @@
|
|
|
726
726
|
bg-red-700
|
|
727
727
|
dark:bg-red-700
|
|
728
728
|
pointer-events-none
|
|
729
|
-
`,"aria-label":"Notificación"});return e.jsxs("button",{type:"button",className:m,disabled:n,onClick:i,"aria-label":l||r,"aria-current":s?"page":void 0,"data-item-id":c,children:[e.jsx("div",{className:u,children:e.jsx("span",{className:d,children:t})}),e.jsx("p",{className:f,children:r}),p()]})},oo=({items:t,alignment:r="top",showFab:s=!1,fabIcon:n,onFabClick:o,fabAriaLabel:a="Crear nuevo",className:i="",selectedId:l,onItemSelect:c})=>{const u=["flex","flex-col","items-center","relative","w-20","h-full","bg-white","dark:bg-dark-bg-primary","border-r","border-border-primary","dark:border-dark-border-primary",i].join(" "),d=["flex","flex-col","items-center","gap-10","w-20","pb-10","pt-2",r!=="top"&&"grow",r!=="top"&&"basis-0",r!=="top"&&"min-h-0"].filter(Boolean).join(" "),m=(()=>{const h=["flex","flex-col","items-center","gap-3","w-20"];return r==="top"?[...h,"shrink-0"].join(" "):r==="center"?[...h,"absolute","left-1/2","top-1/2","-translate-x-1/2","-translate-y-1/2"].join(" "):r==="bottom"?[...h,"grow","basis-0","min-h-0","justify-end","shrink-0"].join(" "):h.join(" ")})(),p=["flex","items-center","justify-center","p-3","shrink-0","rounded-md","bg-primary-custom-600","text-primary-inverse-content","border","border-primary-custom-600","shadow-button-inset","hover:bg-primary-custom-500","active:scale-95","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","focus:ring-offset-2","dark:bg-dark-bg-inverse","dark:text-dark-content-inverse","dark:border-dark-bg-inverse","dark:hover:bg-dark-bg-inverse/90","dark:focus:ring-dark-border-custom","dark:focus:ring-offset-dark-bg-primary","transition-all","duration-150"].join(" "),x=h=>{h.disabled||(h.onClick&&h.onClick(),c&&h.id&&c(h.id))};return e.jsx("nav",{className:u,"aria-label":"Navegación principal",children:e.jsxs("div",{className:d,children:[s&&e.jsx("div",{className:"flex items-start gap-2.5 shrink-0",children:e.jsx("button",{type:"button",className:p,onClick:o,"aria-label":a,children:e.jsx("span",{className:"w-4 h-4 flex items-center justify-center",children:n})})}),e.jsx("div",{className:m,children:t.map((h,b)=>e.jsx(so,{...h,selected:h.selected||l!==void 0&&h.id===l,onClick:()=>x(h)},h.id||b))})]})})},
|
|
729
|
+
`,"aria-label":"Notificación"});return e.jsxs("button",{type:"button",className:m,disabled:n,onClick:i,"aria-label":l||r,"aria-current":s?"page":void 0,"data-item-id":c,children:[e.jsx("div",{className:u,children:e.jsx("span",{className:d,children:t})}),e.jsx("p",{className:f,children:r}),p()]})},oo=({items:t,alignment:r="top",showFab:s=!1,fabIcon:n,onFabClick:o,fabAriaLabel:a="Crear nuevo",className:i="",selectedId:l,onItemSelect:c})=>{const u=["flex","flex-col","items-center","relative","w-20","h-full","bg-white","dark:bg-dark-bg-primary","border-r","border-border-primary","dark:border-dark-border-primary",i].join(" "),d=["flex","flex-col","items-center","gap-10","w-20","pb-10","pt-2",r!=="top"&&"grow",r!=="top"&&"basis-0",r!=="top"&&"min-h-0"].filter(Boolean).join(" "),m=(()=>{const h=["flex","flex-col","items-center","gap-3","w-20"];return r==="top"?[...h,"shrink-0"].join(" "):r==="center"?[...h,"absolute","left-1/2","top-1/2","-translate-x-1/2","-translate-y-1/2"].join(" "):r==="bottom"?[...h,"grow","basis-0","min-h-0","justify-end","shrink-0"].join(" "):h.join(" ")})(),p=["flex","items-center","justify-center","p-3","shrink-0","rounded-md","bg-primary-custom-600","text-primary-inverse-content","border","border-primary-custom-600","shadow-button-inset","hover:bg-primary-custom-500","active:scale-95","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","focus:ring-offset-2","dark:bg-dark-bg-inverse","dark:text-dark-content-inverse","dark:border-dark-bg-inverse","dark:hover:bg-dark-bg-inverse/90","dark:focus:ring-dark-border-custom","dark:focus:ring-offset-dark-bg-primary","transition-all","duration-150"].join(" "),x=h=>{h.disabled||(h.onClick&&h.onClick(),c&&h.id&&c(h.id))};return e.jsx("nav",{className:u,"aria-label":"Navegación principal",children:e.jsxs("div",{className:d,children:[s&&e.jsx("div",{className:"flex items-start gap-2.5 shrink-0",children:e.jsx("button",{type:"button",className:p,onClick:o,"aria-label":a,children:e.jsx("span",{className:"w-4 h-4 flex items-center justify-center",children:n})})}),e.jsx("div",{className:m,children:t.map((h,b)=>e.jsx(so,{...h,selected:h.selected||l!==void 0&&h.id===l,onClick:()=>x(h)},h.id||b))})]})})},fr=({height:t=900,width:r=248,showHeading:s=!0,heading:n,showSearch:o=!0,search:a,sections:i,items:l,className:c="",panelClassName:u=""})=>{const[d,f]=g.useState(a?.value||""),m=h=>{f(h),a?.onChange?.(h)},p={height:typeof t=="number"?`${t}px`:t},x={width:typeof r=="number"?`${r}px`:r};return e.jsx("div",{className:`flex items-start relative ${c}`,style:p,"data-testid":"navigation-rail-panel-container",children:e.jsxs("div",{className:`bg-bg-primary dark:bg-dark-bg-primary border-border-primary dark:border-dark-border-primary border-b-0 border-l border-r border-solid border-t-0 flex flex-col h-full items-start overflow-clip relative shrink-0 ${u}`,style:x,"data-testid":"navigation-rail-panel",children:[s&&n&&e.jsx("div",{className:"flex flex-col items-start p-3 relative shrink-0 w-full",children:e.jsx(ur,{label:n.label,description:n.description,showDescription:n.showDescription!==!1,iconName:n.iconName,showIcon:!0,actionLabel:n.actionLabel,showAction:n.showAction,onActionClick:n.onActionClick,className:"w-full"})}),o&&e.jsx("div",{className:"flex flex-col items-start p-3 relative shrink-0 w-full","data-testid":"navigation-rail-search",children:e.jsx(st,{placeholder:a?.placeholder||"Buscar módulo",value:d,onChange:h=>m(h.target.value),className:"w-full"})}),e.jsx(Ie,{className:"w-full"}),e.jsxs("div",{className:"flex flex-1 flex-col gap-0.5 items-start min-h-px min-w-px p-3 relative shrink-0 overflow-y-auto w-full","data-testid":"navigation-rail-body",children:[i&&i.length>0?i.map((h,b)=>e.jsxs("div",{className:"w-full",children:[h.heading&&e.jsx("div",{className:"flex flex-col gap-0 items-start pb-1 pt-3 px-0 relative shrink-0 w-full","data-testid":`section-heading-${b}`,children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal text-xs leading-4 not-italic relative shrink-0 text-content-tertiary dark:text-content-tertiary w-full whitespace-pre-wrap",children:h.heading})}),e.jsx("div",{className:"flex flex-col gap-0.5 items-start relative shrink-0 w-full","data-testid":`section-items-${b}`,children:h.items.map((v,w)=>e.jsx(Dr,{item:v},`item-${b}-${w}`))}),h.showDivider!==!1&&b<i.length-1&&e.jsx(Ie,{className:"mt-3 w-full"})]},`section-${b}`)):null,l&&l.length>0&&!i?l.map((h,b)=>e.jsx(Dr,{item:h},`item-${b}`)):null]})]})})},Dr=({item:t})=>t.isCollapsible?e.jsx(dr,{label:t.label,icon:t.icon,children:t.children,defaultOpen:t.defaultOpen,disabled:t.disabled,onClick:t.onClick,onOpenChange:t.onOpenChange,className:t.className,showDivider:!1,showHeading:!1}):e.jsxs("button",{onClick:t.onClick,disabled:t.disabled,className:["flex items-center gap-3 px-4 py-2 w-full","rounded-lg cursor-pointer","transition-colors duration-150",!t.disabled&&"text-content-primary",!t.disabled&&"hover:bg-primary-custom-100",!t.disabled&&"dark:text-content-primary",!t.disabled&&"dark:hover:bg-dark-bg-custom",!t.disabled&&"focus:outline-hidden",!t.disabled&&"focus:ring-2",!t.disabled&&"focus:ring-offset-2",!t.disabled&&"focus:ring-primary-custom-400",!t.disabled&&"focus:ring-offset-bg-primary",!t.disabled&&"dark:focus:ring-offset-dark-bg-primary",t.disabled&&"opacity-50",t.disabled&&"cursor-not-allowed",t.className].filter(Boolean).join(" "),"data-testid":`navigation-rail-item-${t.label}`,"aria-disabled":t.disabled,children:[t.icon&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:t.icon}),e.jsx("p",{className:"font-['Inter:Regular',sans-serif] text-sm font-normal leading-5 not-italic relative shrink-0 text-left",children:t.label})]});function ao({title:t,titleId:r,...s},n){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":r},s),t?L.createElement("title",{id:r},t):null,L.createElement("path",{fillRule:"evenodd",d:"M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}const io=L.forwardRef(ao);function lo({title:t,titleId:r,...s},n){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":r},s),t?L.createElement("title",{id:r},t):null,L.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const co=L.forwardRef(lo);function uo({title:t,titleId:r,...s},n){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":r},s),t?L.createElement("title",{id:r},t):null,L.createElement("path",{fillRule:"evenodd",d:"M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z",clipRule:"evenodd"}))}const Sn=L.forwardRef(uo),fo=({className:t="size-5"})=>e.jsx(co,{className:t,"aria-hidden":"true"}),mo=({className:t="size-5"})=>e.jsx(io,{className:t,"aria-hidden":"true"}),_r=({className:t="size-5"})=>e.jsx(eo,{className:t,"aria-hidden":"true"}),Pr=({className:t="size-5"})=>e.jsx(Sn,{className:t,"aria-hidden":"true"}),mr=g.forwardRef(({collapsed:t=!0,items:r=[],showRecentButton:s=!0,showSearchButton:n=!0,onCollapsedChange:o,onItemClick:a,onItemHover:i,className:l,labels:c={},onSearch:u},d)=>{const[f,m]=g.useState(""),[p,x]=g.useState(!1),h=g.useRef(null),b=g.useRef(null);g.useEffect(()=>{function k(j){p&&h.current&&!h.current.contains(j.target)&&b.current&&!b.current.contains(j.target)&&x(!1)}return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[p]);const v={searchButton:c.searchButton??"Search",searchPlaceholder:c.searchPlaceholder??"Buscar módulo",recentButton:c.recentButton??"Recientes",collapseButton:c.collapseButton??"Colapsar",expandButton:c.expandButton??"Expandir"},w=()=>{t&&x(!1),o?.(!t)},N=()=>{x(!p)},S=(k,j)=>{j.onClick?.(new Event("click")),a?.(k,j),p&&x(!1)},y=(k,j)=>{i?.(k,j)},C=k=>{m(k),u?.(k)},M=k=>{C(k.target.value)},E=r.map((k,j)=>({label:k.label,icon:k.icon,disabled:k.disabled,isCollapsible:k.children&&k.children.length>0,children:k.children,defaultOpen:k.defaultOpen,onClick:()=>S(j,k)}));return e.jsxs("div",{ref:d,className:`
|
|
730
730
|
${t?"w-[80px]":"w-[215px]"}
|
|
731
731
|
h-full
|
|
732
732
|
bg-background-primary dark:bg-background-primary
|
|
@@ -737,22 +737,22 @@
|
|
|
737
737
|
relative
|
|
738
738
|
transition-all duration-300
|
|
739
739
|
${l||""}
|
|
740
|
-
`,children:[!t&&e.jsxs("div",{className:"w-full flex flex-col gap-3 px-3 py-3 relative shrink-0",children:[e.jsx(st,{placeholder:
|
|
740
|
+
`,children:[t&&p&&e.jsx("div",{ref:h,className:"absolute left-[80px] top-0 h-full z-50 shadow-xl",children:e.jsx(fr,{height:"100%",width:248,showHeading:!0,heading:{label:"Buscar",showDescription:!1,showAction:!0,actionLabel:"Cerrar",onActionClick:()=>x(!1)},showSearch:!0,search:{placeholder:v.searchPlaceholder,value:f,onChange:C},items:E,className:"h-full border-l border-border-primary dark:border-border-primary"})}),!t&&e.jsxs("div",{className:"w-full flex flex-col gap-3 px-3 py-3 relative shrink-0",children:[e.jsx(st,{placeholder:v.searchPlaceholder,value:f,onChange:M,leftIcon:e.jsx(Pr,{className:"size-4 text-content-secondary dark:text-content-secondary"}),fullWidth:!0}),e.jsx(Ie,{className:"w-full"})]}),e.jsxs("div",{className:`
|
|
741
741
|
flex-1 flex flex-col
|
|
742
742
|
items-center min-h-px min-w-px
|
|
743
743
|
relative shrink-0
|
|
744
744
|
px-0
|
|
745
745
|
${t?"gap-7 py-2 w-[80px]":"gap-0.5 p-3 w-full bg-background-primary dark:bg-background-primary border-l dark:border-border-primary border-border-primary border-solid"}
|
|
746
|
-
`,children:[t&&n&&e.jsx(Q,{type:"default",size:"xl",iconOnly:!0,leftIcon:e.jsx(
|
|
746
|
+
`,children:[t&&n&&e.jsx("div",{ref:b,children:e.jsx(Q,{type:"default",size:"xl",iconOnly:!0,leftIcon:e.jsx(Pr,{className:"overflow-clip relative shrink-0 size-4 text-primary-inverse-content dark:text-primary-inverse-content"}),ariaLabel:v.searchButton,onClick:N,className:p?"bg-primary-custom-500 ring-2 ring-offset-2 ring-primary-custom-400":""})}),e.jsx("div",{className:`
|
|
747
747
|
flex flex-col items-center min-h-px min-w-px
|
|
748
748
|
relative shrink-0
|
|
749
749
|
flex-1
|
|
750
750
|
overflow-hidden
|
|
751
751
|
${t?"gap-3 leading-none w-[80px]":"gap-0.5 p-3 w-full"}
|
|
752
|
-
`,children:
|
|
752
|
+
`,children:t?e.jsx(e.Fragment,{children:r.map((k,j)=>e.jsx(cr,{id:k.id,label:k.label,icon:k.icon,selected:k.active,disabled:k.disabled,badge:k.badge,badgeCount:k.badgeCount,ariaLabel:k.ariaLabel,showLabelText:!1,onClick:()=>S(j,k),onMouseEnter:()=>y(j,k),onMouseLeave:k.onMouseLeave},k.id))}):e.jsx(e.Fragment,{children:r.map((k,j)=>{const A=k.children&&k.children.length>0;return e.jsx("div",{className:"w-full",children:e.jsx(dr,{label:k.label,icon:k.icon,selected:k.active,disabled:k.disabled,badge:k.badge,badgeCount:k.badgeCount,badgeColor:k.badgeColor,showDivider:!1,showHeading:!1,isCollapsible:A,defaultOpen:k.defaultOpen,children:A?k.children:void 0,onClick:()=>S(j,k)})},k.id)})})}),e.jsxs("div",{className:`w-full flex flex-col gap-3 items-center relative shrink-0 ${t?"":"px-3"}`,children:[e.jsx(Ie,{className:"w-full"}),e.jsxs("div",{className:`
|
|
753
753
|
flex flex-col gap-3 relative shrink-0 w-full
|
|
754
754
|
${t?"items-stretch px-3":"items-stretch"}
|
|
755
|
-
`,children:[s&&t&&e.jsx(Q,{type:"outline",size:"base",fullWidth:!0,leftIcon:e.jsx(
|
|
755
|
+
`,children:[s&&t&&e.jsx(Q,{type:"outline",size:"base",fullWidth:!0,leftIcon:e.jsx(_r,{className:"size-4 text-primary-custom-600 dark:text-primary-custom-600"}),ariaLabel:v.recentButton}),s&&!t&&e.jsx(Q,{type:"outline",size:"base",leftIcon:e.jsx(_r,{className:"size-4 text-primary-custom-600 dark:text-primary-custom-600"}),fullWidth:!0,children:v.recentButton}),t?e.jsx(Q,{type:"plain",size:"base",fullWidth:!0,leftIcon:e.jsx(fo,{className:"overflow-clip relative shrink-0 size-4 text-background-inverse-custom-primary dark:text-background-inverse-custom-primary"}),onClick:w,ariaLabel:v.expandButton}):e.jsx(Q,{type:"outline",size:"base",leftIcon:e.jsx(mo,{className:"overflow-clip relative shrink-0 size-4 text-content-custom-primary dark:text-content-custom-primary"}),onClick:w,fullWidth:!0,children:v.collapseButton})]})]})]})]})});mr.displayName="NavigationRailTypes";const po=({className:t="size-4"})=>e.jsx(Sn,{className:t,"aria-hidden":"true"}),Rt=g.forwardRef(({state:t="collapsed",items:r=[],onStateChange:s,onItemClick:n,onItemHover:o,labels:a={},className:i,showSearchButton:l=!0,onSearch:c},u)=>{const[d,f]=g.useState(!1),[m,p]=g.useState("hover"),[x,h]=g.useState(null),b=g.useRef(null),v={searchPlaceholder:a.searchPlaceholder??"Buscar módulo",collapseButton:a.collapseButton??"Colapsar",recentSection:a.recentSection??"Recientes",frequentSection:a.frequentSection??"Opciones frecuentes"},w=t==="collapsed"||t==="hover"||t==="searcher";g.useEffect(()=>()=>{b.current&&clearTimeout(b.current)},[]);const N=A=>{s?.(A?"collapsed":"expanded")},S=A=>{const T=r[A];T&&n?.(T)},y=A=>{const T=r[A];T&&w&&C(T)},C=A=>{w&&A.isCollapsible&&A.children&&(b.current&&(clearTimeout(b.current),b.current=null),h(A),p("hover"),f(!0),o?.(A))},M=()=>{w&&m==="hover"&&(b.current=setTimeout(()=>{f(!1),h(null)},150))},E=()=>{b.current&&(clearTimeout(b.current),b.current=null)},k=()=>{w&&m==="hover"&&(f(!1),h(null))},j=r.map(A=>({id:A.id,label:A.label,icon:A.icon,active:A.active,disabled:A.disabled,badge:A.badge,badgeCount:A.badgeCount,children:A.children,defaultOpen:A.defaultOpen,onClick:()=>{A.onClick?.()},onMouseLeave:()=>M()}));return e.jsxs("div",{ref:u,className:`relative flex items-start h-full ${i||""}`,"data-testid":"navigation-rail-group",children:[e.jsx(mr,{collapsed:w,items:j,showRecentButton:!1,showSearchButton:l,onCollapsedChange:N,onItemClick:S,onItemHover:y,onSearch:c,labels:{searchButton:v.searchPlaceholder,searchPlaceholder:v.searchPlaceholder,collapseButton:v.collapseButton}}),d&&w&&e.jsx("div",{className:"absolute left-[80px] top-0 z-10 h-full",onMouseEnter:E,onMouseLeave:k,children:e.jsx(fr,{height:"100%",width:248,showHeading:m==="hover"&&x!==null,heading:m==="hover"&&x?{label:x.label,iconName:"cog-6-tooth",showDescription:!1,showAction:!1}:void 0,showSearch:m==="searcher",search:{placeholder:v.searchPlaceholder},sections:m==="hover"&&x?.children?[{items:x.children.map(A=>({label:A.label,icon:A.icon,onClick:A.onClick,disabled:A.disabled}))}]:m==="searcher"?[{heading:v.recentSection,items:[{label:"Configuración",icon:e.jsx(po,{className:"size-4"})}]},{heading:v.frequentSection,items:[{label:"Item"}]}]:[]})})]})});Rt.displayName="NavigationRailGroup";const ho=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"transition-transform",children:e.jsx("path",{d:"M12 10L8 6L4 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),xo=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"transition-transform",children:e.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),go=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M14 8H2M2 8L6.5 3.5M2 8L6.5 12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),bo=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 8H14M14 8L9.5 3.5M14 8L9.5 12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),vo=({column:t,sortable:r,sorted:s,sortDirection:n,onSort:o})=>{const c=[`
|
|
756
756
|
flex
|
|
757
757
|
items-center
|
|
758
758
|
gap-3
|
|
@@ -777,7 +777,7 @@
|
|
|
777
777
|
text-ellipsis
|
|
778
778
|
overflow-hidden
|
|
779
779
|
whitespace-nowrap
|
|
780
|
-
`,children:t.header}),r&&e.jsxs("span",{className:"shrink-0 text-content-secondary dark:text-content-secondary",children:[s&&n==="asc"&&e.jsx(ho,{}),s&&n==="desc"&&e.jsx(xo,{}),!s&&e.jsx("div",{className:"w-4 h-4"})]})]})},
|
|
780
|
+
`,children:t.header}),r&&e.jsxs("span",{className:"shrink-0 text-content-secondary dark:text-content-secondary",children:[s&&n==="asc"&&e.jsx(ho,{}),s&&n==="desc"&&e.jsx(xo,{}),!s&&e.jsx("div",{className:"w-4 h-4"})]})]})},Vr=({children:t,align:r="left",width:s,isStriped:n=!1,rowIndex:o=0})=>{const a={left:"justify-start",center:"justify-center",right:"justify-end"},i=n&&o%2===1?"bg-background-secondary dark:bg-dark-bg-primary/30":"";return e.jsx("div",{className:`
|
|
781
781
|
flex
|
|
782
782
|
items-center
|
|
783
783
|
${a[r]}
|
|
@@ -853,7 +853,7 @@
|
|
|
853
853
|
disabled:cursor-not-allowed
|
|
854
854
|
transition-colors
|
|
855
855
|
duration-150
|
|
856
|
-
`,children:[e.jsx("span",{children:o}),e.jsx(bo,{})]})]})},Rn=({title:t,columns:r,data:s,variant:n="basic",showBorder:o=!0,showShadow:a=!0,onSort:i,sortColumn:l,sortDirection:c,fullWidth:u=!1,emptyMessage:d="No hay datos disponibles",loading:f=!1,loadingRows:m=5,pagination:p,className:x="",id:h})=>{const[b,
|
|
856
|
+
`,children:[e.jsx("span",{children:o}),e.jsx(bo,{})]})]})},Rn=({title:t,columns:r,data:s,variant:n="basic",showBorder:o=!0,showShadow:a=!0,onSort:i,sortColumn:l,sortDirection:c,fullWidth:u=!1,emptyMessage:d="No hay datos disponibles",loading:f=!1,loadingRows:m=5,pagination:p,className:x="",id:h})=>{const[b,v]=g.useState(null),[w,N]=g.useState(null),S=l!==void 0?l:b,y=c!==void 0?c:w,C=_=>{let I="asc";S===_&&(y==="asc"?I="desc":y==="desc"&&(I=null)),i?i(_,I):(v(I?_:null),N(I))},M=(_,I)=>typeof I=="function"?I(_):_[I],D=[`
|
|
857
857
|
flex
|
|
858
858
|
flex-col
|
|
859
859
|
gap-4
|
|
@@ -876,14 +876,14 @@
|
|
|
876
876
|
text-ellipsis
|
|
877
877
|
overflow-hidden
|
|
878
878
|
whitespace-nowrap
|
|
879
|
-
`,children:t})}),e.jsxs("div",{className:`grid w-full overflow-x-auto ${H}`,style:{gridTemplateColumns:r.map(_=>_.width||"1fr").join(" ")},children:[r.map((_,
|
|
879
|
+
`,children:t})}),e.jsxs("div",{className:`grid w-full overflow-x-auto ${H}`,style:{gridTemplateColumns:r.map(_=>_.width||"1fr").join(" ")},children:[r.map((_,I)=>{const z=typeof _.accessor=="function"?`column_${I}`:String(_.accessor);return e.jsx(vo,{column:_,sortable:_.sortable||!1,sorted:S===z,sortDirection:S===z?y:null,onSort:()=>C(z)},`header-${z}`)}),f&&e.jsx(e.Fragment,{children:Array.from({length:m}).map((_,I)=>r.map((z,R)=>{const q=typeof z.accessor=="function"?`column_${R}`:String(z.accessor);return e.jsx(Vr,{align:z.align,isStriped:n==="striped",rowIndex:I,children:e.jsx("div",{className:`
|
|
880
880
|
h-4
|
|
881
881
|
w-full
|
|
882
882
|
bg-background-secondary
|
|
883
883
|
dark:bg-dark-border-primary
|
|
884
884
|
rounded
|
|
885
885
|
animate-pulse
|
|
886
|
-
`})},`loading-${
|
|
886
|
+
`})},`loading-${I}-${q}`)}))}),!f&&s.length>0&&e.jsx(e.Fragment,{children:s.map((_,I)=>r.map((z,R)=>{const q=typeof z.accessor=="function"?`column_${R}`:String(z.accessor),F=M(_,z.accessor),ie=z.render?z.render(F,_,I):F;return e.jsx(Vr,{align:z.align,isStriped:n==="striped",rowIndex:I,children:ie},`cell-${I}-${q}`)}))}),!f&&s.length===0&&e.jsx("div",{className:`
|
|
887
887
|
flex
|
|
888
888
|
items-center
|
|
889
889
|
justify-center
|
|
@@ -948,7 +948,7 @@
|
|
|
948
948
|
bg-primary-custom-600
|
|
949
949
|
dark:bg-primary-custom-600
|
|
950
950
|
z-10
|
|
951
|
-
`:"hidden",
|
|
951
|
+
`:"hidden",v=[c,"",d,"group",i].join(" ").replace(/\s+/g," ").trim(),w=[f,m].join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",role:"tab","aria-selected":r,"aria-disabled":o,"aria-label":l||t,tabIndex:o?-1:0,className:v,onClick:o?void 0:a,disabled:o,children:[e.jsxs("div",{className:w,children:[s&&e.jsx("span",{className:`${x} ${p}`.trim(),children:s}),e.jsx("span",{className:`
|
|
952
952
|
text-sm
|
|
953
953
|
font-bold
|
|
954
954
|
leading-5
|
|
@@ -968,14 +968,14 @@
|
|
|
968
968
|
text-primary-inverse-content
|
|
969
969
|
dark:text-dark-bg-primary
|
|
970
970
|
${h}
|
|
971
|
-
`.replace(/\s+/g," ").trim(),"aria-label":`${n} notificaciones`,children:n>99?"99+":n})]}),e.jsx("div",{className:b})]})},wo=({items:t,activeId:r,defaultActiveId:s,onChange:n,className:o="",fullWidth:a=!1,size:i="base",showBorder:l=!0})=>{const[c,u]=g.useState(s||(t.length>0?t[0].id:"")),d=r!==void 0,f=d?r:c,m=
|
|
971
|
+
`.replace(/\s+/g," ").trim(),"aria-label":`${n} notificaciones`,children:n>99?"99+":n})]}),e.jsx("div",{className:b})]})},wo=({items:t,activeId:r,defaultActiveId:s,onChange:n,className:o="",fullWidth:a=!1,size:i="base",showBorder:l=!0})=>{const[c,u]=g.useState(s||(t.length>0?t[0].id:"")),d=r!==void 0,f=d?r:c,m=v=>{d||u(v),n?.(v)},x=`
|
|
972
972
|
flex
|
|
973
973
|
items-end
|
|
974
974
|
pb-2.5
|
|
975
975
|
${{sm:"gap-0",base:"gap-1",lg:"gap-2"}[i]}
|
|
976
976
|
${a?"w-full":""}
|
|
977
977
|
${l?"border-b border-border-primary dark:border-dark-border-primary":""}
|
|
978
|
-
`,h=a?"flex-1":"",b=[x,o].join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{role:"tablist","aria-label":"Pestañas de navegación",className:b,children:t.map(
|
|
978
|
+
`,h=a?"flex-1":"",b=[x,o].join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{role:"tablist","aria-label":"Pestañas de navegación",className:b,children:t.map(v=>e.jsx(yo,{label:v.label,active:f===v.id,icon:v.icon,badge:v.badge,disabled:v.disabled,onClick:()=>m(v.id),className:h},v.id))})},jo=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{d:"M1.75 1.002a.75.75 0 1 0 0 1.5h1.035l1.38 5.514a2.75 2.75 0 0 0 2.658 2.048h5.355a2.75 2.75 0 0 0 2.658-2.048l.9-3.597a.75.75 0 0 0-.728-.919H4.655l-.22-.88A.75.75 0 0 0 3.71 2H1.75ZM5 13a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM11.5 13a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z"})}),No=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M12 5a4 4 0 0 0-8 0v2.379a1.5 1.5 0 0 1-.44 1.06L2.294 9.707a1 1 0 0 0-.293.707V11a1 1 0 0 0 1 1h2a3 3 0 1 0 6 0h2a1 1 0 0 0 1-1v-.586a1 1 0 0 0-.293-.707L12.44 8.44A1.5 1.5 0 0 1 12 7.38V5Zm-5.5 7a1.5 1.5 0 0 0 3 0h-3Z",clipRule:"evenodd"})}),Fr=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M9.965 11.026a5 5 0 1 1 1.06-1.06l2.755 2.754a.75.75 0 1 1-1.06 1.06l-2.755-2.754ZM10.5 7a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z",clipRule:"evenodd"})}),Zr=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",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"})}),xt=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M6.701 2.25c.577-1 2.02-1 2.598 0l5.196 9a1.5 1.5 0 0 1-1.299 2.25H2.804a1.5 1.5 0 0 1-1.3-2.25l5.197-9ZM8 4a.75.75 0 0 1 .75.75v3a.75.75 0 1 1-1.5 0v-3A.75.75 0 0 1 8 4Zm0 7.25a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"})}),Co=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M14 4.75A2.75 2.75 0 0 0 11.25 2h-3A2.75 2.75 0 0 0 5.5 4.75v.5a.75.75 0 0 0 1.5 0v-.5c0-.69.56-1.25 1.25-1.25h3c.69 0 1.25.56 1.25 1.25v6.5c0 .69-.56 1.25-1.25 1.25h-3c-.69 0-1.25-.56-1.25-1.25v-.5a.75.75 0 0 0-1.5 0v.5A2.75 2.75 0 0 0 8.25 14h3A2.75 2.75 0 0 0 14 11.25v-6.5Zm-9.47.47a.75.75 0 0 0-1.06 0L1.22 7.47a.75.75 0 0 0 0 1.06l2.25 2.25a.75.75 0 1 0 1.06-1.06l-.97-.97h5.69a.75.75 0 0 0 0-1.5H3.56l.97-.97a.75.75 0 0 0 0-1.06Z",clipRule:"evenodd"})}),ot=({logo:t,productName:r="Nombre Producto",environmentBadge:s,userDropdown:n,actions:o,notifications:a,className:i="",variant:l="responsive",hideActionButtons:c=!1,showNavigationButton:u=!1,navigationButtonProps:d={},leadingAction:f,siesaLogo:m,showBusinessLogo:p=!1,showSiesaLogoLeading:x=!0,showSiesaLogoTrailing:h=!1,onNavigationClick:b,onSearchClick:v,onCartClick:w,onNotificationsClick:N})=>{const S=`
|
|
979
979
|
box-border
|
|
980
980
|
flex
|
|
981
981
|
flex-col
|
|
@@ -999,7 +999,7 @@
|
|
|
999
999
|
dark:focus:ring-offset-dark-bg-primary
|
|
1000
1000
|
transition-all
|
|
1001
1001
|
duration-150
|
|
1002
|
-
`,y=l==="mobile",C=l==="desktop",M=l==="tablet",
|
|
1002
|
+
`,y=l==="mobile",C=l==="desktop",M=l==="tablet",E=l==="responsive",k=()=>{if(y||!u)return null;const $={type:"default",size:"base",iconOnly:!0,leftIcon:e.jsx(Co,{}),ariaLabel:"Volver",onClick:b,...d};return C||M?e.jsx(Q,{...$}):e.jsx("div",{className:"hidden md:block",children:e.jsx(Q,{...$})})},j=()=>{if(y||!p)return null;const $=e.jsx("img",{src:"/,Business Logo.png",alt:"Business Logo",className:"w-full h-full object-contain"});return C?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[168px] h-[30px]",children:$}):M?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[140px] h-[25px]",children:$}):e.jsx("div",{className:"hidden md:block overflow-hidden relative shrink-0 w-[140px] lg:w-[168px] h-[25px] lg:h-[30px]",children:$})},A=()=>{const $=e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-full h-full object-contain"}),G=e.jsx("img",{src:"/siesa_logo_mobile.png",alt:"Siesa",className:"w-full h-full object-contain"});return y?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[30px] h-[30px]",children:G}):x?C?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:$}):M?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:$}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden overflow-hidden relative shrink-0 w-[30px] h-[30px]",children:G}),x&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block lg:hidden overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:$}),e.jsx("div",{className:"hidden lg:block overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:$})]})]}):null},T=()=>{if(!h||y)return null;const $=e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-full h-full object-contain"});return C?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:$}):M?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:$}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block lg:hidden overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:$}),e.jsx("div",{className:"hidden lg:block overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:$})]})},D=({responsive:$=!0})=>{const G=e.jsx("div",{className:"grow shrink-0 w-px min-h-px bg-border-primary dark:bg-dark-border-primary"});return y?null:C||M?e.jsx("div",{className:"flex flex-col gap-2 h-8 items-start px-0 py-1 relative shrink-0",children:G}):$?e.jsx("div",{className:"hidden md:flex flex-col gap-2 h-8 items-start px-0 py-1 relative shrink-0",children:G}):null},H=()=>{if(y||!r)return null;const $=e.jsx("p",{className:"font-bold leading-7 text-xl text-content-primary dark:text-dark-content-primary tracking-[-0.5px] whitespace-nowrap",children:r});return C||M?$:e.jsx("p",{className:"hidden md:block font-bold leading-7 text-xl text-content-primary dark:text-dark-content-primary tracking-[-0.5px] whitespace-nowrap",children:r})},_=()=>s?y?e.jsx(Oe,{color:"yellow",leftIcon:e.jsx(xt,{}),label:"Pruebas"}):C||M?e.jsx(Oe,{color:"yellow",leftIcon:e.jsx(xt,{}),label:s}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden",children:e.jsx(Oe,{color:"yellow",leftIcon:e.jsx(xt,{}),label:"Pruebas"})}),e.jsx("div",{className:"hidden md:block",children:e.jsx(Oe,{color:"yellow",leftIcon:e.jsx(xt,{}),label:s})})]}):null,I=()=>c?null:y?e.jsx("button",{className:S,"aria-label":"Buscar",onClick:v,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(Fr,{})})}):E?e.jsx("button",{className:`md:hidden ${S}`,"aria-label":"Buscar",onClick:v,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(Fr,{})})}):null,z=()=>c?null:e.jsxs("div",{className:"relative",children:[e.jsx("button",{className:S,"aria-label":"Carrito de compras",onClick:w,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(jo,{})})}),a?.cart!==void 0&&a.cart>0&&e.jsx("div",{className:"absolute bg-error-content dark:bg-error-content flex flex-col gap-2.5 h-4 items-center justify-center left-[calc(50%+8px)] px-1 py-0 rounded-full top-[calc(50%-8px)] -translate-x-1/2 -translate-y-1/2 pointer-events-none min-w-[16px]",children:e.jsx("p",{className:"font-bold leading-3 text-[10px] text-white text-center whitespace-nowrap",children:a.cart>99?"+99":a.cart})})]}),R=()=>c?null:e.jsxs("div",{className:"relative",children:[e.jsx("button",{className:S,"aria-label":"Notificaciones",onClick:N,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(No,{})})}),a?.bell&&e.jsx("div",{className:"absolute w-2 h-2 bg-error-content dark:bg-error-content rounded-full left-[calc(50%+4px)] top-[calc(50%-8px)] -translate-x-1/2 pointer-events-none"})]}),q=()=>{if(!n)return null;const $=n.menuItems||[{children:"Account",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{d:"M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM12.735 14c.618 0 1.093-.561.872-1.139a6.002 6.002 0 0 0-11.215 0c-.22.578.254 1.139.872 1.139h9.47Z"})}),onClick:n.onAccountClick},{children:"Notifications",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M12 5a4 4 0 0 0-8 0v2.379a1.5 1.5 0 0 1-.44 1.06L2.294 9.707a1 1 0 0 0-.293.707V11a1 1 0 0 0 1 1h2a3 3 0 1 0 6 0h2a1 1 0 0 0 1-1v-.586a1 1 0 0 0-.293-.707L12.44 8.44A1.5 1.5 0 0 1 12 7.38V5Zm-5.5 7a1.5 1.5 0 0 0 3 0h-3Z",clipRule:"evenodd"})}),onClick:n.onNotificationsClick},{children:"Billing",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M4 2a1.5 1.5 0 0 0-1.5 1.5v9A1.5 1.5 0 0 0 4 14h8a1.5 1.5 0 0 0 1.5-1.5V6.621a1.5 1.5 0 0 0-.44-1.06L9.94 2.439A1.5 1.5 0 0 0 8.878 2H4Zm4 9.5a.75.75 0 0 1-.75-.75V8.06l-.72.72a.75.75 0 0 1-1.06-1.06l2-2a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-.72-.72v2.69a.75.75 0 0 1-.75.75Z",clipRule:"evenodd"})}),onClick:n.onBillingClick},{isDivider:!0},{children:"Dark mode",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{d:"M14.438 10.148c.19-.425-.321-.787-.748-.601A5.5 5.5 0 0 1 6.453 2.31c.186-.427-.176-.938-.6-.748a6.501 6.501 0 1 0 8.585 8.586Z"})}),onClick:n.onDarkModeClick},{isDivider:!0},{children:"Sign Out",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M14 4.75A2.75 2.75 0 0 0 11.25 2h-3A2.75 2.75 0 0 0 5.5 4.75v.5a.75.75 0 0 0 1.5 0v-.5c0-.69.56-1.25 1.25-1.25h3c.69 0 1.25.56 1.25 1.25v6.5c0 .69-.56 1.25-1.25 1.25h-3c-.69 0-1.25-.56-1.25-1.25v-.5a.75.75 0 0 0-1.5 0v.5A2.75 2.75 0 0 0 8.25 14h3A2.75 2.75 0 0 0 14 11.25v-6.5Zm-9.47.47a.75.75 0 0 0-1.06 0L1.22 7.47a.75.75 0 0 0 0 1.06l2.25 2.25a.75.75 0 1 0 1.06-1.06l-.97-.97h5.69a.75.75 0 0 0 0-1.5H3.56l.97-.97a.75.75 0 0 0 0-1.06Z",clipRule:"evenodd"})}),onClick:n.onSignOutClick}];if(y)return e.jsx(Je,{items:$,renderTrigger:se=>e.jsx("button",{className:`
|
|
1003
1003
|
box-border
|
|
1004
1004
|
flex
|
|
1005
1005
|
items-center
|
|
@@ -1041,7 +1041,7 @@
|
|
|
1041
1041
|
transition-all
|
|
1042
1042
|
duration-150
|
|
1043
1043
|
${se?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1044
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:e.jsxs("div",{className:"box-border flex gap-3 items-center justify-center overflow-hidden px-3 py-2 relative rounded-lg shrink-0",children:[e.jsxs("div",{className:"flex gap-3 items-center justify-center relative shrink-0",children:[e.jsx("div",{className:"flex items-center justify-center relative shrink-0",children:e.jsx("div",{className:"relative rounded-md shrink-0 w-10 h-10",children:e.jsx("img",{alt:n.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-md w-full h-full",src:n.avatar})})}),e.jsxs("div",{className:"flex flex-col gap-0.5 items-start justify-center relative shrink-0 w-[123px]",children:[e.jsx("p",{className:"leading-5 relative shrink-0 text-sm text-content-primary dark:text-dark-content-primary whitespace-nowrap font-normal",children:n.name}),(n.email||n.role)&&e.jsx("p",{className:"leading-4 min-w-full relative shrink-0 text-xs text-content-secondary dark:text-content-secondary w-min whitespace-nowrap overflow-hidden text-ellipsis",children:n.email||n.role})]})]}),e.jsx("div",{className:"overflow-hidden relative shrink-0 w-5 h-5 text-content-secondary dark:text-content-secondary",children:e.jsx(
|
|
1044
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:e.jsxs("div",{className:"box-border flex gap-3 items-center justify-center overflow-hidden px-3 py-2 relative rounded-lg shrink-0",children:[e.jsxs("div",{className:"flex gap-3 items-center justify-center relative shrink-0",children:[e.jsx("div",{className:"flex items-center justify-center relative shrink-0",children:e.jsx("div",{className:"relative rounded-md shrink-0 w-10 h-10",children:e.jsx("img",{alt:n.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-md w-full h-full",src:n.avatar})})}),e.jsxs("div",{className:"flex flex-col gap-0.5 items-start justify-center relative shrink-0 w-[123px]",children:[e.jsx("p",{className:"leading-5 relative shrink-0 text-sm text-content-primary dark:text-dark-content-primary whitespace-nowrap font-normal",children:n.name}),(n.email||n.role)&&e.jsx("p",{className:"leading-4 min-w-full relative shrink-0 text-xs text-content-secondary dark:text-content-secondary w-min whitespace-nowrap overflow-hidden text-ellipsis",children:n.email||n.role})]})]}),e.jsx("div",{className:"overflow-hidden relative shrink-0 w-5 h-5 text-content-secondary dark:text-content-secondary",children:e.jsx(Zr,{})})]})})});return C||M?G():e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden",children:e.jsx(Je,{items:$,renderTrigger:se=>e.jsx("button",{className:`
|
|
1045
1045
|
box-border
|
|
1046
1046
|
flex
|
|
1047
1047
|
items-center
|
|
@@ -1083,7 +1083,7 @@
|
|
|
1083
1083
|
transition-all
|
|
1084
1084
|
duration-150
|
|
1085
1085
|
${se?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1086
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:e.jsxs("div",{className:"box-border flex gap-3 items-center justify-center overflow-hidden px-3 py-2 relative rounded-lg shrink-0",children:[e.jsxs("div",{className:"flex gap-3 items-center justify-center relative shrink-0",children:[e.jsx("div",{className:"flex items-center justify-center relative shrink-0",children:e.jsx("div",{className:"relative rounded-md shrink-0 w-10 h-10",children:e.jsx("img",{alt:n.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-md w-full h-full",src:n.avatar})})}),e.jsxs("div",{className:"flex flex-col gap-0.5 items-start justify-center relative shrink-0 w-[123px]",children:[e.jsx("p",{className:"leading-5 relative shrink-0 text-sm text-content-primary dark:text-dark-content-primary whitespace-nowrap font-normal",children:n.name}),(n.email||n.role)&&e.jsx("p",{className:"leading-4 min-w-full relative shrink-0 text-xs text-content-secondary dark:text-content-secondary w-min whitespace-nowrap overflow-hidden text-ellipsis",children:n.email||n.role})]})]}),e.jsx("div",{className:"overflow-hidden relative shrink-0 w-5 h-5 text-content-secondary dark:text-content-secondary",children:e.jsx(
|
|
1086
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:e.jsxs("div",{className:"box-border flex gap-3 items-center justify-center overflow-hidden px-3 py-2 relative rounded-lg shrink-0",children:[e.jsxs("div",{className:"flex gap-3 items-center justify-center relative shrink-0",children:[e.jsx("div",{className:"flex items-center justify-center relative shrink-0",children:e.jsx("div",{className:"relative rounded-md shrink-0 w-10 h-10",children:e.jsx("img",{alt:n.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-md w-full h-full",src:n.avatar})})}),e.jsxs("div",{className:"flex flex-col gap-0.5 items-start justify-center relative shrink-0 w-[123px]",children:[e.jsx("p",{className:"leading-5 relative shrink-0 text-sm text-content-primary dark:text-dark-content-primary whitespace-nowrap font-normal",children:n.name}),(n.email||n.role)&&e.jsx("p",{className:"leading-4 min-w-full relative shrink-0 text-xs text-content-secondary dark:text-content-secondary w-min whitespace-nowrap overflow-hidden text-ellipsis",children:n.email||n.role})]})]}),e.jsx("div",{className:"overflow-hidden relative shrink-0 w-5 h-5 text-content-secondary dark:text-content-secondary",children:e.jsx(Zr,{})})]})})})})]})},Z=[`
|
|
1087
1087
|
box-border
|
|
1088
1088
|
flex
|
|
1089
1089
|
gap-8
|
|
@@ -1094,7 +1094,7 @@
|
|
|
1094
1094
|
w-full
|
|
1095
1095
|
bg-background-primary
|
|
1096
1096
|
dark:bg-dark-bg-primary
|
|
1097
|
-
`,{responsive:"h-[40px] md:h-16",desktop:"h-16",tablet:"h-16",mobile:"h-[40px]"}[l],i].join(" ").replace(/\s+/g," ").trim();return e.jsxs("nav",{className:Z,children:[e.jsxs("div",{className:"flex gap-4 items-center relative shrink-0",children:[!y&&(f||u&&e.jsx(
|
|
1097
|
+
`,{responsive:"h-[40px] md:h-16",desktop:"h-16",tablet:"h-16",mobile:"h-[40px]"}[l],i].join(" ").replace(/\s+/g," ").trim();return e.jsxs("nav",{className:Z,children:[e.jsxs("div",{className:"flex gap-4 items-center relative shrink-0",children:[!y&&(f||u&&e.jsx(k,{})),t||e.jsx(j,{}),p&&x&&!y&&e.jsx(D,{}),m||e.jsx(A,{}),r&&x&&!y&&e.jsx(D,{}),e.jsx(H,{})]}),e.jsxs("div",{className:"flex gap-4 items-center justify-end grow min-h-px min-w-px relative shrink-0",children:[e.jsx(_,{}),e.jsx(I,{}),e.jsx(z,{}),e.jsx(R,{}),n&&!c&&e.jsx(D,{}),e.jsx(q,{}),h&&n&&!y&&e.jsx(D,{}),e.jsx(T,{}),o&&e.jsx("div",{className:"flex gap-2 items-center",children:o})]})]})},So=({items:t,activeItemId:r,onItemClick:s,className:n="",ariaLabel:o="Navegación Principal"})=>{t.length>5&&console.warn("NavigationBar: Se recomienda un máximo de 5 ítems para mejor UX");const a=d=>{d.disabled||(d.onClick&&d.onClick(d.id),s&&s(d.id))},i=d=>{const f=d.active||d.id===r,m=`
|
|
1098
1098
|
flex-1
|
|
1099
1099
|
flex
|
|
1100
1100
|
flex-col
|
|
@@ -1351,7 +1351,7 @@
|
|
|
1351
1351
|
`:`
|
|
1352
1352
|
text-content-primary
|
|
1353
1353
|
dark:text-dark-content-primary
|
|
1354
|
-
`,p=[d,f,c].join(" ").replace(/\s+/g," ").trim(),x=b=>{a||b.target.closest("button")||l?.(b)},h=b=>{b.stopPropagation(),!a&&i?.(b)};return e.jsxs("div",{className:p,onClick:x,role:"article","aria-label":u||`${r} - ${s}`,tabIndex:a?-1:0,children:[e.jsxs("div",{className:"flex flex-col gap-3 w-full",children:[e.jsx("div",{className:"h-[88px] w-full rounded-lg overflow-hidden",children:e.jsx("img",{src:t,alt:r,className:"w-full h-full object-cover"})}),e.jsxs("div",{className:`flex flex-col w-full font-bold ${m}`.trim().replace(/\s+/g," "),children:[e.jsx("div",{className:"text-sm leading-5",children:r}),e.jsx("div",{className:"text-2xl leading-8 tracking-tighter",children:s})]})]}),e.jsx(Q,{type:"default",size:"sm",leftIcon:e.jsx($o,{className:"w-4 h-4"}),onClick:h,disabled:a,fullWidth:!0,ariaLabel:`${n} ${r}`,children:n})]})},Oo=({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:"M5 3.25V4H2.75a.75.75 0 0 0 0 1.5h.3l.815 8.15A1.5 1.5 0 0 0 5.357 15h5.285a1.5 1.5 0 0 0 1.493-1.35l.815-8.15h.3a.75.75 0 0 0 0-1.5H11v-.75A2.25 2.25 0 0 0 8.75 1h-1.5A2.25 2.25 0 0 0 5 3.25Zm2.25-.75a.75.75 0 0 0-.75.75V4h3v-.75a.75.75 0 0 0-.75-.75h-1.5ZM6.05 6a.75.75 0 0 1 .787.713l.275 5.5a.75.75 0 0 1-1.498.075l-.275-5.5A.75.75 0 0 1 6.05 6Zm3.9 0a.75.75 0 0 1 .712.787l-.275 5.5a.75.75 0 0 1-1.498-.075l.275-5.5a.75.75 0 0 1 .786-.711Z",clipRule:"evenodd"})}),
|
|
1354
|
+
`,p=[d,f,c].join(" ").replace(/\s+/g," ").trim(),x=b=>{a||b.target.closest("button")||l?.(b)},h=b=>{b.stopPropagation(),!a&&i?.(b)};return e.jsxs("div",{className:p,onClick:x,role:"article","aria-label":u||`${r} - ${s}`,tabIndex:a?-1:0,children:[e.jsxs("div",{className:"flex flex-col gap-3 w-full",children:[e.jsx("div",{className:"h-[88px] w-full rounded-lg overflow-hidden",children:e.jsx("img",{src:t,alt:r,className:"w-full h-full object-cover"})}),e.jsxs("div",{className:`flex flex-col w-full font-bold ${m}`.trim().replace(/\s+/g," "),children:[e.jsx("div",{className:"text-sm leading-5",children:r}),e.jsx("div",{className:"text-2xl leading-8 tracking-tighter",children:s})]})]}),e.jsx(Q,{type:"default",size:"sm",leftIcon:e.jsx($o,{className:"w-4 h-4"}),onClick:h,disabled:a,fullWidth:!0,ariaLabel:`${n} ${r}`,children:n})]})},Oo=({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:"M5 3.25V4H2.75a.75.75 0 0 0 0 1.5h.3l.815 8.15A1.5 1.5 0 0 0 5.357 15h5.285a1.5 1.5 0 0 0 1.493-1.35l.815-8.15h.3a.75.75 0 0 0 0-1.5H11v-.75A2.25 2.25 0 0 0 8.75 1h-1.5A2.25 2.25 0 0 0 5 3.25Zm2.25-.75a.75.75 0 0 0-.75.75V4h3v-.75a.75.75 0 0 0-.75-.75h-1.5ZM6.05 6a.75.75 0 0 1 .787.713l.275 5.5a.75.75 0 0 1-1.498.075l-.275-5.5A.75.75 0 0 1 6.05 6Zm3.9 0a.75.75 0 0 1 .712.787l-.275 5.5a.75.75 0 0 1-1.498-.075l.275-5.5a.75.75 0 0 1 .786-.711Z",clipRule:"evenodd"})}),pr=({categoryLabel:t,categoryColor:r="lime",productRef:s,price:n,productName:o,descriptionItems:a=[],showDescription:i=!0,quantity:l=0,minQuantity:c=0,maxQuantity:u,onQuantityChange:d,onDelete:f,disabled:m=!1,className:p="",deleteIcon:x})=>{const h={lime:{bg:"bg-lime-100 dark:bg-lime-900/40",text:"text-lime-700 dark:text-lime-300"},red:{bg:"bg-red-100 dark:bg-red-900/40",text:"text-red-700 dark:text-red-300"},orange:{bg:"bg-orange-100 dark:bg-orange-900/40",text:"text-orange-700 dark:text-orange-300"},amber:{bg:"bg-amber-100 dark:bg-amber-900/40",text:"text-amber-700 dark:text-amber-300"},yellow:{bg:"bg-yellow-100 dark:bg-yellow-900/40",text:"text-yellow-700 dark:text-yellow-300"},green:{bg:"bg-green-100 dark:bg-green-900/40",text:"text-green-700 dark:text-green-300"},emerald:{bg:"bg-emerald-100 dark:bg-emerald-900/40",text:"text-emerald-700 dark:text-emerald-300"},teal:{bg:"bg-teal-100 dark:bg-teal-900/40",text:"text-teal-700 dark:text-teal-300"},cyan:{bg:"bg-cyan-100 dark:bg-cyan-900/40",text:"text-cyan-700 dark:text-cyan-300"},sky:{bg:"bg-sky-100 dark:bg-sky-900/40",text:"text-sky-700 dark:text-sky-300"},blue:{bg:"bg-blue-100 dark:bg-blue-900/40",text:"text-blue-700 dark:text-blue-300"},indigo:{bg:"bg-indigo-100 dark:bg-indigo-900/40",text:"text-indigo-700 dark:text-indigo-300"},violet:{bg:"bg-violet-100 dark:bg-violet-900/40",text:"text-violet-700 dark:text-violet-300"},purple:{bg:"bg-purple-100 dark:bg-purple-900/40",text:"text-purple-700 dark:text-purple-300"},fuchsia:{bg:"bg-fuchsia-100 dark:bg-fuchsia-900/40",text:"text-fuchsia-700 dark:text-fuchsia-300"},pink:{bg:"bg-pink-100 dark:bg-pink-900/40",text:"text-pink-700 dark:text-pink-300"},rose:{bg:"bg-rose-100 dark:bg-rose-900/40",text:"text-rose-700 dark:text-rose-300"},zinc:{bg:"bg-zinc-100 dark:bg-zinc-800/50",text:"text-zinc-600 dark:text-zinc-300"},primary:{bg:"bg-primary-custom-100 dark:bg-primary-custom-600/30",text:"text-primary-custom-600 dark:text-primary-custom-300"}},b=h[r]||h.lime,v=N=>{!m&&d&&d(N)},w=()=>{!m&&f&&f()};return e.jsxs("div",{className:`
|
|
1355
1355
|
flex
|
|
1356
1356
|
flex-col
|
|
1357
1357
|
gap-2
|
|
@@ -1385,7 +1385,7 @@
|
|
|
1385
1385
|
w-full
|
|
1386
1386
|
transition-colors
|
|
1387
1387
|
duration-150
|
|
1388
|
-
`.trim().replace(/\s+/g," "),children:a.map((
|
|
1388
|
+
`.trim().replace(/\s+/g," "),children:a.map((N,S)=>e.jsxs("div",{className:"flex items-center gap-1 w-full",children:[e.jsx("span",{className:"flex-1 min-w-0 text-xs leading-3 font-normal text-content-primary dark:text-dark-content-primary",children:N.description}),e.jsx("span",{className:"text-xs leading-3 font-bold text-content-primary dark:text-dark-content-primary whitespace-nowrap text-right shrink-0",children:N.price})]},S))})]}),e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("div",{className:"w-[118px]",children:e.jsx(lr,{value:l,min:c,max:u,onChange:v,disabled:m})}),e.jsx("button",{type:"button",onClick:w,disabled:m,className:`
|
|
1389
1389
|
flex
|
|
1390
1390
|
items-center
|
|
1391
1391
|
justify-center
|
|
@@ -1409,7 +1409,7 @@
|
|
|
1409
1409
|
transition-all
|
|
1410
1410
|
duration-150
|
|
1411
1411
|
${m?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
1412
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Eliminar producto",children:x||e.jsx(Oo,{className:"w-[18px] h-[21px]"})})]})]})};
|
|
1412
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Eliminar producto",children:x||e.jsx(Oo,{className:"w-[18px] h-[21px]"})})]})]})};pr.displayName="POSProductSidebarItems";const Jt=({tableNumber:t,status:r="available",shape:s="square",chairs:n=4,showChairs:o=!0,isActive:a=!1,onClick:i,className:l="",disabled:c=!1,children:u})=>{const d={available:{border:"border-[#0e79fd]",borderDark:"dark:border-[#93d1fd]",bgEnabled:"bg-transparent",bgEnabledDark:"dark:bg-transparent",bgActive:"bg-primary-custom-100",bgActiveDark:"dark:bg-[#1e3a5f]",borderActive:"border-[#bce4ff]",borderActiveDark:"dark:border-[#1e3a5f]",table:"bg-[#0e79fd]",tableDark:"dark:bg-[#93d1fd]",chair:"bg-[#0e79fd]",chairDark:"dark:bg-[#93d1fd]",text:"text-[#0e79fd]",textDark:"dark:text-[#93d1fd]",focusRing:"focus:ring-[#93d1fd]",focusRingDark:"dark:focus:ring-[#0e79fd]"},busy:{border:"border-[#af460e]",borderDark:"dark:border-[#f5a927]",bgEnabled:"bg-transparent",bgEnabledDark:"dark:bg-transparent",bgActive:"bg-[#fed7aa]",bgActiveDark:"dark:bg-[#5c3a1e]",borderActive:"border-[#fed7aa]",borderActiveDark:"dark:border-[#5c3a1e]",table:"bg-[#af460e]",tableDark:"dark:bg-[#f5a927]",chair:"bg-[#af460e]",chairDark:"dark:bg-[#f5a927]",text:"text-[#af460e]",textDark:"dark:text-[#f5a927]",focusRing:"focus:ring-[#f5a927]",focusRingDark:"dark:focus:ring-[#af460e]"},reserved:{border:"border-[#7e22ce]",borderDark:"dark:border-[#c084fc]",bgEnabled:"bg-transparent",bgEnabledDark:"dark:bg-transparent",bgActive:"bg-[#e9d5ff]",bgActiveDark:"dark:bg-[#3b1f5c]",borderActive:"border-[#e9d5ff]",borderActiveDark:"dark:border-[#3b1f5c]",table:"bg-[#7e22ce]",tableDark:"dark:bg-[#c084fc]",chair:"bg-[#7e22ce]",chairDark:"dark:bg-[#c084fc]",text:"text-[#7e22ce]",textDark:"dark:text-[#c084fc]",focusRing:"focus:ring-[#c084fc]",focusRingDark:"dark:focus:ring-[#7e22ce]"}},f={square:{container:"rounded-[4px]",table:"w-[64px] h-[64px] rounded-[4px]"},circle:{container:"rounded-[9999px]",table:"w-[64px] h-[64px] rounded-[9999px]"},rectangle:{container:"rounded-[4px]",table:"w-[80px] h-[64px] rounded-[4px]"},oval:{container:"rounded-3xl",table:"w-[80px] h-[64px] rounded-3xl"}},m=({rotation:b})=>e.jsxs("div",{className:"w-[28px] h-[22px]",style:{transform:`rotate(${b}deg)`},"aria-hidden":"true",children:[e.jsx("div",{className:`
|
|
1413
1413
|
absolute
|
|
1414
1414
|
top-0
|
|
1415
1415
|
left-0
|
|
@@ -1448,10 +1448,10 @@
|
|
|
1448
1448
|
font-normal
|
|
1449
1449
|
${d[r].text}
|
|
1450
1450
|
${d[r].textDark}
|
|
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]=g.useState(""),[d,f]=g.useState(""),[m,p]=g.useState(!1),[x,h]=g.useState(""),b=w=>{if(w.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){h("Por favor ingresa un email válido");return}h(""),t?.(c,d)},k=w=>{u(w.target.value),x&&h("")},v=()=>{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:b,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:k,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",x?"border-error-border!":""].filter(Boolean).join(" ")})]}),x&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:x})]}),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:w=>f(w.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:v,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]=g.useState(""),[f,m]=g.useState(""),[p,x]=g.useState(""),[h,b]=g.useState(!1),[k,v]=g.useState(""),w=C=>{if(C.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)){v("Por favor ingresa un email válido");return}v(""),t?.(u,f,p)},j=C=>{m(C.target.value),k&&v("")},y=()=>{b(!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:w,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:C=>d(C.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:j,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",k?"border-error-border!":""].filter(Boolean).join(" ")})]}),k&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:k})]}),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:C=>x(C.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:y,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=g.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...l},c)=>g.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])=>g.createElement(u,d)),...Array.isArray(a)?a:[a]]));const At=(t,r)=>{const s=g.forwardRef(({className:n,...o},a)=>g.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 b=o[h];if(i===0&&l===0){if(b===Ur){a.push(o.slice(c,h)),c=h+1;continue}if(b==="/"){u=h;continue}}b==="["?i++:b==="]"?i--:b==="("?l++:b===")"&&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 x=u&&u>c?u-c:void 0;return Gr(a,p,m,x)};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:x,maybePostfixModifierPosition:h}=s(d);if(f){c=d+(c.length>0?" "+c:c);continue}let b=!!h,k=n(b?x.substring(0,h):x);if(!k){if(!b){c=d+(c.length>0?" "+c:c);continue}if(k=n(x),!k){c=d+(c.length>0?" "+c:c);continue}b=!1}const v=m.length===0?"":m.length===1?m[0]:a(m).join(":"),w=p?v+rr:v,j=w+k;if(i.indexOf(j)>-1)continue;i.push(j);const y=o(k,b);for(let C=0;C<y.length;++C){const M=y[C];i.push(w+M)}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=>!O(t)&&!B(t),Ba=t=>Ue(t,Hn,Vn),O=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),B=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"),x=J("blur"),h=J("perspective"),b=J("aspect"),k=J("ease"),v=J("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],y=()=>[...j(),B,O],C=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],I=()=>[B,O,c],S=()=>[Fe,"full","auto",...I()],N=()=>[Re,"none","subgrid",B,O],A=()=>["auto",{span:["full",Re,B,O]},Re,B,O],T=()=>[Re,"auto",B,O],D=()=>["auto","min","max","fr",B,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,B,O],q=()=>[...j(),Kr,qr,{position:[B,O]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ie=()=>["auto","cover","contain",Da,Ba,{size:[B,O]}],Z=()=>[Kt,Qe,$e],$=()=>["","none","full",u,B,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",x,B,O],ee=()=>["none",W,B,O],de=()=>["none",W,B,O],oe=()=>[W,B,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,B,b]}],container:["container"],columns:[{columns:[W,O,B,l]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:y()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],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",B,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",O]}],grow:[{grow:["",W,B,O]}],shrink:[{shrink:["",W,B,O]}],order:[{order:[Re,"first","last","none",B,O]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:A()}],"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,B,Xt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Kt,O]}],"font-family":[{font:[za,O,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,B,O]}],"line-clamp":[{"line-clamp":[W,"none",B,Xt]}],leading:[{leading:[a,...I()]}],"list-image":[{"list-image":["none",B,O]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",B,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",B,$e]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[W,"auto",B,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",B,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",B,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,B,O],radial:["",B,O],conic:[Re,B,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:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"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,B,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,B,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":[B,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":j()}],"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",B,O]}],filter:[{filter:["","none",B,O]}],blur:[{blur:Ne()}],brightness:[{brightness:[W,B,O]}],contrast:[{contrast:[W,B,O]}],"drop-shadow":[{"drop-shadow":["","none",p,bt,gt]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",W,B,O]}],"hue-rotate":[{"hue-rotate":[W,B,O]}],invert:[{invert:["",W,B,O]}],saturate:[{saturate:[W,B,O]}],sepia:[{sepia:["",W,B,O]}],"backdrop-filter":[{"backdrop-filter":["","none",B,O]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[W,B,O]}],"backdrop-contrast":[{"backdrop-contrast":[W,B,O]}],"backdrop-grayscale":[{"backdrop-grayscale":["",W,B,O]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,B,O]}],"backdrop-invert":[{"backdrop-invert":["",W,B,O]}],"backdrop-opacity":[{"backdrop-opacity":[W,B,O]}],"backdrop-saturate":[{"backdrop-saturate":[W,B,O]}],"backdrop-sepia":[{"backdrop-sepia":["",W,B,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",B,O]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[W,"initial",B,O]}],ease:[{ease:["linear","initial",k,B,O]}],delay:[{delay:[W,B,O]}],animate:[{animate:["none",v,B,O]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,B,O]}],"perspective-origin":[{"perspective-origin":y()}],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:[B,O,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"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",B,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",B,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]=g.useState(t);return g.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]=g.useState(-1),d=g.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={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},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=g.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=g;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(),x=n({inst:{value:p,getSnapshot:m}}),h=x[0].inst,b=x[1];return a(function(){h.value=p,h.getSnapshot=m,c(h)&&b({inst:h})},[f,p,m]),o(function(){return c(h)&&b({inst:h}),f(function(){c(h)&&b({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,x){return p===x&&(p!==0||1/p===1/x)||p!==p&&x!==x}function r(p,x){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=x();if(!f){var b=x();a(h,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}b=i({inst:{value:h,getSnapshot:x}});var k=b[0].inst,v=b[1];return c(function(){k.value=h,k.getSnapshot=x,s(k)&&v({inst:k})},[p,h,x]),l(function(){return s(k)&&v({inst:k}),p(function(){s(k)&&v({inst:k})})},[p]),u(h),h}function s(p){var x=p.getSnapshot;p=p.value;try{var h=x();return!a(p,h)}catch{return!0}}function n(p,x){return x()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=g,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}=g.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=g.useMemo(()=>({...si(),...a?.options?.react,...r}),[a,r]),{useSuspense:l,keyPrefix:c}=i,u=t,d=Be(u)?[u]:u,f=g.useMemo(()=>d,d);a?.reportNamespaces?.addUsedNamespaces?.(f);const m=g.useRef(0),p=g.useCallback(S=>{if(!a)return hi;const{bindI18n:N,bindI18nStore:A}=i,T=()=>{m.current+=1,S()};return N&&a.on(N,T),A&&a.store.on(A,T),()=>{N&&N.split(" ").forEach(D=>a.off(D,T)),A&&A.split(" ").forEach(D=>a.store.off(D,T))}},[a,i]),x=g.useRef(),h=g.useCallback(()=>{if(!a)return pi;const S=!!(a.isInitialized||a.initializedStoreOnce)&&f.every(_=>Ya(_,a,i)),N=r.lng||a.language,A=m.current,T=x.current;if(T&&T.ready===S&&T.lng===N&&T.keyPrefix===c&&T.revision===A)return T;const H={t:a.getFixedT(N,i.nsMode==="fallback"?f:f[0],c),ready:S,lng:N,keyPrefix:c,revision:A};return x.current=H,H},[a,f,c,i,r.lng]),[b,k]=g.useState(0),{t:v,ready:w}=fi.useSyncExternalStore(p,h,h);g.useEffect(()=>{if(a&&!w&&!l){const S=()=>k(N=>N+1);r.lng?Yr(a,r.lng,f,S):sr(a,f,S)}},[a,r.lng,f,w,l,b]);const j=a||{},y=g.useRef(null),C=g.useRef(),M=S=>{const N=Object.getOwnPropertyDescriptors(S);N.__original&&delete N.__original;const A=Object.create(Object.getPrototypeOf(S),N);if(!Object.prototype.hasOwnProperty.call(A,"__original"))try{Object.defineProperty(A,"__original",{value:S,writable:!1,enumerable:!1,configurable:!1})}catch{}return A},I=g.useMemo(()=>{const S=j,N=S?.language;let A=S;S&&(y.current&&y.current.__original===S?C.current!==N?(A=M(S),y.current=A,C.current=N):A=y.current:(A=M(S),y.current=A,C.current=N));const T=[v,A,w];return T.t=v,T.i18n=A,T.ready=w,T},[v,j,w,j.resolvedLanguage,j.language,j.languages]);if(a&&l&&!w)throw new Promise(S=>{const N=()=>S();r.lng?Yr(a,r.lng,f,N):sr(a,f,N)});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=g.useCallback(o=>{t.current&&!t.current.contains(o.target)&&r(o)},[t,r]);g.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?g.useLayoutEffect:Zi;const Hi={...L},Wi=Hi.useInsertionEffect,Ui=Wi||(t=>t());function Gi(t){const r=L.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ui(()=>{r.current=t}),L.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={},x=0;for(let h=0;h<l.length;h++){const{name:b,fn:k}=l[h],{x:v,y:w,data:j,reset:y}=await k({x:d,y:f,initialPlacement:n,placement:m,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:t,floating:r}});d=v??d,f=w??f,p={...p,[b]:{...p[b],...j}},y&&x<=50&&(x++,typeof y=="object"&&(y.placement&&(m=y.placement),y.rects&&(u=y.rects===!0?await i.getElementRects({reference:t,floating:r,strategy:o}):y.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),x=Vi(p),b=l[m?f==="floating"?"reference":"floating":f],k=Rt(await a.getClippingRect({element:(s=await(a.isElement==null?void 0:a.isElement(b)))==null||s?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),v=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),j=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},y=Rt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:w,strategy:c}):v);return{top:(k.top-y.top+x.top)/j.y,bottom:(y.bottom-k.bottom+x.bottom)/j.y,left:(k.left-y.left+x.left)/j.x,right:(y.right-k.right+x.right)/j.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:x="none",flipAlignment:h=!0,...b}=Ot(t,r);if((s=a.arrow)!=null&&s.alignmentOffset)return{};const k=Te(o),v=Ee(l),w=Te(l)===l,j=await(c.isRTL==null?void 0:c.isRTL(u.floating)),y=m||(w||!h?[St(l)]:Bi(l)),C=x!=="none";!m&&C&&y.push(..._i(l,h,x,j));const M=[l,...y],I=await es(r,b),S=[];let N=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&S.push(I[k]),f){const H=Oi(o,i,j);S.push(I[H[0]],I[H[1]])}if(N=[...N,{placement:o,overflows:S}],!S.every(H=>H<=0)){var A,T;const H=(((A=a.flip)==null?void 0:A.index)||0)+1,_=M[H];if(_&&(!(f==="alignment"?v!==Ee(_):!1)||N.every(R=>Ee(R.placement)===v?R.overflows[0]>0:!0)))return{data:{index:H,overflows:N},reset:{placement:_}};let E=(T=N.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=N.filter(R=>{if(C){const q=Ee(R.placement);return q===v||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:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof x=="number"&&(p=l==="end"?x*-1:x),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:x,height:h}=a.floating;let b,k;f==="top"||f==="bottom"?(b=f,k=m===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(k=f,b=m==="end"?"top":"bottom");const v=h-d.top-d.bottom,w=x-d.left-d.right,j=nt(h-d[b],v),y=nt(x-d[k],w),C=!r.middlewareData.shift;let M=j,I=y;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(I=w),(n=r.middlewareData.shift)!=null&&n.enabled.y&&(M=v),C&&!m){const N=fe(d.left,0),A=fe(d.right,0),T=fe(d.top,0),D=fe(d.bottom,0);p?I=x-2*(N!==0||A!==0?N+A:fe(d.left,d.right)):M=h-2*(T!==0||D!==0?T+D:fe(d.top,d.bottom))}await c({...r,availableWidth:I,availableHeight:M});const S=await i.getDimensions(l.floating);return x!==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 x=m,h=or(x);for(;h&&n&&p!==x;){const b=He(h),k=h.getBoundingClientRect(),v=pe(h),w=k.left+(h.clientLeft+parseFloat(v.paddingLeft))*b.x,j=k.top+(h.clientTop+parseFloat(v.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,f*=b.y,c+=w,u+=j,x=ce(h),h=or(x)}}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,x=Math.abs(n.clientWidth-f.clientWidth-p);x<=on&&(a-=x)}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 x=kt(f),h=kt(o.clientWidth-(d+m)),b=kt(o.clientHeight-(f+p)),k=kt(d),w={rootMargin:-x+"px "+-h+"px "+-b+"px "+-k+"px",threshold:fe(0,nt(1,c))||1};let j=!0;function y(C){const M=C[0].intersectionRatio;if(M!==c){if(!j)return i();M?i(!1,M):n=setTimeout(()=>{i(!1,1e-7)},1e3)}M===1&&!as(u,t.getBoundingClientRect())&&i(),j=!1}try{s=new IntersectionObserver(y,{...w,root:o.ownerDocument})}catch{s=new IntersectionObserver(y,w)}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(k=>{o&&k.addEventListener("scroll",s,{passive:!0}),a&&k.addEventListener("resize",s)});const f=u&&l?hl(u,s):null;let m=-1,p=null;i&&(p=new ResizeObserver(k=>{let[v]=k;v&&v.target===u&&p&&(p.unobserve(r),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(r)})),s()}),u&&!c&&p.observe(u),p.observe(r));let x,h=c?ze(t):null;c&&b();function b(){const k=ze(t);h&&!as(h,k)&&s(),h=k,x=requestAnimationFrame(b)}return s(),()=>{var k;d.forEach(v=>{o&&v.removeEventListener("scroll",s),a&&v.removeEventListener("resize",s)}),f?.(),(k=p)==null||k.disconnect(),p=null,c&&cancelAnimationFrame(x)}}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?g.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=L.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]=L.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[m,p]=L.useState(n);Et(m,n)||p(n);const[x,h]=L.useState(null),[b,k]=L.useState(null),v=L.useCallback(R=>{R!==C.current&&(C.current=R,h(R))},[]),w=L.useCallback(R=>{R!==M.current&&(M.current=R,k(R))},[]),j=a||x,y=i||b,C=L.useRef(null),M=L.useRef(null),I=L.useRef(d),S=c!=null,N=er(c),A=er(o),T=er(u),D=L.useCallback(()=>{if(!C.current||!M.current)return;const R={placement:r,strategy:s,middleware:m};A.current&&(R.platform=A.current),kl(C.current,M.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,A,T]);yt(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[u]);const H=L.useRef(!1);yt(()=>(H.current=!0,()=>{H.current=!1}),[]),yt(()=>{if(j&&(C.current=j),y&&(M.current=y),j&&y){if(N.current)return N.current(j,y,D);D()}},[j,y,D,N,S]);const _=L.useMemo(()=>({reference:C,floating:M,setReference:v,setFloating:w}),[v,w]),E=L.useMemo(()=>({reference:j,floating:y}),[j,y]),z=L.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 L.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={...L};let dn=!1,El=0;const un=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+El++;function Il(){const[t,r]=L.useState(()=>dn?un():void 0);return ir(()=>{t==null&&r(un())},[]),L.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=L.createContext(null),Bl=L.createContext(null),Tl=()=>{var t;return((t=L.useContext(Ol))==null?void 0:t.id)||null},zl=()=>L.useContext(Bl);function Dl(t){const{open:r=!1,onOpenChange:s,elements:n}=t,o=Ml(),a=L.useRef({}),[i]=L.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]=L.useState(n.reference),d=Gi((p,x,h)=>{a.current.openEvent=p?x:void 0,i.emit("openchange",{open:p,event:x,reason:h,nested:l}),s?.(p,x,h)}),f=L.useMemo(()=>({setPositionReference:u}),[]),m=L.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return L.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]=L.useState(null),[l,c]=L.useState(null),d=o?.domReference||a,f=L.useRef(null),m=zl();ir(()=>{d&&(f.current=d)},[d]);const p=jl({...t,elements:{...o,...l&&{reference:l}}}),x=L.useCallback(w=>{const j=ne(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;c(j),p.refs.setReference(j)},[p.refs]),h=L.useCallback(w=>{(ne(w)||w===null)&&(f.current=w,i(w)),(ne(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!ne(w))&&p.refs.setReference(w)},[p.refs]),b=L.useMemo(()=>({...p.refs,setReference:h,setPositionReference:x,domReference:f}),[p.refs,h,x]),k=L.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),v=L.useMemo(()=>({...p,...n,refs:b,elements:k,nodeId:r}),[p,b,k,r,n]);return ir(()=>{n.dataRef.current.floatingContext=v;const w=m?.nodesRef.current.find(j=>j.id===r);w&&(w.context=v)}),L.useMemo(()=>({...p,context:v,refs:b,elements:k}),[p,b,k,v])}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((x,h)=>n[h]!==x)))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 x=Math.round((Date.now()-d)*100)/100,h=Math.round((Date.now()-p)*100)/100,b=h/16,k=(v,w)=>{for(v=String(v);v.length<w;)v=" "+v;return v};console.info(`%c⏱ ${k(h,5)} /${k(x,5)} ms`,`
|
|
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]=g.useState(""),[d,f]=g.useState(""),[m,p]=g.useState(!1),[x,h]=g.useState(""),b=N=>{if(N.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){h("Por favor ingresa un email válido");return}h(""),t?.(c,d)},v=N=>{u(N.target.value),x&&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:b,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",x?"border-error-border!":""].filter(Boolean).join(" ")})]}),x&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:x})]}),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:N=>f(N.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]=g.useState(""),[f,m]=g.useState(""),[p,x]=g.useState(""),[h,b]=g.useState(!1),[v,w]=g.useState(""),N=C=>{if(C.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)){w("Por favor ingresa un email válido");return}w(""),t?.(u,f,p)},S=C=>{m(C.target.value),v&&w("")},y=()=>{b(!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:N,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:C=>d(C.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:S,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:C=>x(C.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:y,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()),Hr=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=g.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...l},c)=>g.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])=>g.createElement(u,d)),...Array.isArray(a)?a:[a]]));const Et=(t,r)=>{const s=g.forwardRef(({className:n,...o},a)=>g.createElement(qo,{ref:a,iconNode:r,className:Ln(`lucide-${Ho(Hr(t))}`,`lucide-${t}`,n),...o}));return s.displayName=Hr(t),s};const Ko=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xo=Et("chevron-down",Ko);const Yo=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Wr=Et("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=Et("search",Qo);const ea=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$n=Et("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}),wt="-",Ur=[],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(wt),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||Ur}return s[i]||Ur}}},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(wt):t.slice(r).join(wt),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];hr(o,s,n,r)}return s},hr=(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)){hr(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];hr(c,zn(r,l),s,n)}},zn=(t,r)=>{let s=t;const n=r.split(wt),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)}}},er="!",Gr=":",ha=[],qr=(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 b=o[h];if(i===0&&l===0){if(b===Gr){a.push(o.slice(c,h)),c=h+1;continue}if(b==="/"){u=h;continue}}b==="["?i++:b==="]"?i--:b==="("?l++:b===")"&&l--}const f=a.length===0?o:o.slice(c);let m=f,p=!1;f.endsWith(er)?(m=f.slice(0,-1),p=!0):f.startsWith(er)&&(m=f.slice(1),p=!0);const x=u&&u>c?u-c:void 0;return qr(a,p,m,x)};if(r){const o=r+Gr,a=n;n=i=>i.startsWith(o)?a(i.slice(o.length)):qr(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:x,maybePostfixModifierPosition:h}=s(d);if(f){c=d+(c.length>0?" "+c:c);continue}let b=!!h,v=n(b?x.substring(0,h):x);if(!v){if(!b){c=d+(c.length>0?" "+c:c);continue}if(v=n(x),!v){c=d+(c.length>0?" "+c:c);continue}b=!1}const w=m.length===0?"":m.length===1?m[0]:a(m).join(":"),N=p?w+er:w,S=N+v;if(i.indexOf(S)>-1)continue;i.push(S);const y=o(v,b);for(let C=0;C<y.length;++C){const M=y[C];i.push(N+M)}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)),Gt=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=>!O(t)&&!B(t),Ba=t=>Ue(t,Hn,Vn),O=t=>_n.test(t),$e=t=>Ue(t,Wn,Ma),qt=t=>Ue(t,Pa,W),Kr=t=>Ue(t,Fn,Vn),Ta=t=>Ue(t,Zn,$a),gt=t=>Ue(t,Un,La),B=t=>Pn.test(t),Qe=t=>Ge(t,Wn),za=t=>Ge(t,Va),Xr=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"),x=J("blur"),h=J("perspective"),b=J("aspect"),v=J("ease"),w=J("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],y=()=>[...S(),B,O],C=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],E=()=>[B,O,c],k=()=>[Fe,"full","auto",...E()],j=()=>[Re,"none","subgrid",B,O],A=()=>["auto",{span:["full",Re,B,O]},Re,B,O],T=()=>[Re,"auto",B,O],D=()=>["auto","min","max","fr",B,O],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...E()],z=()=>[Fe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],R=()=>[t,B,O],q=()=>[...S(),Xr,Kr,{position:[B,O]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ie=()=>["auto","cover","contain",Da,Ba,{size:[B,O]}],Z=()=>[Gt,Qe,$e],$=()=>["","none","full",u,B,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,Gt,Xr,Kr],Ne=()=>["","none",x,B,O],ee=()=>["none",W,B,O],de=()=>["none",W,B,O],oe=()=>[W,B,O],re=()=>[Fe,"full",...E()];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,B,b]}],container:["container"],columns:[{columns:[W,O,B,l]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:y()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Re,"auto",B,O]}],basis:[{basis:[Fe,"full","auto",l,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[W,Fe,"auto","initial","none",O]}],grow:[{grow:["",W,B,O]}],shrink:[{shrink:["",W,B,O]}],order:[{order:[Re,"first","last","none",B,O]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:A()}],"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:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"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:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"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,B,qt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gt,O]}],"font-family":[{font:[za,O,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,B,O]}],"line-clamp":[{"line-clamp":[W,"none",B,qt]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",B,O]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",B,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",B,$e]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[W,"auto",B,O]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B,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",B,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,B,O],radial:["",B,O],conic:[Re,B,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:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"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,B,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,B,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":[B,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":S()}],"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",B,O]}],filter:[{filter:["","none",B,O]}],blur:[{blur:Ne()}],brightness:[{brightness:[W,B,O]}],contrast:[{contrast:[W,B,O]}],"drop-shadow":[{"drop-shadow":["","none",p,bt,gt]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",W,B,O]}],"hue-rotate":[{"hue-rotate":[W,B,O]}],invert:[{invert:["",W,B,O]}],saturate:[{saturate:[W,B,O]}],sepia:[{sepia:["",W,B,O]}],"backdrop-filter":[{"backdrop-filter":["","none",B,O]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[W,B,O]}],"backdrop-contrast":[{"backdrop-contrast":[W,B,O]}],"backdrop-grayscale":[{"backdrop-grayscale":["",W,B,O]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,B,O]}],"backdrop-invert":[{"backdrop-invert":["",W,B,O]}],"backdrop-opacity":[{"backdrop-opacity":[W,B,O]}],"backdrop-saturate":[{"backdrop-saturate":[W,B,O]}],"backdrop-sepia":[{"backdrop-sepia":["",W,B,O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",B,O]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[W,"initial",B,O]}],ease:[{ease:["linear","initial",v,B,O]}],delay:[{delay:[W,B,O]}],animate:[{animate:["none",w,B,O]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,B,O]}],"perspective-origin":[{"perspective-origin":y()}],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:[B,O,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"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",B,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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",B,O]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[W,Qe,$e,qt]}],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 tr(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]=g.useState(t);return g.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]=g.useState(-1),d=g.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)},Yr={},qn=(t,r,s,n)=>{Be(s)&&Yr[s]||(Be(s)&&(Yr[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)}},rr=(t,r,s)=>{t.loadNamespaces(r,Kn(t,s))},Qr=(t,r,s,n)=>{if(Be(s)&&(s=[s]),t.options.preload&&t.options.preload.indexOf(r)>-1)return rr(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={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},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=g.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:{}},Kt={};var Jr;function ci(){if(Jr)return Kt;Jr=1;var t=g;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(),x=n({inst:{value:p,getSnapshot:m}}),h=x[0].inst,b=x[1];return a(function(){h.value=p,h.getSnapshot=m,c(h)&&b({inst:h})},[f,p,m]),o(function(){return c(h)&&b({inst:h}),f(function(){c(h)&&b({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 Kt.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Kt}var Xt={};var en;function di(){return en||(en=1,process.env.NODE_ENV!=="production"&&(function(){function t(p,x){return p===x&&(p!==0||1/p===1/x)||p!==p&&x!==x}function r(p,x){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=x();if(!f){var b=x();a(h,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}b=i({inst:{value:h,getSnapshot:x}});var v=b[0].inst,w=b[1];return c(function(){v.value=h,v.getSnapshot=x,s(v)&&w({inst:v})},[p,h,x]),l(function(){return s(v)&&w({inst:v}),p(function(){s(v)&&w({inst:v})})},[p]),u(h),h}function s(p){var x=p.getSnapshot;p=p.value;try{var h=x();return!a(p,h)}catch{return!0}}function n(p,x){return x()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=g,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;Xt.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())})()),Xt}var tn;function ui(){return tn||(tn=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}=g.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=g.useMemo(()=>({...si(),...a?.options?.react,...r}),[a,r]),{useSuspense:l,keyPrefix:c}=i,u=t,d=Be(u)?[u]:u,f=g.useMemo(()=>d,d);a?.reportNamespaces?.addUsedNamespaces?.(f);const m=g.useRef(0),p=g.useCallback(k=>{if(!a)return hi;const{bindI18n:j,bindI18nStore:A}=i,T=()=>{m.current+=1,k()};return j&&a.on(j,T),A&&a.store.on(A,T),()=>{j&&j.split(" ").forEach(D=>a.off(D,T)),A&&A.split(" ").forEach(D=>a.store.off(D,T))}},[a,i]),x=g.useRef(),h=g.useCallback(()=>{if(!a)return pi;const k=!!(a.isInitialized||a.initializedStoreOnce)&&f.every(_=>Ya(_,a,i)),j=r.lng||a.language,A=m.current,T=x.current;if(T&&T.ready===k&&T.lng===j&&T.keyPrefix===c&&T.revision===A)return T;const H={t:a.getFixedT(j,i.nsMode==="fallback"?f:f[0],c),ready:k,lng:j,keyPrefix:c,revision:A};return x.current=H,H},[a,f,c,i,r.lng]),[b,v]=g.useState(0),{t:w,ready:N}=fi.useSyncExternalStore(p,h,h);g.useEffect(()=>{if(a&&!N&&!l){const k=()=>v(j=>j+1);r.lng?Qr(a,r.lng,f,k):rr(a,f,k)}},[a,r.lng,f,N,l,b]);const S=a||{},y=g.useRef(null),C=g.useRef(),M=k=>{const j=Object.getOwnPropertyDescriptors(k);j.__original&&delete j.__original;const A=Object.create(Object.getPrototypeOf(k),j);if(!Object.prototype.hasOwnProperty.call(A,"__original"))try{Object.defineProperty(A,"__original",{value:k,writable:!1,enumerable:!1,configurable:!1})}catch{}return A},E=g.useMemo(()=>{const k=S,j=k?.language;let A=k;k&&(y.current&&y.current.__original===k?C.current!==j?(A=M(k),y.current=A,C.current=j):A=y.current:(A=M(k),y.current=A,C.current=j));const T=[w,A,N];return T.t=w,T.i18n=A,T.ready=N,T},[w,S,N,S.resolvedLanguage,S.language,S.languages]);if(a&&l&&!N)throw new Promise(k=>{const j=()=>k();r.lng?Qr(a,r.lng,f,j):rr(a,f,j)});return E},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=g.useCallback(o=>{t.current&&!t.current.contains(o.target)&&r(o)},[t,r]);g.useEffect(()=>{if(s)return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[n,s])}function It(){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 It()?t instanceof Node||t instanceof ce(t).Node:!1}function ne(t){return It()?t instanceof Element||t instanceof ce(t).Element:!1}function ge(t){return It()?t instanceof HTMLElement||t instanceof ce(t).HTMLElement:!1}function rn(t){return!It()||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 At(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 xr(t){const r=gr(),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(xr(r))return r;if(At(r))return null;r=Ae(r)}return null}function gr(){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 Mt(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||rn(t)&&t.host||be(t);return rn(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=nr(i);return r.concat(i,i.visualViewport||[],at(o)?o:[],l&&s?rt(l):[])}return r.concat(o,rt(o,[],s))}function nr(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const nt=Math.min,fe=Math.max,jt=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 Lt(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=Nt(i)),[i,Nt(i)]}function Bi(t){const r=Nt(t);return[sr(t),r,sr(r)]}function sr(t){return t.replace(/start|end/g,r=>Mi[r])}const nn=["left","right"],sn=["right","left"],Ti=["top","bottom"],zi=["bottom","top"];function Di(t,r,s){switch(t){case"top":case"bottom":return s?r?sn:nn:r?nn:sn;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(sr)))),a}function Nt(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 Ct(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(){},or=Fi?g.useLayoutEffect:Zi;const Hi={...L},Wi=Hi.useInsertionEffect,Ui=Wi||(t=>t());function Gi(t){const r=L.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ui(()=>{r.current=t}),L.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 on(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}=on(u,n,c),m=n,p={},x=0;for(let h=0;h<l.length;h++){const{name:b,fn:v}=l[h],{x:w,y:N,data:S,reset:y}=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=N??f,p={...p,[b]:{...p[b],...S}},y&&x<=50&&(x++,typeof y=="object"&&(y.placement&&(m=y.placement),y.rects&&(u=y.rects===!0?await i.getElementRects({reference:t,floating:r,strategy:o}):y.rects),{x:d,y:f}=on(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}=Lt(r,t),x=Vi(p),b=l[m?f==="floating"?"reference":"floating":f],v=Ct(await a.getClippingRect({element:(s=await(a.isElement==null?void 0:a.isElement(b)))==null||s?b:b.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,N=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),S=await(a.isElement==null?void 0:a.isElement(N))?await(a.getScale==null?void 0:a.getScale(N))||{x:1,y:1}:{x:1,y:1},y=Ct(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:N,strategy:c}):w);return{top:(v.top-y.top+x.top)/S.y,bottom:(y.bottom-v.bottom+x.bottom)/S.y,left:(v.left-y.left+x.left)/S.x,right:(y.right-v.right+x.right)/S.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:x="none",flipAlignment:h=!0,...b}=Lt(t,r);if((s=a.arrow)!=null&&s.alignmentOffset)return{};const v=Te(o),w=Ee(l),N=Te(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),y=m||(N||!h?[Nt(l)]:Bi(l)),C=x!=="none";!m&&C&&y.push(..._i(l,h,x,S));const M=[l,...y],E=await es(r,b),k=[];let j=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&k.push(E[v]),f){const H=Oi(o,i,S);k.push(E[H[0]],E[H[1]])}if(j=[...j,{placement:o,overflows:k}],!k.every(H=>H<=0)){var A,T;const H=(((A=a.flip)==null?void 0:A.index)||0)+1,_=M[H];if(_&&(!(f==="alignment"?w!==Ee(_):!1)||j.every(R=>Ee(R.placement)===w?R.overflows[0]>0:!0)))return{data:{index:H,overflows:j},reset:{placement:_}};let I=(T=j.filter(z=>z.overflows[0]<=0).sort((z,R)=>z.overflows[1]-R.overflows[1])[0])==null?void 0:T.placement;if(!I)switch(p){case"bestFit":{var D;const z=(D=j.filter(R=>{if(C){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&&(I=z);break}case"initialPlacement":I=l;break}if(o!==I)return{reset:{placement:I}}}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=Lt(r,t);let{mainAxis:m,crossAxis:p,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof x=="number"&&(p=l==="end"?x*-1:x),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}=Lt(t,r),d=await es(r,u),f=Te(o),m=it(o),p=Ee(o)==="y",{width:x,height:h}=a.floating;let b,v;f==="top"||f==="bottom"?(b=f,v=m===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(v=f,b=m==="end"?"top":"bottom");const w=h-d.top-d.bottom,N=x-d.left-d.right,S=nt(h-d[b],w),y=nt(x-d[v],N),C=!r.middlewareData.shift;let M=S,E=y;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(E=N),(n=r.middlewareData.shift)!=null&&n.enabled.y&&(M=w),C&&!m){const j=fe(d.left,0),A=fe(d.right,0),T=fe(d.top,0),D=fe(d.bottom,0);p?E=x-2*(j!==0||A!==0?j+A:fe(d.left,d.right)):M=h-2*(T!==0||D!==0?T+D:fe(d.top,d.bottom))}await c({...r,availableWidth:E,availableHeight:M});const k=await i.getDimensions(l.floating);return x!==k.width||h!==k.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=jt(s)!==a||jt(n)!==i;return l&&(s=a,n=i),{width:s,height:n,$:l}}function br(t){return ne(t)?t:t.contextElement}function He(t){const r=br(t);if(!ge(r))return xe(1);const s=r.getBoundingClientRect(),{width:n,height:o,$:a}=ts(r);let i=(a?jt(s.width):s.width)/n,l=(a?jt(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!gr()||!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=br(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 x=m,h=nr(x);for(;h&&n&&p!==x;){const b=He(h),v=h.getBoundingClientRect(),w=pe(h),N=v.left+(h.clientLeft+parseFloat(w.paddingLeft))*b.x,S=v.top+(h.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,f*=b.y,c+=N,u+=S,x=ce(h),h=nr(x)}}return Ct({width:d,height:f,x:c,y:u})}function $t(t,r){const s=Mt(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-$t(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?At(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=Mt(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=Mt(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+$t(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 an=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=gr();(!d||d&&r==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=$t(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,x=Math.abs(n.clientWidth-f.clientWidth-p);x<=an&&(a-=x)}else u<=an&&(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 ln(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 Ct(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=xr(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"?At(r)?[]:ll(r,this._c):[].concat(s),n],l=i[0],c=i.reduce((u,d)=>{const f=ln(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},ln(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=$t(o)}if(n||!n&&!a)if((qe(r)!=="body"||at(o))&&(l=Mt(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 Yt(t){return pe(t).position==="static"}function cn(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(At(t))return s;if(!ge(t)){let o=Ae(t);for(;o&&!We(o);){if(ne(o)&&!Yt(o))return o;o=Ae(o)}return s}let n=cn(t,r);for(;n&&ji(n)&&Yt(n);)n=cn(n,r);return n&&We(n)&&Yt(n)&&!xr(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 x=kt(f),h=kt(o.clientWidth-(d+m)),b=kt(o.clientHeight-(f+p)),v=kt(d),N={rootMargin:-x+"px "+-h+"px "+-b+"px "+-v+"px",threshold:fe(0,nt(1,c))||1};let S=!0;function y(C){const M=C[0].intersectionRatio;if(M!==c){if(!S)return i();M?i(!1,M):n=setTimeout(()=>{i(!1,1e-7)},1e3)}M===1&&!as(u,t.getBoundingClientRect())&&i(),S=!1}try{s=new IntersectionObserver(y,{...N,root:o.ownerDocument})}catch{s=new IntersectionObserver(y,N)}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=br(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 N;(N=p)==null||N.observe(r)})),s()}),u&&!c&&p.observe(u),p.observe(r));let x,h=c?ze(t):null;c&&b();function b(){const v=ze(t);h&&!as(h,v)&&s(),h=v,x=requestAnimationFrame(b)}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(x)}}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?g.useLayoutEffect:wl;function St(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(!St(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)&&!St(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 dn(t,r){const s=is(t);return Math.round(r*s)/s}function Qt(t){const r=L.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]=L.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[m,p]=L.useState(n);St(m,n)||p(n);const[x,h]=L.useState(null),[b,v]=L.useState(null),w=L.useCallback(R=>{R!==C.current&&(C.current=R,h(R))},[]),N=L.useCallback(R=>{R!==M.current&&(M.current=R,v(R))},[]),S=a||x,y=i||b,C=L.useRef(null),M=L.useRef(null),E=L.useRef(d),k=c!=null,j=Qt(c),A=Qt(o),T=Qt(u),D=L.useCallback(()=>{if(!C.current||!M.current)return;const R={placement:r,strategy:s,middleware:m};A.current&&(R.platform=A.current),kl(C.current,M.current,R).then(q=>{const F={...q,isPositioned:T.current!==!1};H.current&&!St(E.current,F)&&(E.current=F,$s.flushSync(()=>{f(F)}))})},[m,r,s,A,T]);yt(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[u]);const H=L.useRef(!1);yt(()=>(H.current=!0,()=>{H.current=!1}),[]),yt(()=>{if(S&&(C.current=S),y&&(M.current=y),S&&y){if(j.current)return j.current(S,y,D);D()}},[S,y,D,j,k]);const _=L.useMemo(()=>({reference:C,floating:M,setReference:w,setFloating:N}),[w,N]),I=L.useMemo(()=>({reference:S,floating:y}),[S,y]),z=L.useMemo(()=>{const R={position:s,left:0,top:0};if(!I.floating)return R;const q=dn(I.floating,d.x),F=dn(I.floating,d.y);return l?{...R,transform:"translate("+q+"px, "+F+"px)",...is(I.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:q,top:F}},[s,l,I.floating,d.x,d.y]);return L.useMemo(()=>({...d,update:D,refs:_,elements:I,floatingStyles:z}),[d,D,_,I,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={...L};let un=!1,El=0;const fn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+El++;function Il(){const[t,r]=L.useState(()=>un?fn():void 0);return or(()=>{t==null&&r(fn())},[]),L.useEffect(()=>{un=!0},[]),t}const Al=Rl.useId,Ml=Al||Il;let ar;process.env.NODE_ENV!=="production"&&(ar=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=ar)!=null&&t.has(o))){var a;(a=ar)==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=L.createContext(null),Bl=L.createContext(null),Tl=()=>{var t;return((t=L.useContext(Ol))==null?void 0:t.id)||null},zl=()=>L.useContext(Bl);function Dl(t){const{open:r=!1,onOpenChange:s,elements:n}=t,o=Ml(),a=L.useRef({}),[i]=L.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]=L.useState(n.reference),d=Gi((p,x,h)=>{a.current.openEvent=p?x:void 0,i.emit("openchange",{open:p,event:x,reason:h,nested:l}),s?.(p,x,h)}),f=L.useMemo(()=>({setPositionReference:u}),[]),m=L.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return L.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]=L.useState(null),[l,c]=L.useState(null),d=o?.domReference||a,f=L.useRef(null),m=zl();or(()=>{d&&(f.current=d)},[d]);const p=jl({...t,elements:{...o,...l&&{reference:l}}}),x=L.useCallback(N=>{const S=ne(N)?{getBoundingClientRect:()=>N.getBoundingClientRect(),getClientRects:()=>N.getClientRects(),contextElement:N}:N;c(S),p.refs.setReference(S)},[p.refs]),h=L.useCallback(N=>{(ne(N)||N===null)&&(f.current=N,i(N)),(ne(p.refs.reference.current)||p.refs.reference.current===null||N!==null&&!ne(N))&&p.refs.setReference(N)},[p.refs]),b=L.useMemo(()=>({...p.refs,setReference:h,setPositionReference:x,domReference:f}),[p.refs,h,x]),v=L.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),w=L.useMemo(()=>({...p,...n,refs:b,elements:v,nodeId:r}),[p,b,v,r,n]);return or(()=>{n.dataRef.current.floatingContext=w;const N=m?.nodesRef.current.find(S=>S.id===r);N&&(N.context=w)}),L.useMemo(()=>({...p,context:w,refs:b,elements:v}),[p,b,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((x,h)=>n[h]!==x)))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 x=Math.round((Date.now()-d)*100)/100,h=Math.round((Date.now()-p)*100)/100,b=h/16,v=(w,N)=>{for(w=String(w);w.length<N;)w=" "+w;return w};console.info(`%c⏱ ${v(h,5)} /${v(x,5)} ms`,`
|
|
1452
1452
|
font-size: .6rem;
|
|
1453
1453
|
font-weight: bold;
|
|
1454
|
-
color: hsl(${Math.max(0,Math.min(120-120*b,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),x=this.laneAssignments.get(m);let h,b;if(x!==void 0&&this.options.lanes>1){h=x;const j=f[h],y=j!==void 0?d[j]:void 0;b=y?y.end+this.options.gap:n+o}else{const j=this.options.lanes===1?d[m-1]:this.getFurthestMeasurement(d,m);b=j?j.end+this.options.gap:n+o,h=j?j.lane:m%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(m,h)}const k=c.get(p),v=typeof k=="number"?k:this.options.estimateSize(m),w=b+v;d[m]={index:m,start:b,size:v,end:w,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 x=this.getScrollOffset(),h=this.getOffsetForIndex(s,m);if(!h){console.warn("Failed to get offset for index:",s);return}Vl(h[0],x)||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"?L.useLayoutEffect:L.useEffect;function Yl({useFlushSync:t=!0,...r}){const s=L.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]=L.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:g.useCallback(()=>s,[s]),overscan:n});return{virtualItems:a.getVirtualItems(),totalSize:a.getTotalSize(),scrollToIndex:a.scrollToIndex,measureElement:a.measureElement}}const rc=g.forwardRef(function({value:r,onChange:s,placeholder:n="Search...",className:o,listboxId:a,activeDescendantId:i},l){const c=g.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:x,renderSelected:h,filters:b,getFilters:k,dependencies:v,orderBy:w,bindFields:j,readOnly:y=!1,disabled:C=!1,error:M=!1,onFocus:I,onBlur:S,onReady:N,onInvalidValue:A,noResultsText:T,searchPlaceholder:D,required:H=!1,showRequiredIndicator:_,validateOnBlur:E=!0,onValidationChange:z,errorText:R},q){const{t:F}=vi(),ie=g.useMemo(()=>w??{field:s[0],direction:"asc"},[w,s]),Z=g.useId(),[$,G]=g.useState(!1),[se,De]=g.useState(!1),[Y,Ne]=g.useState(null),[ee,de]=g.useState([]),[oe,re]=g.useState(null),[K,te]=g.useState(1),[ue,ve]=g.useState(!0),[Me,Ke]=g.useState(!1),ke=g.useRef(null),he=g.useRef(null),br=g.useRef(JSON.stringify(v??[])),Ce=g.useRef(null),Tt=g.useRef(null),lt=g.useRef(null),[_e,Le]=g.useState(""),ye=qa(_e),[fs,me]=g.useState(""),vr=g.useRef(!1),le=g.useRef(null);le.current=oe;const Pe=g.useRef(null),Xe=g.useRef(!1),kr=g.useRef(A);g.useEffect(()=>{kr.current=A},[A]);const ms=g.useCallback(()=>{$&&(Xe.current&&(Xe.current=!1,S?.(le.current)),G(!1),Le(""))},[$,S]);ki(Pe,ms,$);const{refs:yr,floatingStyles:ps}=Pl({enabled:$}),{virtualItems:wr,totalSize:hs}=tc({count:ee.length,parentRef:Ce,enabled:$&&ee.length>0}),[ct,we]=g.useState(!1),[jr,dt]=g.useState(!1),[zt,xs]=g.useState([]),[Nr,gs]=g.useState(0),[Dt,bs]=g.useState(1),[Cr,_t]=g.useState(!1),Sr=g.useRef(""),Pt=g.useRef(!1),Ve=g.useRef(1),Rr=M||jr,vs=_??H,Ye=g.useRef(z);g.useEffect(()=>{Ye.current=z},[z]);const ut=g.useCallback(()=>nr(k?k():b),[b,k]),ft=g.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,...j??[]])],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&&N&&(vr.current=!0,setTimeout(()=>{N({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,j,f,u,m,d,N,ut,ie,a]),Er=g.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,...j??[]])],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,j,f,u,m,Me,ue,d,ut,ie,a,F]),mt=g.useCallback(async P=>{try{const V=[...new Set(["Id",...s,...j??[]])];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,j,a]),pt=g.useCallback(()=>C||y?(dt(!1),Ye.current?.(!0),!0):H&&!le.current?(dt(!0),Ye.current?.(!1),!1):(dt(!1),Ye.current?.(!0),!0),[H,y,C]),ks=g.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]);g.useEffect(()=>{$&&Tt.current&&Tt.current.focus()},[$]),g.useEffect(()=>{$&&(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)))},[$,ye,ft,m,Cr,zt,Dt,Nr]),g.useEffect(()=>($||(Le(""),Ve.current=1,te(1),ve(!0),Ke(!1)),()=>{ke.current&&ke.current.abort()}),[$]);const Vt=g.useRef(void 0),Ir=g.useRef(mt);Ir.current=mt;const Ar=g.useRef(0);g.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(v??[]);g.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(b??[]),Mr=g.useRef(ht);g.useEffect(()=>{Mr.current!==ht&&(Mr.current=ht,_t(!1))},[ht]);const Lr=g.useCallback(P=>{if(h)return h(P);if(x)return Ha(x,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,x,p,s]),ys=()=>{C||y||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=g.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=g.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=g.useCallback(()=>{G(!1),Le(""),me(F("announcements.closed")),lt.current?.focus()},[F]),Br=g.useCallback(()=>{he.current=le.current,re(null),we(!1),o(null,he.current),me(F("announcements.cleared"))},[o,F]),Ht=g.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),A?.(P))},open:()=>G(!0),close:()=>G(!1),validate:pt}),[Br,ft,ye,mt,o,A,pt]);g.useImperativeHandle(q,()=>Ht,[Ht]);const{highlightedIndex:Se,setHighlightedIndex:Tr,handleKeyDown:Cs}=Ka({records:ee,isOpen:$,onSelect:Zt,onClose:js,onEscape:Ns,onClear:Or,searchQuery:_e});g.useEffect(()=>{$&&Tr(-1)},[$,ee,Tr]),g.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=g.useRef(!1),Ut=g.useRef(!1),Gt=g.useRef(!1),Ss=()=>{Wt.current=!0},Rs=P=>{C||$||P.key==="Backspace"&&i&&!y&&(oe||ct)&&(P.preventDefault(),Or())},Es=()=>{if(!C&&!y){if(Ut.current){Ut.current=!1;return}if(Gt.current){Gt.current=!1;return}if(Wt.current){Wt.current=!1;return}$||G(!0)}},Is=g.useCallback(()=>{C||Xe.current||(Xe.current=!0,I?.(le.current))},[I,C]),As=g.useCallback(P=>{if(C)return;const V=P.relatedTarget;!Pe.current?.contains(V)&&(Xe.current=!1,E&&!y&&pt(),S?.(le.current))},[S,E,y,C,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",C&&"lookup-field--disabled",y&&"lookup-field--readonly",Rr&&"lookup-field--error",c),role:"combobox","aria-expanded":!C&&$,"aria-haspopup":"listbox","aria-labelledby":`${Z}-label`,"aria-controls":$?`${Z}-listbox`:void 0,"aria-disabled":C||void 0,"aria-readonly":!C&&y||void 0,"aria-invalid":Rr||void 0,"aria-required":H||void 0,onKeyDown:C?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:C,tabIndex:C?-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",$&&"lookup-field__chevron--open"),"aria-hidden":"true"}),i&&oe&&!y&&!C&&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}),$&&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=g.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]=g.useState("collapsed"),x=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:x,...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:x,onSearch:h,searchPlaceholder:b="Buscar",onSort:k,sortColumn:v,sortDirection:w,pagination:j,loading:y=!1,loadingRows:C=5,emptyMessage:M="No hay datos disponibles",className:I="",onNotificationsClick:S,viewOptions:N,selectedViewOption:A,onViewOptionChange:T})=>{const[D,H]=g.useState(""),[_,E]=g.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:x,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:b,leftIcon:e.jsx(yc,{className:"w-4 h-4"}),value:D,onChange:F,className:"w-[200px]"}),N&&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:N.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",A===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:y,loadingRows:C,emptyMessage:M,onSort:k,sortColumn:v,sortDirection:w,pagination:j,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]=g.useState(""),[d,f]=g.useState(""),[m,p]=g.useState(!1),[x,h]=g.useState(""),b=w=>{if(w.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){h("Por favor ingresa un email válido");return}h(""),t?.(c,d)},k=w=>{u(w.target.value),x&&h("")},v=()=>{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:b,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:k,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",x?"border-error-border!":""].filter(Boolean).join(" ")})]}),x&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:x})]}),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:w=>f(w.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:v,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:x="products",onTabChange:h,orderItems:b=[],onOrderItemQuantityChange:k,onOrderItemDelete:v,subtotal:w="40,000.00",taxes:j="40,000.00",total:y="40,000.00",confirmLabel:C="Confirmar Pedido",onConfirmOrder:M,isLoading:I=!1,errorMessage:S,userAvatar:N,userName:A="Jhonnatan Diaz",userRole:T="Administrador",businessLogo:D,siesaLogo:H,className:_=""})=>e.jsxs("div",{className:`
|
|
1454
|
+
color: hsl(${Math.max(0,Math.min(120-120*b,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 mn(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)}},pn=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(pn(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(pn(s))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return a.observe(s,{box:"border-box"}),()=>{a.unobserve(s)}},hn={passive:!0},xn=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&&xn?()=>{}: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,hn);const u=t.options.useScrollendEvent&&xn;return u&&s.addEventListener("scrollend",c,hn),()=>{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),x=this.laneAssignments.get(m);let h,b;if(x!==void 0&&this.options.lanes>1){h=x;const S=f[h],y=S!==void 0?d[S]:void 0;b=y?y.end+this.options.gap:n+o}else{const S=this.options.lanes===1?d[m-1]:this.getFurthestMeasurement(d,m);b=S?S.end+this.options.gap:n+o,h=S?S.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),N=b+w;d[m]={index:m,start:b,size:w,end:N,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 mn(n[ls(0,n.length-1,o=>mn(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 x=this.getScrollOffset(),h=this.getOffsetForIndex(s,m);if(!h){console.warn("Failed to get offset for index:",s);return}Vl(h[0],x)||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 gn=typeof document<"u"?L.useLayoutEffect:L.useEffect;function Yl({useFlushSync:t=!0,...r}){const s=L.useReducer(()=>({}),{})[1],n={...r,onChange:(a,i)=>{var l;t&&i?bn.flushSync(s):s(),(l=r.onChange)==null||l.call(r,a,i)}},[o]=L.useState(()=>new Kl(n));return o.setOptions(n),gn(()=>o._didMount(),[]),gn(()=>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:g.useCallback(()=>s,[s]),overscan:n});return{virtualItems:a.getVirtualItems(),totalSize:a.getTotalSize(),scrollToIndex:a.scrollToIndex,measureElement:a.measureElement}}const rc=g.forwardRef(function({value:r,onChange:s,placeholder:n="Search...",className:o,listboxId:a,activeDescendantId:i},l){const c=g.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:x,renderSelected:h,filters:b,getFilters:v,dependencies:w,orderBy:N,bindFields:S,readOnly:y=!1,disabled:C=!1,error:M=!1,onFocus:E,onBlur:k,onReady:j,onInvalidValue:A,noResultsText:T,searchPlaceholder:D,required:H=!1,showRequiredIndicator:_,validateOnBlur:I=!0,onValidationChange:z,errorText:R},q){const{t:F}=vi(),ie=g.useMemo(()=>N??{field:s[0],direction:"asc"},[N,s]),Z=g.useId(),[$,G]=g.useState(!1),[se,De]=g.useState(!1),[Y,Ne]=g.useState(null),[ee,de]=g.useState([]),[oe,re]=g.useState(null),[K,te]=g.useState(1),[ue,ve]=g.useState(!0),[Me,Ke]=g.useState(!1),ke=g.useRef(null),he=g.useRef(null),vr=g.useRef(JSON.stringify(w??[])),Ce=g.useRef(null),Ot=g.useRef(null),lt=g.useRef(null),[_e,Le]=g.useState(""),ye=qa(_e),[fs,me]=g.useState(""),kr=g.useRef(!1),le=g.useRef(null);le.current=oe;const Pe=g.useRef(null),Xe=g.useRef(!1),yr=g.useRef(A);g.useEffect(()=>{yr.current=A},[A]);const ms=g.useCallback(()=>{$&&(Xe.current&&(Xe.current=!1,k?.(le.current)),G(!1),Le(""))},[$,k]);ki(Pe,ms,$);const{refs:wr,floatingStyles:ps}=Pl({enabled:$}),{virtualItems:jr,totalSize:hs}=tc({count:ee.length,parentRef:Ce,enabled:$&&ee.length>0}),[ct,we]=g.useState(!1),[Nr,dt]=g.useState(!1),[Bt,xs]=g.useState([]),[Cr,gs]=g.useState(0),[Tt,bs]=g.useState(1),[Sr,zt]=g.useState(!1),Rr=g.useRef(""),Dt=g.useRef(!1),Ve=g.useRef(1),Er=M||Nr,vs=_??H,Ye=g.useRef(z);g.useEffect(()=>{Ye.current=z},[z]);const ut=g.useCallback(()=>tr(v?v():b),[b,v]),ft=g.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,...S??[]])],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),!kr.current&&j&&(kr.current=!0,setTimeout(()=>{j({firstPageLoaded:!0},Ft)},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,S,f,u,m,d,j,ut,ie,a]),Ir=g.useCallback(async(P="")=>{if(Dt.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,...S??[]])],Ut=await a(t,{fields:ae,search:P.length>=m?P:"",searchFields:f??s,page:X,pageSize:u,filters:U,orderBy:ie});de(Ls=>[...Ls,...Ut.data]),Ve.current=X,te(X),me(F("announcements.resultsLoaded",{count:Ut.data.length})),Ut.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,S,f,u,m,Me,ue,d,ut,ie,a,F]),mt=g.useCallback(async P=>{try{const V=[...new Set(["Id",...s,...S??[]])];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,S,a]),pt=g.useCallback(()=>C||y?(dt(!1),Ye.current?.(!0),!0):H&&!le.current?(dt(!0),Ye.current?.(!1),!1):(dt(!1),Ye.current?.(!0),!0),[H,y,C]),ks=g.useCallback(()=>{const P=Ce.current;if(!P||Me||!ue)return;const{scrollTop:V,scrollHeight:U,clientHeight:X}=P;U-V-X<oc&&Ir(ye)},[Me,ue,Ir,ye]);g.useEffect(()=>{$&&Ot.current&&Ot.current.focus()},[$]),g.useEffect(()=>{$&&(ye.length===0||ye.length>=m)&&(Sr&&Rr.current===ye&&Bt.length>0?(Dt.current=!0,de(Bt),Ve.current=Tt,te(Tt),ve(!0),requestAnimationFrame(()=>{Ce.current&&(Ce.current.scrollTop=Cr),setTimeout(()=>{Dt.current=!1},0)})):(Ve.current=1,te(1),ve(!0),de([]),ft(ye)))},[$,ye,ft,m,Sr,Bt,Tt,Cr]),g.useEffect(()=>($||(Le(""),Ve.current=1,te(1),ve(!0),Ke(!1)),()=>{ke.current&&ke.current.abort()}),[$]);const _t=g.useRef(void 0),Ar=g.useRef(mt);Ar.current=mt;const Mr=g.useRef(0);g.useEffect(()=>{const V=_t.current===void 0||_t.current!==n;if(_t.current=n,n===null){we(!1);return}if(!V)return;const U=++Mr.current;Ar.current(n).then(X=>{Mr.current===U&&(X?(re(X),we(!1)):(we(!0),re(null),yr.current?.(n)))})},[n]);const Pt=JSON.stringify(w??[]);g.useEffect(()=>{vr.current!==Pt&&(vr.current=Pt,ke.current&&ke.current.abort(),zt(!1),de([]),re(null),Ve.current=1,te(1),ve(!0),G(!1),Le(""))},[Pt]);const ht=JSON.stringify(b??[]),Lr=g.useRef(ht);g.useEffect(()=>{Lr.current!==ht&&(Lr.current=ht,zt(!1))},[ht]);const $r=g.useCallback(P=>{if(h)return h(P);if(x)return Ha(x,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,x,p,s]),ys=()=>{C||y||G(P=>!P)},Or=P=>s.map(V=>String(P[V]??"")).join(" - "),Vt=P=>{he.current=oe,re(P),le.current=P,we(!1),Nr&&(dt(!1),Ye.current?.(!0)),xs(ee),gs(Ce.current?.scrollTop??0),bs(K),Rr.current=_e,zt(!0),o(P,he.current),Le(""),G(!1),Ne(null),Ht.current=!0,lt.current?.focus();const V=$r(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"))},Br=g.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=g.useCallback(()=>{Wt.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=g.useCallback(()=>{G(!1),Le(""),me(F("announcements.closed")),lt.current?.focus()},[F]),Tr=g.useCallback(()=>{he.current=le.current,re(null),we(!1),o(null,he.current),me(F("announcements.cleared"))},[o,F]),Ft=g.useMemo(()=>({clear:Tr,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),A?.(P))},open:()=>G(!0),close:()=>G(!1),validate:pt}),[Tr,ft,ye,mt,o,A,pt]);g.useImperativeHandle(q,()=>Ft,[Ft]);const{highlightedIndex:Se,setHighlightedIndex:zr,handleKeyDown:Cs}=Ka({records:ee,isOpen:$,onSelect:Vt,onClose:js,onEscape:Ns,onClear:Br,searchQuery:_e});g.useEffect(()=>{$&&zr(-1)},[$,ee,zr]),g.useEffect(()=>{if(Se>=0&&Ce.current){const P=Ce.current.querySelector(`[data-index="${Se}"]`);P?.scrollIntoView&&P.scrollIntoView({block:"nearest",behavior:"smooth"})}},[Se]);const Zt=g.useRef(!1),Ht=g.useRef(!1),Wt=g.useRef(!1),Ss=()=>{Zt.current=!0},Rs=P=>{C||$||P.key==="Backspace"&&i&&!y&&(oe||ct)&&(P.preventDefault(),Br())},Es=()=>{if(!C&&!y){if(Ht.current){Ht.current=!1;return}if(Wt.current){Wt.current=!1;return}if(Zt.current){Zt.current=!1;return}$||G(!0)}},Is=g.useCallback(()=>{C||Xe.current||(Xe.current=!0,E?.(le.current))},[E,C]),As=g.useCallback(P=>{if(C)return;const V=P.relatedTarget;!Pe.current?.contains(V)&&(Xe.current=!1,I&&!y&&pt(),k?.(le.current))},[k,I,y,C,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(Wr,{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=jr.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:jr.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:()=>Vt(U),style:{position:"absolute",top:0,left:0,width:"100%",height:`${V.size}px`,transform:`translateY(${V.start}px)`},children:Or(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:()=>Vt(V),children:Or(V)},V.Id)),Me&&e.jsx("div",{className:"lookup-field__loading-more",children:e.jsx(Wr,{className:"h-4 w-4 animate-spin"})})]})};return e.jsxs("div",{ref:Pe,className:tt("lookup-field",C&&"lookup-field--disabled",y&&"lookup-field--readonly",Er&&"lookup-field--error",c),role:"combobox","aria-expanded":!C&&$,"aria-haspopup":"listbox","aria-labelledby":`${Z}-label`,"aria-controls":$?`${Z}-listbox`:void 0,"aria-disabled":C||void 0,"aria-readonly":!C&&y||void 0,"aria-invalid":Er||void 0,"aria-required":H||void 0,onKeyDown:C?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,wr.setReference(P)},id:Z,type:"button",className:"lookup-field__trigger",onClick:ys,onMouseDown:Ss,onKeyDown:Rs,onFocus:Es,disabled:C,tabIndex:C?-1:0,children:[e.jsx("span",{className:"lookup-field__selected-text",children:ct?F("notFound"):oe?$r(oe):l??F("placeholder")}),e.jsx(Xo,{className:tt("lookup-field__chevron",$&&"lookup-field__chevron--open"),"aria-hidden":"true"}),i&&oe&&!y&&!C&&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}),$&&e.jsxs("div",{ref:wr.setFloating,style:ps,className:"lookup-field__dropdown",children:[e.jsx(rc,{ref:Ot,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=g.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]=g.useState("collapsed"),x=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(Rt,{state:m,items:a,showSearchButton:!1,onStateChange:x,...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:x,onSearch:h,searchPlaceholder:b="Buscar",onSort:v,sortColumn:w,sortDirection:N,pagination:S,loading:y=!1,loadingRows:C=5,emptyMessage:M="No hay datos disponibles",className:E="",onNotificationsClick:k,viewOptions:j,selectedViewOption:A,onViewOptionChange:T})=>{const[D,H]=g.useState(""),[_,I]=g.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",E].join(" "),children:[f&&e.jsx(Rt,{state:m,items:z,onStateChange:p,onItemClick:x,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:k,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:b,leftIcon:e.jsx(yc,{className:"w-4 h-4"}),value:D,onChange:F,className:"w-[200px]"}),j&&e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>I(!_),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:j.map(Z=>e.jsx("button",{onClick:()=>{T?.(Z.id),I(!1)},className:["block","w-full","px-4","py-2","text-left","text-sm","hover:bg-background-secondary","dark:hover:bg-dark-bg-secondary",A===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:y,loadingRows:C,emptyMessage:M,onSort:v,sortColumn:w,sortDirection:N,pagination:S,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]=g.useState(""),[d,f]=g.useState(""),[m,p]=g.useState(!1),[x,h]=g.useState(""),b=N=>{if(N.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){h("Por favor ingresa un email válido");return}h(""),t?.(c,d)},v=N=>{u(N.target.value),x&&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:b,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",x?"border-error-border!":""].filter(Boolean).join(" ")})]}),x&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:x})]}),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:N=>f(N.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:x="products",onTabChange:h,orderItems:b=[],onOrderItemQuantityChange:v,onOrderItemDelete:w,subtotal:N="40,000.00",taxes:S="40,000.00",total:y="40,000.00",confirmLabel:C="Confirmar Pedido",onConfirmOrder:M,isLoading:E=!1,errorMessage:k,userAvatar:j,userName:A="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
|
|
@@ -1459,7 +1459,7 @@
|
|
|
1459
1459
|
flex
|
|
1460
1460
|
flex-col
|
|
1461
1461
|
${_}
|
|
1462
|
-
`.trim().replace(/\s+/g," "),children:[e.jsx(ot,{logo:D&&e.jsx("div",{className:"h-[30px] w-[168px] overflow-hidden",children:typeof D=="string"?e.jsx("img",{src:D,alt:"Business Logo",className:"h-full w-full object-contain"}):D}),productName:"",userDropdown:
|
|
1462
|
+
`.trim().replace(/\s+/g," "),children:[e.jsx(ot,{logo:D&&e.jsx("div",{className:"h-[30px] w-[168px] overflow-hidden",children:typeof D=="string"?e.jsx("img",{src:D,alt:"Business Logo",className:"h-full w-full object-contain"}):D}),productName:"",userDropdown:j?{avatar:j,name:A,role:T}:void 0,hideActionButtons:!0,siesaLogo:H&&e.jsx("div",{className:"h-[30px] w-[120px] overflow-hidden",children:typeof H=="string"?e.jsx("img",{src:H,alt:"Siesa Logo",className:"h-full w-full object-contain"}):H}),variant:"desktop",className:"bg-background-secondary dark:bg-dark-bg-primary"}),e.jsx("div",{className:"flex flex-1 w-full overflow-hidden",children:e.jsxs("div",{className:"flex flex-1 w-full overflow-hidden",children:[e.jsxs("div",{className:`
|
|
1463
1463
|
flex-1
|
|
1464
1464
|
flex
|
|
1465
1465
|
flex-col
|
|
@@ -1470,7 +1470,7 @@
|
|
|
1470
1470
|
rounded-tl-3xl
|
|
1471
1471
|
rounded-tr-3xl
|
|
1472
1472
|
overflow-hidden
|
|
1473
|
-
`,children:[e.jsxs("div",{className:"flex items-center gap-4 w-full",children:[e.jsx("div",{className:"shrink-0",children:e.jsx(Q,{type:"default",leftIcon:e.jsx(Rc,{className:"w-4 h-4"}),onClick:i,ariaLabel:r,children:r})}),e.jsx("div",{className:"h-8 w-px bg-border-primary dark:bg-dark-border-primary shrink-0"}),e.jsx("div",{className:"shrink-0",children:e.jsx("h2",{className:"text-xl font-bold leading-7 tracking-tight text-content-primary dark:text-dark-content-primary",children:s})}),e.jsx("div",{className:"flex-1 flex gap-2 overflow-x-auto overflow-y-hidden",children:n.map(
|
|
1473
|
+
`,children:[e.jsxs("div",{className:"flex items-center gap-4 w-full",children:[e.jsx("div",{className:"shrink-0",children:e.jsx(Q,{type:"default",leftIcon:e.jsx(Rc,{className:"w-4 h-4"}),onClick:i,ariaLabel:r,children:r})}),e.jsx("div",{className:"h-8 w-px bg-border-primary dark:bg-dark-border-primary shrink-0"}),e.jsx("div",{className:"shrink-0",children:e.jsx("h2",{className:"text-xl font-bold leading-7 tracking-tight text-content-primary dark:text-dark-content-primary",children:s})}),e.jsx("div",{className:"flex-1 flex gap-2 overflow-x-auto overflow-y-hidden",children:n.map(I=>e.jsx(Q,{type:o===I.id?"default":"outline-solid",onClick:()=>a?.(I.id),children:I.label},I.id))})]}),e.jsxs("div",{className:`
|
|
1474
1474
|
flex-1
|
|
1475
1475
|
flex
|
|
1476
1476
|
gap-0
|
|
@@ -1478,7 +1478,7 @@
|
|
|
1478
1478
|
dark:bg-dark-bg-primary/50
|
|
1479
1479
|
rounded-xl
|
|
1480
1480
|
overflow-hidden
|
|
1481
|
-
`,children:[e.jsx("div",{className:"w-[213px] p-4 border-b border-border-primary dark:border-dark-border-primary",children:e.jsxs("div",{className:"flex flex-col gap-4 h-full",children:[e.jsx("div",{className:"flex items-center justify-center w-full",children:e.jsx("h3",{className:"text-xl font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:l})}),e.jsx("div",{className:"flex-1 flex flex-col gap-2 overflow-x-hidden overflow-y-auto",children:c.map(
|
|
1481
|
+
`,children:[e.jsx("div",{className:"w-[213px] p-4 border-b border-border-primary dark:border-dark-border-primary",children:e.jsxs("div",{className:"flex flex-col gap-4 h-full",children:[e.jsx("div",{className:"flex items-center justify-center w-full",children:e.jsx("h3",{className:"text-xl font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:l})}),e.jsx("div",{className:"flex-1 flex flex-col gap-2 overflow-x-hidden overflow-y-auto",children:c.map(I=>e.jsx(An,{image:I.image,label:I.label,active:u===I.id,onClick:()=>d?.(I.id)},I.id))})]})}),e.jsx("div",{className:"flex-1 p-4 border-l border-b border-border-primary dark:border-dark-border-primary",children:e.jsxs("div",{className:"flex flex-col gap-4 h-full",children:[e.jsx("div",{className:"flex items-center justify-center w-full",children:e.jsx("h3",{className:"text-xl font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:f})}),e.jsxs("div",{className:"flex-1 overflow-x-hidden overflow-y-auto",children:[e.jsx("div",{className:"flex flex-col items-center justify-start min-h-full w-full",children:e.jsx("div",{className:"flex flex-wrap gap-2 justify-center max-w-[704px]",children:m.map(I=>e.jsx(Mn,{image:I.image,productName:I.name,price:I.price,onAddClick:()=>p?.(I.id)},I.id))})}),m.length===0&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-content-secondary dark:text-content-secondary",children:"No hay productos disponibles"})}),E&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-content-secondary dark:text-content-secondary",children:"Cargando productos..."})}),k&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-red-600 dark:text-red-400",children:k})})]})]})})]})]}),e.jsx("div",{className:"w-[304px] p-4 flex flex-col gap-0 h-full overflow-hidden",children:e.jsxs("div",{className:"flex flex-col h-full relative",children:[e.jsx("div",{className:"border-b border-border-primary dark:border-dark-border-primary pb-4 z-10",children:e.jsx("h2",{className:"text-xl font-bold leading-7 tracking-tight text-content-primary dark:text-dark-content-primary",children:t})}),e.jsxs("div",{className:"flex items-start py-2.5 z-10",children:[e.jsxs("button",{className:`
|
|
1482
1482
|
flex-1
|
|
1483
1483
|
flex
|
|
1484
1484
|
flex-col
|
|
@@ -1521,5 +1521,5 @@
|
|
|
1521
1521
|
overflow-x-hidden
|
|
1522
1522
|
overflow-y-auto
|
|
1523
1523
|
z-10
|
|
1524
|
-
`,children:[b.map((E,z)=>e.jsxs(g.Fragment,{children:[e.jsx(mr,{categoryLabel:E.categoryLabel,categoryColor:E.categoryColor,productRef:E.productRef,price:E.price,productName:E.productName,descriptionItems:E.descriptionItems,showDescription:!!E.descriptionItems&&E.descriptionItems.length>0,quantity:E.quantity,onQuantityChange:R=>k?.(E.productId,R),onDelete:()=>v?.(E.productId)}),z<b.length-1&&e.jsx(Ie,{})]},E.productId)),b.length===0&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-content-secondary dark:text-content-secondary text-center",children:"No hay productos en el pedido"})})]}),e.jsxs("div",{className:"flex flex-col gap-4 pt-4 z-10",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-start text-base font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:[e.jsx("div",{className:"flex-1",children:"Subtotal"}),e.jsx("div",{className:"flex-1 text-right",children:w})]}),e.jsxs("div",{className:"flex items-start text-base font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:[e.jsx("div",{className:"flex-1",children:"Impuestos"}),e.jsx("div",{className:"flex-1 text-right",children:j})]}),e.jsx(Ie,{}),e.jsxs("div",{className:"flex items-start text-lg font-bold leading-7 text-content-primary dark:text-dark-content-primary",children:[e.jsx("div",{className:"flex-1",children:"Total"}),e.jsx("div",{className:"flex-1 text-right",children:y})]})]}),e.jsx("div",{className:"flex gap-2 w-full",children:e.jsx(Q,{type:"default",leftIcon:e.jsx(Ec,{className:"w-4 h-4"}),onClick:M,fullWidth:!0,disabled:b.length===0||I,children:C})})]})]})})]})})]});ds.displayName="ProductsView";const Ic=({className:t="w-4 h-4"})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className: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"})]}),Ac=({onSubmit:t,onBackToLogin:r,isLoading:s=!1,errorMessage:n,successMessage:o,className:a="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=g.useState(""),[d,f]=g.useState(""),m=x=>{if(x.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){f("Por favor ingresa un email válido");return}f(""),t?.(c)},p=x=>{u(x.target.value),d&&f("")};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:"hidden md:block 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.jpg",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-zinc-700",...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:"Restablecer Contraseña"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Reestablece tu contraseña ingresando con tu correo electrónico."})]}),n&&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:n}),o&&e.jsx("div",{className:["w-full","p-3","bg-[#d1fae5]","dark:bg-[#064e3b]","border","border-[#a7f3d0]","dark:border-[#065f46]","rounded-md","text-[#065f46]","dark:text-[#a7f3d0]","text-sm"].join(" "),role:"status",children:o}),e.jsxs("form",{onSubmit:m,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(Ic,{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:p,disabled:s,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-zinc-700","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",d?"border-error-border!":""].filter(Boolean).join(" ")})]}),d&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:d})]}),e.jsx("button",{type:"submit",disabled:s||!c,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:s?"Enviando...":"Reestablecer Contraseña"})]}),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]","bg-transparent","border","border-[#93d1fd]","dark:border-[#93d1fd]","rounded-md","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","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:"Iniciar Sesión"})]})]})},Mc=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"})}),Lc=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"})]}),$c=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"})}),Oc=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"})]}),Bc=({onSubmit:t,onSignIn:r,onTermsClick:s,onPrivacyClick:n,isLoading:o=!1,errorMessage:a,className:i="",showBackground:l=!0,variant:c="responsive"})=>{const[u,d]=g.useState(""),[f,m]=g.useState(""),[p,x]=g.useState(""),[h,b]=g.useState(!1),[k,v]=g.useState(""),w=C=>{if(C.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)){v("Por favor ingresa un email válido");return}v(""),t?.(u,f,p)},j=C=>{m(C.target.value),k&&v("")},y=()=>{b(!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:w,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(Mc,{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:C=>d(C.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(Lc,{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:j,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",k?"border-error-border!":""].filter(Boolean).join(" ")})]}),k&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:k})]}),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($c,{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:C=>x(C.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:y,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(Oc,{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"}),"."]})})]})]})},Tc=({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",{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"})}),zc=({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:"M2.22 2.22a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-.72-.72v2.69a.75.75 0 0 1-1.5 0V2.5c0-.69.56-1.25 1.25-1.25h4.75a.75.75 0 0 1 0 1.5H4.81l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06ZM9 2.75a.75.75 0 0 1 .75-.75h4.75C15.19 2 15.75 2.56 15.75 3.25v4.75a.75.75 0 0 1-1.5 0V5.31l-.72.72a.75.75 0 1 1-1.06-1.06l2-2a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-.72-.72V8a.75.75 0 0 1-1.5 0V3.5H9.75A.75.75 0 0 1 9 2.75ZM2.75 9a.75.75 0 0 1 .75.75v2.69l.72-.72a.75.75 0 1 1 1.06 1.06l-2 2a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l.72.72V9.75c0-.41.34-.75.75-.75Zm10.5 0a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-4.75c-.69 0-1.25-.56-1.25-1.25V9.75a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"})}),Dc=({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:"M2.75 2a.75.75 0 0 0-.75.75v3.5a.75.75 0 0 0 1.5 0V3.81l2.47 2.47a.75.75 0 1 0 1.06-1.06L4.56 2.75h2.69a.75.75 0 0 0 0-1.5h-4.5ZM9 2.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-2.69l2.47 2.47a.75.75 0 1 1-1.06 1.06L10.5 4.56v2.69a.75.75 0 0 1-1.5 0v-4.5ZM2.75 9a.75.75 0 0 1 .75.75v2.69l2.47-2.47a.75.75 0 1 1 1.06 1.06L4.56 13.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 1 .75-.75Zm10.5 0a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1 0-1.5h2.69l-2.47-2.47a.75.75 0 1 1 1.06-1.06l2.47 2.47V9.75a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"})}),_c=({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:"M2 4.75A2.75 2.75 0 0 1 4.75 2h3a2.75 2.75 0 0 1 2.75 2.75v.5a.75.75 0 0 1-1.5 0v-.5c0-.69-.56-1.25-1.25-1.25h-3c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h3c.69 0 1.25-.56 1.25-1.25v-.5a.75.75 0 0 1 1.5 0v.5A2.75 2.75 0 0 1 7.75 14h-3A2.75 2.75 0 0 1 2 11.25v-6.5Zm10.58 2.96-1.72-1.72a.75.75 0 1 1 1.06-1.06l2.78 2.78c.3.29.3.76 0 1.06l-2.78 2.78a.75.75 0 1 1-1.06-1.06l1.72-1.72H7.25a.75.75 0 0 1 0-1.5h5.33Z",clipRule:"evenodd"})}),Pc=({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:"M13.78 10.47a.75.75 0 0 1 0 1.06l-2.25 2.25a.75.75 0 1 1-1.06-1.06l.97-.97H5.75a.75.75 0 0 1 0-1.5h5.69l-.97-.97a.75.75 0 0 1 1.06-1.06l2.25 2.25ZM2.22 5.53a.75.75 0 0 1 0-1.06l2.25-2.25a.75.75 0 0 1 1.06 1.06l-.97.97h5.69a.75.75 0 0 1 0 1.5H4.56l.97.97a.75.75 0 1 1-1.06 1.06L2.22 5.53Z",clipRule:"evenodd"})}),Vc=({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",{d:"M2.5 3.5h3v3h-3v-3ZM6.5 2a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-4ZM2.5 10.5h3v3h-3v-3ZM6.5 9a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-4ZM10.5 3.5h3v3h-3v-3ZM13.5 2h-3a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-.5ZM10.5 10.5h3v3h-3v-3Z"})}),Fc=({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",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})}),Zc=({locations:t=[],activeLocationId:r,tables:s=[],tablesTitle:n="Mesas de Antejardín",showPeopleCountPanel:o=!1,selectedTable:a,onLocationSelect:i,onTableSelect:l,onCreateTables:c,onMergeTables:u,onSplitTables:d,onPeopleCountSelect:f,onAssignTable:m,onTransferTable:p,onSetCutlery:x,onClosePeoplePanel:h,onTableSwitchChange:b,isLoading:k=!1,errorMessage:v,tableLayout:w="grid",className:j="",userInfo:y})=>{const C=()=>e.jsx("div",{className:"w-full shrink-0",children:e.jsx(ot,{variant:"desktop",productName:"",userDropdown:y?{avatar:y.avatar,name:y.name,email:y.role,onMenuClick:()=>{}}:void 0})}),M=()=>e.jsxs("div",{className:["w-full","md:w-[245px]","h-auto","md:h-full","shrink-0","flex","flex-col","gap-2.5","p-4","overflow-auto"].join(" "),children:[e.jsx("div",{className:"w-full",children:e.jsx("h2",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Salones"})}),e.jsx("div",{className:"flex flex-col gap-2 w-full",children:k?e.jsx("div",{className:"text-content-secondary dark:text-content-secondary text-sm",children:"Cargando salones..."}):t.length===0?e.jsx("div",{className:"text-content-secondary dark:text-content-secondary text-sm",children:"No hay salones disponibles"}):t.map(N=>e.jsx(En,{locationName:N.name,status:N.status,state:N.id===r?"actived":"enabled",capacity:N.capacity,onClick:()=>i?.(N.id)},N.id))})]}),I=()=>e.jsxs("div",{className:["flex-1","min-w-0","flex","flex-col","gap-4","p-4","bg-white","dark:bg-dark-bg-primary","rounded-tl-3xl","rounded-tr-3xl","overflow-auto"].join(" "),children:[e.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-start md:items-center justify-between w-full",children:[e.jsx("h2",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary","flex-1"].join(" "),children:n}),e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsx(Q,{type:"default",size:"sm",leftIcon:e.jsx(Tc,{}),onClick:c,children:"Crear Mesas"}),e.jsx(Q,{type:"default",size:"sm",leftIcon:e.jsx(zc,{}),onClick:u,children:"Unir Mesas"}),e.jsx(Q,{type:"default",size:"sm",leftIcon:e.jsx(Dc,{}),onClick:d,children:"Separar Mesas"})]})]}),e.jsx("div",{className:["flex-1","bg-background-secondary","dark:bg-dark-bg-secondary","rounded-xl","p-4","overflow-auto","min-h-[400px]"].join(" "),children:k?e.jsx("div",{className:"flex items-center justify-center h-full text-content-secondary dark:text-content-secondary",children:"Cargando mesas..."}):v?e.jsx("div",{className:"flex items-center justify-center h-full text-error-content dark:text-error-content",children:v}):s.length===0?e.jsx("div",{className:"flex items-center justify-center h-full text-content-secondary dark:text-content-secondary",children:"No hay mesas en esta ubicación"}):w==="grid"?e.jsx("div",{className:"flex flex-col items-center justify-center min-h-full w-full p-4",children:e.jsx("div",{className:"flex flex-wrap gap-2 justify-center max-w-[664px]",children:s.map(N=>e.jsx(tr,{tableNumber:N.tableNumber,status:N.status,shape:N.shape,chairs:N.chairs,isActive:N.isActive,onClick:()=>l?.(N.tableNumber)},N.tableNumber))})}):e.jsx("div",{className:"relative w-full h-full min-h-[400px]",children:s.map(N=>e.jsx("div",{className:"absolute",style:N.position?{left:`${N.position.x}%`,top:`${N.position.y}%`,transform:"translate(-50%, -50%)"}:void 0,children:e.jsx(tr,{tableNumber:N.tableNumber,status:N.status,shape:N.shape,chairs:N.chairs,isActive:N.isActive,onClick:()=>l?.(N.tableNumber)})},N.tableNumber))})}),e.jsxs("div",{className:"flex flex-wrap gap-4 items-center w-full",children:[e.jsx(et,{status:"available"}),e.jsx(et,{status:"occupied"}),e.jsx(et,{status:"reserved"}),e.jsx(et,{status:"outOfService"})]})]}),S=()=>o?e.jsxs("div",{className:["w-full","md:w-[304px]","shrink-0","flex","flex-col","p-4","overflow-hidden"].join(" "),children:[e.jsxs("div",{className:"flex items-center justify-between w-full pb-4 border-b border-border-primary dark:border-dark-border-primary shrink-0",children:[e.jsx(cr,{label:a?.locationName||"Ubicación",description:a?.tableName||"Mesa",labelPosition:"trailing",checked:!1,onChange:N=>b?.(N.target.checked)}),e.jsx("button",{className:["p-2","rounded-md","border","border-primary-custom-300","text-primary-custom-600","hover:bg-background-secondary","dark:border-dark-border-custom","dark:hover:bg-dark-bg-primary","transition-colors"].join(" "),onClick:h,"aria-label":"Cerrar panel",children:e.jsx(Fc,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full flex-1 overflow-auto pt-4",children:[e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[e.jsx("h3",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Tomar pedido"}),e.jsx("p",{className:["text-sm","leading-5","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Selecciona la cantidad de personas"})]}),e.jsx("div",{className:"grid grid-cols-3 gap-2 w-full mt-2",children:[1,2,3,4,5,6,7,8].map(N=>e.jsx(In,{size:"l",border:!0,onClick:()=>f?.(N),children:N},N))})]}),e.jsxs("div",{className:"flex flex-col gap-4 w-full pt-4 mt-auto shrink-0 grow-0 basis-auto border-t border-border-primary dark:border-dark-border-primary",children:[e.jsx(Q,{type:"default",size:"sm",fullWidth:!0,leftIcon:e.jsx(_c,{}),onClick:m,children:"Asignar"}),e.jsxs("div",{className:"flex gap-2 w-full",children:[e.jsx(Q,{type:"outline",size:"sm",fullWidth:!0,leftIcon:e.jsx(Pc,{}),onClick:p,children:"Transferir"}),e.jsx(Q,{type:"outline",size:"sm",fullWidth:!0,leftIcon:e.jsx(Vc,{}),onClick:x,children:"Cubiertos"})]})]})]}):null;return e.jsxs("div",{className:["flex","flex-col","w-full","min-h-screen","bg-background-secondary","dark:bg-dark-bg-primary",j].join(" "),children:[C(),e.jsxs("div",{className:"flex flex-1 w-full overflow-hidden",children:[M(),I(),S()]})]})},us=g.createContext(void 0),Hc=({children:t,defaultTheme:r="light"})=>{const[s,n]=g.useState(()=>typeof window<"u"&&localStorage.getItem("siesa-ui-theme")||r);g.useEffect(()=>{const i=window.document.documentElement;s==="dark"?i.classList.add("dark"):i.classList.remove("dark"),localStorage.setItem("siesa-ui-theme",s)},[s]);const o=()=>{n(i=>i==="light"?"dark":"light")},a=i=>{n(i)};return e.jsx(us.Provider,{value:{theme:s,toggleTheme:o,setTheme:a},children:t})},Wc=()=>{const t=g.useContext(us);if(t===void 0)throw new Error("useTheme debe ser usado dentro de un ThemeProvider");return t};exports.Alert=Nn;exports.Avatar=wn;exports.Badge=Oe;exports.Button=Q;exports.Checkbox=kn;exports.DescriptionList=jn;exports.Divider=Ie;exports.Dropdown=Je;exports.DropdownItemCollapsible=jt;exports.DropdownItemHeading=ur;exports.Input=st;exports.LayoutBase=uc;exports.ListView=wc;exports.LoginView=Do;exports.LoginViewPage=Sc;exports.LookupField=cs;exports.Navbar=ot;exports.NavigationBar=So;exports.NavigationRail=oo;exports.NavigationRailGroup=It;exports.NavigationRailItem=wt;exports.NavigationRailPanel=Cn;exports.NavigationRailTypes=fr;exports.Notification=Ws;exports.POSConvention=et;exports.POSLocationButton=En;exports.POSNumberButton=In;exports.POSProductButton=An;exports.POSProductCard=Mn;exports.POSProductSidebarItems=mr;exports.POSTable=tr;exports.Pagination=qs;exports.ProductsView=ds;exports.Quantity=dr;exports.Radio=yn;exports.RecoverPasswordView=Ac;exports.Select=no;exports.SignUpView=Zo;exports.SignUpViewPage=Bc;exports.Switch=cr;exports.Table=Rn;exports.TableLayoutView=Zc;exports.Tabs=wo;exports.Textarea=vn;exports.ThemeProvider=Hc;exports.buildExpressiveFilter=Gn;exports.createFetcher=dc;exports.mergeFilters=Ua;exports.normalizeFilters=nr;exports.useTheme=Wc;
|
|
1524
|
+
`,children:[b.map((I,z)=>e.jsxs(g.Fragment,{children:[e.jsx(pr,{categoryLabel:I.categoryLabel,categoryColor:I.categoryColor,productRef:I.productRef,price:I.price,productName:I.productName,descriptionItems:I.descriptionItems,showDescription:!!I.descriptionItems&&I.descriptionItems.length>0,quantity:I.quantity,onQuantityChange:R=>v?.(I.productId,R),onDelete:()=>w?.(I.productId)}),z<b.length-1&&e.jsx(Ie,{})]},I.productId)),b.length===0&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-content-secondary dark:text-content-secondary text-center",children:"No hay productos en el pedido"})})]}),e.jsxs("div",{className:"flex flex-col gap-4 pt-4 z-10",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-start text-base font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:[e.jsx("div",{className:"flex-1",children:"Subtotal"}),e.jsx("div",{className:"flex-1 text-right",children:N})]}),e.jsxs("div",{className:"flex items-start text-base font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:[e.jsx("div",{className:"flex-1",children:"Impuestos"}),e.jsx("div",{className:"flex-1 text-right",children:S})]}),e.jsx(Ie,{}),e.jsxs("div",{className:"flex items-start text-lg font-bold leading-7 text-content-primary dark:text-dark-content-primary",children:[e.jsx("div",{className:"flex-1",children:"Total"}),e.jsx("div",{className:"flex-1 text-right",children:y})]})]}),e.jsx("div",{className:"flex gap-2 w-full",children:e.jsx(Q,{type:"default",leftIcon:e.jsx(Ec,{className:"w-4 h-4"}),onClick:M,fullWidth:!0,disabled:b.length===0||E,children:C})})]})]})})]})})]});ds.displayName="ProductsView";const Ic=({className:t="w-4 h-4"})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className: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"})]}),Ac=({onSubmit:t,onBackToLogin:r,isLoading:s=!1,errorMessage:n,successMessage:o,className:a="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=g.useState(""),[d,f]=g.useState(""),m=x=>{if(x.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){f("Por favor ingresa un email válido");return}f(""),t?.(c)},p=x=>{u(x.target.value),d&&f("")};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:"hidden md:block 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.jpg",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-zinc-700",...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:"Restablecer Contraseña"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Reestablece tu contraseña ingresando con tu correo electrónico."})]}),n&&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:n}),o&&e.jsx("div",{className:["w-full","p-3","bg-[#d1fae5]","dark:bg-[#064e3b]","border","border-[#a7f3d0]","dark:border-[#065f46]","rounded-md","text-[#065f46]","dark:text-[#a7f3d0]","text-sm"].join(" "),role:"status",children:o}),e.jsxs("form",{onSubmit:m,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(Ic,{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:p,disabled:s,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-zinc-700","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",d?"border-error-border!":""].filter(Boolean).join(" ")})]}),d&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:d})]}),e.jsx("button",{type:"submit",disabled:s||!c,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:s?"Enviando...":"Reestablecer Contraseña"})]}),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]","bg-transparent","border","border-[#93d1fd]","dark:border-[#93d1fd]","rounded-md","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","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:"Iniciar Sesión"})]})]})},Mc=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"})}),Lc=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"})]}),$c=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"})}),Oc=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"})]}),Bc=({onSubmit:t,onSignIn:r,onTermsClick:s,onPrivacyClick:n,isLoading:o=!1,errorMessage:a,className:i="",showBackground:l=!0,variant:c="responsive"})=>{const[u,d]=g.useState(""),[f,m]=g.useState(""),[p,x]=g.useState(""),[h,b]=g.useState(!1),[v,w]=g.useState(""),N=C=>{if(C.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)){w("Por favor ingresa un email válido");return}w(""),t?.(u,f,p)},S=C=>{m(C.target.value),v&&w("")},y=()=>{b(!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:N,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(Mc,{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:C=>d(C.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(Lc,{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:S,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($c,{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:C=>x(C.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:y,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(Oc,{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"}),"."]})})]})]})},Tc=({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",{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"})}),zc=({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:"M2.22 2.22a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-.72-.72v2.69a.75.75 0 0 1-1.5 0V2.5c0-.69.56-1.25 1.25-1.25h4.75a.75.75 0 0 1 0 1.5H4.81l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06ZM9 2.75a.75.75 0 0 1 .75-.75h4.75C15.19 2 15.75 2.56 15.75 3.25v4.75a.75.75 0 0 1-1.5 0V5.31l-.72.72a.75.75 0 1 1-1.06-1.06l2-2a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-.72-.72V8a.75.75 0 0 1-1.5 0V3.5H9.75A.75.75 0 0 1 9 2.75ZM2.75 9a.75.75 0 0 1 .75.75v2.69l.72-.72a.75.75 0 1 1 1.06 1.06l-2 2a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l.72.72V9.75c0-.41.34-.75.75-.75Zm10.5 0a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-4.75c-.69 0-1.25-.56-1.25-1.25V9.75a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"})}),Dc=({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:"M2.75 2a.75.75 0 0 0-.75.75v3.5a.75.75 0 0 0 1.5 0V3.81l2.47 2.47a.75.75 0 1 0 1.06-1.06L4.56 2.75h2.69a.75.75 0 0 0 0-1.5h-4.5ZM9 2.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-2.69l2.47 2.47a.75.75 0 1 1-1.06 1.06L10.5 4.56v2.69a.75.75 0 0 1-1.5 0v-4.5ZM2.75 9a.75.75 0 0 1 .75.75v2.69l2.47-2.47a.75.75 0 1 1 1.06 1.06L4.56 13.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 1 .75-.75Zm10.5 0a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1 0-1.5h2.69l-2.47-2.47a.75.75 0 1 1 1.06-1.06l2.47 2.47V9.75a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"})}),_c=({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:"M2 4.75A2.75 2.75 0 0 1 4.75 2h3a2.75 2.75 0 0 1 2.75 2.75v.5a.75.75 0 0 1-1.5 0v-.5c0-.69-.56-1.25-1.25-1.25h-3c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h3c.69 0 1.25-.56 1.25-1.25v-.5a.75.75 0 0 1 1.5 0v.5A2.75 2.75 0 0 1 7.75 14h-3A2.75 2.75 0 0 1 2 11.25v-6.5Zm10.58 2.96-1.72-1.72a.75.75 0 1 1 1.06-1.06l2.78 2.78c.3.29.3.76 0 1.06l-2.78 2.78a.75.75 0 1 1-1.06-1.06l1.72-1.72H7.25a.75.75 0 0 1 0-1.5h5.33Z",clipRule:"evenodd"})}),Pc=({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:"M13.78 10.47a.75.75 0 0 1 0 1.06l-2.25 2.25a.75.75 0 1 1-1.06-1.06l.97-.97H5.75a.75.75 0 0 1 0-1.5h5.69l-.97-.97a.75.75 0 0 1 1.06-1.06l2.25 2.25ZM2.22 5.53a.75.75 0 0 1 0-1.06l2.25-2.25a.75.75 0 0 1 1.06 1.06l-.97.97h5.69a.75.75 0 0 1 0 1.5H4.56l.97.97a.75.75 0 1 1-1.06 1.06L2.22 5.53Z",clipRule:"evenodd"})}),Vc=({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",{d:"M2.5 3.5h3v3h-3v-3ZM6.5 2a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-4ZM2.5 10.5h3v3h-3v-3ZM6.5 9a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-4ZM10.5 3.5h3v3h-3v-3ZM13.5 2h-3a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-.5ZM10.5 10.5h3v3h-3v-3Z"})}),Fc=({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",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})}),Zc=({locations:t=[],activeLocationId:r,tables:s=[],tablesTitle:n="Mesas de Antejardín",showPeopleCountPanel:o=!1,selectedTable:a,onLocationSelect:i,onTableSelect:l,onCreateTables:c,onMergeTables:u,onSplitTables:d,onPeopleCountSelect:f,onAssignTable:m,onTransferTable:p,onSetCutlery:x,onClosePeoplePanel:h,onTableSwitchChange:b,isLoading:v=!1,errorMessage:w,tableLayout:N="grid",className:S="",userInfo:y})=>{const C=()=>e.jsx("div",{className:"w-full shrink-0",children:e.jsx(ot,{variant:"desktop",productName:"",userDropdown:y?{avatar:y.avatar,name:y.name,email:y.role,onMenuClick:()=>{}}:void 0})}),M=()=>e.jsxs("div",{className:["w-full","md:w-[245px]","h-auto","md:h-full","shrink-0","flex","flex-col","gap-2.5","p-4","overflow-auto"].join(" "),children:[e.jsx("div",{className:"w-full",children:e.jsx("h2",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Salones"})}),e.jsx("div",{className:"flex flex-col gap-2 w-full",children:v?e.jsx("div",{className:"text-content-secondary dark:text-content-secondary text-sm",children:"Cargando salones..."}):t.length===0?e.jsx("div",{className:"text-content-secondary dark:text-content-secondary text-sm",children:"No hay salones disponibles"}):t.map(j=>e.jsx(En,{locationName:j.name,status:j.status,state:j.id===r?"actived":"enabled",capacity:j.capacity,onClick:()=>i?.(j.id)},j.id))})]}),E=()=>e.jsxs("div",{className:["flex-1","min-w-0","flex","flex-col","gap-4","p-4","bg-white","dark:bg-dark-bg-primary","rounded-tl-3xl","rounded-tr-3xl","overflow-auto"].join(" "),children:[e.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-start md:items-center justify-between w-full",children:[e.jsx("h2",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary","flex-1"].join(" "),children:n}),e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsx(Q,{type:"default",size:"sm",leftIcon:e.jsx(Tc,{}),onClick:c,children:"Crear Mesas"}),e.jsx(Q,{type:"default",size:"sm",leftIcon:e.jsx(zc,{}),onClick:u,children:"Unir Mesas"}),e.jsx(Q,{type:"default",size:"sm",leftIcon:e.jsx(Dc,{}),onClick:d,children:"Separar Mesas"})]})]}),e.jsx("div",{className:["flex-1","bg-background-secondary","dark:bg-dark-bg-secondary","rounded-xl","p-4","overflow-auto","min-h-[400px]"].join(" "),children:v?e.jsx("div",{className:"flex items-center justify-center h-full text-content-secondary dark:text-content-secondary",children:"Cargando mesas..."}):w?e.jsx("div",{className:"flex items-center justify-center h-full text-error-content dark:text-error-content",children:w}):s.length===0?e.jsx("div",{className:"flex items-center justify-center h-full text-content-secondary dark:text-content-secondary",children:"No hay mesas en esta ubicación"}):N==="grid"?e.jsx("div",{className:"flex flex-col items-center justify-center min-h-full w-full p-4",children:e.jsx("div",{className:"flex flex-wrap gap-2 justify-center max-w-[664px]",children:s.map(j=>e.jsx(Jt,{tableNumber:j.tableNumber,status:j.status,shape:j.shape,chairs:j.chairs,isActive:j.isActive,onClick:()=>l?.(j.tableNumber)},j.tableNumber))})}):e.jsx("div",{className:"relative w-full h-full min-h-[400px]",children:s.map(j=>e.jsx("div",{className:"absolute",style:j.position?{left:`${j.position.x}%`,top:`${j.position.y}%`,transform:"translate(-50%, -50%)"}:void 0,children:e.jsx(Jt,{tableNumber:j.tableNumber,status:j.status,shape:j.shape,chairs:j.chairs,isActive:j.isActive,onClick:()=>l?.(j.tableNumber)})},j.tableNumber))})}),e.jsxs("div",{className:"flex flex-wrap gap-4 items-center w-full",children:[e.jsx(et,{status:"available"}),e.jsx(et,{status:"occupied"}),e.jsx(et,{status:"reserved"}),e.jsx(et,{status:"outOfService"})]})]}),k=()=>o?e.jsxs("div",{className:["w-full","md:w-[304px]","shrink-0","flex","flex-col","p-4","overflow-hidden"].join(" "),children:[e.jsxs("div",{className:"flex items-center justify-between w-full pb-4 border-b border-border-primary dark:border-dark-border-primary shrink-0",children:[e.jsx(ir,{label:a?.locationName||"Ubicación",description:a?.tableName||"Mesa",labelPosition:"trailing",checked:!1,onChange:j=>b?.(j.target.checked)}),e.jsx("button",{className:["p-2","rounded-md","border","border-primary-custom-300","text-primary-custom-600","hover:bg-background-secondary","dark:border-dark-border-custom","dark:hover:bg-dark-bg-primary","transition-colors"].join(" "),onClick:h,"aria-label":"Cerrar panel",children:e.jsx(Fc,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full flex-1 overflow-auto pt-4",children:[e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[e.jsx("h3",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Tomar pedido"}),e.jsx("p",{className:["text-sm","leading-5","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Selecciona la cantidad de personas"})]}),e.jsx("div",{className:"grid grid-cols-3 gap-2 w-full mt-2",children:[1,2,3,4,5,6,7,8].map(j=>e.jsx(In,{size:"l",border:!0,onClick:()=>f?.(j),children:j},j))})]}),e.jsxs("div",{className:"flex flex-col gap-4 w-full pt-4 mt-auto shrink-0 grow-0 basis-auto border-t border-border-primary dark:border-dark-border-primary",children:[e.jsx(Q,{type:"default",size:"sm",fullWidth:!0,leftIcon:e.jsx(_c,{}),onClick:m,children:"Asignar"}),e.jsxs("div",{className:"flex gap-2 w-full",children:[e.jsx(Q,{type:"outline",size:"sm",fullWidth:!0,leftIcon:e.jsx(Pc,{}),onClick:p,children:"Transferir"}),e.jsx(Q,{type:"outline",size:"sm",fullWidth:!0,leftIcon:e.jsx(Vc,{}),onClick:x,children:"Cubiertos"})]})]})]}):null;return e.jsxs("div",{className:["flex","flex-col","w-full","min-h-screen","bg-background-secondary","dark:bg-dark-bg-primary",S].join(" "),children:[C(),e.jsxs("div",{className:"flex flex-1 w-full overflow-hidden",children:[M(),E(),k()]})]})},us=g.createContext(void 0),Hc=({children:t,defaultTheme:r="light"})=>{const[s,n]=g.useState(()=>typeof window<"u"&&localStorage.getItem("siesa-ui-theme")||r);g.useEffect(()=>{const i=window.document.documentElement;s==="dark"?i.classList.add("dark"):i.classList.remove("dark"),localStorage.setItem("siesa-ui-theme",s)},[s]);const o=()=>{n(i=>i==="light"?"dark":"light")},a=i=>{n(i)};return e.jsx(us.Provider,{value:{theme:s,toggleTheme:o,setTheme:a},children:t})},Wc=()=>{const t=g.useContext(us);if(t===void 0)throw new Error("useTheme debe ser usado dentro de un ThemeProvider");return t};exports.Alert=Cn;exports.Avatar=jn;exports.Badge=Oe;exports.Button=Q;exports.Checkbox=yn;exports.DescriptionList=Nn;exports.Divider=Ie;exports.Dropdown=Je;exports.DropdownItemCollapsible=dr;exports.DropdownItemHeading=ur;exports.Input=st;exports.LayoutBase=uc;exports.ListView=wc;exports.LoginView=Do;exports.LoginViewPage=Sc;exports.LookupField=cs;exports.Navbar=ot;exports.NavigationBar=So;exports.NavigationRail=oo;exports.NavigationRailGroup=Rt;exports.NavigationRailItem=cr;exports.NavigationRailPanel=fr;exports.NavigationRailTypes=mr;exports.Notification=Ws;exports.POSConvention=et;exports.POSLocationButton=En;exports.POSNumberButton=In;exports.POSProductButton=An;exports.POSProductCard=Mn;exports.POSProductSidebarItems=pr;exports.POSTable=Jt;exports.Pagination=qs;exports.ProductsView=ds;exports.Quantity=lr;exports.Radio=wn;exports.RecoverPasswordView=Ac;exports.Select=no;exports.SignUpView=Zo;exports.SignUpViewPage=Bc;exports.Switch=ir;exports.Table=Rn;exports.TableLayoutView=Zc;exports.Tabs=wo;exports.Textarea=kn;exports.ThemeProvider=Hc;exports.buildExpressiveFilter=Gn;exports.createFetcher=dc;exports.mergeFilters=Ua;exports.normalizeFilters=tr;exports.useTheme=Wc;
|
|
1525
1525
|
//# sourceMappingURL=siesa-ui-kit.cjs.map
|