siesa-ui-kit 1.0.20 → 1.0.21
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/components/Table/Table.d.ts.map +1 -1
- package/dist/siesa-ui-kit.cjs +113 -112
- package/dist/siesa-ui-kit.cjs.map +1 -1
- package/dist/siesa-ui-kit.mjs +1485 -1473
- package/dist/siesa-ui-kit.mjs.map +1 -1
- package/package.json +1 -1
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"),b=require("react"),gn=require("react-dom");function bn(t){const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),gn=require("react-dom");function bn(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 M=bn(b),$s=bn(gn),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:g="red",...h})=>{const x={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"},j={default:`
|
|
2
2
|
bg-primary-custom-600
|
|
3
3
|
text-primary-inverse-content
|
|
4
4
|
border
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
disabled:opacity-50
|
|
67
67
|
disabled:cursor-not-allowed
|
|
68
68
|
disabled:pointer-events-none
|
|
69
|
-
`,k=d?"w-full":"",N=[C,x[
|
|
69
|
+
`,k=d?"w-full":"",N=[C,x[r],j[t],k,l].join(" ").replace(/\s+/g," ").trim(),A=T=>T?e.jsx("span",{className:`inline-flex items-center justify-center ${v[r]}`,children:T}):null,I=()=>s?A(n):e.jsxs(e.Fragment,{children:[n&&A(n),a&&e.jsx("span",{className:w[r],children:a}),o&&A(o)]}),S={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"}},y=S[g]||S.red,B=()=>!m&&p===void 0?null:p!==void 0?e.jsx("span",{className:`
|
|
70
70
|
absolute
|
|
71
71
|
-top-1
|
|
72
72
|
-right-1
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
rounded-full
|
|
93
93
|
${y.bg}
|
|
94
94
|
pointer-events-none
|
|
95
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Notificación"});return e.jsxs("button",{type:u,className:`${N} ${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:`${N} ${m||p!==void 0?"relative":""}`,disabled:i,onClick:c,"aria-label":f,...h,children:[I(),B()]})},st=b.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)}`,g=`
|
|
96
96
|
w-full
|
|
97
97
|
px-3
|
|
98
98
|
py-1.5
|
|
@@ -127,14 +127,14 @@
|
|
|
127
127
|
dark:focus:border-dark-border-custom
|
|
128
128
|
dark:focus:ring-dark-border-custom
|
|
129
129
|
dark:focus:ring-offset-dark-bg-primary
|
|
130
|
-
`,x=
|
|
130
|
+
`,x=n?`
|
|
131
131
|
border-error-border!
|
|
132
132
|
focus:ring-error-border/30!
|
|
133
133
|
focus:ring-offset-2!
|
|
134
134
|
dark:border-error-border!
|
|
135
135
|
dark:focus:ring-error-border/30!
|
|
136
136
|
dark:focus:ring-offset-dark-bg-primary!
|
|
137
|
-
`:"",v=l?"w-full":"w-[265px]",w=j=>{if(!j)return null;const C=j.props.className||"";return b.cloneElement(j,{className:`w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary ${C}`})};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}),
|
|
137
|
+
`:"",v=l?"w-full":"w-[265px]",w=j=>{if(!j)return null;const C=j.props.className||"";return b.cloneElement(j,{className:`w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary ${C}`})};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
|
${g}
|
|
139
139
|
${h}
|
|
140
140
|
${x}
|
|
@@ -143,8 +143,8 @@
|
|
|
143
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
|
-
${
|
|
147
|
-
`.trim().replace(/\s+/g," "),children:
|
|
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 vn=b.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)}`,g=`
|
|
148
148
|
w-full
|
|
149
149
|
px-3
|
|
150
150
|
pr-1.5
|
|
@@ -176,14 +176,14 @@
|
|
|
176
176
|
dark:hover:border-zinc-500
|
|
177
177
|
dark:focus:border-2
|
|
178
178
|
dark:focus:border-dark-border-custom
|
|
179
|
-
`,x=
|
|
179
|
+
`,x=n?`
|
|
180
180
|
border-error-border!
|
|
181
181
|
focus:border-2!
|
|
182
182
|
focus:border-error-border!
|
|
183
183
|
dark:border-error-border!
|
|
184
184
|
dark:focus:border-2!
|
|
185
185
|
dark:focus:border-error-border!
|
|
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||
|
|
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
|
${g}
|
|
188
188
|
${h}
|
|
189
189
|
${x}
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
leading-5
|
|
194
194
|
text-content-tertiary
|
|
195
195
|
dark:text-dark-content-tertiary
|
|
196
|
-
`.trim().replace(/\s+/g," "),children:
|
|
196
|
+
`.trim().replace(/\s+/g," "),children:n&&o?o:s})]})});vn.displayName="Textarea";const kn=b.forwardRef(({label:t,description:r,checked:s=!1,indeterminate:n=!1,disabled:o=!1,className:a="",id:i,onChange:l,...c},u)=>{const d=b.useRef(null),f=u||d,m=i||`checkbox-${Math.random().toString(36).substr(2,9)}`;b.useEffect(()=>{f.current&&(f.current.indeterminate=n)},[n,f]);const x=[`
|
|
197
197
|
w-4
|
|
198
198
|
h-4
|
|
199
199
|
rounded
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
`,o?`
|
|
211
211
|
opacity-50
|
|
212
212
|
cursor-not-allowed
|
|
213
|
-
`:s||
|
|
213
|
+
`:s||n?`
|
|
214
214
|
peer-hover:border-[#50a5f7]
|
|
215
215
|
peer-focus:ring-2
|
|
216
216
|
peer-focus:ring-primary-custom-400/20
|
|
@@ -226,13 +226,13 @@
|
|
|
226
226
|
dark:peer-hover:border-[#b6b6b9]
|
|
227
227
|
dark:peer-focus:border-dark-border-custom
|
|
228
228
|
dark:peer-focus:ring-dark-border-custom/20
|
|
229
|
-
`,s||
|
|
229
|
+
`,s||n?`
|
|
230
230
|
bg-primary-custom-600!
|
|
231
231
|
border-primary-custom-500!
|
|
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:x,children:[s&&!
|
|
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:x,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})]})]})});kn.displayName="Checkbox";const yn=b.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
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
justify-center
|
|
247
247
|
dark:bg-dark-bg-primary
|
|
248
248
|
dark:border-dark-border-primary
|
|
249
|
-
`,p=
|
|
249
|
+
`,p=n?`
|
|
250
250
|
opacity-50
|
|
251
251
|
cursor-not-allowed
|
|
252
252
|
`:`
|
|
@@ -263,12 +263,12 @@
|
|
|
263
263
|
shadow-button-inset
|
|
264
264
|
dark:bg-dark-bg-inverse!
|
|
265
265
|
dark:border-dark-bg-inverse!
|
|
266
|
-
`:"";return e.jsxs("div",{className:`flex gap-3 items-start ${o}`,children:[e.jsxs("div",{className:"flex items-center justify-center h-5 w-4 shrink-0",children:[e.jsx("input",{ref:d,type:"radio",id:f,checked:s,disabled:
|
|
266
|
+
`:"";return e.jsxs("div",{className:`flex gap-3 items-start ${o}`,children:[e.jsxs("div",{className:"flex items-center justify-center h-5 w-4 shrink-0",children:[e.jsx("input",{ref:d,type:"radio",id:f,checked:s,disabled:n,onChange:i,value:l,name:c,className:"peer sr-only",...u}),e.jsx("label",{htmlFor:f,className:`
|
|
267
267
|
${m}
|
|
268
268
|
${p}
|
|
269
269
|
${g}
|
|
270
|
-
${
|
|
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||
|
|
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})]})]})});yn.displayName="Radio";const cr=b.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
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
relative
|
|
278
278
|
transition-all
|
|
279
279
|
duration-200
|
|
280
|
-
`,p=()=>o?
|
|
280
|
+
`,p=()=>o?n?`
|
|
281
281
|
bg-primary-custom-600
|
|
282
282
|
border-primary-inverse-border
|
|
283
283
|
opacity-50
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
cursor-not-allowed
|
|
292
292
|
dark:bg-dark-bg-primary
|
|
293
293
|
dark:border-dark-border-primary
|
|
294
|
-
`:
|
|
294
|
+
`:n?`
|
|
295
295
|
bg-primary-custom-600
|
|
296
296
|
border-primary-inverse-border
|
|
297
297
|
cursor-pointer
|
|
@@ -322,7 +322,7 @@
|
|
|
322
322
|
-translate-y-1/2
|
|
323
323
|
transition-all
|
|
324
324
|
duration-200
|
|
325
|
-
`,C=
|
|
325
|
+
`,C=n?"left-[13px]":"left-px";return o?`${j} ${C} ${n?"border-primary-inverse-border dark:border-primary-inverse-border":"border-border-primary dark:border-dark-border-primary"}`:`${j} ${C} ${n?`
|
|
326
326
|
border-primary-inverse-border
|
|
327
327
|
peer-hover:border-[#307cc5]
|
|
328
328
|
dark:border-primary-inverse-border
|
|
@@ -332,15 +332,15 @@
|
|
|
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(),x=g().replace(/\s+/g," ").trim(),v=t||
|
|
335
|
+
`}`},h=[m,p()].join(" ").replace(/\s+/g," ").trim(),x=g().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:x})})]});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]})})});cr.displayName="Switch";const wn=b.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
|
|
339
339
|
justify-center
|
|
340
340
|
overflow-hidden
|
|
341
341
|
${c[t]}
|
|
342
|
-
${d[
|
|
343
|
-
`;return s?e.jsx("div",{ref:l,className:`${f} ${a}`.trim().replace(/\s+/g," "),children:e.jsx("img",{src:s,alt:
|
|
342
|
+
${d[r]}
|
|
343
|
+
`;return s?e.jsx("div",{ref:l,className:`${f} ${a}`.trim().replace(/\s+/g," "),children:e.jsx("img",{src:s,alt:n,className:"w-full h-full object-cover",...i})}):o?e.jsx("div",{ref:l,className:`
|
|
344
344
|
${f}
|
|
345
345
|
${u[t]}
|
|
346
346
|
bg-content-primary
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
bg-background-secondary
|
|
355
355
|
dark:bg-dark-bg-primary
|
|
356
356
|
${a}
|
|
357
|
-
`.trim().replace(/\s+/g," ")})});wn.displayName="Avatar";const Ie=b.forwardRef(({type:t="default",className:
|
|
357
|
+
`.trim().replace(/\s+/g," ")})});wn.displayName="Avatar";const Ie=b.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 jn=b.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,...
|
|
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})})]})});jn.displayName="DescriptionList";const Nn=b.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}),
|
|
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})]})})});Nn.displayName="Alert";const Oe=b.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 b.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:
|
|
384
|
+
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:`font-sans text-xs leading-4 ${c.notificationText}`,children:n})})]})});Oe.displayName="Badge";const dr=b.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[g,h]=b.useState(r),x=t!==void 0,v=x?t:g;b.useEffect(()=>{x||h(r)},[r,x]);const w=T=>{let D=T;n!==void 0&&D<n&&(D=n),o!==void 0&&D>o&&(D=o),x||h(D),s?.(D)},j=()=>{d||w(v-1)},C=()=>{d||w(v+1)},k=d||n!==void 0&&v<=n,N=d||o!==void 0&&v>=o,A=()=>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"})}),I=()=>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"})}),S=u?"border-error-border dark:border-error-border":"border-border-primary dark:border-dark-border-primary",y=!d&&!u?"hover:border-[#f9f9f9] dark:hover:border-[#f9f9f9]":"",B=!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
|
|
@@ -426,10 +426,10 @@
|
|
|
426
426
|
${N?"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(I,{})})]}),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})]})});dr.displayName="Quantity";const wt=({icon:t,label:
|
|
432
|
+
`.trim().replace(/\s+/g," "),children:c})]})});dr.displayName="Quantity";const wt=({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 g=["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(" "),x=["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:v,disabled:r,onClick:i,onMouseEnter:l,onMouseLeave:c,"aria-label":u||n,"aria-current":s?"page":void 0,"aria-disabled":r,"data-item-id":d,"data-testid":`navigation-rail-item-${d}`,children:[m&&e.jsx("div",{className:g,children:e.jsx("span",{className:h,children:t})}),f&&e.jsx("p",{className:x,children:n}),w()]})};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:n,items:s,open:r,onOpenChange:o,disabled:a=!1,className:i="",menuClassName:l="",ariaLabel:c,placeholder:u="Options",renderTrigger:d})=>{const[f,m]=b.useState(!1),[p,g]=b.useState("bottom-left"),h=b.useRef(null),x=b.useRef(null),v=r!==void 0,w=v?r:f,j=b.useCallback(()=>{if(!h.current)return;const S=h.current.getBoundingClientRect(),y=window.innerWidth,B=window.innerHeight,T=200,D=250,Z=B-S.bottom,z=S.top,I=y-S.left,W=S.right,R=Z<D&&z>Z,G=I<T&&W>I;g(R&&G?"top-right":R?"top-left":G?"bottom-right":"bottom-left")},[]),C=()=>{if(a)return;const S=!w;S&&j(),v||m(S),o?.(S)};b.useEffect(()=>{const S=y=>{h.current&&!h.current.contains(y.target)&&(v||m(!1),o?.(!1))};if(w)return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[w,v,o]),b.useEffect(()=>{const S=y=>{y.key==="Escape"&&w&&(v||m(!1),o?.(!1))};if(w)return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[w,v,o]);const k=S=>{S.disabled||S.isDivider||S.isHeading||(S.onClick&&S.onClick({}),v||m(!1),o?.(!1))},N=["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:C,role:"button",tabIndex:a?-1:0,children:d(w)}):e.jsxs("button",{type:"button",className:N,onClick:C,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:n||u}),e.jsx(Os,{})]}),w&&e.jsx("div",{ref:x,className:E,children:s.map((S,y)=>S.isDivider?e.jsx(zs,{className:S.className},y):S.isHeading?e.jsx(Ts,{className:S.className,children:S.children},y):e.jsx(Bs,{...S,onClick:()=>k(S)},y))})]})},Bs=({children:t,icon:n,description:s,shortcut:r,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:[n&&e.jsx("span",{className:"inline-flex items-center justify-center w-4 h-4 text-content-secondary dark:text-dark-content-secondary",children:n}),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})]}),r&&e.jsx("span",{className:"text-xs text-content-secondary dark:text-dark-content-secondary ml-auto whitespace-nowrap",children:r})]})},Ts=({children:t,className:n=""})=>{const s=["px-4","py-1","text-xs","font-normal","text-content-tertiary","dark:text-dark-content-tertiary",n].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{className:s,children:t})},zs=({className:t=""})=>{const n=["px-4","py-1",t].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{className:n,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:n,children:s=[],defaultOpen:r=!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:g="red",className:h=""})=>{const[x,v]=b.useState(r),w=()=>{if(o||!l)return;const k=!x;v(k),a?.(k)},j=k=>{o||(l?w():i?.(k))},C=k=>N=>{k.disabled||k.onClick?.(N)};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:j,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":x&&l,"aria-disabled":o,children:[n&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:n}),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",x?"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"}),x&&l&&s.length>0&&e.jsx("div",{className:"flex flex-col gap-0.5 w-full py-2 px-0",children:s.map((k,N)=>e.jsxs("div",{onClick:C(k),className:["flex gap-3 items-center pl-6 pr-4 py-2 w-full","rounded-lg cursor-pointer","transition-all duration-150",!k.disabled&&"text-content-primary",!k.disabled&&"hover:bg-primary-custom-100",!k.disabled&&"hover:text-primary-custom-600",!k.disabled&&"dark:text-content-primary",!k.disabled&&"dark:hover:bg-dark-bg-custom",!k.disabled&&"dark:hover:text-dark-content-custom",!k.disabled&&"focus:outline-hidden",!k.disabled&&"focus:ring-2",!k.disabled&&"focus:ring-offset-2",!k.disabled&&"focus:ring-primary-custom-400",!k.disabled&&"focus:ring-offset-bg-primary",!k.disabled&&"dark:focus:ring-offset-dark-bg-primary",k.disabled&&"opacity-50",k.disabled&&"cursor-not-allowed",k.className].filter(Boolean).join(" "),children:[k.icon&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:k.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:k.label})})]},N))})]})},_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,n)=>{if(!t)return null;const s=Zs[t];return s?e.jsx(s,{className:n}):(console.warn(`Icon "${t}" not found in iconMap`),null)},ur=({label:t="Label",description:n,showDescription:s=!0,iconName:r="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:g,children:e.jsx("span",{className:h,children:t})}),f&&e.jsx("p",{className:x,children:r}),w()]})};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]=b.useState(!1),[p,g]=b.useState("bottom-left"),h=b.useRef(null),x=b.useRef(null),v=n!==void 0,w=v?n:f,j=b.useCallback(()=>{if(!h.current)return;const S=h.current.getBoundingClientRect(),y=window.innerWidth,B=window.innerHeight,T=200,D=250,H=B-S.bottom,_=S.top,E=y-S.left,z=S.right,R=H<D&&_>H,q=E<T&&z>E;g(R&&q?"top-right":R?"top-left":q?"bottom-right":"bottom-left")},[]),C=()=>{if(a)return;const S=!w;S&&j(),v||m(S),o?.(S)};b.useEffect(()=>{const S=y=>{h.current&&!h.current.contains(y.target)&&(v||m(!1),o?.(!1))};if(w)return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[w,v,o]),b.useEffect(()=>{const S=y=>{y.key==="Escape"&&w&&(v||m(!1),o?.(!1))};if(w)return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[w,v,o]);const k=S=>{S.disabled||S.isDivider||S.isHeading||(S.onClick&&S.onClick({}),v||m(!1),o?.(!1))},N=["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:C,role:"button",tabIndex:a?-1:0,children:d(w)}):e.jsxs("button",{type:"button",className:N,onClick:C,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:x,className:I,children:s.map((S,y)=>S.isDivider?e.jsx(zs,{className:S.className},y):S.isHeading?e.jsx(Ts,{className:S.className,children:S.children},y):e.jsx(Bs,{...S,onClick:()=>k(S)},y))})]})},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:g="red",className:h=""})=>{const[x,v]=b.useState(n),w=()=>{if(o||!l)return;const k=!x;v(k),a?.(k)},j=k=>{o||(l?w():i?.(k))},C=k=>N=>{k.disabled||k.onClick?.(N)};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:j,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":x&&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",x?"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"}),x&&l&&s.length>0&&e.jsx("div",{className:"flex flex-col gap-0.5 w-full py-2 px-0",children:s.map((k,N)=>e.jsxs("div",{onClick:C(k),className:["flex gap-3 items-center pl-6 pr-4 py-2 w-full","rounded-lg cursor-pointer","transition-all duration-150",!k.disabled&&"text-content-primary",!k.disabled&&"hover:bg-primary-custom-100",!k.disabled&&"hover:text-primary-custom-600",!k.disabled&&"dark:text-content-primary",!k.disabled&&"dark:hover:bg-dark-bg-custom",!k.disabled&&"dark:hover:text-dark-content-custom",!k.disabled&&"focus:outline-hidden",!k.disabled&&"focus:ring-2",!k.disabled&&"focus:ring-offset-2",!k.disabled&&"focus:ring-primary-custom-400",!k.disabled&&"focus:ring-offset-bg-primary",!k.disabled&&"dark:focus:ring-offset-dark-bg-primary",k.disabled&&"opacity-50",k.disabled&&"cursor-not-allowed",k.className].filter(Boolean).join(" "),children:[k.icon&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:k.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:k.label})})]},N))})]})},_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
|
|
@@ -469,14 +469,14 @@
|
|
|
469
469
|
rounded-lg
|
|
470
470
|
w-56
|
|
471
471
|
${c}
|
|
472
|
-
`,"data-testid":"dropdown-item-heading",...u,children:[o&&
|
|
472
|
+
`,"data-testid":"dropdown-item-heading",...u,children:[o&&n&&e.jsx("div",{className:`
|
|
473
473
|
flex
|
|
474
474
|
items-center
|
|
475
475
|
justify-center
|
|
476
476
|
shrink-0
|
|
477
477
|
w-4
|
|
478
478
|
h-4
|
|
479
|
-
`,"data-testid":"icon-wrapper",children:e.jsx("div",{className:"text-primary-custom-600 dark:text-dark-content-inverse",children:Hs(
|
|
479
|
+
`,"data-testid":"icon-wrapper",children:e.jsx("div",{className:"text-primary-custom-600 dark:text-dark-content-inverse",children:Hs(n,"w-4 h-4")})}),e.jsxs("div",{className:`
|
|
480
480
|
flex
|
|
481
481
|
flex-1
|
|
482
482
|
flex-col
|
|
@@ -493,7 +493,7 @@
|
|
|
493
493
|
whitespace-nowrap
|
|
494
494
|
overflow-hidden
|
|
495
495
|
text-ellipsis
|
|
496
|
-
`,"data-testid":"label",children:t}),s&&
|
|
496
|
+
`,"data-testid":"label",children:t}),s&&r&&e.jsx("p",{className:`
|
|
497
497
|
font-normal
|
|
498
498
|
text-xs
|
|
499
499
|
leading-4
|
|
@@ -503,7 +503,7 @@
|
|
|
503
503
|
whitespace-pre-wrap
|
|
504
504
|
overflow-hidden
|
|
505
505
|
text-ellipsis
|
|
506
|
-
`,"data-testid":"description",children:
|
|
506
|
+
`,"data-testid":"description",children:r})]}),i&&a&&e.jsx("div",{className:`
|
|
507
507
|
flex
|
|
508
508
|
items-center
|
|
509
509
|
justify-center
|
|
@@ -519,7 +519,7 @@
|
|
|
519
519
|
text-content-secondary
|
|
520
520
|
dark:text-dark-border-inverse
|
|
521
521
|
whitespace-nowrap
|
|
522
|
-
`,"data-testid":"action-label",children:a})})]});ur.displayName="DropdownItemHeading";const Ws=({count:t,color:
|
|
522
|
+
`,"data-testid":"action-label",children:a})})]});ur.displayName="DropdownItemHeading";const Ws=({count:t,color:r="red",className:s="",ariaLabel:n})=>{const o={zinc:{bg:"bg-zinc-600",text:"text-white"},red:{bg:"bg-content-extensions-red",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"}},a=o[r]||o.red,i=n||(t!==void 0&&t>0?`${t} notificaci${t===1?"ón":"ones"}`:"Notificación pendiente");if(t!==void 0&&t>0){const l=t>99?"99+":t.toString();return e.jsx("span",{className:`
|
|
523
523
|
inline-flex
|
|
524
524
|
items-center
|
|
525
525
|
justify-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:
|
|
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=b.useMemo(()=>{const h=a*2+3+2;if(r<=h)return Array.from({length:r},(N,A)=>A+1);const x=Math.max(t-a,1),v=Math.min(t+a,r),w=x>2,j=v<r-1,C=1,k=r;if(!w&&j){const N=3+2*a;return[...Array.from({length:N},(I,S)=>S+1),"...",r]}if(w&&!j){const N=3+2*a,A=Array.from({length:N},(I,S)=>r-N+S+1);return[C,"...",...A]}if(w&&j){const N=Array.from({length:v-x+1},(A,I)=>x+I);return[C,"...",...N,"...",k]}return[]},[t,r,a]),f=g=>{g>=1&&g<=r&&g!==t&&s?.(g)},m=({page:g,isActive:h=!1,disabled:x=!1,onClick:v,ariaLabel:w})=>{const j=g==="...",A=[`
|
|
549
549
|
inline-flex
|
|
550
550
|
items-center
|
|
551
551
|
justify-center
|
|
@@ -604,7 +604,7 @@
|
|
|
604
604
|
transition-all
|
|
605
605
|
duration-150
|
|
606
606
|
${t===1?"opacity-50 cursor-not-allowed pointer-events-none":""}
|
|
607
|
-
`.replace(/\s+/g," ").trim(),onClick:()=>f(t-1),disabled:t===1,"aria-label":`${
|
|
607
|
+
`.replace(/\s+/g," ").trim(),onClick:()=>f(t-1),disabled:t===1,"aria-label":`${n} page`,children:[e.jsx(Us,{className:"w-4 h-4"}),n]}),e.jsx("div",{className:"inline-flex items-center",children:d.map((g,h)=>e.jsx(m,{page:g,isActive:g===t,onClick:()=>typeof g=="number"&&f(g),ariaLabel:typeof g=="number"?`Go to page ${g}`:`Page ${g}`},`${g}-${h}`))}),l&&e.jsxs("button",{type:"button",className:`
|
|
608
608
|
inline-flex
|
|
609
609
|
items-center
|
|
610
610
|
justify-center
|
|
@@ -622,8 +622,8 @@
|
|
|
622
622
|
dark:active:scale-95
|
|
623
623
|
transition-all
|
|
624
624
|
duration-150
|
|
625
|
-
${t===
|
|
626
|
-
`.replace(/\s+/g," ").trim(),onClick:()=>f(t+1),disabled:t===
|
|
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 M.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?M.createElement("title",{id:r},t):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Xs=M.forwardRef(Ks);function Ys({title:t,titleId:r,...s},n){return M.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?M.createElement("title",{id:r},t):null,M.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=M.forwardRef(Ys);function Js({title:t,titleId:r,...s},n){return M.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?M.createElement("title",{id:r},t):null,M.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=M.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:g="",ariaLabel:h,id:x,name:v,required:w=!1,menuPosition:j="bottom",fullWidth:C=!1})=>{const[k,N]=b.useState(!1),[A,I]=b.useState(r!==void 0?r:s),[S,y]=b.useState(-1),B=b.useRef(null),T=b.useRef(null),D=b.useRef(null);b.useEffect(()=>{r!==void 0&&I(r)},[r]),b.useEffect(()=>{const K=te=>{B.current&&!B.current.contains(te.target)&&N(!1)};if(k)return document.addEventListener("mousedown",K),()=>{document.removeEventListener("mousedown",K)}},[k]),b.useEffect(()=>{const K=te=>{if(k)switch(te.key){case"Escape":N(!1),T.current?.focus();break;case"ArrowDown":te.preventDefault(),y(ue=>ue<t.length-1?ue+1:0);break;case"ArrowUp":te.preventDefault(),y(ue=>ue>0?ue-1:t.length-1);break;case"Enter":te.preventDefault(),S>=0&&S<t.length&&E(t[S]);break}};if(k)return document.addEventListener("keydown",K),()=>{document.removeEventListener("keydown",K)}},[k,S,t]);const H=t.find(K=>K.value===A),_=()=>{o||(N(!k),y(-1))},E=K=>{K.disabled||(I(K.value),N(!1),f?.(K.value),setTimeout(()=>{T.current?.focus()},0))},L=[`
|
|
627
627
|
inline-flex
|
|
628
628
|
items-center
|
|
629
629
|
justify-between
|
|
@@ -697,7 +697,7 @@
|
|
|
697
697
|
text-[10px]
|
|
698
698
|
leading-[12px]
|
|
699
699
|
font-bold
|
|
700
|
-
`,de=(K,te)=>{const ue=K.value===A,ve=te===S,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",k&&"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 ${C?"w-full":""} ${m}`,ref:B,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:x,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:L,onClick:
|
|
700
|
+
`,de=(K,te)=>{const ue=K.value===A,ve=te===S,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",k&&"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 ${C?"w-full":""} ${m}`,ref:B,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:x,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:L,onClick:_,disabled:o,"aria-label":h||i,"aria-haspopup":"listbox","aria-expanded":k,id:x,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:A!==void 0?String(A):""}),k&&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:()=>E(K),onMouseEnter:()=>y(te),role:"option","aria-selected":K.value===A,"aria-disabled":K.disabled,children:[e.jsx("div",{className:"w-4 flex items-center justify-center",children:K.value===A&&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:
|
|
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(" "),g=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,x)=>e.jsx(so,{...h,selected:h.selected||l!==void 0&&h.id===l,onClick:()=>g(h)},h.id||x))})]})})},Cn=({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]=b.useState(a?.value||""),m=h=>{f(h),a?.onChange?.(h)},p={height:typeof t=="number"?`${t}px`:t},g={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:g,"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,x)=>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-${x}`,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-${x}`,children:h.items.map((v,w)=>e.jsx(zr,{item:v},`item-${x}-${w}`))}),h.showDivider!==!1&&x<i.length-1&&e.jsx(Ie,{className:"mt-3 w-full"})]},`section-${x}`)):null,l&&l.length>0&&!i?l.map((h,x)=>e.jsx(zr,{item:h},`item-${x}`)):null]})]})})},zr=({item:t})=>t.isCollapsible?e.jsx(jt,{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 M.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?M.createElement("title",{id:r},t):null,M.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=M.forwardRef(ao);function lo({title:t,titleId:r,...s},n){return M.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?M.createElement("title",{id:r},t):null,M.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=M.forwardRef(lo);function uo({title:t,titleId:r,...s},n){return M.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?M.createElement("title",{id:r},t):null,M.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=M.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"}),Dr=({className:t="size-5"})=>e.jsx(eo,{className:t,"aria-hidden":"true"}),_r=({className:t="size-5"})=>e.jsx(Sn,{className:t,"aria-hidden":"true"}),fr=b.forwardRef(({collapsed:t=!0,items:r=[],showRecentButton:s=!0,showSearchButton:n=!0,onCollapsedChange:o,onItemClick:a,onItemHover:i,className:l,labels:c={}},u)=>{const[d,f]=b.useState(""),m={searchButton:c.searchButton??"Search",searchPlaceholder:c.searchPlaceholder??"Buscar módulo",recentButton:c.recentButton??"Recientes",collapseButton:c.collapseButton??"Colapsar",expandButton:c.expandButton??"Expandir"},p=()=>{o?.(!t)},g=(x,v)=>{v.onClick?.(new Event("click")),a?.(x,v)},h=(x,v)=>{i?.(x,v)};return e.jsxs("div",{ref:u,className:`
|
|
730
730
|
${t?"w-[80px]":"w-[215px]"}
|
|
731
731
|
h-full
|
|
732
732
|
bg-background-primary dark:bg-background-primary
|
|
@@ -743,16 +743,16 @@
|
|
|
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&&
|
|
746
|
+
`,children:[t&&n&&e.jsx(Q,{type:"default",size:"xl",iconOnly:!0,leftIcon:e.jsx(_r,{className:"overflow-clip relative shrink-0 size-4 text-primary-inverse-content dark:text-primary-inverse-content"}),ariaLabel:m.searchButton}),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:r.length===0?e.jsxs(e.Fragment,{children:[t&&Array.from({length:4}).map((x,v)=>e.jsx(wt,{id:`demo-collapsed-${v}`,label:"Item",icon:e.jsx("svg",{className:"size-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12a9 9 0 1118 0 9 9 0 01-18 0z"})}),showLabelText:!1},`demo-collapsed-${v}`)),!t&&Array.from({length:6}).map((x,v)=>e.jsx(jt,{label:"Item",showDivider:!1,showHeading:!1},`demo-expanded-${v}`))]}):t?e.jsx(e.Fragment,{children:r.map((x,v)=>e.jsx(wt,{id:x.id,label:x.label,icon:x.icon,selected:x.active,disabled:x.disabled,badge:x.badge,badgeCount:x.badgeCount,ariaLabel:x.ariaLabel,showLabelText:!1,onClick:()=>g(v,x),onMouseEnter:()=>h(v,x),onMouseLeave:x.onMouseLeave},x.id))}):e.jsx(e.Fragment,{children:r.map((x,v)=>{const w=x.children&&x.children.length>0;return e.jsx("div",{className:"w-full",children:e.jsx(jt,{label:x.label,icon:x.icon,selected:x.active,disabled:x.disabled,badge:x.badge,badgeCount:x.badgeCount,badgeColor:x.badgeColor,showDivider:!1,showHeading:!1,isCollapsible:w,defaultOpen:x.defaultOpen,children:w?x.children:void 0,onClick:()=>g(v,x)})},x.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(Dr,{className:"size-4 text-primary-custom-600 dark:text-primary-custom-600"}),ariaLabel:m.recentButton}),s&&!t&&e.jsx(Q,{type:"outline",size:"base",leftIcon:e.jsx(Dr,{className:"size-4 text-primary-custom-600 dark:text-primary-custom-600"}),fullWidth:!0,children:m.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:p,ariaLabel:m.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:p,fullWidth:!0,children:m.collapseButton})]})]})]})]})});fr.displayName="NavigationRailTypes";const po=({className:t="size-4"})=>e.jsx(Sn,{className:t,"aria-hidden":"true"}),It=b.forwardRef(({state:t="collapsed",items:
|
|
755
|
+
`,children:[s&&t&&e.jsx(Q,{type:"outline",size:"base",fullWidth:!0,leftIcon:e.jsx(Dr,{className:"size-4 text-primary-custom-600 dark:text-primary-custom-600"}),ariaLabel:m.recentButton}),s&&!t&&e.jsx(Q,{type:"outline",size:"base",leftIcon:e.jsx(Dr,{className:"size-4 text-primary-custom-600 dark:text-primary-custom-600"}),fullWidth:!0,children:m.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:p,ariaLabel:m.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:p,fullWidth:!0,children:m.collapseButton})]})]})]})]})});fr.displayName="NavigationRailTypes";const po=({className:t="size-4"})=>e.jsx(Sn,{className:t,"aria-hidden":"true"}),It=b.forwardRef(({state:t="collapsed",items:r=[],onStateChange:s,onItemClick:n,onItemHover:o,labels:a={},className:i,showSearchButton:l=!0},c)=>{const[u,d]=b.useState(!1),[f,m]=b.useState("hover"),[p,g]=b.useState(null),h=b.useRef(null),x={searchPlaceholder:a.searchPlaceholder??"Buscar módulo",collapseButton:a.collapseButton??"Colapsar",recentSection:a.recentSection??"Recientes",frequentSection:a.frequentSection??"Opciones frecuentes"},v=t==="collapsed"||t==="hover"||t==="searcher";b.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const w=y=>{s?.(y?"collapsed":"expanded")},j=y=>{const B=r[y];B&&n?.(B)},C=y=>{const B=r[y];B&&v&&k(B)},k=y=>{v&&y.isCollapsible&&y.children&&(h.current&&(clearTimeout(h.current),h.current=null),g(y),m("hover"),d(!0),o?.(y))},N=()=>{v&&f==="hover"&&(h.current=setTimeout(()=>{d(!1),g(null)},150))},A=()=>{h.current&&(clearTimeout(h.current),h.current=null)},I=()=>{v&&f==="hover"&&(d(!1),g(null))},S=r.map(y=>({id:y.id,label:y.label,icon:y.icon,active:y.active,disabled:y.disabled,badge:y.badge,badgeCount:y.badgeCount,children:y.children,defaultOpen:y.defaultOpen,onClick:()=>{y.onClick?.()},onMouseLeave:()=>N()}));return e.jsxs("div",{ref:c,className:`relative flex items-start h-full ${i||""}`,"data-testid":"navigation-rail-group",children:[e.jsx(fr,{collapsed:v,items:S,showRecentButton:!1,showSearchButton:l,onCollapsedChange:w,onItemClick:j,onItemHover:C,labels:{searchButton:x.searchPlaceholder,searchPlaceholder:x.searchPlaceholder,collapseButton:x.collapseButton}}),u&&v&&e.jsx("div",{className:"absolute left-[80px] top-0 z-10 h-full",onMouseEnter:A,onMouseLeave:I,children:e.jsx(Cn,{height:"100%",width:248,showHeading:f==="hover"&&p!==null,heading:f==="hover"&&p?{label:p.label,iconName:"cog-6-tooth",showDescription:!1,showAction:!1}:void 0,showSearch:f==="searcher",search:{placeholder:x.searchPlaceholder},sections:f==="hover"&&p?.children?[{items:p.children.map(y=>({label:y.label,icon:y.icon,onClick:y.onClick,disabled:y.disabled}))}]:f==="searcher"?[{heading:x.recentSection,items:[{label:"Configuración",icon:e.jsx(po,{className:"size-4"})}]},{heading:x.frequentSection,items:[{label:"Item"}]}]:[]})})]})});It.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
|
|
@@ -764,12 +764,12 @@
|
|
|
764
764
|
dark:border-dark-border-primary
|
|
765
765
|
transition-colors
|
|
766
766
|
duration-150
|
|
767
|
-
`,
|
|
767
|
+
`,r?`
|
|
768
768
|
cursor-pointer
|
|
769
769
|
hover:bg-background-secondary
|
|
770
770
|
dark:hover:bg-dark-bg-primary/50
|
|
771
771
|
select-none
|
|
772
|
-
`:"",{left:"justify-start",center:"justify-center",right:"justify-end"}[t.align||"left"]].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:c,onClick:
|
|
772
|
+
`:"",{left:"justify-start",center:"justify-center",right:"justify-end"}[t.align||"left"]].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:c,onClick:r?o:void 0,role:r?"button":void 0,tabIndex:r?0:void 0,onKeyDown:r?u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),o())}:void 0,style:{width:t.width},children:[e.jsx("span",{className:`
|
|
773
773
|
text-sm
|
|
774
774
|
font-bold
|
|
775
775
|
text-content-secondary
|
|
@@ -777,10 +777,10 @@
|
|
|
777
777
|
text-ellipsis
|
|
778
778
|
overflow-hidden
|
|
779
779
|
whitespace-nowrap
|
|
780
|
-
`,children:t.header}),
|
|
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"})]})]})},Pr=({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
|
-
|
|
783
|
-
${a[
|
|
782
|
+
items-center
|
|
783
|
+
${a[r]}
|
|
784
784
|
px-6
|
|
785
785
|
py-4
|
|
786
786
|
min-h-[56px]
|
|
@@ -795,7 +795,7 @@
|
|
|
795
795
|
text-ellipsis
|
|
796
796
|
overflow-hidden
|
|
797
797
|
w-full
|
|
798
|
-
`,children:t})})},ko=({currentPage:t,totalPages:
|
|
798
|
+
`,children:t})})},ko=({currentPage:t,totalPages:r,onPageChange:s,previousLabel:n="Anterior",nextLabel:o="Siguiente"})=>{const i=(()=>{const l=[];if(r<=7)for(let u=1;u<=r;u++)l.push(u);else l.push(1),t<=3?l.push(2,3):t>=r-2?(l.push("..."),l.push(r-2,r-1)):(l.push("..."),l.push(t),l.push("...")),r>1&&l.push(r);return l})();return e.jsxs("div",{className:"flex items-center justify-between w-full h-9",children:[e.jsxs("button",{onClick:()=>t>1&&s(t-1),disabled:t===1,className:`
|
|
799
799
|
flex
|
|
800
800
|
items-center
|
|
801
801
|
gap-3
|
|
@@ -812,7 +812,7 @@
|
|
|
812
812
|
disabled:cursor-not-allowed
|
|
813
813
|
transition-colors
|
|
814
814
|
duration-150
|
|
815
|
-
`,children:[e.jsx(go,{}),e.jsx("span",{children:
|
|
815
|
+
`,children:[e.jsx(go,{}),e.jsx("span",{children:n})]}),e.jsx("div",{className:"flex items-center gap-0",children:i.map((l,c)=>{if(l==="...")return e.jsx("div",{className:`
|
|
816
816
|
flex
|
|
817
817
|
items-center
|
|
818
818
|
justify-center
|
|
@@ -836,7 +836,7 @@
|
|
|
836
836
|
transition-colors
|
|
837
837
|
duration-150
|
|
838
838
|
${u?"bg-blue-100 dark:bg-blue-900/30":"hover:bg-blue-50 dark:hover:bg-blue-900/20"}
|
|
839
|
-
`,children:l},l)})}),e.jsxs("button",{onClick:()=>t<
|
|
839
|
+
`,children:l},l)})}),e.jsxs("button",{onClick:()=>t<r&&s(t+1),disabled:t===r,className:`
|
|
840
840
|
flex
|
|
841
841
|
items-center
|
|
842
842
|
gap-3
|
|
@@ -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:
|
|
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:g="",id:h})=>{const[x,v]=b.useState(null),[w,j]=b.useState(null),C=l!==void 0?l:x,k=c!==void 0?c:w,N=_=>{let E="asc";C===_&&(k==="asc"?E="desc":k==="desc"&&(E=null)),i?i(_,E):(v(E?_:null),j(E))},A=(_,E)=>typeof E=="function"?E(_):_[E],D=[`
|
|
857
857
|
flex
|
|
858
858
|
flex-col
|
|
859
859
|
gap-4
|
|
@@ -862,7 +862,7 @@
|
|
|
862
862
|
rounded-xl
|
|
863
863
|
transition-all
|
|
864
864
|
duration-150
|
|
865
|
-
`,o?"border border-border-primary dark:border-dark-border-primary":"",a?"shadow-base":"","p-8",u||
|
|
865
|
+
`,o?"border border-border-primary dark:border-dark-border-primary":"",a?"shadow-base":"","p-8",u||n==="fullWidth"?"w-full":"",g].join(" ").replace(/\s+/g," ").trim(),H=n==="grid"?`
|
|
866
866
|
border
|
|
867
867
|
border-border-primary
|
|
868
868
|
dark:border-dark-border-primary
|
|
@@ -876,22 +876,23 @@
|
|
|
876
876
|
text-ellipsis
|
|
877
877
|
overflow-hidden
|
|
878
878
|
whitespace-nowrap
|
|
879
|
-
`,children:t})}),e.
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
879
|
+
`,children:t})}),e.jsxs("div",{className:`grid w-full overflow-x-auto ${H}`,style:{gridTemplateColumns:r.map(_=>_.width||"1fr").join(" ")},children:[r.map((_,E)=>{const z=typeof _.accessor=="function"?`column_${E}`:String(_.accessor);return e.jsx(vo,{column:_,sortable:_.sortable||!1,sorted:C===z,sortDirection:C===z?k:null,onSort:()=>N(z)},`header-${z}`)}),f&&e.jsx(e.Fragment,{children:Array.from({length:m}).map((_,E)=>r.map((z,R)=>{const q=typeof z.accessor=="function"?`column_${R}`:String(z.accessor);return e.jsx(Pr,{align:z.align,isStriped:n==="striped",rowIndex:E,children:e.jsx("div",{className:`
|
|
880
|
+
h-4
|
|
881
|
+
w-full
|
|
882
|
+
bg-background-secondary
|
|
883
|
+
dark:bg-dark-border-primary
|
|
884
|
+
rounded
|
|
885
|
+
animate-pulse
|
|
886
|
+
`})},`loading-${E}-${q}`)}))}),!f&&s.length>0&&e.jsx(e.Fragment,{children:s.map((_,E)=>r.map((z,R)=>{const q=typeof z.accessor=="function"?`column_${R}`:String(z.accessor),F=A(_,z.accessor),ie=z.render?z.render(F,_,E):F;return e.jsx(Pr,{align:z.align,isStriped:n==="striped",rowIndex:E,children:ie},`cell-${E}-${q}`)}))}),!f&&s.length===0&&e.jsx("div",{className:`
|
|
887
|
+
flex
|
|
888
|
+
items-center
|
|
889
|
+
justify-center
|
|
890
|
+
px-6
|
|
891
|
+
py-12
|
|
892
|
+
text-sm
|
|
893
|
+
text-content-secondary
|
|
894
|
+
dark:text-content-secondary
|
|
895
|
+
`,style:{gridColumn:`1 / ${r.length+1}`},children:d})]}),p&&e.jsx(ko,{currentPage:p.currentPage,totalPages:p.totalPages,onPageChange:p.onPageChange,previousLabel:p.previousLabel,nextLabel:p.nextLabel})]})},yo=({label:t,active:r=!1,icon:s,badge:n,disabled:o=!1,onClick:a,className:i="",ariaLabel:l})=>{const c=`
|
|
895
896
|
relative
|
|
896
897
|
flex
|
|
897
898
|
flex-col
|
|
@@ -921,7 +922,7 @@
|
|
|
921
922
|
dark:group-hover:bg-white/5
|
|
922
923
|
dark:group-focus-visible:bg-white/5
|
|
923
924
|
dark:group-focus-visible:shadow-2xl
|
|
924
|
-
`,p=
|
|
925
|
+
`,p=r?`
|
|
925
926
|
text-primary-custom-600
|
|
926
927
|
dark:text-primary-custom-600
|
|
927
928
|
`:`
|
|
@@ -931,13 +932,13 @@
|
|
|
931
932
|
w-3
|
|
932
933
|
h-3
|
|
933
934
|
shrink-0
|
|
934
|
-
`,h=
|
|
935
|
+
`,h=r?`
|
|
935
936
|
bg-primary-custom-600
|
|
936
937
|
dark:bg-primary-custom-600
|
|
937
938
|
`:`
|
|
938
939
|
bg-content-primary
|
|
939
940
|
dark:bg-dark-content-primary
|
|
940
|
-
`,x=
|
|
941
|
+
`,x=r?`
|
|
941
942
|
absolute
|
|
942
943
|
-bottom-2.5
|
|
943
944
|
left-0
|
|
@@ -947,13 +948,13 @@
|
|
|
947
948
|
bg-primary-custom-600
|
|
948
949
|
dark:bg-primary-custom-600
|
|
949
950
|
z-10
|
|
950
|
-
`:"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":
|
|
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:`${g} ${p}`.trim(),children:s}),e.jsx("span",{className:`
|
|
951
952
|
text-sm
|
|
952
953
|
font-bold
|
|
953
954
|
leading-5
|
|
954
955
|
whitespace-nowrap
|
|
955
956
|
${p}
|
|
956
|
-
`.replace(/\s+/g," ").trim(),children:t}),
|
|
957
|
+
`.replace(/\s+/g," ").trim(),children:t}),n!==void 0&&n>0&&e.jsx("span",{className:`
|
|
957
958
|
flex
|
|
958
959
|
items-center
|
|
959
960
|
justify-center
|
|
@@ -967,14 +968,14 @@
|
|
|
967
968
|
text-primary-inverse-content
|
|
968
969
|
dark:text-dark-bg-primary
|
|
969
970
|
${h}
|
|
970
|
-
`.replace(/\s+/g," ").trim(),"aria-label":`${
|
|
971
|
+
`.replace(/\s+/g," ").trim(),"aria-label":`${n} notificaciones`,children:n>99?"99+":n})]}),e.jsx("div",{className:x})]})},wo=({items:t,activeId:r,defaultActiveId:s,onChange:n,className:o="",fullWidth:a=!1,size:i="base",showBorder:l=!0})=>{const[c,u]=b.useState(s||(t.length>0?t[0].id:"")),d=r!==void 0,f=d?r:c,m=v=>{d||u(v),n?.(v)},g=`
|
|
971
972
|
flex
|
|
972
973
|
items-end
|
|
973
974
|
pb-2.5
|
|
974
975
|
${{sm:"gap-0",base:"gap-1",lg:"gap-2"}[i]}
|
|
975
976
|
${a?"w-full":""}
|
|
976
977
|
${l?"border-b border-border-primary dark:border-dark-border-primary":""}
|
|
977
|
-
`,h=a?"flex-1":"",x=[g,o].join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{role:"tablist","aria-label":"Pestañas de navegación",className:x,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"})}),Vr=()=>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"})}),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:"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:
|
|
978
|
+
`,h=a?"flex-1":"",x=[g,o].join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{role:"tablist","aria-label":"Pestañas de navegación",className:x,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"})}),Vr=()=>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"})}),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:"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:g=!0,showSiesaLogoTrailing:h=!1,onNavigationClick:x,onSearchClick:v,onCartClick:w,onNotificationsClick:j})=>{const C=`
|
|
978
979
|
box-border
|
|
979
980
|
flex
|
|
980
981
|
flex-col
|
|
@@ -998,7 +999,7 @@
|
|
|
998
999
|
dark:focus:ring-offset-dark-bg-primary
|
|
999
1000
|
transition-all
|
|
1000
1001
|
duration-150
|
|
1001
|
-
`,k=l==="mobile",N=l==="desktop",A=l==="tablet",
|
|
1002
|
+
`,k=l==="mobile",N=l==="desktop",A=l==="tablet",I=l==="responsive",S=()=>{if(k||!u)return null;const L={type:"default",size:"base",iconOnly:!0,leftIcon:e.jsx(Co,{}),ariaLabel:"Volver",onClick:x,...d};return N||A?e.jsx(Q,{...L}):e.jsx("div",{className:"hidden md:block",children:e.jsx(Q,{...L})})},y=()=>{if(k||!p)return null;const L=e.jsx("img",{src:"/,Business Logo.png",alt:"Business Logo",className:"w-full h-full object-contain"});return N?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[168px] h-[30px]",children:L}):A?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[140px] h-[25px]",children:L}):e.jsx("div",{className:"hidden md:block overflow-hidden relative shrink-0 w-[140px] lg:w-[168px] h-[25px] lg:h-[30px]",children:L})},B=()=>{const L=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 k?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[30px] h-[30px]",children:G}):g?N?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:L}):A?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:L}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden overflow-hidden relative shrink-0 w-[30px] h-[30px]",children:G}),g&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block lg:hidden overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:L}),e.jsx("div",{className:"hidden lg:block overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:L})]})]}):null},T=()=>{if(!h||k)return null;const L=e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-full h-full object-contain"});return N?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:L}):A?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:L}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block lg:hidden overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:L}),e.jsx("div",{className:"hidden lg:block overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:L})]})},D=({responsive:L=!0})=>{const G=e.jsx("div",{className:"grow shrink-0 w-px min-h-px bg-border-primary dark:bg-dark-border-primary"});return k?null:N||A?e.jsx("div",{className:"flex flex-col gap-2 h-8 items-start px-0 py-1 relative shrink-0",children:G}):L?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(k||!r)return null;const L=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 N||A?L: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?k?e.jsx(Oe,{color:"yellow",leftIcon:e.jsx(xt,{}),label:"Pruebas"}):N||A?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,E=()=>c?null:k?e.jsx("button",{className:C,"aria-label":"Buscar",onClick:v,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(Vr,{})})}):I?e.jsx("button",{className:`md:hidden ${C}`,"aria-label":"Buscar",onClick:v,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(Vr,{})})}):null,z=()=>c?null:e.jsxs("div",{className:"relative",children:[e.jsx("button",{className:C,"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:C,"aria-label":"Notificaciones",onClick:j,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 L=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(k)return e.jsx(Je,{items:L,renderTrigger:se=>e.jsx("button",{className:`
|
|
1002
1003
|
box-border
|
|
1003
1004
|
flex
|
|
1004
1005
|
items-center
|
|
@@ -1019,7 +1020,7 @@
|
|
|
1019
1020
|
transition-all
|
|
1020
1021
|
duration-150
|
|
1021
1022
|
${se?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1022
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:e.jsx("div",{className:"relative rounded-full shrink-0 w-8 h-8",children:e.jsx("img",{alt:
|
|
1023
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:e.jsx("div",{className:"relative rounded-full shrink-0 w-8 h-8",children:e.jsx("img",{alt:n.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-full w-full h-full",src:n.avatar})})})});const G=()=>e.jsx(Je,{items:L,renderTrigger:se=>e.jsx("button",{className:`
|
|
1023
1024
|
box-border
|
|
1024
1025
|
flex
|
|
1025
1026
|
items-center
|
|
@@ -1040,7 +1041,7 @@
|
|
|
1040
1041
|
transition-all
|
|
1041
1042
|
duration-150
|
|
1042
1043
|
${se?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1043
|
-
`.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:
|
|
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(Fr,{})})]})})});return N||A?G():e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden",children:e.jsx(Je,{items:L,renderTrigger:se=>e.jsx("button",{className:`
|
|
1044
1045
|
box-border
|
|
1045
1046
|
flex
|
|
1046
1047
|
items-center
|
|
@@ -1061,7 +1062,7 @@
|
|
|
1061
1062
|
transition-all
|
|
1062
1063
|
duration-150
|
|
1063
1064
|
${se?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1064
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:e.jsx("div",{className:"relative rounded-full shrink-0 w-8 h-8",children:e.jsx("img",{alt:
|
|
1065
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:e.jsx("div",{className:"relative rounded-full shrink-0 w-8 h-8",children:e.jsx("img",{alt:n.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-full w-full h-full",src:n.avatar})})})})}),e.jsx("div",{className:"hidden md:flex",children:e.jsx(Je,{items:L,renderTrigger:se=>e.jsx("button",{className:`
|
|
1065
1066
|
box-border
|
|
1066
1067
|
flex
|
|
1067
1068
|
items-center
|
|
@@ -1082,7 +1083,7 @@
|
|
|
1082
1083
|
transition-all
|
|
1083
1084
|
duration-150
|
|
1084
1085
|
${se?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1085
|
-
`.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:
|
|
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(Fr,{})})]})})})})]})},Z=[`
|
|
1086
1087
|
box-border
|
|
1087
1088
|
flex
|
|
1088
1089
|
gap-8
|
|
@@ -1093,7 +1094,7 @@
|
|
|
1093
1094
|
w-full
|
|
1094
1095
|
bg-background-primary
|
|
1095
1096
|
dark:bg-dark-bg-primary
|
|
1096
|
-
`,{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:
|
|
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:[!k&&(f||u&&e.jsx(S,{})),t||e.jsx(y,{}),p&&g&&!k&&e.jsx(D,{}),m||e.jsx(B,{}),r&&g&&!k&&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(E,{}),e.jsx(z,{}),e.jsx(R,{}),n&&!c&&e.jsx(D,{}),e.jsx(q,{}),h&&n&&!k&&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=`
|
|
1097
1098
|
flex-1
|
|
1098
1099
|
flex
|
|
1099
1100
|
flex-col
|
|
@@ -1156,19 +1157,19 @@
|
|
|
1156
1157
|
gap-2
|
|
1157
1158
|
min-h-0
|
|
1158
1159
|
min-w-0
|
|
1159
|
-
`.replace(/\s+/g," ").trim();return e.jsx("nav",{className:`${l} ${
|
|
1160
|
+
`.replace(/\s+/g," ").trim();return e.jsx("nav",{className:`${l} ${n}`.trim(),role:"navigation","aria-label":o,children:e.jsx("div",{className:c,children:e.jsx("div",{className:u,children:t.map(d=>i(d))})})})},Ro=({lightColor:t,darkColor:r,className:s=""})=>e.jsxs("svg",{className:`w-4 h-4 shrink-0 ${s}`.trim(),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"8",fill:t,className:"dark:hidden"}),e.jsx("circle",{cx:"8",cy:"8",r:"8",fill:r,className:"hidden dark:block"})]}),et=({status:t="available",className:r=""})=>{const n={available:{lightColor:"#0e79fd",darkColor:"#93d1fd",label:"Disponible"},occupied:{lightColor:"#af460e",darkColor:"#f5a927",label:"Ocupada"},reserved:{lightColor:"#7e22ce",darkColor:"#c084fc",label:"Reservada"},outOfService:{lightColor:"#3f3f46",darkColor:"#a1a1aa",label:"Fuera de Servicio"}}[t],a=[`
|
|
1160
1161
|
inline-flex
|
|
1161
1162
|
items-center
|
|
1162
1163
|
gap-1
|
|
1163
1164
|
shrink-0
|
|
1164
|
-
`,
|
|
1165
|
+
`,r].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:a,role:"presentation","aria-label":`Estado: ${n.label}`,children:[e.jsx(Ro,{lightColor:n.lightColor,darkColor:n.darkColor}),e.jsx("span",{className:`
|
|
1165
1166
|
text-xs
|
|
1166
1167
|
leading-4
|
|
1167
1168
|
font-normal
|
|
1168
1169
|
text-content-primary
|
|
1169
1170
|
dark:text-dark-content-primary
|
|
1170
1171
|
whitespace-nowrap
|
|
1171
|
-
`.replace(/\s+/g," ").trim(),children:
|
|
1172
|
+
`.replace(/\s+/g," ").trim(),children:n.label})]})},Eo=({className:t=""})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Io=({className:t=""})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ao=({className:t=""})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M10.5 5H1.5M8.5 1V3M3.5 1V3M3.25 11H8.75C9.57843 11 10.25 10.3284 10.25 9.5V3.5C10.25 2.67157 9.57843 2 8.75 2H3.25C2.42157 2 1.75 2.67157 1.75 3.5V9.5C1.75 10.3284 2.42157 11 3.25 11Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Mo=({className:t=""})=>e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[e.jsx("path",{d:"M10.5 6C10.5 8.48528 8.48528 10.5 6 10.5C3.51472 10.5 1.5 8.48528 1.5 6C1.5 3.51472 3.51472 1.5 6 1.5C8.48528 1.5 10.5 3.51472 10.5 6Z",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M9.18198 2.81802L2.81802 9.18198",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Lo=({className:t=""})=>e.jsx("svg",{width:"13",height:"10",viewBox:"0 0 13 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M9.25 9V8C9.25 6.89543 8.35457 6 7.25 6H2.75C1.64543 6 0.75 6.89543 0.75 8V9M12.25 9V8C12.25 6.89543 11.3546 6 10.25 6H9.75M7 2.5C7 3.60457 6.10457 4.5 5 4.5C3.89543 4.5 3 3.60457 3 2.5C3 1.39543 3.89543 0.5 5 0.5C6.10457 0.5 7 1.39543 7 2.5ZM10 2C10 2.82843 9.32843 3.5 8.5 3.5C7.67157 3.5 7 2.82843 7 2C7 1.17157 7.67157 0.5 8.5 0.5C9.32843 0.5 10 1.17157 10 2Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})}),En=({locationName:t,status:r="available",state:s="enabled",capacity:n,onClick:o,disabled:a=!1,className:i="",ariaLabel:l,fullWidth:c=!0})=>{const d={available:{textColor:"text-primary-custom-600 dark:text-primary-custom-600",badgeBg:"bg-primary-custom-100 dark:bg-blue-900/30",badgeText:"text-primary-custom-600 dark:text-blue-400",activedBg:"bg-primary-custom-100 dark:bg-blue-900/30",icon:Eo,badgeLabel:"Disponible"},occupied:{textColor:"text-[#af460e] dark:text-orange-400",badgeBg:"bg-[#fcedc9] dark:bg-yellow-900/30",badgeText:"text-[#af460e] dark:text-orange-400",activedBg:"bg-[#fcedc9] dark:bg-yellow-900/30",icon:Io,badgeLabel:"Ocupada"},reserved:{textColor:"text-[#7e22ce] dark:text-fuchsia-400",badgeBg:"bg-[#f3e8ff] dark:bg-purple-900/30",badgeText:"text-[#7e22ce] dark:text-purple-400",activedBg:"bg-[#f3e8ff] dark:bg-purple-900/30",icon:Ao,badgeLabel:"Reservada"},outOfService:{textColor:"text-[#3f3f46] dark:text-zinc-400",badgeBg:"bg-[#f4f4f5] dark:bg-zinc-800/30",badgeText:"text-content-tertiary dark:text-zinc-400",activedBg:"bg-[#f4f4f5] dark:bg-zinc-800/30",icon:Mo,badgeLabel:"F. de Servicio"}}[r],f=d.icon,m=s==="actived"?d.activedBg:"bg-white dark:bg-dark-bg-primary",h=[`
|
|
1172
1173
|
flex
|
|
1173
1174
|
flex-col
|
|
1174
1175
|
items-stretch
|
|
@@ -1191,7 +1192,7 @@
|
|
|
1191
1192
|
disabled:opacity-50
|
|
1192
1193
|
disabled:cursor-not-allowed
|
|
1193
1194
|
disabled:pointer-events-none
|
|
1194
|
-
`,m,i].join(" ").replace(/\s+/g," ").trim(),x=
|
|
1195
|
+
`,m,i].join(" ").replace(/\s+/g," ").trim(),x=n?`${n.current}/${n.total} mesas`:null;return e.jsxs("button",{className:h,onClick:o,disabled:a,"aria-label":l||`${t} - ${d.badgeLabel}`,type:"button",children:[e.jsx("div",{className:`
|
|
1195
1196
|
text-base
|
|
1196
1197
|
font-bold
|
|
1197
1198
|
leading-6
|
|
@@ -1212,7 +1213,7 @@
|
|
|
1212
1213
|
text-xs
|
|
1213
1214
|
leading-4
|
|
1214
1215
|
${d.badgeText}
|
|
1215
|
-
`.replace(/\s+/g," ").trim(),children:d.badgeLabel})]})]})]})},In=({size:t="l",border:
|
|
1216
|
+
`.replace(/\s+/g," ").trim(),children:d.badgeLabel})]})]})]})},In=({size:t="l",border:r=!1,children:s,disabled:n=!1,className:o="",onClick:a,ariaLabel:i,htmlType:l="button",...c})=>{const u={s:"w-10 h-10",m:"w-[65px] h-[65px]",l:"w-20 h-20"},d={s:"text-2xl",m:"text-5xl",l:"text-5xl"},g=[`
|
|
1216
1217
|
inline-flex
|
|
1217
1218
|
items-center
|
|
1218
1219
|
justify-center
|
|
@@ -1232,7 +1233,7 @@
|
|
|
1232
1233
|
disabled:pointer-events-none
|
|
1233
1234
|
transition-all
|
|
1234
1235
|
duration-150
|
|
1235
|
-
`,u[t],d[t],
|
|
1236
|
+
`,u[t],d[t],r?`
|
|
1236
1237
|
bg-white
|
|
1237
1238
|
text-content-primary
|
|
1238
1239
|
border
|
|
@@ -1269,7 +1270,7 @@
|
|
|
1269
1270
|
dark:active:bg-dark-bg-inverse
|
|
1270
1271
|
dark:active:text-dark-content-inverse
|
|
1271
1272
|
dark:active:scale-95
|
|
1272
|
-
`,o].join(" ").replace(/\s+/g," ").trim();return e.jsx("button",{type:l,className:g,disabled:
|
|
1273
|
+
`,o].join(" ").replace(/\s+/g," ").trim();return e.jsx("button",{type:l,className:g,disabled:n,onClick:a,"aria-label":i||`Número ${s}`,...c,children:s})},An=({image:t,label:r,active:s=!1,disabled:n=!1,onClick:o,className:a="",ariaLabel:i})=>{const u=[`
|
|
1273
1274
|
flex
|
|
1274
1275
|
flex-col
|
|
1275
1276
|
gap-2
|
|
@@ -1285,7 +1286,7 @@
|
|
|
1285
1286
|
focus:ring-offset-2
|
|
1286
1287
|
dark:focus:ring-dark-border-custom
|
|
1287
1288
|
dark:focus:ring-offset-dark-bg-primary
|
|
1288
|
-
`,
|
|
1289
|
+
`,n?`
|
|
1289
1290
|
bg-white
|
|
1290
1291
|
text-content-primary
|
|
1291
1292
|
opacity-55
|
|
@@ -1313,7 +1314,7 @@
|
|
|
1313
1314
|
dark:text-dark-content-primary
|
|
1314
1315
|
dark:hover:bg-dark-bg-primary/80
|
|
1315
1316
|
dark:active:scale-95
|
|
1316
|
-
`,a].join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:u,disabled:
|
|
1317
|
+
`,a].join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:u,disabled:n,onClick:o,"aria-label":i||r,"aria-pressed":s,children:[e.jsx("div",{className:"aspect-158/80 w-full rounded-lg overflow-hidden",children:e.jsx("img",{src:t,alt:r,className:"w-full h-full object-cover"})}),e.jsx("div",{className:"w-full text-left leading-5",children:r})]})},$o=({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,"aria-hidden":"true",children:e.jsx("path",{d:"M8 3V13M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Mn=({image:t,productName:r,price:s,buttonText:n="Agregar",active:o=!1,disabled:a=!1,onAddClick:i,onCardClick:l,className:c="",ariaLabel:u})=>{const d=`
|
|
1317
1318
|
flex
|
|
1318
1319
|
flex-col
|
|
1319
1320
|
gap-2
|
|
@@ -1350,7 +1351,7 @@
|
|
|
1350
1351
|
`:`
|
|
1351
1352
|
text-content-primary
|
|
1352
1353
|
dark:text-dark-content-primary
|
|
1353
|
-
`,p=[d,f,c].join(" ").replace(/\s+/g," ").trim(),g=x=>{a||x.target.closest("button")||l?.(x)},h=x=>{x.stopPropagation(),!a&&i?.(x)};return e.jsxs("div",{className:p,onClick:g,role:"article","aria-label":u||`${
|
|
1354
|
+
`,p=[d,f,c].join(" ").replace(/\s+/g," ").trim(),g=x=>{a||x.target.closest("button")||l?.(x)},h=x=>{x.stopPropagation(),!a&&i?.(x)};return e.jsxs("div",{className:p,onClick:g,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"})}),mr=({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:g})=>{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"}},x=h[r]||h.lime,v=j=>{!m&&d&&d(j)},w=()=>{!m&&f&&f()};return e.jsxs("div",{className:`
|
|
1354
1355
|
flex
|
|
1355
1356
|
flex-col
|
|
1356
1357
|
gap-2
|
|
@@ -1373,7 +1374,7 @@
|
|
|
1373
1374
|
text-center
|
|
1374
1375
|
whitespace-nowrap
|
|
1375
1376
|
${x.text}
|
|
1376
|
-
`.trim().replace(/\s+/g," "),children:t})}),e.jsx("span",{className:"text-[10px] leading-3 font-normal text-content-primary dark:text-dark-content-primary whitespace-nowrap",children:s})]}),e.jsx("div",{className:"flex items-center shrink-0",children:e.jsx("span",{className:"text-xs leading-4 font-bold text-content-primary dark:text-dark-content-primary whitespace-nowrap text-right",children:
|
|
1377
|
+
`.trim().replace(/\s+/g," "),children:t})}),e.jsx("span",{className:"text-[10px] leading-3 font-normal text-content-primary dark:text-dark-content-primary whitespace-nowrap",children:s})]}),e.jsx("div",{className:"flex items-center shrink-0",children:e.jsx("span",{className:"text-xs leading-4 font-bold text-content-primary dark:text-dark-content-primary whitespace-nowrap text-right",children:n})})]}),e.jsx("div",{className:"flex items-start w-full",children:e.jsx("span",{className:"text-xs leading-4 font-bold text-content-primary dark:text-dark-content-primary flex-1 min-w-0",children:o})})]}),i&&a.length>0&&e.jsx("div",{className:`
|
|
1377
1378
|
flex
|
|
1378
1379
|
flex-col
|
|
1379
1380
|
gap-2
|
|
@@ -1408,15 +1409,15 @@
|
|
|
1408
1409
|
transition-all
|
|
1409
1410
|
duration-150
|
|
1410
1411
|
${m?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
1411
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Eliminar producto",children:g||e.jsx(Oo,{className:"w-[18px] h-[21px]"})})]})]})};mr.displayName="POSProductSidebarItems";const tr=({tableNumber:t,status:
|
|
1412
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Eliminar producto",children:g||e.jsx(Oo,{className:"w-[18px] h-[21px]"})})]})]})};mr.displayName="POSProductSidebarItems";const tr=({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:x})=>e.jsxs("div",{className:"w-[28px] h-[22px]",style:{transform:`rotate(${x}deg)`},"aria-hidden":"true",children:[e.jsx("div",{className:`
|
|
1412
1413
|
absolute
|
|
1413
1414
|
top-0
|
|
1414
1415
|
left-0
|
|
1415
1416
|
right-0
|
|
1416
1417
|
h-[16px]
|
|
1417
1418
|
rounded-t-[4px]
|
|
1418
|
-
${d[
|
|
1419
|
-
${d[
|
|
1419
|
+
${d[r].chair}
|
|
1420
|
+
${d[r].chairDark}
|
|
1420
1421
|
`}),e.jsx("div",{className:`
|
|
1421
1422
|
absolute
|
|
1422
1423
|
bottom-0
|
|
@@ -1424,14 +1425,14 @@
|
|
|
1424
1425
|
right-[7.14%]
|
|
1425
1426
|
h-[14px]
|
|
1426
1427
|
rounded-b-[4px]
|
|
1427
|
-
${d[
|
|
1428
|
-
${d[
|
|
1429
|
-
`})]}),p=()=>{!c&&i&&i()},g=x=>{(x.key==="Enter"||x.key===" ")&&!c&&i&&(x.preventDefault(),i())},h=["w-[160px]","h-[160px]","shrink-0","relative","flex","flex-col","items-center","justify-center","p-0","border-2","box-border","rounded-[8px]",a?d[
|
|
1428
|
+
${d[r].chair}
|
|
1429
|
+
${d[r].chairDark}
|
|
1430
|
+
`})]}),p=()=>{!c&&i&&i()},g=x=>{(x.key==="Enter"||x.key===" ")&&!c&&i&&(x.preventDefault(),i())},h=["w-[160px]","h-[160px]","shrink-0","relative","flex","flex-col","items-center","justify-center","p-0","border-2","box-border","rounded-[8px]",a?d[r].borderActive:d[r].border,a?d[r].borderActiveDark:d[r].borderDark,a?d[r].bgActive:d[r].bgEnabled,a?d[r].bgActiveDark:d[r].bgEnabledDark,"focus:outline-hidden","focus:ring-2",d[r].focusRing,d[r].focusRingDark,"focus:ring-offset-2","dark:focus:ring-offset-dark-bg-primary","transition-all","duration-150",i&&!c?"cursor-pointer":"",i&&!c?"hover:scale-105":"",i&&!c?"active:scale-95":"",c?"opacity-50 cursor-not-allowed":"",l].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{className:h,onClick:p,onKeyDown:g,disabled:c,type:"button","aria-label":`Mesa ${t} - ${r==="available"?"Disponible":r==="busy"?"Ocupada":"Reservada"}`,children:[e.jsxs("div",{className:"flex flex-col gap-[4px] items-center justify-center w-[134px] h-[134px] shrink-0",children:[o&&(n===2||n===4||n===6||n===8)&&e.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[n>=6&&e.jsxs(e.Fragment,{children:[e.jsx(m,{rotation:0}),e.jsx(m,{rotation:0})]}),n===2&&e.jsx(m,{rotation:0}),n===4&&e.jsx(m,{rotation:0})]}),e.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[o&&(n===4||n===6||n===8)&&e.jsxs("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:[n>=8&&e.jsxs(e.Fragment,{children:[e.jsx(m,{rotation:270}),e.jsx(m,{rotation:270})]}),(n===4||n===6)&&e.jsx(m,{rotation:270})]}),e.jsx("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:e.jsx("div",{className:"flex items-center shrink-0",children:e.jsx("div",{className:`
|
|
1430
1431
|
${f[s].table}
|
|
1431
|
-
${d[
|
|
1432
|
-
${d[
|
|
1432
|
+
${d[r].table}
|
|
1433
|
+
${d[r].tableDark}
|
|
1433
1434
|
shrink-0
|
|
1434
|
-
`})})}),o&&(
|
|
1435
|
+
`})})}),o&&(n===4||n===6||n===8)&&e.jsxs("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:[n>=8&&e.jsxs(e.Fragment,{children:[e.jsx(m,{rotation:90}),e.jsx(m,{rotation:90})]}),(n===4||n===6)&&e.jsx(m,{rotation:90})]})]}),o&&(n===2||n===4||n===6||n===8)&&e.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[n>=6&&e.jsxs(e.Fragment,{children:[e.jsx(m,{rotation:180}),e.jsx(m,{rotation:180})]}),n===2&&e.jsx(m,{rotation:180}),n===4&&e.jsx(m,{rotation:180})]})]}),e.jsxs("div",{className:`
|
|
1435
1436
|
flex
|
|
1436
1437
|
flex-col
|
|
1437
1438
|
justify-center
|
|
@@ -1445,20 +1446,20 @@
|
|
|
1445
1446
|
shrink-0
|
|
1446
1447
|
text-[10px]
|
|
1447
1448
|
font-normal
|
|
1448
|
-
${d[
|
|
1449
|
-
${d[
|
|
1450
|
-
`,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:n,onSignUp:s,isLoading:r=!1,errorMessage:o,className:a="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=b.useState(""),[d,f]=b.useState(""),[m,p]=b.useState(!1),[g,h]=b.useState(""),x=j=>{if(j.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){h("Por favor ingresa un email válido");return}h(""),t?.(c,d)},v=j=>{u(j.target.value),g&&h("")},w=()=>{p(!m)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",a].join(" "),children:[i&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Iniciar Sesión"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Inicia sesión ingresando con tu correo electrónico y contraseña."})]}),o&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:o}),e.jsxs("form",{onSubmit:x,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Bo,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:c,onChange:v,disabled:r,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",g?"border-error-border!":""].filter(Boolean).join(" ")})]}),g&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:g})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("button",{type:"button",onClick:n,className:"text-[12px] leading-4 font-bold text-primary-custom-600 dark:text-[#93d1fd] hover:underline transition-all duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm px-1",children:"Olvidé mi Contraseña"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(To,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:m?"text":"password",placeholder:"••••••••",value:d,onChange:j=>f(j.target.value),disabled:r,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:r||!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:r?"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:n,onTermsClick:s,onPrivacyClick:r,isLoading:o=!1,errorMessage:a,className:i="",showBackground:l=!0,variant:c="responsive"})=>{const[u,d]=b.useState(""),[f,m]=b.useState(""),[p,g]=b.useState(""),[h,x]=b.useState(!1),[v,w]=b.useState(""),j=N=>{if(N.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)){w("Por favor ingresa un email válido");return}w(""),t?.(u,f,p)},C=N=>{m(N.target.value),v&&w("")},k=()=>{x(!h)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",i].join(" "),children:[l&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...c==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:c==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Crear Cuenta"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Ingresa todos los datos para crear tu cuenta."})]}),a&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:a}),e.jsxs("form",{onSubmit:j,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"name-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Nombre ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(_o,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"name-input",type:"text",placeholder:"Juan Pérez",value:u,onChange:N=>d(N.target.value),disabled:o,required:!0,autoComplete:"name",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Po,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:f,onChange:C,disabled:o,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",v?"border-error-border!":""].filter(Boolean).join(" ")})]}),v&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:v})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Vo,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:h?"text":"password",placeholder:"••••••••",value:p,onChange:N=>g(N.target.value),disabled:o,required:!0,autoComplete:"new-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:k,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":h?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(Fo,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:o||!u||!f||!p,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:o?"Registrando...":"Registrarse"})]}),e.jsx("button",{type:"button",onClick:n,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:r,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,(n,s,r)=>r?r.toUpperCase():s.toLowerCase()),Zr=t=>{const n=Wo(t);return n.charAt(0).toUpperCase()+n.slice(1)},Ln=(...t)=>t.filter((n,s,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===s).join(" ").trim(),Uo=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var Go={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const qo=b.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...l},c)=>b.createElement("svg",{ref:c,...Go,width:n,height:n,stroke:t,strokeWidth:r?Number(s)*24/Number(n):s,className:Ln("lucide",o),...!a&&!Uo(l)&&{"aria-hidden":"true"},...l},[...i.map(([u,d])=>b.createElement(u,d)),...Array.isArray(a)?a:[a]]));const At=(t,n)=>{const s=b.forwardRef(({className:r,...o},a)=>b.createElement(qo,{ref:a,iconNode:n,className:Ln(`lucide-${Ho(Zr(t))}`,`lucide-${t}`,r),...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 n,s,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(s=On(t[n]))&&(r&&(r+=" "),r+=s)}else for(s in t)t[s]&&(r&&(r+=" "),r+=s);return r}function ta(){for(var t,n,s=0,r="",o=arguments.length;s<o;s++)(t=arguments[s])&&(n=On(t))&&(r&&(r+=" "),r+=n);return r}const ra=(t,n)=>{const s=new Array(t.length+n.length);for(let r=0;r<t.length;r++)s[r]=t[r];for(let r=0;r<n.length;r++)s[t.length+r]=n[r];return s},na=(t,n)=>({classGroupId:t,validator:n}),Bn=(t=new Map,n=null,s)=>({nextPart:t,validators:n,classGroupId:s}),Nt="-",Wr=[],sa="arbitrary..",oa=t=>{const n=ia(t),{conflictingClassGroups:s,conflictingClassGroupModifiers:r}=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,n)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=r[i],u=s[i];return c?u?ra(u,c):c:u||Wr}return s[i]||Wr}}},Tn=(t,n,s)=>{if(t.length-n===0)return s.classGroupId;const o=t[n],a=s.nextPart.get(o);if(a){const u=Tn(t,n+1,a);if(u)return u}const i=s.validators;if(i===null)return;const l=n===0?t.join(Nt):t.slice(n).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 n=t.slice(1,-1),s=n.indexOf(":"),r=n.slice(0,s);return r?sa+r:void 0})(),ia=t=>{const{theme:n,classGroups:s}=t;return la(s,n)},la=(t,n)=>{const s=Bn();for(const r in t){const o=t[r];pr(o,s,r,n)}return s},pr=(t,n,s,r)=>{const o=t.length;for(let a=0;a<o;a++){const i=t[a];ca(i,n,s,r)}},ca=(t,n,s,r)=>{if(typeof t=="string"){da(t,n,s);return}if(typeof t=="function"){ua(t,n,s,r);return}fa(t,n,s,r)},da=(t,n,s)=>{const r=t===""?n:zn(n,t);r.classGroupId=s},ua=(t,n,s,r)=>{if(ma(t)){pr(t(r),n,s,r);return}n.validators===null&&(n.validators=[]),n.validators.push(na(s,t))},fa=(t,n,s,r)=>{const o=Object.entries(t),a=o.length;for(let i=0;i<a;i++){const[l,c]=o[i];pr(c,zn(n,l),s,r)}},zn=(t,n)=>{let s=t;const r=n.split(Nt),o=r.length;for(let a=0;a<o;a++){const i=r[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 n=0,s=Object.create(null),r=Object.create(null);const o=(a,i)=>{s[a]=i,n++,n>t&&(n=0,r=s,s=Object.create(null))};return{get(a){let i=s[a];if(i!==void 0)return i;if((i=r[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,n,s,r,o)=>({modifiers:t,hasImportantModifier:n,baseClassName:s,maybePostfixModifierPosition:r,isExternal:o}),xa=t=>{const{prefix:n,experimentalParseClassName:s}=t;let r=o=>{const a=[];let i=0,l=0,c=0,u;const d=o.length;for(let h=0;h<d;h++){const x=o[h];if(i===0&&l===0){if(x===Ur){a.push(o.slice(c,h)),c=h+1;continue}if(x==="/"){u=h;continue}}x==="["?i++:x==="]"?i--:x==="("?l++:x===")"&&l--}const f=a.length===0?o:o.slice(c);let m=f,p=!1;f.endsWith(rr)?(m=f.slice(0,-1),p=!0):f.startsWith(rr)&&(m=f.slice(1),p=!0);const g=u&&u>c?u-c:void 0;return Gr(a,p,m,g)};if(n){const o=n+Ur,a=r;r=i=>i.startsWith(o)?a(i.slice(o.length)):Gr(ha,!1,i,void 0,!0)}if(s){const o=r;r=a=>s({className:a,parseClassName:o})}return r},ga=t=>{const n=new Map;return t.orderSensitiveModifiers.forEach((s,r)=>{n.set(s,1e6+r)}),s=>{const r=[];let o=[];for(let a=0;a<s.length;a++){const i=s[a],l=i[0]==="[",c=n.has(i);l||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},ba=t=>({cache:pa(t.cacheSize),parseClassName:xa(t),sortModifiers:ga(t),...oa(t)}),va=/\s+/,ka=(t,n)=>{const{parseClassName:s,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=n,i=[],l=t.trim().split(va);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:m,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:h}=s(d);if(f){c=d+(c.length>0?" "+c:c);continue}let x=!!h,v=r(x?g.substring(0,h):g);if(!v){if(!x){c=d+(c.length>0?" "+c:c);continue}if(v=r(g),!v){c=d+(c.length>0?" "+c:c);continue}x=!1}const w=m.length===0?"":m.length===1?m[0]:a(m).join(":"),j=p?w+rr:w,C=j+v;if(i.indexOf(C)>-1)continue;i.push(C);const k=o(v,x);for(let N=0;N<k.length;++N){const A=k[N];i.push(j+A)}c=d+(c.length>0?" "+c:c)}return c},ya=(...t)=>{let n=0,s,r,o="";for(;n<t.length;)(s=t[n++])&&(r=Dn(s))&&(o&&(o+=" "),o+=r);return o},Dn=t=>{if(typeof t=="string")return t;let n,s="";for(let r=0;r<t.length;r++)t[r]&&(n=Dn(t[r]))&&(s&&(s+=" "),s+=n);return s},wa=(t,...n)=>{let s,r,o,a;const i=c=>{const u=n.reduce((d,f)=>f(d),t());return s=ba(u),r=s.cache.get,o=s.cache.set,a=l,l(c)},l=c=>{const u=r(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 n=s=>s[t]||ja;return n.isThemeGetter=!0,n},_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),H=t=>!!t&&!Number.isNaN(Number(t)),Re=t=>!!t&&Number.isInteger(Number(t)),Kt=t=>t.endsWith("%")&&H(t.slice(0,-1)),je=t=>Ca.test(t),Aa=()=>!0,Ma=t=>Sa.test(t)&&!Ra.test(t),Vn=()=>!1,La=t=>Ea.test(t),$a=t=>Ia.test(t),Oa=t=>!$(t)&&!O(t),Ba=t=>Ue(t,Hn,Vn),$=t=>_n.test(t),$e=t=>Ue(t,Wn,Ma),Xt=t=>Ue(t,Pa,H),qr=t=>Ue(t,Fn,Vn),Ta=t=>Ue(t,Zn,$a),gt=t=>Ue(t,Un,La),O=t=>Pn.test(t),Qe=t=>Ge(t,Wn),za=t=>Ge(t,Va),Kr=t=>Ge(t,Fn),Da=t=>Ge(t,Hn),_a=t=>Ge(t,Zn),bt=t=>Ge(t,Un,!0),Ue=(t,n,s)=>{const r=_n.exec(t);return r?r[1]?n(r[1]):s(r[2]):!1},Ge=(t,n,s=!1)=>{const r=Pn.exec(t);return r?r[1]?n(r[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"),n=J("font"),s=J("text"),r=J("font-weight"),o=J("tracking"),a=J("leading"),i=J("breakpoint"),l=J("container"),c=J("spacing"),u=J("radius"),d=J("shadow"),f=J("inset-shadow"),m=J("text-shadow"),p=J("drop-shadow"),g=J("blur"),h=J("perspective"),x=J("aspect"),v=J("ease"),w=J("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...C(),O,$],N=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],E=()=>[O,$,c],S=()=>[Fe,"full","auto",...E()],y=()=>[Re,"none","subgrid",O,$],B=()=>["auto",{span:["full",Re,O,$]},Re,O,$],T=()=>[Re,"auto",O,$],D=()=>["auto","min","max","fr",O,$],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...E()],W=()=>[Fe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],R=()=>[t,O,$],G=()=>[...C(),Kr,qr,{position:[O,$]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ie=()=>["auto","cover","contain",Da,Ba,{size:[O,$]}],F=()=>[Kt,Qe,$e],L=()=>["","none","full",u,O,$],q=()=>["",H,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=()=>[H,Kt,Kr,qr],Ne=()=>["","none",g,O,$],ee=()=>["none",H,O,$],de=()=>["none",H,O,$],oe=()=>[H,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",H],text:[je],"text-shadow":[je],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Fe,$,O,x]}],container:["container"],columns:[{columns:[H,$,O,l]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:S()}],"inset-x":[{"inset-x":S()}],"inset-y":[{"inset-y":S()}],start:[{start:S()}],end:[{end:S()}],top:[{top:S()}],right:[{right:S()}],bottom:[{bottom:S()}],left:[{left:S()}],visibility:["visible","invisible","collapse"],z:[{z:[Re,"auto",O,$]}],basis:[{basis:[Fe,"full","auto",l,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[H,Fe,"auto","initial","none",$]}],grow:[{grow:["",H,O,$]}],shrink:[{shrink:["",H,O,$]}],order:[{order:[Re,"first","last","none",O,$]}],"grid-cols":[{"grid-cols":y()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":y()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],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:W()}],w:[{w:[l,"screen",...W()]}],"min-w":[{"min-w":[l,"screen","none",...W()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",s,Qe,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,O,Xt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Kt,$]}],"font-family":[{font:[za,$,n]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,O,$]}],"line-clamp":[{"line-clamp":[H,"none",O,Xt]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",O,$]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,$]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[H,"from-font","auto",O,$e]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[H,"auto",O,$]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",O,$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Re,O,$],radial:["",O,$],conic:[Re,O,$]},_a,Ta]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"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":[H,O,$]}],"outline-w":[{outline:["",H,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:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[H,$e]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",m,bt,gt]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[H,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":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[O,$]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"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:G()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",O,$]}],filter:[{filter:["","none",O,$]}],blur:[{blur:Ne()}],brightness:[{brightness:[H,O,$]}],contrast:[{contrast:[H,O,$]}],"drop-shadow":[{"drop-shadow":["","none",p,bt,gt]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",H,O,$]}],"hue-rotate":[{"hue-rotate":[H,O,$]}],invert:[{invert:["",H,O,$]}],saturate:[{saturate:[H,O,$]}],sepia:[{sepia:["",H,O,$]}],"backdrop-filter":[{"backdrop-filter":["","none",O,$]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[H,O,$]}],"backdrop-contrast":[{"backdrop-contrast":[H,O,$]}],"backdrop-grayscale":[{"backdrop-grayscale":["",H,O,$]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,O,$]}],"backdrop-invert":[{"backdrop-invert":["",H,O,$]}],"backdrop-opacity":[{"backdrop-opacity":[H,O,$]}],"backdrop-saturate":[{"backdrop-saturate":[H,O,$]}],"backdrop-sepia":[{"backdrop-sepia":["",H,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",O,$]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[H,"initial",O,$]}],ease:[{ease:["linear","initial",v,O,$]}],delay:[{delay:[H,O,$]}],animate:[{animate:["none",w,O,$]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,O,$]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[O,$,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",O,$]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":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",O,$]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[H,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,n){return t.replace(/\{(\w+)\}/g,(s,r)=>{const o=n[r];return o!=null?String(o):""})}function Wa(t){return Array.isArray(t)&&t.every(Array.isArray)}function Gn(t){return Object.entries(t).map(([n,s])=>[{[n]: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,n=Ga){const[s,r]=b.useState(t);return b.useEffect(()=>{const o=setTimeout(()=>{r(t)},n);return()=>{clearTimeout(o)}},[t,n]),s}function Ka(t){const{records:n,isOpen:s,onSelect:r,onClose:o,onEscape:a,onClear:i,searchQuery:l}=t,[c,u]=b.useState(-1),d=b.useCallback(f=>{if(s)switch(f.key){case"ArrowDown":{if(f.preventDefault(),n.length===0)return;u(m=>m>=n.length-1?0:m+1);break}case"ArrowUp":{if(f.preventDefault(),n.length===0)return;u(m=>m<=0?n.length-1:m-1);break}case"Home":{if(f.preventDefault(),n.length===0)return;u(0);break}case"End":{if(f.preventDefault(),n.length===0)return;u(n.length-1);break}case"Enter":{f.preventDefault(),c>=0&&c<n.length&&r(n[c]);break}case"Escape":{f.preventDefault(),a();break}case"Backspace":{l===""&&i();break}case"Tab":{o();break}}},[s,n,c,r,o,a,i,l]);return{highlightedIndex:c,setHighlightedIndex:u,handleKeyDown:d}}const Xa=(t,n,s,r)=>{const o=[s,{code:n,...r||{}}];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,n,s,r)=>{Be(s)&&Xr[s]||(Be(s)&&(Xr[s]=new Date),Xa(t,n,s,r))},Kn=(t,n)=>()=>{if(t.isInitialized)n();else{const s=()=>{setTimeout(()=>{t.off("initialized",s)},0),n()};t.on("initialized",s)}},sr=(t,n,s)=>{t.loadNamespaces(n,Kn(t,s))},Yr=(t,n,s,r)=>{if(Be(s)&&(s=[s]),t.options.preload&&t.options.preload.indexOf(n)>-1)return sr(t,s,r);s.forEach(o=>{t.options.ns.indexOf(o)<0&&t.options.ns.push(o)}),t.loadLanguages(n,Kn(t,r))},Ya=(t,n,s={})=>!n.languages||!n.languages.length?(qn(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(t,{lng:s.lng,precheck:(r,o)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.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=b.createContext();class li{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var vt={exports:{}},Yt={};var Qr;function ci(){if(Qr)return Yt;Qr=1;var t=b;function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var s=typeof Object.is=="function"?Object.is:n,r=t.useState,o=t.useEffect,a=t.useLayoutEffect,i=t.useDebugValue;function l(f,m){var p=m(),g=r({inst:{value:p,getSnapshot:m}}),h=g[0].inst,x=g[1];return a(function(){h.value=p,h.getSnapshot=m,c(h)&&x({inst:h})},[f,p,m]),o(function(){return c(h)&&x({inst:h}),f(function(){c(h)&&x({inst:h})})},[f]),i(p),p}function c(f){var m=f.getSnapshot;f=f.value;try{var p=m();return!s(f,p)}catch{return!0}}function u(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return Yt.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Yt}var Qt={};var Jr;function di(){return Jr||(Jr=1,process.env.NODE_ENV!=="production"&&(function(){function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function n(p,g){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=g();if(!f){var x=g();a(h,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}x=i({inst:{value:h,getSnapshot:g}});var v=x[0].inst,w=x[1];return c(function(){v.value=h,v.getSnapshot=g,s(v)&&w({inst:v})},[p,h,g]),l(function(){return s(v)&&w({inst:v}),p(function(){s(v)&&w({inst:v})})},[p]),u(h),h}function s(p){var g=p.getSnapshot;p=p.value;try{var h=g();return!a(p,h)}catch{return!0}}function r(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=b,a=typeof Object.is=="function"?Object.is:t,i=o.useState,l=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:n;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,n)=>Be(n)?n:Qa(n)&&Be(n.defaultValue)?n.defaultValue:Array.isArray(t)?t[t.length-1]:t,pi={t:mi,ready:!1},hi=()=>()=>{},xi=(t,n={})=>{const{i18n:s}=n,{i18n:r,defaultNS:o}=b.useContext(ii)||{},a=s||r||ai();a&&!a.reportNamespaces&&(a.reportNamespaces=new li),a||qn(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const i=b.useMemo(()=>({...si(),...a?.options?.react,...n}),[a,n]),{useSuspense:l,keyPrefix:c}=i,u=t,d=Be(u)?[u]:u,f=b.useMemo(()=>d,d);a?.reportNamespaces?.addUsedNamespaces?.(f);const m=b.useRef(0),p=b.useCallback(S=>{if(!a)return hi;const{bindI18n:y,bindI18nStore:B}=i,T=()=>{m.current+=1,S()};return y&&a.on(y,T),B&&a.store.on(B,T),()=>{y&&y.split(" ").forEach(D=>a.off(D,T)),B&&B.split(" ").forEach(D=>a.store.off(D,T))}},[a,i]),g=b.useRef(),h=b.useCallback(()=>{if(!a)return pi;const S=!!(a.isInitialized||a.initializedStoreOnce)&&f.every(z=>Ya(z,a,i)),y=n.lng||a.language,B=m.current,T=g.current;if(T&&T.ready===S&&T.lng===y&&T.keyPrefix===c&&T.revision===B)return T;const Z={t:a.getFixedT(y,i.nsMode==="fallback"?f:f[0],c),ready:S,lng:y,keyPrefix:c,revision:B};return g.current=Z,Z},[a,f,c,i,n.lng]),[x,v]=b.useState(0),{t:w,ready:j}=fi.useSyncExternalStore(p,h,h);b.useEffect(()=>{if(a&&!j&&!l){const S=()=>v(y=>y+1);n.lng?Yr(a,n.lng,f,S):sr(a,f,S)}},[a,n.lng,f,j,l,x]);const C=a||{},k=b.useRef(null),N=b.useRef(),A=S=>{const y=Object.getOwnPropertyDescriptors(S);y.__original&&delete y.__original;const B=Object.create(Object.getPrototypeOf(S),y);if(!Object.prototype.hasOwnProperty.call(B,"__original"))try{Object.defineProperty(B,"__original",{value:S,writable:!1,enumerable:!1,configurable:!1})}catch{}return B},E=b.useMemo(()=>{const S=C,y=S?.language;let B=S;S&&(k.current&&k.current.__original===S?N.current!==y?(B=A(S),k.current=B,N.current=y):B=k.current:(B=A(S),k.current=B,N.current=y));const T=[w,B,j];return T.t=w,T.i18n=B,T.ready=j,T},[w,C,j,C.resolvedLanguage,C.language,C.languages]);if(a&&l&&!j)throw new Promise(S=>{const y=()=>S();n.lng?Yr(a,n.lng,f,y):sr(a,f,y)});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,n){return n?t.replace(/\{\{(\w+)\}\}/g,(s,r)=>String(n[r]??"")):t}function vi(){try{const{t,i18n:n}=xi("lookupField");if(!n.isInitialized)throw new Error("i18n not initialized");return{t:(s,r)=>r?t(s,r):t(s),i18n:n}}catch{return{t:(n,s)=>{const r=gi[n]??n;return bi(r,s)},i18n:null}}}function ki(t,n,s=!0){const r=b.useCallback(o=>{t.current&&!t.current.contains(o.target)&&n(o)},[t,n]);b.useEffect(()=>{if(s)return document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[r,s])}function Mt(){return typeof window<"u"}function qe(t){return Xn(t)?(t.nodeName||"").toLowerCase():"#document"}function ce(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function be(t){var n;return(n=(Xn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.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:n,overflowX:s,overflowY:r,display:o}=pe(t);return/auto|scroll|overlay|hidden|clip/.test(n+r+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(n=>{try{return t.matches(n)}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 n=xr(),s=ne(t)?pe(t):t;return Ci.some(r=>s[r]?s[r]!=="none":!1)||(s.containerType?s.containerType!=="normal":!1)||!n&&(s.backdropFilter?s.backdropFilter!=="none":!1)||!n&&(s.filter?s.filter!=="none":!1)||Si.some(r=>(s.willChange||"").includes(r))||Ri.some(r=>(s.contain||"").includes(r))}function Ei(t){let n=Ae(t);for(;ge(n)&&!We(n);){if(hr(n))return n;if(Lt(n))return null;n=Ae(n)}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 n=t.assignedSlot||t.parentNode||tn(t)&&t.host||be(t);return tn(n)?n.host:n}function Yn(t){const n=Ae(t);return We(n)?t.ownerDocument?t.ownerDocument.body:t.body:ge(n)&&at(n)?n:Yn(n)}function rt(t,n,s){var r;n===void 0&&(n=[]),s===void 0&&(s=!0);const o=Yn(t),a=o===((r=t.ownerDocument)==null?void 0:r.body),i=ce(o);if(a){const l=or(i);return n.concat(i,i.visualViewport||[],at(o)?o:[],l&&s?rt(l):[])}return n.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,n){return typeof t=="function"?t(n):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,n,s){s===void 0&&(s=!1);const r=it(t),o=Jn(t),a=Qn(o);let i=o==="x"?r===(s?"end":"start")?"right":"left":r==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(i=St(i)),[i,St(i)]}function Bi(t){const n=St(t);return[ar(t),n,ar(n)]}function ar(t){return t.replace(/start|end/g,n=>Mi[n])}const rn=["left","right"],nn=["right","left"],Ti=["top","bottom"],zi=["bottom","top"];function Di(t,n,s){switch(t){case"top":case"bottom":return s?n?nn:rn:n?rn:nn;case"left":case"right":return n?Ti:zi;default:return[]}}function _i(t,n,s,r){const o=it(t);let a=Di(Te(t),s==="start",r);return o&&(a=a.map(i=>i+"-"+o),n&&(a=a.concat(a.map(ar)))),a}function St(t){return t.replace(/left|right|bottom|top/g,n=>Ai[n])}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:n,y:s,width:r,height:o}=t;return{width:r,height:o,top:s,left:n,right:n+r,bottom:s+o,x:n,y:s}}var Fi=typeof document<"u",Zi=function(){},ir=Fi?b.useLayoutEffect:Zi;const Hi={...M},Wi=Hi.useInsertionEffect,Ui=Wi||(t=>t());function Gi(t){const n=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ui(()=>{n.current=t}),M.useCallback(function(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return n.current==null?void 0:n.current(...r)},[])}function sn(t,n,s){let{reference:r,floating:o}=t;const a=Ee(n),i=Jn(n),l=Qn(i),c=Te(n),u=a==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(it(n)){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,n,s)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=s,l=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(n));let u=await i.getElementRects({reference:t,floating:n,strategy:o}),{x:d,y:f}=sn(u,r,c),m=r,p={},g=0;for(let h=0;h<l.length;h++){const{name:x,fn:v}=l[h],{x:w,y:j,data:C,reset:k}=await v({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:t,floating:n}});d=w??d,f=j??f,p={...p,[x]:{...p[x],...C}},k&&g<=50&&(g++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(u=k.rects===!0?await i.getElementRects({reference:t,floating:n,strategy:o}):k.rects),{x:d,y:f}=sn(u,m,c)),h=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:p}};async function es(t,n){var s;n===void 0&&(n={});const{x:r,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(n,t),g=Vi(p),x=l[m?f==="floating"?"reference":"floating":f],v=Rt(await a.getClippingRect({element:(s=await(a.isElement==null?void 0:a.isElement(x)))==null||s?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),w=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,j=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),C=await(a.isElement==null?void 0:a.isElement(j))?await(a.getScale==null?void 0:a.getScale(j))||{x:1,y:1}:{x:1,y:1},k=Rt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:j,strategy:c}):w);return{top:(v.top-k.top+g.top)/C.y,bottom:(k.bottom-v.bottom+g.bottom)/C.y,left:(v.left-k.left+g.left)/C.x,right:(k.right-v.right+g.right)/C.x}}const Ki=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var s,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:c,elements:u}=n,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...x}=Ot(t,n);if((s=a.arrow)!=null&&s.alignmentOffset)return{};const v=Te(o),w=Ee(l),j=Te(l)===l,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=m||(j||!h?[St(l)]:Bi(l)),N=g!=="none";!m&&N&&k.push(..._i(l,h,g,C));const A=[l,...k],E=await es(n,x),S=[];let y=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&S.push(E[v]),f){const Z=Oi(o,i,C);S.push(E[Z[0]],E[Z[1]])}if(y=[...y,{placement:o,overflows:S}],!S.every(Z=>Z<=0)){var B,T;const Z=(((B=a.flip)==null?void 0:B.index)||0)+1,z=A[Z];if(z&&(!(f==="alignment"?w!==Ee(z):!1)||y.every(R=>Ee(R.placement)===w?R.overflows[0]>0:!0)))return{data:{index:Z,overflows:y},reset:{placement:z}};let I=(T=y.filter(W=>W.overflows[0]<=0).sort((W,R)=>W.overflows[1]-R.overflows[1])[0])==null?void 0:T.placement;if(!I)switch(p){case"bestFit":{var D;const W=(D=y.filter(R=>{if(N){const G=Ee(R.placement);return G===w||G==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(G=>G>0).reduce((G,V)=>G+V,0)]).sort((R,G)=>R[1]-G[1])[0])==null?void 0:D[0];W&&(I=W);break}case"initialPlacement":I=l;break}if(o!==I)return{reset:{placement:I}}}return{}}}},Xi=new Set(["left","top"]);async function Yi(t,n){const{placement:s,platform:r,elements:o}=t,a=await(r.isRTL==null?void 0:r.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(n,t);let{mainAxis:m,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(p=l==="end"?g*-1:g),c?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const Qi=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(n){var s,r;const{x:o,y:a,placement:i,middlewareData:l}=n,c=await Yi(n,t);return i===((s=l.offset)==null?void 0:s.placement)&&(r=l.arrow)!=null&&r.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(n){var s,r;const{placement:o,rects:a,platform:i,elements:l}=n,{apply:c=()=>{},...u}=Ot(t,n),d=await es(n,u),f=Te(o),m=it(o),p=Ee(o)==="y",{width:g,height:h}=a.floating;let x,v;f==="top"||f==="bottom"?(x=f,v=m===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(v=f,x=m==="end"?"top":"bottom");const w=h-d.top-d.bottom,j=g-d.left-d.right,C=nt(h-d[x],w),k=nt(g-d[v],j),N=!n.middlewareData.shift;let A=C,E=k;if((s=n.middlewareData.shift)!=null&&s.enabled.x&&(E=j),(r=n.middlewareData.shift)!=null&&r.enabled.y&&(A=w),N&&!m){const y=fe(d.left,0),B=fe(d.right,0),T=fe(d.top,0),D=fe(d.bottom,0);p?E=g-2*(y!==0||B!==0?y+B:fe(d.left,d.right)):A=h-2*(T!==0||D!==0?T+D:fe(d.top,d.bottom))}await c({...n,availableWidth:E,availableHeight:A});const S=await i.getDimensions(l.floating);return g!==S.width||h!==S.height?{reset:{rects:!0}}:{}}}};function ts(t){const n=pe(t);let s=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const o=ge(t),a=o?t.offsetWidth:s,i=o?t.offsetHeight:r,l=Ct(s)!==a||Ct(r)!==i;return l&&(s=a,r=i),{width:s,height:r,$:l}}function gr(t){return ne(t)?t:t.contextElement}function He(t){const n=gr(t);if(!ge(n))return xe(1);const s=n.getBoundingClientRect(),{width:r,height:o,$:a}=ts(n);let i=(a?Ct(s.width):s.width)/r,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 n=ce(t);return!xr()||!n.visualViewport?el:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function tl(t,n,s){return n===void 0&&(n=!1),!s||n&&s!==ce(t)?!1:n}function ze(t,n,s,r){n===void 0&&(n=!1),s===void 0&&(s=!1);const o=t.getBoundingClientRect(),a=gr(t);let i=xe(1);n&&(r?ne(r)&&(i=He(r)):i=He(t));const l=tl(a,s,r)?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=r&&ne(r)?ce(r):r;let g=m,h=or(g);for(;h&&r&&p!==g;){const x=He(h),v=h.getBoundingClientRect(),w=pe(h),j=v.left+(h.clientLeft+parseFloat(w.paddingLeft))*x.x,C=v.top+(h.clientTop+parseFloat(w.paddingTop))*x.y;c*=x.x,u*=x.y,d*=x.x,f*=x.y,c+=j,u+=C,g=ce(h),h=or(g)}}return Rt({width:d,height:f,x:c,y:u})}function Bt(t,n){const s=$t(t).scrollLeft;return n?n.left+s:ze(be(t)).left+s}function ns(t,n){const s=t.getBoundingClientRect(),r=s.left+n.scrollLeft-Bt(t,s),o=s.top+n.scrollTop;return{x:r,y:o}}function rl(t){let{elements:n,rect:s,offsetParent:r,strategy:o}=t;const a=o==="fixed",i=be(r),l=n?Lt(n.floating):!1;if(r===i||l&&a)return s;let c={scrollLeft:0,scrollTop:0},u=xe(1);const d=xe(0),f=ge(r);if((f||!f&&!a)&&((qe(r)!=="body"||at(i))&&(c=$t(r)),ge(r))){const p=ze(r);u=He(r),d.x=p.x+r.clientLeft,d.y=p.y+r.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 n=be(t),s=$t(t),r=t.ownerDocument.body,o=fe(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),a=fe(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let i=-s.scrollLeft+Bt(t);const l=-s.scrollTop;return pe(r).direction==="rtl"&&(i+=fe(n.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}}const on=25;function ol(t,n){const s=ce(t),r=be(t),o=s.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,c=0;if(o){a=o.width,i=o.height;const d=xr();(!d||d&&n==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=Bt(r);if(u<=0){const d=r.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-p);g<=on&&(a-=g)}else u<=on&&(a+=u);return{width:a,height:i,x:l,y:c}}const al=new Set(["absolute","fixed"]);function il(t,n){const s=ze(t,!0,n==="fixed"),r=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=r*a.y;return{width:i,height:l,x:c,y:u}}function an(t,n,s){let r;if(n==="viewport")r=ol(t,s);else if(n==="document")r=sl(be(t));else if(ne(n))r=il(n,s);else{const o=rs(t);r={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return Rt(r)}function ss(t,n){const s=Ae(t);return s===n||!ne(s)||We(s)?!1:pe(s).position==="fixed"||ss(s,n)}function ll(t,n){const s=n.get(t);if(s)return s;let r=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))?r=r.filter(d=>d!==i):o=l,i=Ae(i)}return n.set(t,r),r}function cl(t){let{element:n,boundary:s,rootBoundary:r,strategy:o}=t;const i=[...s==="clippingAncestors"?Lt(n)?[]:ll(n,this._c):[].concat(s),r],l=i[0],c=i.reduce((u,d)=>{const f=an(n,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(n,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function dl(t){const{width:n,height:s}=ts(t);return{width:n,height:s}}function ul(t,n,s){const r=ge(n),o=be(n),a=s==="fixed",i=ze(t,!0,a,n);let l={scrollLeft:0,scrollTop:0};const c=xe(0);function u(){c.x=Bt(o)}if(r||!r&&!a)if((qe(n)!=="body"||at(o))&&(l=$t(n)),r){const p=ze(n,!0,a,n);c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}else o&&u();a&&!r&&o&&u();const d=o&&!r&&!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,n){if(!ge(t)||pe(t).position==="fixed")return null;if(n)return n(t);let s=t.offsetParent;return be(t)===s&&(s=s.ownerDocument.body),s}function os(t,n){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 r=ln(t,n);for(;r&&ji(r)&&Jt(r);)r=ln(r,n);return r&&We(r)&&Jt(r)&&!hr(r)?s:r||Ei(t)||s}const fl=async function(t){const n=this.getOffsetParent||os,s=this.getDimensions,r=await s(t.floating);return{reference:ul(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.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,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function hl(t,n){let s=null,r;const o=be(t);function a(){var l;clearTimeout(r),(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||n(),!m||!p)return;const g=kt(f),h=kt(o.clientWidth-(d+m)),x=kt(o.clientHeight-(f+p)),v=kt(d),j={rootMargin:-g+"px "+-h+"px "+-x+"px "+-v+"px",threshold:fe(0,nt(1,c))||1};let C=!0;function k(N){const A=N[0].intersectionRatio;if(A!==c){if(!C)return i();A?i(!1,A):r=setTimeout(()=>{i(!1,1e-7)},1e3)}A===1&&!as(u,t.getBoundingClientRect())&&i(),C=!1}try{s=new IntersectionObserver(k,{...j,root:o.ownerDocument})}catch{s=new IntersectionObserver(k,j)}s.observe(t)}return i(!0),a}function xl(t,n,s,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=gr(t),d=o||a?[...u?rt(u):[],...rt(n)]:[];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(n),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var j;(j=p)==null||j.observe(n)})),s()}),u&&!c&&p.observe(u),p.observe(n));let g,h=c?ze(t):null;c&&x();function x(){const v=ze(t);h&&!as(h,v)&&s(),h=v,g=requestAnimationFrame(x)}return s(),()=>{var v;d.forEach(w=>{o&&w.removeEventListener("scroll",s),a&&w.removeEventListener("resize",s)}),f?.(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const gl=Qi,bl=Ki,vl=Ji,kl=(t,n,s)=>{const r=new Map,o={platform:pl,...s},a={...o.platform,_c:r};return qi(t,n,{...o,platform:a})};var yl=typeof document<"u",wl=function(){},yt=yl?b.useLayoutEffect:wl;function Et(t,n){if(t===n)return!0;if(typeof t!=typeof n)return!1;if(typeof t=="function"&&t.toString()===n.toString())return!0;let s,r,o;if(t&&n&&typeof t=="object"){if(Array.isArray(t)){if(s=t.length,s!==n.length)return!1;for(r=s;r--!==0;)if(!Et(t[r],n[r]))return!1;return!0}if(o=Object.keys(t),s=o.length,s!==Object.keys(n).length)return!1;for(r=s;r--!==0;)if(!{}.hasOwnProperty.call(n,o[r]))return!1;for(r=s;r--!==0;){const a=o[r];if(!(a==="_owner"&&t.$$typeof)&&!Et(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}function is(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function cn(t,n){const s=is(t);return Math.round(n*s)/s}function er(t){const n=M.useRef(t);return yt(()=>{n.current=t}),n}function jl(t){t===void 0&&(t={});const{placement:n="bottom",strategy:s="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,f]=M.useState({x:0,y:0,strategy:s,placement:n,middlewareData:{},isPositioned:!1}),[m,p]=M.useState(r);Et(m,r)||p(r);const[g,h]=M.useState(null),[x,v]=M.useState(null),w=M.useCallback(R=>{R!==N.current&&(N.current=R,h(R))},[]),j=M.useCallback(R=>{R!==A.current&&(A.current=R,v(R))},[]),C=a||g,k=i||x,N=M.useRef(null),A=M.useRef(null),E=M.useRef(d),S=c!=null,y=er(c),B=er(o),T=er(u),D=M.useCallback(()=>{if(!N.current||!A.current)return;const R={placement:n,strategy:s,middleware:m};B.current&&(R.platform=B.current),kl(N.current,A.current,R).then(G=>{const V={...G,isPositioned:T.current!==!1};Z.current&&!Et(E.current,V)&&(E.current=V,$s.flushSync(()=>{f(V)}))})},[m,n,s,B,T]);yt(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[u]);const Z=M.useRef(!1);yt(()=>(Z.current=!0,()=>{Z.current=!1}),[]),yt(()=>{if(C&&(N.current=C),k&&(A.current=k),C&&k){if(y.current)return y.current(C,k,D);D()}},[C,k,D,y,S]);const z=M.useMemo(()=>({reference:N,floating:A,setReference:w,setFloating:j}),[w,j]),I=M.useMemo(()=>({reference:C,floating:k}),[C,k]),W=M.useMemo(()=>{const R={position:s,left:0,top:0};if(!I.floating)return R;const G=cn(I.floating,d.x),V=cn(I.floating,d.y);return l?{...R,transform:"translate("+G+"px, "+V+"px)",...is(I.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:G,top:V}},[s,l,I.floating,d.x,d.y]);return M.useMemo(()=>({...d,update:D,refs:z,elements:I,floatingStyles:W}),[d,D,z,I,W])}const Nl=(t,n)=>({...gl(t),options:[t,n]}),Cl=(t,n)=>({...bl(t),options:[t,n]}),Sl=(t,n)=>({...vl(t),options:[t,n]}),Rl={...M};let dn=!1,El=0;const un=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+El++;function Il(){const[t,n]=M.useState(()=>dn?un():void 0);return ir(()=>{t==null&&n(un())},[]),M.useEffect(()=>{dn=!0},[]),t}const Al=Rl.useId,Ml=Al||Il;let lr;process.env.NODE_ENV!=="production"&&(lr=new Set);function Ll(){for(var t,n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];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(n,s){var r;(r=t.get(n))==null||r.forEach(o=>o(s))},on(n,s){t.has(n)||t.set(n,new Set),t.get(n).add(s)},off(n,s){var r;(r=t.get(n))==null||r.delete(s)}}}const Ol=M.createContext(null),Bl=M.createContext(null),Tl=()=>{var t;return((t=M.useContext(Ol))==null?void 0:t.id)||null},zl=()=>M.useContext(Bl);function Dl(t){const{open:n=!1,onOpenChange:s,elements:r}=t,o=Ml(),a=M.useRef({}),[i]=M.useState(()=>$l()),l=Tl()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!ne(p)&&Ll("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=M.useState(r.reference),d=Gi((p,g,h)=>{a.current.openEvent=p?g:void 0,i.emit("openchange",{open:p,event:g,reason:h,nested:l}),s?.(p,g,h)}),f=M.useMemo(()=>({setPositionReference:u}),[]),m=M.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return M.useMemo(()=>({dataRef:a,open:n,onOpenChange:d,elements:m,events:i,floatingId:o,refs:f}),[n,d,m,i,o,f])}function _l(t){t===void 0&&(t={});const{nodeId:n}=t,s=Dl({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||s,o=r.elements,[a,i]=M.useState(null),[l,c]=M.useState(null),d=o?.domReference||a,f=M.useRef(null),m=zl();ir(()=>{d&&(f.current=d)},[d]);const p=jl({...t,elements:{...o,...l&&{reference:l}}}),g=M.useCallback(j=>{const C=ne(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),getClientRects:()=>j.getClientRects(),contextElement:j}:j;c(C),p.refs.setReference(C)},[p.refs]),h=M.useCallback(j=>{(ne(j)||j===null)&&(f.current=j,i(j)),(ne(p.refs.reference.current)||p.refs.reference.current===null||j!==null&&!ne(j))&&p.refs.setReference(j)},[p.refs]),x=M.useMemo(()=>({...p.refs,setReference:h,setPositionReference:g,domReference:f}),[p.refs,h,g]),v=M.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),w=M.useMemo(()=>({...p,...r,refs:x,elements:v,nodeId:n}),[p,x,v,n,r]);return ir(()=>{r.dataRef.current.floatingContext=w;const j=m?.nodesRef.current.find(C=>C.id===n);j&&(j.context=w)}),M.useMemo(()=>({...p,context:w,refs:x,elements:v}),[p,x,v,w])}function Pl({placement:t="bottom-start",offsetPx:n=4,enabled:s=!0}={}){const{refs:r,floatingStyles:o,context:a}=_l({placement:t,middleware:[Nl(n),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:r,floatingStyles:o,context:a}}function Ze(t,n,s){let r=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!==r.length||f.some((g,h)=>r[h]!==g)))return o;r=f;let p;if(s.key&&((c=s.debug)!=null&&c.call(s))&&(p=Date.now()),o=n(...f),s.key&&((u=s.debug)!=null&&u.call(s))){const g=Math.round((Date.now()-d)*100)/100,h=Math.round((Date.now()-p)*100)/100,x=h/16,v=(w,j)=>{for(w=String(w);w.length<j;)w=" "+w;return w};console.info(`%c⏱ ${v(h,5)} /${v(g,5)} ms`,`
|
|
1449
|
+
${d[r].text}
|
|
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]=b.useState(""),[d,f]=b.useState(""),[m,p]=b.useState(!1),[g,h]=b.useState(""),x=j=>{if(j.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){h("Por favor ingresa un email válido");return}h(""),t?.(c,d)},v=j=>{u(j.target.value),g&&h("")},w=()=>{p(!m)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",a].join(" "),children:[i&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Iniciar Sesión"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Inicia sesión ingresando con tu correo electrónico y contraseña."})]}),o&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:o}),e.jsxs("form",{onSubmit:x,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Bo,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:c,onChange:v,disabled:n,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",g?"border-error-border!":""].filter(Boolean).join(" ")})]}),g&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:g})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("button",{type:"button",onClick:r,className:"text-[12px] leading-4 font-bold text-primary-custom-600 dark:text-[#93d1fd] hover:underline transition-all duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm px-1",children:"Olvidé mi Contraseña"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(To,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:m?"text":"password",placeholder:"••••••••",value:d,onChange:j=>f(j.target.value),disabled:n,required:!0,autoComplete:"current-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:w,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":m?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(zo,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:n||!c||!d,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:n?"Iniciando sesión...":"Iniciar Sesión"})]}),e.jsx("button",{type:"button",onClick:s,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"¿No tienes una cuenta?"})]})]})},_o=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0Zm-5-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 9c-1.825 0-3.422.977-4.295 2.437A5.49 5.49 0 0 0 8 13.5a5.49 5.49 0 0 0 4.294-2.063A4.997 4.997 0 0 0 8 9Z",clipRule:"evenodd"})}),Po=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),Vo=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),Fo=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),Zo=({onSubmit:t,onSignIn:r,onTermsClick:s,onPrivacyClick:n,isLoading:o=!1,errorMessage:a,className:i="",showBackground:l=!0,variant:c="responsive"})=>{const[u,d]=b.useState(""),[f,m]=b.useState(""),[p,g]=b.useState(""),[h,x]=b.useState(!1),[v,w]=b.useState(""),j=N=>{if(N.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)){w("Por favor ingresa un email válido");return}w(""),t?.(u,f,p)},C=N=>{m(N.target.value),v&&w("")},k=()=>{x(!h)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",i].join(" "),children:[l&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...c==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:c==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Crear Cuenta"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Ingresa todos los datos para crear tu cuenta."})]}),a&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:a}),e.jsxs("form",{onSubmit:j,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"name-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Nombre ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(_o,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"name-input",type:"text",placeholder:"Juan Pérez",value:u,onChange:N=>d(N.target.value),disabled:o,required:!0,autoComplete:"name",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Po,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:f,onChange:C,disabled:o,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",v?"border-error-border!":""].filter(Boolean).join(" ")})]}),v&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:v})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Vo,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:h?"text":"password",placeholder:"••••••••",value:p,onChange:N=>g(N.target.value),disabled:o,required:!0,autoComplete:"new-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:k,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":h?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(Fo,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:o||!u||!f||!p,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:o?"Registrando...":"Registrarse"})]}),e.jsx("button",{type:"button",onClick:r,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"Ya tengo una cuenta"}),e.jsx("div",{className:"w-full text-center",children:e.jsxs("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:["Al registrarse, estás aceptando nuestras"," ",e.jsx("button",{type:"button",onClick:s,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Condiciones de Uso"})," ","y nuestras"," ",e.jsx("button",{type:"button",onClick:n,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Políticas de Privacidad"}),"."]})})]})]})};const Ho=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wo=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,n)=>n?n.toUpperCase():s.toLowerCase()),Zr=t=>{const r=Wo(t);return r.charAt(0).toUpperCase()+r.slice(1)},Ln=(...t)=>t.filter((r,s,n)=>!!r&&r.trim()!==""&&n.indexOf(r)===s).join(" ").trim(),Uo=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var Go={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const qo=b.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...l},c)=>b.createElement("svg",{ref:c,...Go,width:r,height:r,stroke:t,strokeWidth:n?Number(s)*24/Number(r):s,className:Ln("lucide",o),...!a&&!Uo(l)&&{"aria-hidden":"true"},...l},[...i.map(([u,d])=>b.createElement(u,d)),...Array.isArray(a)?a:[a]]));const At=(t,r)=>{const s=b.forwardRef(({className:n,...o},a)=>b.createElement(qo,{ref:a,iconNode:r,className:Ln(`lucide-${Ho(Zr(t))}`,`lucide-${t}`,n),...o}));return s.displayName=Zr(t),s};const Ko=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xo=At("chevron-down",Ko);const Yo=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Hr=At("loader-circle",Yo);const Qo=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Jo=At("search",Qo);const ea=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$n=At("x",ea);function On(t){var r,s,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(s=On(t[r]))&&(n&&(n+=" "),n+=s)}else for(s in t)t[s]&&(n&&(n+=" "),n+=s);return n}function ta(){for(var t,r,s=0,n="",o=arguments.length;s<o;s++)(t=arguments[s])&&(r=On(t))&&(n&&(n+=" "),n+=r);return n}const ra=(t,r)=>{const s=new Array(t.length+r.length);for(let n=0;n<t.length;n++)s[n]=t[n];for(let n=0;n<r.length;n++)s[t.length+n]=r[n];return s},na=(t,r)=>({classGroupId:t,validator:r}),Bn=(t=new Map,r=null,s)=>({nextPart:t,validators:r,classGroupId:s}),Nt="-",Wr=[],sa="arbitrary..",oa=t=>{const r=ia(t),{conflictingClassGroups:s,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return aa(i);const l=i.split(Nt),c=l[0]===""&&l.length>1?1:0;return Tn(l,c,r)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=n[i],u=s[i];return c?u?ra(u,c):c:u||Wr}return s[i]||Wr}}},Tn=(t,r,s)=>{if(t.length-r===0)return s.classGroupId;const o=t[r],a=s.nextPart.get(o);if(a){const u=Tn(t,r+1,a);if(u)return u}const i=s.validators;if(i===null)return;const l=r===0?t.join(Nt):t.slice(r).join(Nt),c=i.length;for(let u=0;u<c;u++){const d=i[u];if(d.validator(l))return d.classGroupId}},aa=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=t.slice(1,-1),s=r.indexOf(":"),n=r.slice(0,s);return n?sa+n:void 0})(),ia=t=>{const{theme:r,classGroups:s}=t;return la(s,r)},la=(t,r)=>{const s=Bn();for(const n in t){const o=t[n];pr(o,s,n,r)}return s},pr=(t,r,s,n)=>{const o=t.length;for(let a=0;a<o;a++){const i=t[a];ca(i,r,s,n)}},ca=(t,r,s,n)=>{if(typeof t=="string"){da(t,r,s);return}if(typeof t=="function"){ua(t,r,s,n);return}fa(t,r,s,n)},da=(t,r,s)=>{const n=t===""?r:zn(r,t);n.classGroupId=s},ua=(t,r,s,n)=>{if(ma(t)){pr(t(n),r,s,n);return}r.validators===null&&(r.validators=[]),r.validators.push(na(s,t))},fa=(t,r,s,n)=>{const o=Object.entries(t),a=o.length;for(let i=0;i<a;i++){const[l,c]=o[i];pr(c,zn(r,l),s,n)}},zn=(t,r)=>{let s=t;const n=r.split(Nt),o=n.length;for(let a=0;a<o;a++){const i=n[a];let l=s.nextPart.get(i);l||(l=Bn(),s.nextPart.set(i,l)),s=l}return s},ma=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,pa=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,s=Object.create(null),n=Object.create(null);const o=(a,i)=>{s[a]=i,r++,r>t&&(r=0,n=s,s=Object.create(null))};return{get(a){let i=s[a];if(i!==void 0)return i;if((i=n[a])!==void 0)return o(a,i),i},set(a,i){a in s?s[a]=i:o(a,i)}}},rr="!",Ur=":",ha=[],Gr=(t,r,s,n,o)=>({modifiers:t,hasImportantModifier:r,baseClassName:s,maybePostfixModifierPosition:n,isExternal:o}),xa=t=>{const{prefix:r,experimentalParseClassName:s}=t;let n=o=>{const a=[];let i=0,l=0,c=0,u;const d=o.length;for(let h=0;h<d;h++){const x=o[h];if(i===0&&l===0){if(x===Ur){a.push(o.slice(c,h)),c=h+1;continue}if(x==="/"){u=h;continue}}x==="["?i++:x==="]"?i--:x==="("?l++:x===")"&&l--}const f=a.length===0?o:o.slice(c);let m=f,p=!1;f.endsWith(rr)?(m=f.slice(0,-1),p=!0):f.startsWith(rr)&&(m=f.slice(1),p=!0);const g=u&&u>c?u-c:void 0;return Gr(a,p,m,g)};if(r){const o=r+Ur,a=n;n=i=>i.startsWith(o)?a(i.slice(o.length)):Gr(ha,!1,i,void 0,!0)}if(s){const o=n;n=a=>s({className:a,parseClassName:o})}return n},ga=t=>{const r=new Map;return t.orderSensitiveModifiers.forEach((s,n)=>{r.set(s,1e6+n)}),s=>{const n=[];let o=[];for(let a=0;a<s.length;a++){const i=s[a],l=i[0]==="[",c=r.has(i);l||c?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},ba=t=>({cache:pa(t.cacheSize),parseClassName:xa(t),sortModifiers:ga(t),...oa(t)}),va=/\s+/,ka=(t,r)=>{const{parseClassName:s,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=r,i=[],l=t.trim().split(va);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:m,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:h}=s(d);if(f){c=d+(c.length>0?" "+c:c);continue}let x=!!h,v=n(x?g.substring(0,h):g);if(!v){if(!x){c=d+(c.length>0?" "+c:c);continue}if(v=n(g),!v){c=d+(c.length>0?" "+c:c);continue}x=!1}const w=m.length===0?"":m.length===1?m[0]:a(m).join(":"),j=p?w+rr:w,C=j+v;if(i.indexOf(C)>-1)continue;i.push(C);const k=o(v,x);for(let N=0;N<k.length;++N){const A=k[N];i.push(j+A)}c=d+(c.length>0?" "+c:c)}return c},ya=(...t)=>{let r=0,s,n,o="";for(;r<t.length;)(s=t[r++])&&(n=Dn(s))&&(o&&(o+=" "),o+=n);return o},Dn=t=>{if(typeof t=="string")return t;let r,s="";for(let n=0;n<t.length;n++)t[n]&&(r=Dn(t[n]))&&(s&&(s+=" "),s+=r);return s},wa=(t,...r)=>{let s,n,o,a;const i=c=>{const u=r.reduce((d,f)=>f(d),t());return s=ba(u),n=s.cache.get,o=s.cache.set,a=l,l(c)},l=c=>{const u=n(c);if(u)return u;const d=ka(c,s);return o(c,d),d};return a=i,(...c)=>a(ya(...c))},ja=[],J=t=>{const r=s=>s[t]||ja;return r.isThemeGetter=!0,r},_n=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Na=/^\d+\/\d+$/,Ca=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ra=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ea=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ia=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fe=t=>Na.test(t),W=t=>!!t&&!Number.isNaN(Number(t)),Re=t=>!!t&&Number.isInteger(Number(t)),Kt=t=>t.endsWith("%")&&W(t.slice(0,-1)),je=t=>Ca.test(t),Aa=()=>!0,Ma=t=>Sa.test(t)&&!Ra.test(t),Vn=()=>!1,La=t=>Ea.test(t),$a=t=>Ia.test(t),Oa=t=>!$(t)&&!O(t),Ba=t=>Ue(t,Hn,Vn),$=t=>_n.test(t),$e=t=>Ue(t,Wn,Ma),Xt=t=>Ue(t,Pa,W),qr=t=>Ue(t,Fn,Vn),Ta=t=>Ue(t,Zn,$a),gt=t=>Ue(t,Un,La),O=t=>Pn.test(t),Qe=t=>Ge(t,Wn),za=t=>Ge(t,Va),Kr=t=>Ge(t,Fn),Da=t=>Ge(t,Hn),_a=t=>Ge(t,Zn),bt=t=>Ge(t,Un,!0),Ue=(t,r,s)=>{const n=_n.exec(t);return n?n[1]?r(n[1]):s(n[2]):!1},Ge=(t,r,s=!1)=>{const n=Pn.exec(t);return n?n[1]?r(n[1]):s:!1},Fn=t=>t==="position"||t==="percentage",Zn=t=>t==="image"||t==="url",Hn=t=>t==="length"||t==="size"||t==="bg-size",Wn=t=>t==="length",Pa=t=>t==="number",Va=t=>t==="family-name",Un=t=>t==="shadow",Fa=()=>{const t=J("color"),r=J("font"),s=J("text"),n=J("font-weight"),o=J("tracking"),a=J("leading"),i=J("breakpoint"),l=J("container"),c=J("spacing"),u=J("radius"),d=J("shadow"),f=J("inset-shadow"),m=J("text-shadow"),p=J("drop-shadow"),g=J("blur"),h=J("perspective"),x=J("aspect"),v=J("ease"),w=J("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...C(),O,$],N=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],I=()=>[O,$,c],S=()=>[Fe,"full","auto",...I()],y=()=>[Re,"none","subgrid",O,$],B=()=>["auto",{span:["full",Re,O,$]},Re,O,$],T=()=>[Re,"auto",O,$],D=()=>["auto","min","max","fr",O,$],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...I()],z=()=>[Fe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],R=()=>[t,O,$],q=()=>[...C(),Kr,qr,{position:[O,$]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ie=()=>["auto","cover","contain",Da,Ba,{size:[O,$]}],Z=()=>[Kt,Qe,$e],L=()=>["","none","full",u,O,$],G=()=>["",W,Qe,$e],se=()=>["solid","dashed","dotted","double"],De=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[W,Kt,Kr,qr],Ne=()=>["","none",g,O,$],ee=()=>["none",W,O,$],de=()=>["none",W,O,$],oe=()=>[W,O,$],re=()=>[Fe,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[je],breakpoint:[je],color:[Aa],container:[je],"drop-shadow":[je],ease:["in","out","in-out"],font:[Oa],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[je],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[je],shadow:[je],spacing:["px",W],text:[je],"text-shadow":[je],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Fe,$,O,x]}],container:["container"],columns:[{columns:[W,$,O,l]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:S()}],"inset-x":[{"inset-x":S()}],"inset-y":[{"inset-y":S()}],start:[{start:S()}],end:[{end:S()}],top:[{top:S()}],right:[{right:S()}],bottom:[{bottom:S()}],left:[{left:S()}],visibility:["visible","invisible","collapse"],z:[{z:[Re,"auto",O,$]}],basis:[{basis:[Fe,"full","auto",l,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[W,Fe,"auto","initial","none",$]}],grow:[{grow:["",W,O,$]}],shrink:[{shrink:["",W,O,$]}],order:[{order:[Re,"first","last","none",O,$]}],"grid-cols":[{"grid-cols":y()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":y()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[l,"screen",...z()]}],"min-w":[{"min-w":[l,"screen","none",...z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",s,Qe,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,O,Xt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Kt,$]}],"font-family":[{font:[za,$,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,O,$]}],"line-clamp":[{"line-clamp":[W,"none",O,Xt]}],leading:[{leading:[a,...I()]}],"list-image":[{"list-image":["none",O,$]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,$]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[W,"from-font","auto",O,$e]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[W,"auto",O,$]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",O,$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Re,O,$],radial:["",O,$],conic:[Re,O,$]},_a,Ta]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[W,O,$]}],"outline-w":[{outline:["",W,Qe,$e]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",d,bt,gt]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",f,bt,gt]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[W,$e]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",m,bt,gt]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[W,O,$]}],"mix-blend":[{"mix-blend":[...De(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":De()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[W]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[O,$]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[W]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",O,$]}],filter:[{filter:["","none",O,$]}],blur:[{blur:Ne()}],brightness:[{brightness:[W,O,$]}],contrast:[{contrast:[W,O,$]}],"drop-shadow":[{"drop-shadow":["","none",p,bt,gt]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",W,O,$]}],"hue-rotate":[{"hue-rotate":[W,O,$]}],invert:[{invert:["",W,O,$]}],saturate:[{saturate:[W,O,$]}],sepia:[{sepia:["",W,O,$]}],"backdrop-filter":[{"backdrop-filter":["","none",O,$]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[W,O,$]}],"backdrop-contrast":[{"backdrop-contrast":[W,O,$]}],"backdrop-grayscale":[{"backdrop-grayscale":["",W,O,$]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,O,$]}],"backdrop-invert":[{"backdrop-invert":["",W,O,$]}],"backdrop-opacity":[{"backdrop-opacity":[W,O,$]}],"backdrop-saturate":[{"backdrop-saturate":[W,O,$]}],"backdrop-sepia":[{"backdrop-sepia":["",W,O,$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,$]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[W,"initial",O,$]}],ease:[{ease:["linear","initial",v,O,$]}],delay:[{delay:[W,O,$]}],animate:[{animate:["none",w,O,$]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,O,$]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[O,$,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",O,$]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",O,$]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[W,Qe,$e,Xt]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Za=wa(Fa);function tt(...t){return Za(ta(t))}function Ha(t,r){return t.replace(/\{(\w+)\}/g,(s,n)=>{const o=r[n];return o!=null?String(o):""})}function Wa(t){return Array.isArray(t)&&t.every(Array.isArray)}function Gn(t){return Object.entries(t).map(([r,s])=>[{[r]:s}])}function nr(t){if(t)return Wa(t)?t:Gn(t)}function Ua(...t){return t.filter(Boolean).flat()}const Ga=300;function qa(t,r=Ga){const[s,n]=b.useState(t);return b.useEffect(()=>{const o=setTimeout(()=>{n(t)},r);return()=>{clearTimeout(o)}},[t,r]),s}function Ka(t){const{records:r,isOpen:s,onSelect:n,onClose:o,onEscape:a,onClear:i,searchQuery:l}=t,[c,u]=b.useState(-1),d=b.useCallback(f=>{if(s)switch(f.key){case"ArrowDown":{if(f.preventDefault(),r.length===0)return;u(m=>m>=r.length-1?0:m+1);break}case"ArrowUp":{if(f.preventDefault(),r.length===0)return;u(m=>m<=0?r.length-1:m-1);break}case"Home":{if(f.preventDefault(),r.length===0)return;u(0);break}case"End":{if(f.preventDefault(),r.length===0)return;u(r.length-1);break}case"Enter":{f.preventDefault(),c>=0&&c<r.length&&n(r[c]);break}case"Escape":{f.preventDefault(),a();break}case"Backspace":{l===""&&i();break}case"Tab":{o();break}}},[s,r,c,n,o,a,i,l]);return{highlightedIndex:c,setHighlightedIndex:u,handleKeyDown:d}}const Xa=(t,r,s,n)=>{const o=[s,{code:r,...n||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(o,"warn","react-i18next::",!0);Be(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...o):console?.warn&&console.warn(...o)},Xr={},qn=(t,r,s,n)=>{Be(s)&&Xr[s]||(Be(s)&&(Xr[s]=new Date),Xa(t,r,s,n))},Kn=(t,r)=>()=>{if(t.isInitialized)r();else{const s=()=>{setTimeout(()=>{t.off("initialized",s)},0),r()};t.on("initialized",s)}},sr=(t,r,s)=>{t.loadNamespaces(r,Kn(t,s))},Yr=(t,r,s,n)=>{if(Be(s)&&(s=[s]),t.options.preload&&t.options.preload.indexOf(r)>-1)return sr(t,s,n);s.forEach(o=>{t.options.ns.indexOf(o)<0&&t.options.ns.push(o)}),t.loadLanguages(r,Kn(t,n))},Ya=(t,r,s={})=>!r.languages||!r.languages.length?(qn(r,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:r.languages}),!0):r.hasLoadedNamespace(t,{lng:s.lng,precheck:(n,o)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!o(n.isLanguageChangingTo,t))return!1}}),Be=t=>typeof t=="string",Qa=t=>typeof t=="object"&&t!==null,Ja=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ei={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ti=t=>ei[t],ri=t=>t.replace(Ja,ti);let ni={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ri,transDefaultProps:void 0};const si=()=>ni;let oi;const ai=()=>oi,ii=b.createContext();class li{constructor(){this.usedNamespaces={}}addUsedNamespaces(r){r.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var vt={exports:{}},Yt={};var Qr;function ci(){if(Qr)return Yt;Qr=1;var t=b;function r(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var s=typeof Object.is=="function"?Object.is:r,n=t.useState,o=t.useEffect,a=t.useLayoutEffect,i=t.useDebugValue;function l(f,m){var p=m(),g=n({inst:{value:p,getSnapshot:m}}),h=g[0].inst,x=g[1];return a(function(){h.value=p,h.getSnapshot=m,c(h)&&x({inst:h})},[f,p,m]),o(function(){return c(h)&&x({inst:h}),f(function(){c(h)&&x({inst:h})})},[f]),i(p),p}function c(f){var m=f.getSnapshot;f=f.value;try{var p=m();return!s(f,p)}catch{return!0}}function u(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return Yt.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Yt}var Qt={};var Jr;function di(){return Jr||(Jr=1,process.env.NODE_ENV!=="production"&&(function(){function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function r(p,g){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=g();if(!f){var x=g();a(h,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}x=i({inst:{value:h,getSnapshot:g}});var v=x[0].inst,w=x[1];return c(function(){v.value=h,v.getSnapshot=g,s(v)&&w({inst:v})},[p,h,g]),l(function(){return s(v)&&w({inst:v}),p(function(){s(v)&&w({inst:v})})},[p]),u(h),h}function s(p){var g=p.getSnapshot;p=p.value;try{var h=g();return!a(p,h)}catch{return!0}}function n(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=b,a=typeof Object.is=="function"?Object.is:t,i=o.useState,l=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:r;Qt.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Qt}var en;function ui(){return en||(en=1,process.env.NODE_ENV==="production"?vt.exports=ci():vt.exports=di()),vt.exports}var fi=ui();const mi=(t,r)=>Be(r)?r:Qa(r)&&Be(r.defaultValue)?r.defaultValue:Array.isArray(t)?t[t.length-1]:t,pi={t:mi,ready:!1},hi=()=>()=>{},xi=(t,r={})=>{const{i18n:s}=r,{i18n:n,defaultNS:o}=b.useContext(ii)||{},a=s||n||ai();a&&!a.reportNamespaces&&(a.reportNamespaces=new li),a||qn(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const i=b.useMemo(()=>({...si(),...a?.options?.react,...r}),[a,r]),{useSuspense:l,keyPrefix:c}=i,u=t,d=Be(u)?[u]:u,f=b.useMemo(()=>d,d);a?.reportNamespaces?.addUsedNamespaces?.(f);const m=b.useRef(0),p=b.useCallback(S=>{if(!a)return hi;const{bindI18n:y,bindI18nStore:B}=i,T=()=>{m.current+=1,S()};return y&&a.on(y,T),B&&a.store.on(B,T),()=>{y&&y.split(" ").forEach(D=>a.off(D,T)),B&&B.split(" ").forEach(D=>a.store.off(D,T))}},[a,i]),g=b.useRef(),h=b.useCallback(()=>{if(!a)return pi;const S=!!(a.isInitialized||a.initializedStoreOnce)&&f.every(_=>Ya(_,a,i)),y=r.lng||a.language,B=m.current,T=g.current;if(T&&T.ready===S&&T.lng===y&&T.keyPrefix===c&&T.revision===B)return T;const H={t:a.getFixedT(y,i.nsMode==="fallback"?f:f[0],c),ready:S,lng:y,keyPrefix:c,revision:B};return g.current=H,H},[a,f,c,i,r.lng]),[x,v]=b.useState(0),{t:w,ready:j}=fi.useSyncExternalStore(p,h,h);b.useEffect(()=>{if(a&&!j&&!l){const S=()=>v(y=>y+1);r.lng?Yr(a,r.lng,f,S):sr(a,f,S)}},[a,r.lng,f,j,l,x]);const C=a||{},k=b.useRef(null),N=b.useRef(),A=S=>{const y=Object.getOwnPropertyDescriptors(S);y.__original&&delete y.__original;const B=Object.create(Object.getPrototypeOf(S),y);if(!Object.prototype.hasOwnProperty.call(B,"__original"))try{Object.defineProperty(B,"__original",{value:S,writable:!1,enumerable:!1,configurable:!1})}catch{}return B},I=b.useMemo(()=>{const S=C,y=S?.language;let B=S;S&&(k.current&&k.current.__original===S?N.current!==y?(B=A(S),k.current=B,N.current=y):B=k.current:(B=A(S),k.current=B,N.current=y));const T=[w,B,j];return T.t=w,T.i18n=B,T.ready=j,T},[w,C,j,C.resolvedLanguage,C.language,C.languages]);if(a&&l&&!j)throw new Promise(S=>{const y=()=>S();r.lng?Yr(a,r.lng,f,y):sr(a,f,y)});return I},gi={placeholder:"Select...",searchPlaceholder:"Search...",noResults:"No results found",loading:"Loading...",minChars:"Type at least {{count}} characters",error:"An error occurred",notFound:"[Record not found]",clear:"Clear selection",open:"Open dropdown",close:"Close dropdown","announcements.loading":"Loading results","announcements.noResults":"No results found","announcements.cleared":"Selection cleared","announcements.opened":"Dropdown opened, {{count}} results available","announcements.closed":"Dropdown closed","announcements.selected":"{{value}} selected","announcements.resultsLoaded":"{{count}} results loaded","validation.required":"This field is required","validation.requiredIndicator":"*"};function bi(t,r){return r?t.replace(/\{\{(\w+)\}\}/g,(s,n)=>String(r[n]??"")):t}function vi(){try{const{t,i18n:r}=xi("lookupField");if(!r.isInitialized)throw new Error("i18n not initialized");return{t:(s,n)=>n?t(s,n):t(s),i18n:r}}catch{return{t:(r,s)=>{const n=gi[r]??r;return bi(n,s)},i18n:null}}}function ki(t,r,s=!0){const n=b.useCallback(o=>{t.current&&!t.current.contains(o.target)&&r(o)},[t,r]);b.useEffect(()=>{if(s)return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[n,s])}function Mt(){return typeof window<"u"}function qe(t){return Xn(t)?(t.nodeName||"").toLowerCase():"#document"}function ce(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function be(t){var r;return(r=(Xn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function Xn(t){return Mt()?t instanceof Node||t instanceof ce(t).Node:!1}function ne(t){return Mt()?t instanceof Element||t instanceof ce(t).Element:!1}function ge(t){return Mt()?t instanceof HTMLElement||t instanceof ce(t).HTMLElement:!1}function tn(t){return!Mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ce(t).ShadowRoot}const yi=new Set(["inline","contents"]);function at(t){const{overflow:r,overflowX:s,overflowY:n,display:o}=pe(t);return/auto|scroll|overlay|hidden|clip/.test(r+n+s)&&!yi.has(o)}const wi=new Set(["table","td","th"]);function ji(t){return wi.has(qe(t))}const Ni=[":popover-open",":modal"];function Lt(t){return Ni.some(r=>{try{return t.matches(r)}catch{return!1}})}const Ci=["transform","translate","scale","rotate","perspective"],Si=["transform","translate","scale","rotate","perspective","filter"],Ri=["paint","layout","strict","content"];function hr(t){const r=xr(),s=ne(t)?pe(t):t;return Ci.some(n=>s[n]?s[n]!=="none":!1)||(s.containerType?s.containerType!=="normal":!1)||!r&&(s.backdropFilter?s.backdropFilter!=="none":!1)||!r&&(s.filter?s.filter!=="none":!1)||Si.some(n=>(s.willChange||"").includes(n))||Ri.some(n=>(s.contain||"").includes(n))}function Ei(t){let r=Ae(t);for(;ge(r)&&!We(r);){if(hr(r))return r;if(Lt(r))return null;r=Ae(r)}return null}function xr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ii=new Set(["html","body","#document"]);function We(t){return Ii.has(qe(t))}function pe(t){return ce(t).getComputedStyle(t)}function $t(t){return ne(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ae(t){if(qe(t)==="html")return t;const r=t.assignedSlot||t.parentNode||tn(t)&&t.host||be(t);return tn(r)?r.host:r}function Yn(t){const r=Ae(t);return We(r)?t.ownerDocument?t.ownerDocument.body:t.body:ge(r)&&at(r)?r:Yn(r)}function rt(t,r,s){var n;r===void 0&&(r=[]),s===void 0&&(s=!0);const o=Yn(t),a=o===((n=t.ownerDocument)==null?void 0:n.body),i=ce(o);if(a){const l=or(i);return r.concat(i,i.visualViewport||[],at(o)?o:[],l&&s?rt(l):[])}return r.concat(o,rt(o,[],s))}function or(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const nt=Math.min,fe=Math.max,Ct=Math.round,kt=Math.floor,xe=t=>({x:t,y:t}),Ai={left:"right",right:"left",bottom:"top",top:"bottom"},Mi={start:"end",end:"start"};function Ot(t,r){return typeof t=="function"?t(r):t}function Te(t){return t.split("-")[0]}function it(t){return t.split("-")[1]}function Li(t){return t==="x"?"y":"x"}function Qn(t){return t==="y"?"height":"width"}const $i=new Set(["top","bottom"]);function Ee(t){return $i.has(Te(t))?"y":"x"}function Jn(t){return Li(Ee(t))}function Oi(t,r,s){s===void 0&&(s=!1);const n=it(t),o=Jn(t),a=Qn(o);let i=o==="x"?n===(s?"end":"start")?"right":"left":n==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=St(i)),[i,St(i)]}function Bi(t){const r=St(t);return[ar(t),r,ar(r)]}function ar(t){return t.replace(/start|end/g,r=>Mi[r])}const rn=["left","right"],nn=["right","left"],Ti=["top","bottom"],zi=["bottom","top"];function Di(t,r,s){switch(t){case"top":case"bottom":return s?r?nn:rn:r?rn:nn;case"left":case"right":return r?Ti:zi;default:return[]}}function _i(t,r,s,n){const o=it(t);let a=Di(Te(t),s==="start",n);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(ar)))),a}function St(t){return t.replace(/left|right|bottom|top/g,r=>Ai[r])}function Pi(t){return{top:0,right:0,bottom:0,left:0,...t}}function Vi(t){return typeof t!="number"?Pi(t):{top:t,right:t,bottom:t,left:t}}function Rt(t){const{x:r,y:s,width:n,height:o}=t;return{width:n,height:o,top:s,left:r,right:r+n,bottom:s+o,x:r,y:s}}var Fi=typeof document<"u",Zi=function(){},ir=Fi?b.useLayoutEffect:Zi;const Hi={...M},Wi=Hi.useInsertionEffect,Ui=Wi||(t=>t());function Gi(t){const r=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ui(()=>{r.current=t}),M.useCallback(function(){for(var s=arguments.length,n=new Array(s),o=0;o<s;o++)n[o]=arguments[o];return r.current==null?void 0:r.current(...n)},[])}function sn(t,r,s){let{reference:n,floating:o}=t;const a=Ee(r),i=Jn(r),l=Qn(i),c=Te(r),u=a==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,m=n[l]/2-o[l]/2;let p;switch(c){case"top":p={x:d,y:n.y-o.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(it(r)){case"start":p[i]-=m*(s&&u?-1:1);break;case"end":p[i]+=m*(s&&u?-1:1);break}return p}const qi=async(t,r,s)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=s,l=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(r));let u=await i.getElementRects({reference:t,floating:r,strategy:o}),{x:d,y:f}=sn(u,n,c),m=n,p={},g=0;for(let h=0;h<l.length;h++){const{name:x,fn:v}=l[h],{x:w,y:j,data:C,reset:k}=await v({x:d,y:f,initialPlacement:n,placement:m,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:t,floating:r}});d=w??d,f=j??f,p={...p,[x]:{...p[x],...C}},k&&g<=50&&(g++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(u=k.rects===!0?await i.getElementRects({reference:t,floating:r,strategy:o}):k.rects),{x:d,y:f}=sn(u,m,c)),h=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:p}};async function es(t,r){var s;r===void 0&&(r={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=Ot(r,t),g=Vi(p),x=l[m?f==="floating"?"reference":"floating":f],v=Rt(await a.getClippingRect({element:(s=await(a.isElement==null?void 0:a.isElement(x)))==null||s?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),w=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,j=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),C=await(a.isElement==null?void 0:a.isElement(j))?await(a.getScale==null?void 0:a.getScale(j))||{x:1,y:1}:{x:1,y:1},k=Rt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:j,strategy:c}):w);return{top:(v.top-k.top+g.top)/C.y,bottom:(k.bottom-v.bottom+g.bottom)/C.y,left:(v.left-k.left+g.left)/C.x,right:(k.right-v.right+g.right)/C.x}}const Ki=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var s,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:c,elements:u}=r,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...x}=Ot(t,r);if((s=a.arrow)!=null&&s.alignmentOffset)return{};const v=Te(o),w=Ee(l),j=Te(l)===l,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=m||(j||!h?[St(l)]:Bi(l)),N=g!=="none";!m&&N&&k.push(..._i(l,h,g,C));const A=[l,...k],I=await es(r,x),S=[];let y=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&S.push(I[v]),f){const H=Oi(o,i,C);S.push(I[H[0]],I[H[1]])}if(y=[...y,{placement:o,overflows:S}],!S.every(H=>H<=0)){var B,T;const H=(((B=a.flip)==null?void 0:B.index)||0)+1,_=A[H];if(_&&(!(f==="alignment"?w!==Ee(_):!1)||y.every(R=>Ee(R.placement)===w?R.overflows[0]>0:!0)))return{data:{index:H,overflows:y},reset:{placement:_}};let E=(T=y.filter(z=>z.overflows[0]<=0).sort((z,R)=>z.overflows[1]-R.overflows[1])[0])==null?void 0:T.placement;if(!E)switch(p){case"bestFit":{var D;const z=(D=y.filter(R=>{if(N){const q=Ee(R.placement);return q===w||q==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(q=>q>0).reduce((q,F)=>q+F,0)]).sort((R,q)=>R[1]-q[1])[0])==null?void 0:D[0];z&&(E=z);break}case"initialPlacement":E=l;break}if(o!==E)return{reset:{placement:E}}}return{}}}},Xi=new Set(["left","top"]);async function Yi(t,r){const{placement:s,platform:n,elements:o}=t,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Te(s),l=it(s),c=Ee(s)==="y",u=Xi.has(i)?-1:1,d=a&&c?-1:1,f=Ot(r,t);let{mainAxis:m,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(p=l==="end"?g*-1:g),c?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const Qi=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var s,n;const{x:o,y:a,placement:i,middlewareData:l}=r,c=await Yi(r,t);return i===((s=l.offset)==null?void 0:s.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},Ji=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var s,n;const{placement:o,rects:a,platform:i,elements:l}=r,{apply:c=()=>{},...u}=Ot(t,r),d=await es(r,u),f=Te(o),m=it(o),p=Ee(o)==="y",{width:g,height:h}=a.floating;let x,v;f==="top"||f==="bottom"?(x=f,v=m===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(v=f,x=m==="end"?"top":"bottom");const w=h-d.top-d.bottom,j=g-d.left-d.right,C=nt(h-d[x],w),k=nt(g-d[v],j),N=!r.middlewareData.shift;let A=C,I=k;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(I=j),(n=r.middlewareData.shift)!=null&&n.enabled.y&&(A=w),N&&!m){const y=fe(d.left,0),B=fe(d.right,0),T=fe(d.top,0),D=fe(d.bottom,0);p?I=g-2*(y!==0||B!==0?y+B:fe(d.left,d.right)):A=h-2*(T!==0||D!==0?T+D:fe(d.top,d.bottom))}await c({...r,availableWidth:I,availableHeight:A});const S=await i.getDimensions(l.floating);return g!==S.width||h!==S.height?{reset:{rects:!0}}:{}}}};function ts(t){const r=pe(t);let s=parseFloat(r.width)||0,n=parseFloat(r.height)||0;const o=ge(t),a=o?t.offsetWidth:s,i=o?t.offsetHeight:n,l=Ct(s)!==a||Ct(n)!==i;return l&&(s=a,n=i),{width:s,height:n,$:l}}function gr(t){return ne(t)?t:t.contextElement}function He(t){const r=gr(t);if(!ge(r))return xe(1);const s=r.getBoundingClientRect(),{width:n,height:o,$:a}=ts(r);let i=(a?Ct(s.width):s.width)/n,l=(a?Ct(s.height):s.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const el=xe(0);function rs(t){const r=ce(t);return!xr()||!r.visualViewport?el:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function tl(t,r,s){return r===void 0&&(r=!1),!s||r&&s!==ce(t)?!1:r}function ze(t,r,s,n){r===void 0&&(r=!1),s===void 0&&(s=!1);const o=t.getBoundingClientRect(),a=gr(t);let i=xe(1);r&&(n?ne(n)&&(i=He(n)):i=He(t));const l=tl(a,s,n)?rs(a):xe(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(a){const m=ce(a),p=n&&ne(n)?ce(n):n;let g=m,h=or(g);for(;h&&n&&p!==g;){const x=He(h),v=h.getBoundingClientRect(),w=pe(h),j=v.left+(h.clientLeft+parseFloat(w.paddingLeft))*x.x,C=v.top+(h.clientTop+parseFloat(w.paddingTop))*x.y;c*=x.x,u*=x.y,d*=x.x,f*=x.y,c+=j,u+=C,g=ce(h),h=or(g)}}return Rt({width:d,height:f,x:c,y:u})}function Bt(t,r){const s=$t(t).scrollLeft;return r?r.left+s:ze(be(t)).left+s}function ns(t,r){const s=t.getBoundingClientRect(),n=s.left+r.scrollLeft-Bt(t,s),o=s.top+r.scrollTop;return{x:n,y:o}}function rl(t){let{elements:r,rect:s,offsetParent:n,strategy:o}=t;const a=o==="fixed",i=be(n),l=r?Lt(r.floating):!1;if(n===i||l&&a)return s;let c={scrollLeft:0,scrollTop:0},u=xe(1);const d=xe(0),f=ge(n);if((f||!f&&!a)&&((qe(n)!=="body"||at(i))&&(c=$t(n)),ge(n))){const p=ze(n);u=He(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}const m=i&&!f&&!a?ns(i,c):xe(0);return{width:s.width*u.x,height:s.height*u.y,x:s.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:s.y*u.y-c.scrollTop*u.y+d.y+m.y}}function nl(t){return Array.from(t.getClientRects())}function sl(t){const r=be(t),s=$t(t),n=t.ownerDocument.body,o=fe(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),a=fe(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight);let i=-s.scrollLeft+Bt(t);const l=-s.scrollTop;return pe(n).direction==="rtl"&&(i+=fe(r.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:l}}const on=25;function ol(t,r){const s=ce(t),n=be(t),o=s.visualViewport;let a=n.clientWidth,i=n.clientHeight,l=0,c=0;if(o){a=o.width,i=o.height;const d=xr();(!d||d&&r==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=Bt(n);if(u<=0){const d=n.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(n.clientWidth-f.clientWidth-p);g<=on&&(a-=g)}else u<=on&&(a+=u);return{width:a,height:i,x:l,y:c}}const al=new Set(["absolute","fixed"]);function il(t,r){const s=ze(t,!0,r==="fixed"),n=s.top+t.clientTop,o=s.left+t.clientLeft,a=ge(t)?He(t):xe(1),i=t.clientWidth*a.x,l=t.clientHeight*a.y,c=o*a.x,u=n*a.y;return{width:i,height:l,x:c,y:u}}function an(t,r,s){let n;if(r==="viewport")n=ol(t,s);else if(r==="document")n=sl(be(t));else if(ne(r))n=il(r,s);else{const o=rs(t);n={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return Rt(n)}function ss(t,r){const s=Ae(t);return s===r||!ne(s)||We(s)?!1:pe(s).position==="fixed"||ss(s,r)}function ll(t,r){const s=r.get(t);if(s)return s;let n=rt(t,[],!1).filter(l=>ne(l)&&qe(l)!=="body"),o=null;const a=pe(t).position==="fixed";let i=a?Ae(t):t;for(;ne(i)&&!We(i);){const l=pe(i),c=hr(i);!c&&l.position==="fixed"&&(o=null),(a?!c&&!o:!c&&l.position==="static"&&!!o&&al.has(o.position)||at(i)&&!c&&ss(t,i))?n=n.filter(d=>d!==i):o=l,i=Ae(i)}return r.set(t,n),n}function cl(t){let{element:r,boundary:s,rootBoundary:n,strategy:o}=t;const i=[...s==="clippingAncestors"?Lt(r)?[]:ll(r,this._c):[].concat(s),n],l=i[0],c=i.reduce((u,d)=>{const f=an(r,d,o);return u.top=fe(f.top,u.top),u.right=nt(f.right,u.right),u.bottom=nt(f.bottom,u.bottom),u.left=fe(f.left,u.left),u},an(r,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function dl(t){const{width:r,height:s}=ts(t);return{width:r,height:s}}function ul(t,r,s){const n=ge(r),o=be(r),a=s==="fixed",i=ze(t,!0,a,r);let l={scrollLeft:0,scrollTop:0};const c=xe(0);function u(){c.x=Bt(o)}if(n||!n&&!a)if((qe(r)!=="body"||at(o))&&(l=$t(r)),n){const p=ze(r,!0,a,r);c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}else o&&u();a&&!n&&o&&u();const d=o&&!n&&!a?ns(o,l):xe(0),f=i.left+l.scrollLeft-c.x-d.x,m=i.top+l.scrollTop-c.y-d.y;return{x:f,y:m,width:i.width,height:i.height}}function Jt(t){return pe(t).position==="static"}function ln(t,r){if(!ge(t)||pe(t).position==="fixed")return null;if(r)return r(t);let s=t.offsetParent;return be(t)===s&&(s=s.ownerDocument.body),s}function os(t,r){const s=ce(t);if(Lt(t))return s;if(!ge(t)){let o=Ae(t);for(;o&&!We(o);){if(ne(o)&&!Jt(o))return o;o=Ae(o)}return s}let n=ln(t,r);for(;n&&ji(n)&&Jt(n);)n=ln(n,r);return n&&We(n)&&Jt(n)&&!hr(n)?s:n||Ei(t)||s}const fl=async function(t){const r=this.getOffsetParent||os,s=this.getDimensions,n=await s(t.floating);return{reference:ul(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ml(t){return pe(t).direction==="rtl"}const pl={convertOffsetParentRelativeRectToViewportRelativeRect:rl,getDocumentElement:be,getClippingRect:cl,getOffsetParent:os,getElementRects:fl,getClientRects:nl,getDimensions:dl,getScale:He,isElement:ne,isRTL:ml};function as(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function hl(t,r){let s=null,n;const o=be(t);function a(){var l;clearTimeout(n),(l=s)==null||l.disconnect(),s=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=t.getBoundingClientRect(),{left:d,top:f,width:m,height:p}=u;if(l||r(),!m||!p)return;const g=kt(f),h=kt(o.clientWidth-(d+m)),x=kt(o.clientHeight-(f+p)),v=kt(d),j={rootMargin:-g+"px "+-h+"px "+-x+"px "+-v+"px",threshold:fe(0,nt(1,c))||1};let C=!0;function k(N){const A=N[0].intersectionRatio;if(A!==c){if(!C)return i();A?i(!1,A):n=setTimeout(()=>{i(!1,1e-7)},1e3)}A===1&&!as(u,t.getBoundingClientRect())&&i(),C=!1}try{s=new IntersectionObserver(k,{...j,root:o.ownerDocument})}catch{s=new IntersectionObserver(k,j)}s.observe(t)}return i(!0),a}function xl(t,r,s,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=gr(t),d=o||a?[...u?rt(u):[],...rt(r)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",s,{passive:!0}),a&&v.addEventListener("resize",s)});const f=u&&l?hl(u,s):null;let m=-1,p=null;i&&(p=new ResizeObserver(v=>{let[w]=v;w&&w.target===u&&p&&(p.unobserve(r),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var j;(j=p)==null||j.observe(r)})),s()}),u&&!c&&p.observe(u),p.observe(r));let g,h=c?ze(t):null;c&&x();function x(){const v=ze(t);h&&!as(h,v)&&s(),h=v,g=requestAnimationFrame(x)}return s(),()=>{var v;d.forEach(w=>{o&&w.removeEventListener("scroll",s),a&&w.removeEventListener("resize",s)}),f?.(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const gl=Qi,bl=Ki,vl=Ji,kl=(t,r,s)=>{const n=new Map,o={platform:pl,...s},a={...o.platform,_c:n};return qi(t,r,{...o,platform:a})};var yl=typeof document<"u",wl=function(){},yt=yl?b.useLayoutEffect:wl;function Et(t,r){if(t===r)return!0;if(typeof t!=typeof r)return!1;if(typeof t=="function"&&t.toString()===r.toString())return!0;let s,n,o;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(s=t.length,s!==r.length)return!1;for(n=s;n--!==0;)if(!Et(t[n],r[n]))return!1;return!0}if(o=Object.keys(t),s=o.length,s!==Object.keys(r).length)return!1;for(n=s;n--!==0;)if(!{}.hasOwnProperty.call(r,o[n]))return!1;for(n=s;n--!==0;){const a=o[n];if(!(a==="_owner"&&t.$$typeof)&&!Et(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}function is(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function cn(t,r){const s=is(t);return Math.round(r*s)/s}function er(t){const r=M.useRef(t);return yt(()=>{r.current=t}),r}function jl(t){t===void 0&&(t={});const{placement:r="bottom",strategy:s="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,f]=M.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[m,p]=M.useState(n);Et(m,n)||p(n);const[g,h]=M.useState(null),[x,v]=M.useState(null),w=M.useCallback(R=>{R!==N.current&&(N.current=R,h(R))},[]),j=M.useCallback(R=>{R!==A.current&&(A.current=R,v(R))},[]),C=a||g,k=i||x,N=M.useRef(null),A=M.useRef(null),I=M.useRef(d),S=c!=null,y=er(c),B=er(o),T=er(u),D=M.useCallback(()=>{if(!N.current||!A.current)return;const R={placement:r,strategy:s,middleware:m};B.current&&(R.platform=B.current),kl(N.current,A.current,R).then(q=>{const F={...q,isPositioned:T.current!==!1};H.current&&!Et(I.current,F)&&(I.current=F,$s.flushSync(()=>{f(F)}))})},[m,r,s,B,T]);yt(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[u]);const H=M.useRef(!1);yt(()=>(H.current=!0,()=>{H.current=!1}),[]),yt(()=>{if(C&&(N.current=C),k&&(A.current=k),C&&k){if(y.current)return y.current(C,k,D);D()}},[C,k,D,y,S]);const _=M.useMemo(()=>({reference:N,floating:A,setReference:w,setFloating:j}),[w,j]),E=M.useMemo(()=>({reference:C,floating:k}),[C,k]),z=M.useMemo(()=>{const R={position:s,left:0,top:0};if(!E.floating)return R;const q=cn(E.floating,d.x),F=cn(E.floating,d.y);return l?{...R,transform:"translate("+q+"px, "+F+"px)",...is(E.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:q,top:F}},[s,l,E.floating,d.x,d.y]);return M.useMemo(()=>({...d,update:D,refs:_,elements:E,floatingStyles:z}),[d,D,_,E,z])}const Nl=(t,r)=>({...gl(t),options:[t,r]}),Cl=(t,r)=>({...bl(t),options:[t,r]}),Sl=(t,r)=>({...vl(t),options:[t,r]}),Rl={...M};let dn=!1,El=0;const un=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+El++;function Il(){const[t,r]=M.useState(()=>dn?un():void 0);return ir(()=>{t==null&&r(un())},[]),M.useEffect(()=>{dn=!0},[]),t}const Al=Rl.useId,Ml=Al||Il;let lr;process.env.NODE_ENV!=="production"&&(lr=new Set);function Ll(){for(var t,r=arguments.length,s=new Array(r),n=0;n<r;n++)s[n]=arguments[n];const o="Floating UI: "+s.join(" ");if(!((t=lr)!=null&&t.has(o))){var a;(a=lr)==null||a.add(o),console.error(o)}}function $l(){const t=new Map;return{emit(r,s){var n;(n=t.get(r))==null||n.forEach(o=>o(s))},on(r,s){t.has(r)||t.set(r,new Set),t.get(r).add(s)},off(r,s){var n;(n=t.get(r))==null||n.delete(s)}}}const Ol=M.createContext(null),Bl=M.createContext(null),Tl=()=>{var t;return((t=M.useContext(Ol))==null?void 0:t.id)||null},zl=()=>M.useContext(Bl);function Dl(t){const{open:r=!1,onOpenChange:s,elements:n}=t,o=Ml(),a=M.useRef({}),[i]=M.useState(()=>$l()),l=Tl()!=null;if(process.env.NODE_ENV!=="production"){const p=n.reference;p&&!ne(p)&&Ll("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=M.useState(n.reference),d=Gi((p,g,h)=>{a.current.openEvent=p?g:void 0,i.emit("openchange",{open:p,event:g,reason:h,nested:l}),s?.(p,g,h)}),f=M.useMemo(()=>({setPositionReference:u}),[]),m=M.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return M.useMemo(()=>({dataRef:a,open:r,onOpenChange:d,elements:m,events:i,floatingId:o,refs:f}),[r,d,m,i,o,f])}function _l(t){t===void 0&&(t={});const{nodeId:r}=t,s=Dl({...t,elements:{reference:null,floating:null,...t.elements}}),n=t.rootContext||s,o=n.elements,[a,i]=M.useState(null),[l,c]=M.useState(null),d=o?.domReference||a,f=M.useRef(null),m=zl();ir(()=>{d&&(f.current=d)},[d]);const p=jl({...t,elements:{...o,...l&&{reference:l}}}),g=M.useCallback(j=>{const C=ne(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),getClientRects:()=>j.getClientRects(),contextElement:j}:j;c(C),p.refs.setReference(C)},[p.refs]),h=M.useCallback(j=>{(ne(j)||j===null)&&(f.current=j,i(j)),(ne(p.refs.reference.current)||p.refs.reference.current===null||j!==null&&!ne(j))&&p.refs.setReference(j)},[p.refs]),x=M.useMemo(()=>({...p.refs,setReference:h,setPositionReference:g,domReference:f}),[p.refs,h,g]),v=M.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),w=M.useMemo(()=>({...p,...n,refs:x,elements:v,nodeId:r}),[p,x,v,r,n]);return ir(()=>{n.dataRef.current.floatingContext=w;const j=m?.nodesRef.current.find(C=>C.id===r);j&&(j.context=w)}),M.useMemo(()=>({...p,context:w,refs:x,elements:v}),[p,x,v,w])}function Pl({placement:t="bottom-start",offsetPx:r=4,enabled:s=!0}={}){const{refs:n,floatingStyles:o,context:a}=_l({placement:t,middleware:[Nl(r),Cl({fallbackAxisSideDirection:"end",padding:8}),Sl({apply({rects:i,elements:l}){Object.assign(l.floating.style,{minWidth:`${i.reference.width}px`})},padding:8})],whileElementsMounted:s?xl:void 0});return{refs:n,floatingStyles:o,context:a}}function Ze(t,r,s){let n=s.initialDeps??[],o,a=!0;function i(){var l,c,u;let d;s.key&&((l=s.debug)!=null&&l.call(s))&&(d=Date.now());const f=t();if(!(f.length!==n.length||f.some((g,h)=>n[h]!==g)))return o;n=f;let p;if(s.key&&((c=s.debug)!=null&&c.call(s))&&(p=Date.now()),o=r(...f),s.key&&((u=s.debug)!=null&&u.call(s))){const g=Math.round((Date.now()-d)*100)/100,h=Math.round((Date.now()-p)*100)/100,x=h/16,v=(w,j)=>{for(w=String(w);w.length<j;)w=" "+w;return w};console.info(`%c⏱ ${v(h,5)} /${v(g,5)} ms`,`
|
|
1451
1452
|
font-size: .6rem;
|
|
1452
1453
|
font-weight: bold;
|
|
1453
|
-
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,s?.key)}return s?.onChange&&!(a&&s.skipInitialOnChange)&&s.onChange(o),a=!1,o}return i.updateDeps=l=>{r=l},i}function fn(t,n){if(t===void 0)throw new Error("Unexpected undefined");return t}const Vl=(t,n)=>Math.abs(t-n)<1.01,Fl=(t,n,s)=>{let r;return function(...o){t.clearTimeout(r),r=t.setTimeout(()=>n.apply(this,o),s)}},mn=t=>{const{offsetWidth:n,offsetHeight:s}=t;return{width:n,height:s}},Zl=t=>t,Hl=t=>{const n=Math.max(t.startIndex-t.overscan,0),s=Math.min(t.endIndex+t.overscan,t.count-1),r=[];for(let o=n;o<=s;o++)r.push(o);return r},Wl=(t,n)=>{const s=t.scrollElement;if(!s)return;const r=t.targetWindow;if(!r)return;const o=i=>{const{width:l,height:c}=i;n({width:Math.round(l),height:Math.round(c)})};if(o(mn(s)),!r.ResizeObserver)return()=>{};const a=new r.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,n)=>{const s=t.scrollElement;if(!s)return;const r=t.targetWindow;if(!r)return;let o=0;const a=t.options.useScrollendEvent&&hn?()=>{}:Fl(r,()=>{n(o,!1)},t.options.isScrollingResetDelay),i=d=>()=>{const{horizontal:f,isRtl:m}=t.options;o=f?s.scrollLeft*(m&&-1||1):s.scrollTop,a(),n(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,n,s)=>{if(n?.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[s.options.horizontal?"inlineSize":"blockSize"])}return t[s.options.horizontal?"offsetWidth":"offsetHeight"]},ql=(t,{adjustments:n=0,behavior:s},r)=>{var o,a;const i=t+n;(a=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[r.options.horizontal?"left":"top"]:i,behavior:s})};class Kl{constructor(n){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 r=()=>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=r())==null||o.disconnect(),s=null},observe:o=>{var a;return(a=r())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=r())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=s=>{Object.entries(s).forEach(([r,o])=>{typeof o>"u"&&delete s[r]}),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 r,o;(o=(r=this.options).onChange)==null||o.call(r,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 r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,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,r)=>{const o=new Map,a=new Map;for(let i=r-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,r,o,a,i,l)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMeasuredCacheIndexes=[],{count:s,paddingStart:r,scrollMargin:o,getItemKey:a,enabled:i,lanes:l}),{key:!1}),this.getMeasurements=Ze(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:s,paddingStart:r,scrollMargin:o,getItemKey:a,enabled:i,lanes:l},c)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>s)for(const m of this.laneAssignments.keys())m>=s&&this.laneAssignments.delete(m);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===s&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,u),f=new Array(l).fill(void 0);for(let m=0;m<u;m++){const p=d[m];p&&(f[p.lane]=m)}for(let m=u;m<s;m++){const p=a(m),g=this.laneAssignments.get(m);let h,x;if(g!==void 0&&this.options.lanes>1){h=g;const C=f[h],k=C!==void 0?d[C]:void 0;x=k?k.end+this.options.gap:r+o}else{const C=this.options.lanes===1?d[m-1]:this.getFurthestMeasurement(d,m);x=C?C.end+this.options.gap:r+o,h=C?C.lane:m%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(m,h)}const v=c.get(p),w=typeof v=="number"?v:this.options.estimateSize(m),j=x+w;d[m]={index:m,start:x,size:w,end:j,key:p,lane:h},f[h]=m}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Ze(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(s,r,o,a)=>this.range=s.length>0&&r>0?Xl({measurements:s,outerSize:r,scrollOffset:o,lanes:a}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Ze(()=>{let s=null,r=null;const o=this.calculateRange();return o&&(s=o.startIndex,r=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,s,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,s,r]},(s,r,o,a,i)=>a===null||i===null?[]:s({startIndex:a,endIndex:i,overscan:r,count:o}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=s=>{const r=this.options.indexAttribute,o=s.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(s,r)=>{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,r,this))},this.resizeItem=(s,r)=>{const o=this.measurementsCache[s];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,i=r-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,r)),this.notify(!1))},this.measureElement=s=>{if(!s){this.elementsCache.forEach((r,o)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(o))});return}this._measureElement(s,void 0)},this.getVirtualItems=Ze(()=>[this.getVirtualIndexes(),this.getMeasurements()],(s,r)=>{const o=[];for(let a=0,i=s.length;a<i;a++){const l=s[a],c=r[l];o.push(c)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=s=>{const r=this.getMeasurements();if(r.length!==0)return fn(r[ls(0,r.length-1,o=>fn(r[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,r,o=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),i=this.getScrollOffset();r==="auto"&&(r=s>=i+a?"end":"start"),r==="center"?s+=(o-a)/2:r==="end"&&(s-=a);const l=this.getMaxScrollOffset();return Math.max(Math.min(l,s),0)},this.getOffsetForIndex=(s,r="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(r==="auto")if(o.end>=i+a-this.options.scrollPaddingEnd)r="end";else if(o.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];if(r==="end"&&s===this.options.count-1)return[this.getMaxScrollOffset(),r];const l=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,r,o.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(s,{align:r="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,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(s,{align:r="auto",behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),s=Math.max(0,Math.min(s,this.options.count-1)),this.currentScrollToIndex=s;let a=0;const i=10,l=u=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(s,u);if(!d){console.warn("Failed to get offset for index:",s);return}const[f,m]=d;this._scrollToOffset(f,{adjustments:void 0,behavior:o}),this.targetWindow.requestAnimationFrame(()=>{const p=()=>{if(this.currentScrollToIndex!==s)return;const g=this.getScrollOffset(),h=this.getOffsetForIndex(s,m);if(!h){console.warn("Failed to get offset for index:",s);return}Vl(h[0],g)||c(m)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(p):p()})},c=u=>{this.targetWindow&&this.currentScrollToIndex===s&&(a++,a<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",a,i),this.targetWindow.requestAnimationFrame(()=>l(u))):console.warn(`Failed to scroll to index ${s} after ${i} attempts.`))};l(r)},this.scrollBy=(s,{behavior:r}={})=>{r==="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:r})},this.getTotalSize=()=>{var s;const r=this.getMeasurements();let o;if(r.length===0)o=this.options.paddingStart;else if(this.options.lanes===1)o=((s=r[r.length-1])==null?void 0:s.end)??0;else{const a=Array(this.options.lanes).fill(null);let i=r.length-1;for(;i>=0&&a.some(l=>l===null);){const l=r[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:r,behavior:o})=>{this.options.scrollToFn(s,{behavior:o,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(n)}}const ls=(t,n,s,r)=>{for(;t<=n;){const o=(t+n)/2|0,a=s(o);if(a<r)t=o+1;else if(a>r)n=o-1;else return o}return t>0?t-1:0};function Xl({measurements:t,outerSize:n,scrollOffset:s,lanes:r}){const o=t.length-1,a=c=>t[c].start;if(t.length<=r)return{startIndex:0,endIndex:o};let i=ls(0,o,a,s),l=i;if(r===1)for(;l<o&&t[l].end<s+n;)l++;else if(r>1){const c=Array(r).fill(0);for(;l<o&&c.some(d=>d<s+n);){const d=t[l];c[d.lane]=d.end,l++}const u=Array(r).fill(s+n);for(;i>=0&&u.some(d=>d>=s);){const d=t[i];u[d.lane]=d.start,i--}i=Math.max(0,i-i%r),l=Math.min(o,l+(r-1-l%r))}return{startIndex:i,endIndex:l}}const xn=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Yl({useFlushSync:t=!0,...n}){const s=M.useReducer(()=>({}),{})[1],r={...n,onChange:(a,i)=>{var l;t&&i?gn.flushSync(s):s(),(l=n.onChange)==null||l.call(n,a,i)}},[o]=M.useState(()=>new Kl(r));return o.setOptions(r),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:n,estimateSize:s=Jl,overscan:r=ec,enabled:o=!0}){const a=Ql({count:o?t:0,getScrollElement:()=>n.current,estimateSize:b.useCallback(()=>s,[s]),overscan:r});return{virtualItems:a.getVirtualItems(),totalSize:a.getTotalSize(),scrollToIndex:a.scrollToIndex,measureElement:a.measureElement}}const rc=b.forwardRef(function({value:n,onChange:s,placeholder:r="Search...",className:o,listboxId:a,activeDescendantId:i},l){const c=b.useCallback(()=>{s("")},[s]);return e.jsxs("div",{className:tt("lookup-field__search-container",o),children:[e.jsx(Jo,{className:"lookup-field__search-icon"}),e.jsx("input",{ref:l,type:"text",className:"lookup-field__search",value:n,onChange:u=>s(u.target.value),placeholder:r,"aria-label":r,"aria-autocomplete":"list","aria-controls":a,"aria-activedescendant":i}),n&&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:n,displayFields:s,value:r,onChange:o,fetcher:a,clearable:i=!0,placeholder:l,className:c,pageSize:u=sc,onError:d,searchFields:f,minChars:m=ac,displayValue:p,displayTemplate:g,renderSelected:h,filters:x,getFilters:v,dependencies:w,orderBy:j,bindFields:C,readOnly:k=!1,disabled:N=!1,error:A=!1,onFocus:E,onBlur:S,onReady:y,onInvalidValue:B,noResultsText:T,searchPlaceholder:D,required:Z=!1,showRequiredIndicator:z,validateOnBlur:I=!0,onValidationChange:W,errorText:R},G){const{t:V}=vi(),ie=b.useMemo(()=>j??{field:s[0],direction:"asc"},[j,s]),F=b.useId(),[L,q]=b.useState(!1),[se,De]=b.useState(!1),[Y,Ne]=b.useState(null),[ee,de]=b.useState([]),[oe,re]=b.useState(null),[K,te]=b.useState(1),[ue,ve]=b.useState(!0),[Me,Ke]=b.useState(!1),ke=b.useRef(null),he=b.useRef(null),br=b.useRef(JSON.stringify(w??[])),Ce=b.useRef(null),Tt=b.useRef(null),lt=b.useRef(null),[_e,Le]=b.useState(""),ye=qa(_e),[fs,me]=b.useState(""),vr=b.useRef(!1),le=b.useRef(null);le.current=oe;const Pe=b.useRef(null),Xe=b.useRef(!1),kr=b.useRef(B);b.useEffect(()=>{kr.current=B},[B]);const ms=b.useCallback(()=>{L&&(Xe.current&&(Xe.current=!1,S?.(le.current)),q(!1),Le(""))},[L,S]);ki(Pe,ms,L);const{refs:yr,floatingStyles:ps}=Pl({enabled:L}),{virtualItems:wr,totalSize:hs}=tc({count:ee.length,parentRef:Ce,enabled:L&&ee.length>0}),[ct,we]=b.useState(!1),[jr,dt]=b.useState(!1),[zt,xs]=b.useState([]),[Nr,gs]=b.useState(0),[Dt,bs]=b.useState(1),[Cr,_t]=b.useState(!1),Sr=b.useRef(""),Pt=b.useRef(!1),Ve=b.useRef(1),Rr=A||jr,vs=z??Z,Ye=b.useRef(W);b.useEffect(()=>{Ye.current=W},[W]);const ut=b.useCallback(()=>nr(v?v():x),[x,v]),ft=b.useCallback(async(_="")=>{ke.current&&ke.current.abort();const P=new AbortController;ke.current=P;try{De(!0),Ne(null),me(V("announcements.loading"));const U=ut(),X=[...new Set(["Id",...s,...C??[]])],ae=await a(t,{fields:X,search:_.length>=m?_:"",searchFields:f??s,page:1,pageSize:u,filters:U,orderBy:ie});if(P.signal.aborted)return;de(ae.data),!vr.current&&y&&(vr.current=!0,setTimeout(()=>{y({firstPageLoaded:!0},Ht)},0)),ae.data.length===0?me(V("announcements.noResults")):me(V("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{P.signal.aborted||De(!1)}},[t,s,C,f,u,m,d,y,ut,ie,a]),Er=b.useCallback(async(_="")=>{if(Pt.current||Me||!ue)return;const P=Ve.current;try{Ke(!0),me(V("announcements.loadingMore"));const U=ut(),X=P+1,ae=[...new Set(["Id",...s,...C??[]])],qt=await a(t,{fields:ae,search:_.length>=m?_:"",searchFields:f??s,page:X,pageSize:u,filters:U,orderBy:ie});de(Ls=>[...Ls,...qt.data]),Ve.current=X,te(X),me(V("announcements.resultsLoaded",{count:qt.data.length})),qt.data.length<u&&ve(!1)}catch(U){if(U instanceof Error&&U.name==="AbortError")return;const X=U instanceof Error?U:new Error("Unknown error");d?.(X)}finally{Ke(!1)}},[t,s,C,f,u,m,Me,ue,d,ut,ie,a,V]),mt=b.useCallback(async _=>{try{const P=[...new Set(["Id",...s,...C??[]])];console.log("[LookupField] fetchAndSetRecordById:",{recordId:_,entity:t,allFields:P});const U=await a(t,{fields:P,filters:[[{Id:_}]],page:1,pageSize:1});return console.log("[LookupField] fetchAndSetRecordById response:",U),U.data[0]??null}catch(P){return console.error("[LookupField] fetchAndSetRecordById error:",P),null}},[t,s,C,a]),pt=b.useCallback(()=>N||k?(dt(!1),Ye.current?.(!0),!0):Z&&!le.current?(dt(!0),Ye.current?.(!1),!1):(dt(!1),Ye.current?.(!0),!0),[Z,k,N]),ks=b.useCallback(()=>{const _=Ce.current;if(!_||Me||!ue)return;const{scrollTop:P,scrollHeight:U,clientHeight:X}=_;U-P-X<oc&&Er(ye)},[Me,ue,Er,ye]);b.useEffect(()=>{L&&Tt.current&&Tt.current.focus()},[L]),b.useEffect(()=>{L&&(ye.length===0||ye.length>=m)&&(Cr&&Sr.current===ye&&zt.length>0?(Pt.current=!0,de(zt),Ve.current=Dt,te(Dt),ve(!0),requestAnimationFrame(()=>{Ce.current&&(Ce.current.scrollTop=Nr),setTimeout(()=>{Pt.current=!1},0)})):(Ve.current=1,te(1),ve(!0),de([]),ft(ye)))},[L,ye,ft,m,Cr,zt,Dt,Nr]),b.useEffect(()=>(L||(Le(""),Ve.current=1,te(1),ve(!0),Ke(!1)),()=>{ke.current&&ke.current.abort()}),[L]);const Vt=b.useRef(void 0),Ir=b.useRef(mt);Ir.current=mt;const Ar=b.useRef(0);b.useEffect(()=>{const P=Vt.current===void 0||Vt.current!==r;if(Vt.current=r,r===null){we(!1);return}if(!P)return;const U=++Ar.current;Ir.current(r).then(X=>{Ar.current===U&&(X?(re(X),we(!1)):(we(!0),re(null),kr.current?.(r)))})},[r]);const Ft=JSON.stringify(w??[]);b.useEffect(()=>{br.current!==Ft&&(br.current=Ft,ke.current&&ke.current.abort(),_t(!1),de([]),re(null),Ve.current=1,te(1),ve(!0),q(!1),Le(""))},[Ft]);const ht=JSON.stringify(x??[]),Mr=b.useRef(ht);b.useEffect(()=>{Mr.current!==ht&&(Mr.current=ht,_t(!1))},[ht]);const Lr=b.useCallback(_=>{if(h)return h(_);if(g)return Ha(g,_);if(p){const P=_[p];return P!=null?String(P):""}return s.map(P=>{const U=_[P];return U!=null?String(U):""}).join(" - ")},[h,g,p,s]),ys=()=>{N||k||q(_=>!_)},$r=_=>s.map(P=>String(_[P]??"")).join(" - "),Zt=_=>{he.current=oe,re(_),le.current=_,we(!1),jr&&(dt(!1),Ye.current?.(!0)),xs(ee),gs(Ce.current?.scrollTop??0),bs(K),Sr.current=_e,_t(!0),o(_,he.current),Le(""),q(!1),Ne(null),Ut.current=!0,lt.current?.focus();const P=Lr(_);me(V("announcements.selected",{value:P}))},ws=_=>{_.stopPropagation(),he.current=oe,re(null),le.current=null,we(!1),o(null,he.current),me(V("announcements.cleared"))},Or=b.useCallback(()=>{!le.current&&!ct||(he.current=le.current,re(null),le.current=null,we(!1),o(null,he.current),me(V("announcements.cleared")))},[ct,o,V]),js=b.useCallback(()=>{Gt.current=!0,q(!1),Le(""),me(V("announcements.closed")),setTimeout(()=>{if(!Pe.current)return;const P=Array.from(document.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')),U=P.findIndex(ae=>Pe.current?.contains(ae));let X=null;for(let ae=U+1;ae<P.length;ae++)if(!Pe.current?.contains(P[ae])){X=P[ae];break}X&&X.focus()},0)},[V]),Ns=b.useCallback(()=>{q(!1),Le(""),me(V("announcements.closed")),lt.current?.focus()},[V]),Br=b.useCallback(()=>{he.current=le.current,re(null),we(!1),o(null,he.current),me(V("announcements.cleared"))},[o,V]),Ht=b.useMemo(()=>({clear:Br,focus:()=>lt.current?.focus(),reload:()=>ft(ye),getValue:()=>le.current,setValue:async _=>{const P=await mt(_);P?(he.current=le.current,re(P),we(!1),o(P,he.current)):(we(!0),re(null),B?.(_))},open:()=>q(!0),close:()=>q(!1),validate:pt}),[Br,ft,ye,mt,o,B,pt]);b.useImperativeHandle(G,()=>Ht,[Ht]);const{highlightedIndex:Se,setHighlightedIndex:Tr,handleKeyDown:Cs}=Ka({records:ee,isOpen:L,onSelect:Zt,onClose:js,onEscape:Ns,onClear:Or,searchQuery:_e});b.useEffect(()=>{L&&Tr(-1)},[L,ee,Tr]),b.useEffect(()=>{if(Se>=0&&Ce.current){const _=Ce.current.querySelector(`[data-index="${Se}"]`);_?.scrollIntoView&&_.scrollIntoView({block:"nearest",behavior:"smooth"})}},[Se]);const Wt=b.useRef(!1),Ut=b.useRef(!1),Gt=b.useRef(!1),Ss=()=>{Wt.current=!0},Rs=_=>{N||L||_.key==="Backspace"&&i&&!k&&(oe||ct)&&(_.preventDefault(),Or())},Es=()=>{if(!N&&!k){if(Ut.current){Ut.current=!1;return}if(Gt.current){Gt.current=!1;return}if(Wt.current){Wt.current=!1;return}L||q(!0)}},Is=b.useCallback(()=>{N||Xe.current||(Xe.current=!0,E?.(le.current))},[E,N]),As=b.useCallback(_=>{if(N)return;const P=_.relatedTarget;!Pe.current?.contains(P)&&(Xe.current=!1,I&&!k&&pt(),S?.(le.current))},[S,I,k,N,pt]),Ms=()=>{if(_e.length>0&&_e.length<m)return e.jsx("div",{className:"lookup-field__empty",children:V("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:V("loading")})]});if(Y)return e.jsx("div",{className:"lookup-field__error",children:V("error")});if(ee.length===0)return e.jsx("div",{className:"lookup-field__empty",children:T??V("noResults")});const _=wr.length>0;return e.jsxs("div",{ref:Ce,className:"lookup-field__options",onScroll:ks,children:[_?e.jsx("div",{style:{height:`${hs}px`,width:"100%",position:"relative"},children:wr.map(P=>{const U=ee[P.index],X=P.index;return e.jsx("div",{id:`${F}-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:`${P.size}px`,transform:`translateY(${P.start}px)`},children:$r(U)},U.Id)})}):ee.map((P,U)=>e.jsx("div",{id:`${F}-option-${P.Id}`,"data-index":U,className:tt("lookup-field__option",U===Se&&"lookup-field__option--highlighted"),role:"option","aria-selected":oe?.Id===P.Id,tabIndex:-1,onClick:()=>Zt(P),children:$r(P)},P.Id)),Me&&e.jsx("div",{className:"lookup-field__loading-more",children:e.jsx(Hr,{className:"h-4 w-4 animate-spin"})})]})};return e.jsxs("div",{ref:Pe,className:tt("lookup-field",N&&"lookup-field--disabled",k&&"lookup-field--readonly",Rr&&"lookup-field--error",c),role:"combobox","aria-expanded":!N&&L,"aria-haspopup":"listbox","aria-labelledby":`${F}-label`,"aria-controls":L?`${F}-listbox`:void 0,"aria-disabled":N||void 0,"aria-readonly":!N&&k||void 0,"aria-invalid":Rr||void 0,"aria-required":Z||void 0,onKeyDown:N?void 0:Cs,onFocus:Is,onBlur:As,children:[e.jsx(nc,{message:fs}),e.jsxs("label",{id:`${F}-label`,htmlFor:F,className:"lookup-field__label",children:[n,vs&&e.jsx("span",{className:"lookup-field__required-indicator",children:V("validation.requiredIndicator")})]}),e.jsxs("button",{ref:_=>{lt.current=_,yr.setReference(_)},id:F,type:"button",className:"lookup-field__trigger",onClick:ys,onMouseDown:Ss,onKeyDown:Rs,onFocus:Es,disabled:N,tabIndex:N?-1:0,children:[e.jsx("span",{className:"lookup-field__selected-text",children:ct?V("notFound"):oe?Lr(oe):l??V("placeholder")}),e.jsx(Xo,{className:tt("lookup-field__chevron",L&&"lookup-field__chevron--open"),"aria-hidden":"true"}),i&&oe&&!k&&!N&&e.jsx($n,{className:"lookup-field__clear",onClick:ws,"aria-label":"Clear selection"})]}),R&&e.jsx("span",{className:"lookup-field__error-text",role:"alert",children:R}),L&&e.jsxs("div",{ref:yr.setFloating,style:ps,className:"lookup-field__dropdown",children:[e.jsx(rc,{ref:Tt,value:_e,onChange:Le,placeholder:D??V("searchPlaceholder"),listboxId:`${F}-listbox`,activeDescendantId:Se>=0&&ee[Se]?`${F}-option-${ee[Se].Id}`:void 0}),e.jsx("div",{id:`${F}-listbox`,role:"listbox","aria-label":n,children:Ms()})]})]})}const cs=b.forwardRef(ic);cs.displayName="LookupField";class lc extends Error{constructor(n,s,r){super(n),this.status=s,this.statusText=r,this.name="ApiError"}}const cc={"Content-Type":"application/json"};function dc(t,n){const s={...cc,...n?.headers};return async(r,o)=>{const a=`${t}/${r}/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:n,siesaLogoWidth:s,siesaLogoHeight:r,userDropdown:o,navigationItems:a,children:i,className:l="",contentClassName:c="",navbarProps:u={},navigationRailProps:d={}})=>{const[f,m]=b.useState("collapsed"),p=g=>{g&&m(g)};return e.jsxs("div",{className:["h-screen","w-full","bg-white","dark:bg-dark-bg-primary","flex","flex-col","overflow-hidden",l].join(" ").replace(/\s+/g," ").trim(),children:[e.jsx(ot,{productName:t,userDropdown:o,hideActionButtons:!0,showSiesaLogoLeading:!0,showBusinessLogo:!1,siesaLogo:n?e.jsx("img",{src:n,alt:"Siesa",className:"object-contain",style:{width:s||"100%",height:r||"100%"}}):void 0,className:"bg-white dark:bg-dark-bg-primary",...u}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsx(It,{state:f,items:a,showSearchButton:!1,onStateChange:p,...d}),e.jsx("div",{className:["flex-1","overflow-y-auto","bg-gray-50","dark:bg-dark-bg-primary",c].join(" ").replace(/\s+/g," ").trim(),children:i})]})]})},fc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.543 2.232a.75.75 0 0 0-1.085 0l-5.25 5.5A.75.75 0 0 0 2.75 9H4v4a1 1 0 0 0 1 1h1.5a.5.5 0 0 0 .5-.5v-2a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v2a.5.5 0 0 0 .5.5H12a1 1 0 0 0 1-1V9h1.25a.75.75 0 0 0 .543-1.268l-5.25-5.5Z"})}),mc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0ZM5.37 2.822a6.493 6.493 0 0 0-2.818 3.428h2.103c.088-.907.254-1.778.494-2.595a8.932 8.932 0 0 1 .221-.833ZM1.5 8c0 .522.062 1.03.179 1.516l.135.484h2.49a16.15 16.15 0 0 1 0-4H1.815L1.68 6.484A6.533 6.533 0 0 0 1.5 8Zm.552 2.75A6.493 6.493 0 0 0 5.37 14.18a8.932 8.932 0 0 1-.221-.833 13.2 13.2 0 0 1-.494-2.595H2.552Zm4.058 0c.083.78.23 1.497.429 2.128.197.622.423 1.07.649 1.357.225.286.401.265.312.265.089 0 .265.021.49-.265.226-.287.452-.735.649-1.357.199-.631.346-1.348.429-2.128H6.11Zm4.234 0a13.198 13.198 0 0 1-.494 2.595 8.938 8.938 0 0 1-.22.833 6.493 6.493 0 0 0 2.817-3.428h-2.103Zm2.104-2h-2.48a16.15 16.15 0 0 0 0-4h2.48l.135.484A6.538 6.538 0 0 1 14.5 8a6.538 6.538 0 0 1-.179 1.516l-.135.484h.162Zm-2.818-4.928c.167.251.394.699.221.833.24.817.406 1.688.494 2.595h2.103a6.493 6.493 0 0 0-2.818-3.428ZM9.89 6h-3.78c.083-.78.23-1.497.429-2.128.197-.622.423-1.07.649-1.357.225-.286.401-.265.312-.265.089 0 .265-.021.49.265.226.287.452.735.649 1.357.199.631.346 1.348.429 2.128Zm-4.234 0H3.553a6.493 6.493 0 0 1 2.818-3.428 8.932 8.932 0 0 0-.221.833c-.24.817-.406 1.688-.494 2.595Zm.144 2a14.65 14.65 0 0 0 0 4h4.4a14.65 14.65 0 0 0 0-4H5.8Z"})}),pc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M4 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V6.414A2 2 0 0 0 13.414 5L10 1.586A2 2 0 0 0 8.586 1H4Zm1 5a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1H5Zm-.5 2.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5Zm.5 1.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1H5Z",clipRule:"evenodd"})}),hc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1 9.5A3.5 3.5 0 0 0 4.5 13H12a3 3 0 0 0 .917-5.857 2.503 2.503 0 0 0-3.198-3.019 3.5 3.5 0 0 0-6.628 2.171A3.5 3.5 0 0 0 1 9.5Z"})}),xc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4ZM10 4a2 2 0 0 1 2-2h.5a.5.5 0 0 1 0 1H12a1 1 0 0 0-1 1v.5a.5.5 0 0 1-1 0V4ZM2 12a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v2ZM10.5 8a.5.5 0 0 0-.5.5V10H8.5a.5.5 0 0 0 0 1H10v1.5a.5.5 0 0 0 1 0V11h1.5a.5.5 0 0 0 0-1H11V8.5a.5.5 0 0 0-.5-.5Z"})}),gc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"})}),bc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M2.5 4a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1ZM4.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM4 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 4 8Zm.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM3 8a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-.5 4.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Z",clipRule:"evenodd"})}),vc=({className:t=""})=>e.jsxs("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M14 2H2c-.55 0-.95.538-.75 1.032l3 7.5c.127.318.44.528.783.528h5.934c.343 0 .656-.21.783-.528l3-7.5C14.95 2.538 14.55 2 14 2Z"}),e.jsx("path",{d:"M6 12.25v1.25a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1.25H6Z"})]}),kc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),yc=({className:t=""})=>e.jsxs("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),wc=({title:t="List View",navbarProductName:n="SB Commercial",tableTitle:s="Usuarios",columns:r,data:o,navigationItems:a,quickFilters:i,actionButtons:l,userDropdown:c,notifications:u,environmentBadge:d,showNavigationRail:f=!0,navigationRailState:m="collapsed",onNavigationRailStateChange:p,onNavItemClick:g,onSearch:h,searchPlaceholder:x="Buscar",onSort:v,sortColumn:w,sortDirection:j,pagination:C,loading:k=!1,loadingRows:N=5,emptyMessage:A="No hay datos disponibles",className:E="",onNotificationsClick:S,viewOptions:y,selectedViewOption:B,onViewOptionChange:T})=>{const[D,Z]=b.useState(""),[z,I]=b.useState(!1),W=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"}],G=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:()=>{}}],V=F=>{Z(F.target.value),h?.(F.target.value)},ie=r.map(F=>({header:F.header,accessor:F.accessor,sortable:F.sortable,render:F.render,align:F.align,width:F.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(It,{state:m,items:W,onStateChange:p,onItemClick:g,showSearchButton:!0}),e.jsxs("div",{className:"flex flex-col flex-1 overflow-hidden",children:[e.jsx(ot,{productName:n,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(F=>e.jsx(Oe,{color:F.color,label:F.label,leftIcon:F.icon},F.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:G.map(F=>e.jsx(Q,{type:F.type,size:"sm",leftIcon:F.leftIcon,onClick:F.onClick,children:F.label},F.id))})]}),e.jsxs("div",{className:"flex flex-col gap-4 flex-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-xl p-8 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-4 w-full",children:[e.jsx("h3",{className:"flex-1 font-bold text-base leading-6 text-content-primary dark:text-dark-content-primary overflow-hidden text-ellipsis whitespace-nowrap",children:s}),e.jsx(st,{placeholder:x,leftIcon:e.jsx(yc,{className:"w-4 h-4"}),value:D,onChange:V,className:"w-[200px]"}),y&&e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>I(!z),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"})]}),z&&e.jsx("div",{className:"absolute top-full right-0 mt-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-lg shadow-lg z-10 min-w-[150px]",children:y.map(F=>e.jsx("button",{onClick:()=>{T?.(F.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",B===F.id?"bg-primary-custom-100 dark:bg-primary-custom-600/20":""].join(" "),children:F.label},F.id))})]})]}),e.jsx(Rn,{columns:ie,data:o,variant:"grid",showBorder:!1,showShadow:!1,loading:k,loadingRows:N,emptyMessage:A,onSort:v,sortColumn:w,sortDirection:j,pagination:C,className:"flex-1"})]})]})})]})]})},jc=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),Nc=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),Cc=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),Sc=({onSubmit:t,onForgotPassword:n,onSignUp:s,isLoading:r=!1,errorMessage:o,className:a="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=b.useState(""),[d,f]=b.useState(""),[m,p]=b.useState(!1),[g,h]=b.useState(""),x=j=>{if(j.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){h("Por favor ingresa un email válido");return}h(""),t?.(c,d)},v=j=>{u(j.target.value),g&&h("")},w=()=>{p(!m)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",a].join(" "),children:[i&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Iniciar Sesión"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Inicia sesión ingresando con tu correo electrónico y contraseña."})]}),o&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:o}),e.jsxs("form",{onSubmit:x,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(jc,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:c,onChange:v,disabled:r,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",g?"border-error-border!":""].filter(Boolean).join(" ")})]}),g&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:g})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("button",{type:"button",onClick:n,className:"text-[12px] leading-4 font-bold text-primary-custom-600 dark:text-[#93d1fd] hover:underline transition-all duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm px-1",children:"Olvidé mi Contraseña"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Nc,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:m?"text":"password",placeholder:"••••••••",value:d,onChange:j=>f(j.target.value),disabled:r,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:r||!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:r?"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:n="Cambiar Mesa",menusTitle:s="Menús",menus:r=[{id:"1",label:"Corral"},{id:"2",label:"Burguer One"},{id:"3",label:"Andrés Carne de Res"},{id:"4",label:"Aceites"},{id:"5",label:"Kiosco Mac"},{id:"6",label:"Kiosco Qbano"},{id:"7",label:"Premier Dinning"}],selectedMenuId:o="1",onMenuSelect:a,onChangeTable:i,categoryTitle:l="Categoría",categories:c=[],selectedCategoryId:u,onCategorySelect:d,productsTitle:f="Productos",products:m=[],onAddProduct:p,activeTab:g="products",onTabChange:h,orderItems:x=[],onOrderItemQuantityChange:v,onOrderItemDelete:w,subtotal:j="40,000.00",taxes:C="40,000.00",total:k="40,000.00",confirmLabel:N="Confirmar Pedido",onConfirmOrder:A,isLoading:E=!1,errorMessage:S,userAvatar:y,userName:B="Jhonnatan Diaz",userRole:T="Administrador",businessLogo:D,siesaLogo:Z,className:z=""})=>e.jsxs("div",{className:`
|
|
1454
|
+
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,s?.key)}return s?.onChange&&!(a&&s.skipInitialOnChange)&&s.onChange(o),a=!1,o}return i.updateDeps=l=>{n=l},i}function fn(t,r){if(t===void 0)throw new Error("Unexpected undefined");return t}const Vl=(t,r)=>Math.abs(t-r)<1.01,Fl=(t,r,s)=>{let n;return function(...o){t.clearTimeout(n),n=t.setTimeout(()=>r.apply(this,o),s)}},mn=t=>{const{offsetWidth:r,offsetHeight:s}=t;return{width:r,height:s}},Zl=t=>t,Hl=t=>{const r=Math.max(t.startIndex-t.overscan,0),s=Math.min(t.endIndex+t.overscan,t.count-1),n=[];for(let o=r;o<=s;o++)n.push(o);return n},Wl=(t,r)=>{const s=t.scrollElement;if(!s)return;const n=t.targetWindow;if(!n)return;const o=i=>{const{width:l,height:c}=i;r({width:Math.round(l),height:Math.round(c)})};if(o(mn(s)),!n.ResizeObserver)return()=>{};const a=new n.ResizeObserver(i=>{const l=()=>{const c=i[0];if(c?.borderBoxSize){const u=c.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(mn(s))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return a.observe(s,{box:"border-box"}),()=>{a.unobserve(s)}},pn={passive:!0},hn=typeof window>"u"?!0:"onscrollend"in window,Ul=(t,r)=>{const s=t.scrollElement;if(!s)return;const n=t.targetWindow;if(!n)return;let o=0;const a=t.options.useScrollendEvent&&hn?()=>{}:Fl(n,()=>{r(o,!1)},t.options.isScrollingResetDelay),i=d=>()=>{const{horizontal:f,isRtl:m}=t.options;o=f?s.scrollLeft*(m&&-1||1):s.scrollTop,a(),r(o,d)},l=i(!0),c=i(!1);s.addEventListener("scroll",l,pn);const u=t.options.useScrollendEvent&&hn;return u&&s.addEventListener("scrollend",c,pn),()=>{s.removeEventListener("scroll",l),u&&s.removeEventListener("scrollend",c)}},Gl=(t,r,s)=>{if(r?.borderBoxSize){const n=r.borderBoxSize[0];if(n)return Math.round(n[s.options.horizontal?"inlineSize":"blockSize"])}return t[s.options.horizontal?"offsetWidth":"offsetHeight"]},ql=(t,{adjustments:r=0,behavior:s},n)=>{var o,a;const i=t+r;(a=(o=n.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[n.options.horizontal?"left":"top"]:i,behavior:s})};class Kl{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let s=null;const n=()=>s||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:s=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{const i=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var o;(o=n())==null||o.disconnect(),s=null},observe:o=>{var a;return(a=n())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=n())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=s=>{Object.entries(s).forEach(([n,o])=>{typeof o>"u"&&delete s[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Zl,rangeExtractor:Hl,onChange:()=>{},measureElement:Gl,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...s}},this.notify=s=>{var n,o;(o=(n=this.options).onChange)==null||o.call(n,this,s)},this.maybeNotify=Ze(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),s=>{this.notify(s)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(s=>s()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var s;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((s=this.scrollElement)==null?void 0:s.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=a,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(s,n)=>{const o=new Map,a=new Map;for(let i=n-1;i>=0;i--){const l=s[i];if(o.has(l.lane))continue;const c=a.get(l.lane);if(c==null||l.end>c.end?a.set(l.lane,l):l.end<c.end&&o.set(l.lane,!0),o.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,l)=>i.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurementOptions=Ze(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(s,n,o,a,i,l)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMeasuredCacheIndexes=[],{count:s,paddingStart:n,scrollMargin:o,getItemKey:a,enabled:i,lanes:l}),{key:!1}),this.getMeasurements=Ze(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:s,paddingStart:n,scrollMargin:o,getItemKey:a,enabled:i,lanes:l},c)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>s)for(const m of this.laneAssignments.keys())m>=s&&this.laneAssignments.delete(m);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===s&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,u),f=new Array(l).fill(void 0);for(let m=0;m<u;m++){const p=d[m];p&&(f[p.lane]=m)}for(let m=u;m<s;m++){const p=a(m),g=this.laneAssignments.get(m);let h,x;if(g!==void 0&&this.options.lanes>1){h=g;const C=f[h],k=C!==void 0?d[C]:void 0;x=k?k.end+this.options.gap:n+o}else{const C=this.options.lanes===1?d[m-1]:this.getFurthestMeasurement(d,m);x=C?C.end+this.options.gap:n+o,h=C?C.lane:m%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(m,h)}const v=c.get(p),w=typeof v=="number"?v:this.options.estimateSize(m),j=x+w;d[m]={index:m,start:x,size:w,end:j,key:p,lane:h},f[h]=m}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Ze(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(s,n,o,a)=>this.range=s.length>0&&n>0?Xl({measurements:s,outerSize:n,scrollOffset:o,lanes:a}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Ze(()=>{let s=null,n=null;const o=this.calculateRange();return o&&(s=o.startIndex,n=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,s,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,s,n]},(s,n,o,a,i)=>a===null||i===null?[]:s({startIndex:a,endIndex:i,overscan:n,count:o}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=s=>{const n=this.options.indexAttribute,o=s.getAttribute(n);return o?parseInt(o,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(s,n)=>{const o=this.indexFromElement(s),a=this.measurementsCache[o];if(!a)return;const i=a.key,l=this.elementsCache.get(i);l!==s&&(l&&this.observer.unobserve(l),this.observer.observe(s),this.elementsCache.set(i,s)),s.isConnected&&this.resizeItem(o,this.options.measureElement(s,n,this))},this.resizeItem=(s,n)=>{const o=this.measurementsCache[s];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,i=n-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.measureElement=s=>{if(!s){this.elementsCache.forEach((n,o)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(o))});return}this._measureElement(s,void 0)},this.getVirtualItems=Ze(()=>[this.getVirtualIndexes(),this.getMeasurements()],(s,n)=>{const o=[];for(let a=0,i=s.length;a<i;a++){const l=s[a],c=n[l];o.push(c)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=s=>{const n=this.getMeasurements();if(n.length!==0)return fn(n[ls(0,n.length-1,o=>fn(n[o]).start,s)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const s=this.scrollElement.document.documentElement;return this.options.horizontal?s.scrollWidth-this.scrollElement.innerWidth:s.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(s,n,o=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),i=this.getScrollOffset();n==="auto"&&(n=s>=i+a?"end":"start"),n==="center"?s+=(o-a)/2:n==="end"&&(s-=a);const l=this.getMaxScrollOffset();return Math.max(Math.min(l,s),0)},this.getOffsetForIndex=(s,n="auto")=>{s=Math.max(0,Math.min(s,this.options.count-1));const o=this.measurementsCache[s];if(!o)return;const a=this.getSize(),i=this.getScrollOffset();if(n==="auto")if(o.end>=i+a-this.options.scrollPaddingEnd)n="end";else if(o.start<=i+this.options.scrollPaddingStart)n="start";else return[i,n];if(n==="end"&&s===this.options.count-1)return[this.getMaxScrollOffset(),n];const l=n==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,n,o.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(s,{align:n="start",behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(s,n),{adjustments:void 0,behavior:o})},this.scrollToIndex=(s,{align:n="auto",behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),s=Math.max(0,Math.min(s,this.options.count-1)),this.currentScrollToIndex=s;let a=0;const i=10,l=u=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(s,u);if(!d){console.warn("Failed to get offset for index:",s);return}const[f,m]=d;this._scrollToOffset(f,{adjustments:void 0,behavior:o}),this.targetWindow.requestAnimationFrame(()=>{const p=()=>{if(this.currentScrollToIndex!==s)return;const g=this.getScrollOffset(),h=this.getOffsetForIndex(s,m);if(!h){console.warn("Failed to get offset for index:",s);return}Vl(h[0],g)||c(m)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(p):p()})},c=u=>{this.targetWindow&&this.currentScrollToIndex===s&&(a++,a<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",a,i),this.targetWindow.requestAnimationFrame(()=>l(u))):console.warn(`Failed to scroll to index ${s} after ${i} attempts.`))};l(n)},this.scrollBy=(s,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+s,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var s;const n=this.getMeasurements();let o;if(n.length===0)o=this.options.paddingStart;else if(this.options.lanes===1)o=((s=n[n.length-1])==null?void 0:s.end)??0;else{const a=Array(this.options.lanes).fill(null);let i=n.length-1;for(;i>=0&&a.some(l=>l===null);){const l=n[i];a[l.lane]===null&&(a[l.lane]=l.end),i--}o=Math.max(...a.filter(l=>l!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(s,{adjustments:n,behavior:o})=>{this.options.scrollToFn(s,{behavior:o,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(r)}}const ls=(t,r,s,n)=>{for(;t<=r;){const o=(t+r)/2|0,a=s(o);if(a<n)t=o+1;else if(a>n)r=o-1;else return o}return t>0?t-1:0};function Xl({measurements:t,outerSize:r,scrollOffset:s,lanes:n}){const o=t.length-1,a=c=>t[c].start;if(t.length<=n)return{startIndex:0,endIndex:o};let i=ls(0,o,a,s),l=i;if(n===1)for(;l<o&&t[l].end<s+r;)l++;else if(n>1){const c=Array(n).fill(0);for(;l<o&&c.some(d=>d<s+r);){const d=t[l];c[d.lane]=d.end,l++}const u=Array(n).fill(s+r);for(;i>=0&&u.some(d=>d>=s);){const d=t[i];u[d.lane]=d.start,i--}i=Math.max(0,i-i%n),l=Math.min(o,l+(n-1-l%n))}return{startIndex:i,endIndex:l}}const xn=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Yl({useFlushSync:t=!0,...r}){const s=M.useReducer(()=>({}),{})[1],n={...r,onChange:(a,i)=>{var l;t&&i?gn.flushSync(s):s(),(l=r.onChange)==null||l.call(r,a,i)}},[o]=M.useState(()=>new Kl(n));return o.setOptions(n),xn(()=>o._didMount(),[]),xn(()=>o._willUpdate()),o}function Ql(t){return Yl({observeElementRect:Wl,observeElementOffset:Ul,scrollToFn:ql,...t})}const Jl=36,ec=5;function tc({count:t,parentRef:r,estimateSize:s=Jl,overscan:n=ec,enabled:o=!0}){const a=Ql({count:o?t:0,getScrollElement:()=>r.current,estimateSize:b.useCallback(()=>s,[s]),overscan:n});return{virtualItems:a.getVirtualItems(),totalSize:a.getTotalSize(),scrollToIndex:a.scrollToIndex,measureElement:a.measureElement}}const rc=b.forwardRef(function({value:r,onChange:s,placeholder:n="Search...",className:o,listboxId:a,activeDescendantId:i},l){const c=b.useCallback(()=>{s("")},[s]);return e.jsxs("div",{className:tt("lookup-field__search-container",o),children:[e.jsx(Jo,{className:"lookup-field__search-icon"}),e.jsx("input",{ref:l,type:"text",className:"lookup-field__search",value:r,onChange:u=>s(u.target.value),placeholder:n,"aria-label":n,"aria-autocomplete":"list","aria-controls":a,"aria-activedescendant":i}),r&&e.jsx("button",{type:"button",className:"lookup-field__search-clear",onClick:c,"aria-label":"Clear search",tabIndex:-1,children:e.jsx($n,{className:"h-4 w-4"})})]})});function nc({message:t}){return e.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"lookup-field__live-region",children:t})}const sc=10,oc=50,ac=1;function ic({entity:t,label:r,displayFields:s,value:n,onChange:o,fetcher:a,clearable:i=!0,placeholder:l,className:c,pageSize:u=sc,onError:d,searchFields:f,minChars:m=ac,displayValue:p,displayTemplate:g,renderSelected:h,filters:x,getFilters:v,dependencies:w,orderBy:j,bindFields:C,readOnly:k=!1,disabled:N=!1,error:A=!1,onFocus:I,onBlur:S,onReady:y,onInvalidValue:B,noResultsText:T,searchPlaceholder:D,required:H=!1,showRequiredIndicator:_,validateOnBlur:E=!0,onValidationChange:z,errorText:R},q){const{t:F}=vi(),ie=b.useMemo(()=>j??{field:s[0],direction:"asc"},[j,s]),Z=b.useId(),[L,G]=b.useState(!1),[se,De]=b.useState(!1),[Y,Ne]=b.useState(null),[ee,de]=b.useState([]),[oe,re]=b.useState(null),[K,te]=b.useState(1),[ue,ve]=b.useState(!0),[Me,Ke]=b.useState(!1),ke=b.useRef(null),he=b.useRef(null),br=b.useRef(JSON.stringify(w??[])),Ce=b.useRef(null),Tt=b.useRef(null),lt=b.useRef(null),[_e,Le]=b.useState(""),ye=qa(_e),[fs,me]=b.useState(""),vr=b.useRef(!1),le=b.useRef(null);le.current=oe;const Pe=b.useRef(null),Xe=b.useRef(!1),kr=b.useRef(B);b.useEffect(()=>{kr.current=B},[B]);const ms=b.useCallback(()=>{L&&(Xe.current&&(Xe.current=!1,S?.(le.current)),G(!1),Le(""))},[L,S]);ki(Pe,ms,L);const{refs:yr,floatingStyles:ps}=Pl({enabled:L}),{virtualItems:wr,totalSize:hs}=tc({count:ee.length,parentRef:Ce,enabled:L&&ee.length>0}),[ct,we]=b.useState(!1),[jr,dt]=b.useState(!1),[zt,xs]=b.useState([]),[Nr,gs]=b.useState(0),[Dt,bs]=b.useState(1),[Cr,_t]=b.useState(!1),Sr=b.useRef(""),Pt=b.useRef(!1),Ve=b.useRef(1),Rr=A||jr,vs=_??H,Ye=b.useRef(z);b.useEffect(()=>{Ye.current=z},[z]);const ut=b.useCallback(()=>nr(v?v():x),[x,v]),ft=b.useCallback(async(P="")=>{ke.current&&ke.current.abort();const V=new AbortController;ke.current=V;try{De(!0),Ne(null),me(F("announcements.loading"));const U=ut(),X=[...new Set(["Id",...s,...C??[]])],ae=await a(t,{fields:X,search:P.length>=m?P:"",searchFields:f??s,page:1,pageSize:u,filters:U,orderBy:ie});if(V.signal.aborted)return;de(ae.data),!vr.current&&y&&(vr.current=!0,setTimeout(()=>{y({firstPageLoaded:!0},Ht)},0)),ae.data.length===0?me(F("announcements.noResults")):me(F("announcements.opened",{count:ae.data.length})),ae.data.length<u&&ve(!1)}catch(U){if(U instanceof Error&&U.name==="AbortError")return;const X=U instanceof Error?U:new Error("Unknown error");Ne(X),d?.(X)}finally{V.signal.aborted||De(!1)}},[t,s,C,f,u,m,d,y,ut,ie,a]),Er=b.useCallback(async(P="")=>{if(Pt.current||Me||!ue)return;const V=Ve.current;try{Ke(!0),me(F("announcements.loadingMore"));const U=ut(),X=V+1,ae=[...new Set(["Id",...s,...C??[]])],qt=await a(t,{fields:ae,search:P.length>=m?P:"",searchFields:f??s,page:X,pageSize:u,filters:U,orderBy:ie});de(Ls=>[...Ls,...qt.data]),Ve.current=X,te(X),me(F("announcements.resultsLoaded",{count:qt.data.length})),qt.data.length<u&&ve(!1)}catch(U){if(U instanceof Error&&U.name==="AbortError")return;const X=U instanceof Error?U:new Error("Unknown error");d?.(X)}finally{Ke(!1)}},[t,s,C,f,u,m,Me,ue,d,ut,ie,a,F]),mt=b.useCallback(async P=>{try{const V=[...new Set(["Id",...s,...C??[]])];console.log("[LookupField] fetchAndSetRecordById:",{recordId:P,entity:t,allFields:V});const U=await a(t,{fields:V,filters:[[{Id:P}]],page:1,pageSize:1});return console.log("[LookupField] fetchAndSetRecordById response:",U),U.data[0]??null}catch(V){return console.error("[LookupField] fetchAndSetRecordById error:",V),null}},[t,s,C,a]),pt=b.useCallback(()=>N||k?(dt(!1),Ye.current?.(!0),!0):H&&!le.current?(dt(!0),Ye.current?.(!1),!1):(dt(!1),Ye.current?.(!0),!0),[H,k,N]),ks=b.useCallback(()=>{const P=Ce.current;if(!P||Me||!ue)return;const{scrollTop:V,scrollHeight:U,clientHeight:X}=P;U-V-X<oc&&Er(ye)},[Me,ue,Er,ye]);b.useEffect(()=>{L&&Tt.current&&Tt.current.focus()},[L]),b.useEffect(()=>{L&&(ye.length===0||ye.length>=m)&&(Cr&&Sr.current===ye&&zt.length>0?(Pt.current=!0,de(zt),Ve.current=Dt,te(Dt),ve(!0),requestAnimationFrame(()=>{Ce.current&&(Ce.current.scrollTop=Nr),setTimeout(()=>{Pt.current=!1},0)})):(Ve.current=1,te(1),ve(!0),de([]),ft(ye)))},[L,ye,ft,m,Cr,zt,Dt,Nr]),b.useEffect(()=>(L||(Le(""),Ve.current=1,te(1),ve(!0),Ke(!1)),()=>{ke.current&&ke.current.abort()}),[L]);const Vt=b.useRef(void 0),Ir=b.useRef(mt);Ir.current=mt;const Ar=b.useRef(0);b.useEffect(()=>{const V=Vt.current===void 0||Vt.current!==n;if(Vt.current=n,n===null){we(!1);return}if(!V)return;const U=++Ar.current;Ir.current(n).then(X=>{Ar.current===U&&(X?(re(X),we(!1)):(we(!0),re(null),kr.current?.(n)))})},[n]);const Ft=JSON.stringify(w??[]);b.useEffect(()=>{br.current!==Ft&&(br.current=Ft,ke.current&&ke.current.abort(),_t(!1),de([]),re(null),Ve.current=1,te(1),ve(!0),G(!1),Le(""))},[Ft]);const ht=JSON.stringify(x??[]),Mr=b.useRef(ht);b.useEffect(()=>{Mr.current!==ht&&(Mr.current=ht,_t(!1))},[ht]);const Lr=b.useCallback(P=>{if(h)return h(P);if(g)return Ha(g,P);if(p){const V=P[p];return V!=null?String(V):""}return s.map(V=>{const U=P[V];return U!=null?String(U):""}).join(" - ")},[h,g,p,s]),ys=()=>{N||k||G(P=>!P)},$r=P=>s.map(V=>String(P[V]??"")).join(" - "),Zt=P=>{he.current=oe,re(P),le.current=P,we(!1),jr&&(dt(!1),Ye.current?.(!0)),xs(ee),gs(Ce.current?.scrollTop??0),bs(K),Sr.current=_e,_t(!0),o(P,he.current),Le(""),G(!1),Ne(null),Ut.current=!0,lt.current?.focus();const V=Lr(P);me(F("announcements.selected",{value:V}))},ws=P=>{P.stopPropagation(),he.current=oe,re(null),le.current=null,we(!1),o(null,he.current),me(F("announcements.cleared"))},Or=b.useCallback(()=>{!le.current&&!ct||(he.current=le.current,re(null),le.current=null,we(!1),o(null,he.current),me(F("announcements.cleared")))},[ct,o,F]),js=b.useCallback(()=>{Gt.current=!0,G(!1),Le(""),me(F("announcements.closed")),setTimeout(()=>{if(!Pe.current)return;const V=Array.from(document.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')),U=V.findIndex(ae=>Pe.current?.contains(ae));let X=null;for(let ae=U+1;ae<V.length;ae++)if(!Pe.current?.contains(V[ae])){X=V[ae];break}X&&X.focus()},0)},[F]),Ns=b.useCallback(()=>{G(!1),Le(""),me(F("announcements.closed")),lt.current?.focus()},[F]),Br=b.useCallback(()=>{he.current=le.current,re(null),we(!1),o(null,he.current),me(F("announcements.cleared"))},[o,F]),Ht=b.useMemo(()=>({clear:Br,focus:()=>lt.current?.focus(),reload:()=>ft(ye),getValue:()=>le.current,setValue:async P=>{const V=await mt(P);V?(he.current=le.current,re(V),we(!1),o(V,he.current)):(we(!0),re(null),B?.(P))},open:()=>G(!0),close:()=>G(!1),validate:pt}),[Br,ft,ye,mt,o,B,pt]);b.useImperativeHandle(q,()=>Ht,[Ht]);const{highlightedIndex:Se,setHighlightedIndex:Tr,handleKeyDown:Cs}=Ka({records:ee,isOpen:L,onSelect:Zt,onClose:js,onEscape:Ns,onClear:Or,searchQuery:_e});b.useEffect(()=>{L&&Tr(-1)},[L,ee,Tr]),b.useEffect(()=>{if(Se>=0&&Ce.current){const P=Ce.current.querySelector(`[data-index="${Se}"]`);P?.scrollIntoView&&P.scrollIntoView({block:"nearest",behavior:"smooth"})}},[Se]);const Wt=b.useRef(!1),Ut=b.useRef(!1),Gt=b.useRef(!1),Ss=()=>{Wt.current=!0},Rs=P=>{N||L||P.key==="Backspace"&&i&&!k&&(oe||ct)&&(P.preventDefault(),Or())},Es=()=>{if(!N&&!k){if(Ut.current){Ut.current=!1;return}if(Gt.current){Gt.current=!1;return}if(Wt.current){Wt.current=!1;return}L||G(!0)}},Is=b.useCallback(()=>{N||Xe.current||(Xe.current=!0,I?.(le.current))},[I,N]),As=b.useCallback(P=>{if(N)return;const V=P.relatedTarget;!Pe.current?.contains(V)&&(Xe.current=!1,E&&!k&&pt(),S?.(le.current))},[S,E,k,N,pt]),Ms=()=>{if(_e.length>0&&_e.length<m)return e.jsx("div",{className:"lookup-field__empty",children:F("minChars",{count:m})});if(se)return e.jsxs("div",{className:"lookup-field__loading",children:[e.jsx(Hr,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{children:F("loading")})]});if(Y)return e.jsx("div",{className:"lookup-field__error",children:F("error")});if(ee.length===0)return e.jsx("div",{className:"lookup-field__empty",children:T??F("noResults")});const P=wr.length>0;return e.jsxs("div",{ref:Ce,className:"lookup-field__options",onScroll:ks,children:[P?e.jsx("div",{style:{height:`${hs}px`,width:"100%",position:"relative"},children:wr.map(V=>{const U=ee[V.index],X=V.index;return e.jsx("div",{id:`${Z}-option-${U.Id}`,"data-index":X,className:tt("lookup-field__option",X===Se&&"lookup-field__option--highlighted"),role:"option","aria-selected":oe?.Id===U.Id,tabIndex:-1,onClick:()=>Zt(U),style:{position:"absolute",top:0,left:0,width:"100%",height:`${V.size}px`,transform:`translateY(${V.start}px)`},children:$r(U)},U.Id)})}):ee.map((V,U)=>e.jsx("div",{id:`${Z}-option-${V.Id}`,"data-index":U,className:tt("lookup-field__option",U===Se&&"lookup-field__option--highlighted"),role:"option","aria-selected":oe?.Id===V.Id,tabIndex:-1,onClick:()=>Zt(V),children:$r(V)},V.Id)),Me&&e.jsx("div",{className:"lookup-field__loading-more",children:e.jsx(Hr,{className:"h-4 w-4 animate-spin"})})]})};return e.jsxs("div",{ref:Pe,className:tt("lookup-field",N&&"lookup-field--disabled",k&&"lookup-field--readonly",Rr&&"lookup-field--error",c),role:"combobox","aria-expanded":!N&&L,"aria-haspopup":"listbox","aria-labelledby":`${Z}-label`,"aria-controls":L?`${Z}-listbox`:void 0,"aria-disabled":N||void 0,"aria-readonly":!N&&k||void 0,"aria-invalid":Rr||void 0,"aria-required":H||void 0,onKeyDown:N?void 0:Cs,onFocus:Is,onBlur:As,children:[e.jsx(nc,{message:fs}),e.jsxs("label",{id:`${Z}-label`,htmlFor:Z,className:"lookup-field__label",children:[r,vs&&e.jsx("span",{className:"lookup-field__required-indicator",children:F("validation.requiredIndicator")})]}),e.jsxs("button",{ref:P=>{lt.current=P,yr.setReference(P)},id:Z,type:"button",className:"lookup-field__trigger",onClick:ys,onMouseDown:Ss,onKeyDown:Rs,onFocus:Es,disabled:N,tabIndex:N?-1:0,children:[e.jsx("span",{className:"lookup-field__selected-text",children:ct?F("notFound"):oe?Lr(oe):l??F("placeholder")}),e.jsx(Xo,{className:tt("lookup-field__chevron",L&&"lookup-field__chevron--open"),"aria-hidden":"true"}),i&&oe&&!k&&!N&&e.jsx($n,{className:"lookup-field__clear",onClick:ws,"aria-label":"Clear selection"})]}),R&&e.jsx("span",{className:"lookup-field__error-text",role:"alert",children:R}),L&&e.jsxs("div",{ref:yr.setFloating,style:ps,className:"lookup-field__dropdown",children:[e.jsx(rc,{ref:Tt,value:_e,onChange:Le,placeholder:D??F("searchPlaceholder"),listboxId:`${Z}-listbox`,activeDescendantId:Se>=0&&ee[Se]?`${Z}-option-${ee[Se].Id}`:void 0}),e.jsx("div",{id:`${Z}-listbox`,role:"listbox","aria-label":r,children:Ms()})]})]})}const cs=b.forwardRef(ic);cs.displayName="LookupField";class lc extends Error{constructor(r,s,n){super(r),this.status=s,this.statusText=n,this.name="ApiError"}}const cc={"Content-Type":"application/json"};function dc(t,r){const s={...cc,...r?.headers};return async(n,o)=>{const a=`${t}/${n}/search`,i=o.fields.includes("Id")?o.fields:["Id",...o.fields],l=await fetch(a,{method:"POST",headers:s,body:JSON.stringify({...o,fields:i})});if(!l.ok)throw new lc(`API Error: ${l.status} ${l.statusText}`,l.status,l.statusText);return l.json()}}const uc=({productName:t="Mi Aplicación",siesaLogoPath:r,siesaLogoWidth:s,siesaLogoHeight:n,userDropdown:o,navigationItems:a,children:i,className:l="",contentClassName:c="",navbarProps:u={},navigationRailProps:d={}})=>{const[f,m]=b.useState("collapsed"),p=g=>{g&&m(g)};return e.jsxs("div",{className:["h-screen","w-full","bg-white","dark:bg-dark-bg-primary","flex","flex-col","overflow-hidden",l].join(" ").replace(/\s+/g," ").trim(),children:[e.jsx(ot,{productName:t,userDropdown:o,hideActionButtons:!0,showSiesaLogoLeading:!0,showBusinessLogo:!1,siesaLogo:r?e.jsx("img",{src:r,alt:"Siesa",className:"object-contain",style:{width:s||"100%",height:n||"100%"}}):void 0,className:"bg-white dark:bg-dark-bg-primary",...u}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsx(It,{state:f,items:a,showSearchButton:!1,onStateChange:p,...d}),e.jsx("div",{className:["flex-1","overflow-y-auto","bg-gray-50","dark:bg-dark-bg-primary",c].join(" ").replace(/\s+/g," ").trim(),children:i})]})]})},fc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.543 2.232a.75.75 0 0 0-1.085 0l-5.25 5.5A.75.75 0 0 0 2.75 9H4v4a1 1 0 0 0 1 1h1.5a.5.5 0 0 0 .5-.5v-2a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v2a.5.5 0 0 0 .5.5H12a1 1 0 0 0 1-1V9h1.25a.75.75 0 0 0 .543-1.268l-5.25-5.5Z"})}),mc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0ZM5.37 2.822a6.493 6.493 0 0 0-2.818 3.428h2.103c.088-.907.254-1.778.494-2.595a8.932 8.932 0 0 1 .221-.833ZM1.5 8c0 .522.062 1.03.179 1.516l.135.484h2.49a16.15 16.15 0 0 1 0-4H1.815L1.68 6.484A6.533 6.533 0 0 0 1.5 8Zm.552 2.75A6.493 6.493 0 0 0 5.37 14.18a8.932 8.932 0 0 1-.221-.833 13.2 13.2 0 0 1-.494-2.595H2.552Zm4.058 0c.083.78.23 1.497.429 2.128.197.622.423 1.07.649 1.357.225.286.401.265.312.265.089 0 .265.021.49-.265.226-.287.452-.735.649-1.357.199-.631.346-1.348.429-2.128H6.11Zm4.234 0a13.198 13.198 0 0 1-.494 2.595 8.938 8.938 0 0 1-.22.833 6.493 6.493 0 0 0 2.817-3.428h-2.103Zm2.104-2h-2.48a16.15 16.15 0 0 0 0-4h2.48l.135.484A6.538 6.538 0 0 1 14.5 8a6.538 6.538 0 0 1-.179 1.516l-.135.484h.162Zm-2.818-4.928c.167.251.394.699.221.833.24.817.406 1.688.494 2.595h2.103a6.493 6.493 0 0 0-2.818-3.428ZM9.89 6h-3.78c.083-.78.23-1.497.429-2.128.197-.622.423-1.07.649-1.357.225-.286.401-.265.312-.265.089 0 .265-.021.49.265.226.287.452.735.649 1.357.199.631.346 1.348.429 2.128Zm-4.234 0H3.553a6.493 6.493 0 0 1 2.818-3.428 8.932 8.932 0 0 0-.221.833c-.24.817-.406 1.688-.494 2.595Zm.144 2a14.65 14.65 0 0 0 0 4h4.4a14.65 14.65 0 0 0 0-4H5.8Z"})}),pc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M4 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V6.414A2 2 0 0 0 13.414 5L10 1.586A2 2 0 0 0 8.586 1H4Zm1 5a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1H5Zm-.5 2.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5Zm.5 1.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1H5Z",clipRule:"evenodd"})}),hc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1 9.5A3.5 3.5 0 0 0 4.5 13H12a3 3 0 0 0 .917-5.857 2.503 2.503 0 0 0-3.198-3.019 3.5 3.5 0 0 0-6.628 2.171A3.5 3.5 0 0 0 1 9.5Z"})}),xc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4ZM10 4a2 2 0 0 1 2-2h.5a.5.5 0 0 1 0 1H12a1 1 0 0 0-1 1v.5a.5.5 0 0 1-1 0V4ZM2 12a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v2ZM10.5 8a.5.5 0 0 0-.5.5V10H8.5a.5.5 0 0 0 0 1H10v1.5a.5.5 0 0 0 1 0V11h1.5a.5.5 0 0 0 0-1H11V8.5a.5.5 0 0 0-.5-.5Z"})}),gc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"})}),bc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M2.5 4a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1ZM4.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM4 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 4 8Zm.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM3 8a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-.5 4.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Z",clipRule:"evenodd"})}),vc=({className:t=""})=>e.jsxs("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M14 2H2c-.55 0-.95.538-.75 1.032l3 7.5c.127.318.44.528.783.528h5.934c.343 0 .656-.21.783-.528l3-7.5C14.95 2.538 14.55 2 14 2Z"}),e.jsx("path",{d:"M6 12.25v1.25a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1.25H6Z"})]}),kc=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),yc=({className:t=""})=>e.jsxs("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),wc=({title:t="List View",navbarProductName:r="SB Commercial",tableTitle:s="Usuarios",columns:n,data:o,navigationItems:a,quickFilters:i,actionButtons:l,userDropdown:c,notifications:u,environmentBadge:d,showNavigationRail:f=!0,navigationRailState:m="collapsed",onNavigationRailStateChange:p,onNavItemClick:g,onSearch:h,searchPlaceholder:x="Buscar",onSort:v,sortColumn:w,sortDirection:j,pagination:C,loading:k=!1,loadingRows:N=5,emptyMessage:A="No hay datos disponibles",className:I="",onNotificationsClick:S,viewOptions:y,selectedViewOption:B,onViewOptionChange:T})=>{const[D,H]=b.useState(""),[_,E]=b.useState(!1),z=a||[{id:"home",icon:e.jsx(fc,{className:"w-4 h-4"}),label:"Inicio",active:!0},{id:"option1",icon:e.jsx(mc,{className:"w-4 h-4"}),label:"Opción 1"},{id:"option2",icon:e.jsx(pc,{className:"w-4 h-4"}),label:"Opción 2"},{id:"option3",icon:e.jsx(hc,{className:"w-4 h-4"}),label:"Opción 3"},{id:"more",icon:e.jsx(xc,{className:"w-4 h-4"}),label:"Ver más..."}],R=i||[{id:"paid",label:"Facturas Pagadas",color:"lime"},{id:"pending",label:"Facturas Pendientes por Pago",color:"rose"},{id:"orders",label:"Órdenes de Compra",color:"sky"}],q=l||[{id:"audit",label:"Auditoría",leftIcon:e.jsx(bc,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"filter",label:"Filtrar",leftIcon:e.jsx(vc,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"create",label:"Crear",leftIcon:e.jsx(gc,{className:"w-4 h-4"}),type:"default",onClick:()=>{}}],F=Z=>{H(Z.target.value),h?.(Z.target.value)},ie=n.map(Z=>({header:Z.header,accessor:Z.accessor,sortable:Z.sortable,render:Z.render,align:Z.align,width:Z.width}));return e.jsxs("div",{className:["bg-background-secondary","dark:bg-dark-bg-primary","flex","w-full","h-full","min-h-screen",I].join(" "),children:[f&&e.jsx(It,{state:m,items:z,onStateChange:p,onItemClick:g,showSearchButton:!0}),e.jsxs("div",{className:"flex flex-col flex-1 overflow-hidden",children:[e.jsx(ot,{productName:r,environmentBadge:d,userDropdown:c,notifications:u,hideActionButtons:!1,onNotificationsClick:S,className:"bg-background-secondary dark:bg-dark-bg-primary"}),e.jsx("div",{className:"flex items-center gap-2 px-4 py-2 w-full bg-background-secondary dark:bg-dark-bg-primary",children:R.map(Z=>e.jsx(Oe,{color:Z.color,label:Z.label,leftIcon:Z.icon},Z.id))}),e.jsx("div",{className:"flex flex-1 overflow-hidden bg-background-secondary dark:bg-dark-bg-primary",children:e.jsxs("div",{className:"flex flex-col gap-4 flex-1 bg-white dark:bg-dark-bg-primary p-4 rounded-tl-3xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("h2",{className:"font-bold text-xl leading-7 tracking-[-0.5px] text-content-primary dark:text-dark-content-primary",children:t}),e.jsx("div",{className:"flex items-center gap-2",children:q.map(Z=>e.jsx(Q,{type:Z.type,size:"sm",leftIcon:Z.leftIcon,onClick:Z.onClick,children:Z.label},Z.id))})]}),e.jsxs("div",{className:"flex flex-col gap-4 flex-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-xl p-8 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-4 w-full",children:[e.jsx("h3",{className:"flex-1 font-bold text-base leading-6 text-content-primary dark:text-dark-content-primary overflow-hidden text-ellipsis whitespace-nowrap",children:s}),e.jsx(st,{placeholder:x,leftIcon:e.jsx(yc,{className:"w-4 h-4"}),value:D,onChange:F,className:"w-[200px]"}),y&&e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>E(!_),className:"flex items-center gap-3 px-3 py-2 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-lg shadow-xs hover:bg-background-secondary dark:hover:bg-dark-bg-secondary transition-colors",children:[e.jsx("span",{className:"font-bold text-sm text-content-secondary dark:text-content-secondary",children:"Ver"}),e.jsx(kc,{className:"w-5 h-5 text-content-secondary dark:text-content-secondary"})]}),_&&e.jsx("div",{className:"absolute top-full right-0 mt-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-lg shadow-lg z-10 min-w-[150px]",children:y.map(Z=>e.jsx("button",{onClick:()=>{T?.(Z.id),E(!1)},className:["block","w-full","px-4","py-2","text-left","text-sm","hover:bg-background-secondary","dark:hover:bg-dark-bg-secondary",B===Z.id?"bg-primary-custom-100 dark:bg-primary-custom-600/20":""].join(" "),children:Z.label},Z.id))})]})]}),e.jsx(Rn,{columns:ie,data:o,variant:"grid",showBorder:!1,showShadow:!1,loading:k,loadingRows:N,emptyMessage:A,onSort:v,sortColumn:w,sortDirection:j,pagination:C,className:"flex-1"})]})]})})]})]})},jc=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),Nc=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),Cc=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),Sc=({onSubmit:t,onForgotPassword:r,onSignUp:s,isLoading:n=!1,errorMessage:o,className:a="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=b.useState(""),[d,f]=b.useState(""),[m,p]=b.useState(!1),[g,h]=b.useState(""),x=j=>{if(j.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){h("Por favor ingresa un email válido");return}h(""),t?.(c,d)},v=j=>{u(j.target.value),g&&h("")},w=()=>{p(!m)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",a].join(" "),children:[i&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Iniciar Sesión"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Inicia sesión ingresando con tu correo electrónico y contraseña."})]}),o&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:o}),e.jsxs("form",{onSubmit:x,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(jc,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:c,onChange:v,disabled:n,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",g?"border-error-border!":""].filter(Boolean).join(" ")})]}),g&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:g})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("button",{type:"button",onClick:r,className:"text-[12px] leading-4 font-bold text-primary-custom-600 dark:text-[#93d1fd] hover:underline transition-all duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm px-1",children:"Olvidé mi Contraseña"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Nc,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:m?"text":"password",placeholder:"••••••••",value:d,onChange:j=>f(j.target.value),disabled:n,required:!0,autoComplete:"current-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:w,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":m?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(Cc,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:n||!c||!d,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:n?"Iniciando sesión...":"Iniciar Sesión"})]}),e.jsx("button",{type:"button",onClick:s,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"¿No tienes una cuenta?"})]})]})},Rc=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M14 8a.75.75 0 0 1-.75.75H4.56l3.22 3.22a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 1.06L4.56 7.25h8.69A.75.75 0 0 1 14 8Z",clipRule:"evenodd"})}),Ec=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"})}),ds=({tableTitle:t="Mesa 1",changeTableLabel:r="Cambiar Mesa",menusTitle:s="Menús",menus:n=[{id:"1",label:"Corral"},{id:"2",label:"Burguer One"},{id:"3",label:"Andrés Carne de Res"},{id:"4",label:"Aceites"},{id:"5",label:"Kiosco Mac"},{id:"6",label:"Kiosco Qbano"},{id:"7",label:"Premier Dinning"}],selectedMenuId:o="1",onMenuSelect:a,onChangeTable:i,categoryTitle:l="Categoría",categories:c=[],selectedCategoryId:u,onCategorySelect:d,productsTitle:f="Productos",products:m=[],onAddProduct:p,activeTab:g="products",onTabChange:h,orderItems:x=[],onOrderItemQuantityChange:v,onOrderItemDelete:w,subtotal:j="40,000.00",taxes:C="40,000.00",total:k="40,000.00",confirmLabel:N="Confirmar Pedido",onConfirmOrder:A,isLoading:I=!1,errorMessage:S,userAvatar:y,userName:B="Jhonnatan Diaz",userRole:T="Administrador",businessLogo:D,siesaLogo:H,className:_=""})=>e.jsxs("div",{className:`
|
|
1454
1455
|
min-h-screen
|
|
1455
1456
|
w-full
|
|
1456
1457
|
bg-background-secondary
|
|
1457
1458
|
dark:bg-dark-bg-primary
|
|
1458
1459
|
flex
|
|
1459
1460
|
flex-col
|
|
1460
|
-
${
|
|
1461
|
-
`.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:y?{avatar:y,name:B,role:T}:void 0,hideActionButtons:!0,siesaLogo:
|
|
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:y?{avatar:y,name:B,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:`
|
|
1462
1463
|
flex-1
|
|
1463
1464
|
flex
|
|
1464
1465
|
flex-col
|
|
@@ -1469,7 +1470,7 @@
|
|
|
1469
1470
|
rounded-tl-3xl
|
|
1470
1471
|
rounded-tr-3xl
|
|
1471
1472
|
overflow-hidden
|
|
1472
|
-
`,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:
|
|
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(E=>e.jsx(Q,{type:o===E.id?"default":"outline-solid",onClick:()=>a?.(E.id),children:E.label},E.id))})]}),e.jsxs("div",{className:`
|
|
1473
1474
|
flex-1
|
|
1474
1475
|
flex
|
|
1475
1476
|
gap-0
|
|
@@ -1477,7 +1478,7 @@
|
|
|
1477
1478
|
dark:bg-dark-bg-primary/50
|
|
1478
1479
|
rounded-xl
|
|
1479
1480
|
overflow-hidden
|
|
1480
|
-
`,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(E=>e.jsx(An,{image:E.image,label:E.label,active:u===E.id,onClick:()=>d?.(E.id)},E.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(E=>e.jsx(Mn,{image:E.image,productName:E.name,price:E.price,onAddClick:()=>p?.(E.id)},E.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"})}),I&&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..."})}),S&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-red-600 dark:text-red-400",children:S})})]})]})})]})]}),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:`
|
|
1481
1482
|
flex-1
|
|
1482
1483
|
flex
|
|
1483
1484
|
flex-col
|
|
@@ -1520,5 +1521,5 @@
|
|
|
1520
1521
|
overflow-x-hidden
|
|
1521
1522
|
overflow-y-auto
|
|
1522
1523
|
z-10
|
|
1523
|
-
`,children:[x.map((I,W)=>e.jsxs(b.Fragment,{children:[e.jsx(mr,{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)}),W<x.length-1&&e.jsx(Ie,{})]},I.productId)),x.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:j})]}),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:C})]}),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:k})]})]}),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:A,fullWidth:!0,disabled:x.length===0||E,children:N})})]})]})})]})})]});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:n,isLoading:s=!1,errorMessage:r,successMessage:o,className:a="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=b.useState(""),[d,f]=b.useState(""),m=g=>{if(g.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){f("Por favor ingresa un email válido");return}f(""),t?.(c)},p=g=>{u(g.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."})]}),r&&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:r}),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:n,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:n,onTermsClick:s,onPrivacyClick:r,isLoading:o=!1,errorMessage:a,className:i="",showBackground:l=!0,variant:c="responsive"})=>{const[u,d]=b.useState(""),[f,m]=b.useState(""),[p,g]=b.useState(""),[h,x]=b.useState(!1),[v,w]=b.useState(""),j=N=>{if(N.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)){w("Por favor ingresa un email válido");return}w(""),t?.(u,f,p)},C=N=>{m(N.target.value),v&&w("")},k=()=>{x(!h)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",i].join(" "),children:[l&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...c==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:c==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Crear Cuenta"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Ingresa todos los datos para crear tu cuenta."})]}),a&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:a}),e.jsxs("form",{onSubmit:j,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"name-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Nombre ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(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:N=>d(N.target.value),disabled:o,required:!0,autoComplete:"name",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(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:C,disabled:o,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",v?"border-error-border!":""].filter(Boolean).join(" ")})]}),v&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:v})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx($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:N=>g(N.target.value),disabled:o,required:!0,autoComplete:"new-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:k,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":h?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(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:n,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:r,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:n,tables:s=[],tablesTitle:r="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:g,onClosePeoplePanel:h,onTableSwitchChange:x,isLoading:v=!1,errorMessage:w,tableLayout:j="grid",className:C="",userInfo:k})=>{const N=()=>e.jsx("div",{className:"w-full shrink-0",children:e.jsx(ot,{variant:"desktop",productName:"",userDropdown:k?{avatar:k.avatar,name:k.name,email:k.role,onMenuClick:()=>{}}:void 0})}),A=()=>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(y=>e.jsx(En,{locationName:y.name,status:y.status,state:y.id===n?"actived":"enabled",capacity:y.capacity,onClick:()=>i?.(y.id)},y.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:r}),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"}):j==="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(y=>e.jsx(tr,{tableNumber:y.tableNumber,status:y.status,shape:y.shape,chairs:y.chairs,isActive:y.isActive,onClick:()=>l?.(y.tableNumber)},y.tableNumber))})}):e.jsx("div",{className:"relative w-full h-full min-h-[400px]",children:s.map(y=>e.jsx("div",{className:"absolute",style:y.position?{left:`${y.position.x}%`,top:`${y.position.y}%`,transform:"translate(-50%, -50%)"}:void 0,children:e.jsx(tr,{tableNumber:y.tableNumber,status:y.status,shape:y.shape,chairs:y.chairs,isActive:y.isActive,onClick:()=>l?.(y.tableNumber)})},y.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:y=>x?.(y.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(y=>e.jsx(In,{size:"l",border:!0,onClick:()=>f?.(y),children:y},y))})]}),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:g,children:"Cubiertos"})]})]})]}):null;return e.jsxs("div",{className:["flex","flex-col","w-full","min-h-screen","bg-background-secondary","dark:bg-dark-bg-primary",C].join(" "),children:[N(),e.jsxs("div",{className:"flex flex-1 w-full overflow-hidden",children:[A(),E(),S()]})]})},us=b.createContext(void 0),Hc=({children:t,defaultTheme:n="light"})=>{const[s,r]=b.useState(()=>typeof window<"u"&&localStorage.getItem("siesa-ui-theme")||n);b.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=()=>{r(i=>i==="light"?"dark":"light")},a=i=>{r(i)};return e.jsx(us.Provider,{value:{theme:s,toggleTheme:o,setTheme:a},children:t})},Wc=()=>{const t=b.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:[x.map((E,z)=>e.jsxs(b.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=>v?.(E.productId,R),onDelete:()=>w?.(E.productId)}),z<x.length-1&&e.jsx(Ie,{})]},E.productId)),x.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:j})]}),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:C})]}),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:k})]})]}),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:A,fullWidth:!0,disabled:x.length===0||I,children:N})})]})]})})]})})]});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]=b.useState(""),[d,f]=b.useState(""),m=g=>{if(g.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){f("Por favor ingresa un email válido");return}f(""),t?.(c)},p=g=>{u(g.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]=b.useState(""),[f,m]=b.useState(""),[p,g]=b.useState(""),[h,x]=b.useState(!1),[v,w]=b.useState(""),j=N=>{if(N.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)){w("Por favor ingresa un email válido");return}w(""),t?.(u,f,p)},C=N=>{m(N.target.value),v&&w("")},k=()=>{x(!h)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",i].join(" "),children:[l&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...c==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:c==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Crear Cuenta"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Ingresa todos los datos para crear tu cuenta."})]}),a&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:a}),e.jsxs("form",{onSubmit:j,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"name-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Nombre ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(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:N=>d(N.target.value),disabled:o,required:!0,autoComplete:"name",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(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:C,disabled:o,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",v?"border-error-border!":""].filter(Boolean).join(" ")})]}),v&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:v})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx($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:N=>g(N.target.value),disabled:o,required:!0,autoComplete:"new-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:k,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":h?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(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:g,onClosePeoplePanel:h,onTableSwitchChange:x,isLoading:v=!1,errorMessage:w,tableLayout:j="grid",className:C="",userInfo:k})=>{const N=()=>e.jsx("div",{className:"w-full shrink-0",children:e.jsx(ot,{variant:"desktop",productName:"",userDropdown:k?{avatar:k.avatar,name:k.name,email:k.role,onMenuClick:()=>{}}:void 0})}),A=()=>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(y=>e.jsx(En,{locationName:y.name,status:y.status,state:y.id===r?"actived":"enabled",capacity:y.capacity,onClick:()=>i?.(y.id)},y.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: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"}):j==="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(y=>e.jsx(tr,{tableNumber:y.tableNumber,status:y.status,shape:y.shape,chairs:y.chairs,isActive:y.isActive,onClick:()=>l?.(y.tableNumber)},y.tableNumber))})}):e.jsx("div",{className:"relative w-full h-full min-h-[400px]",children:s.map(y=>e.jsx("div",{className:"absolute",style:y.position?{left:`${y.position.x}%`,top:`${y.position.y}%`,transform:"translate(-50%, -50%)"}:void 0,children:e.jsx(tr,{tableNumber:y.tableNumber,status:y.status,shape:y.shape,chairs:y.chairs,isActive:y.isActive,onClick:()=>l?.(y.tableNumber)})},y.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:y=>x?.(y.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(y=>e.jsx(In,{size:"l",border:!0,onClick:()=>f?.(y),children:y},y))})]}),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:g,children:"Cubiertos"})]})]})]}):null;return e.jsxs("div",{className:["flex","flex-col","w-full","min-h-screen","bg-background-secondary","dark:bg-dark-bg-primary",C].join(" "),children:[N(),e.jsxs("div",{className:"flex flex-1 w-full overflow-hidden",children:[A(),I(),S()]})]})},us=b.createContext(void 0),Hc=({children:t,defaultTheme:r="light"})=>{const[s,n]=b.useState(()=>typeof window<"u"&&localStorage.getItem("siesa-ui-theme")||r);b.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=b.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
1525
|
//# sourceMappingURL=siesa-ui-kit.cjs.map
|