var spui=(()=>{var Ee=Object.defineProperty;var ce=(e,n)=>{for(var s in n)Ee(e,s,{get:n[s],enumerable:!0})};var ae={};ce(ae,{Accordion:()=>Lt,Alert:()=>je,Autocomplete:()=>Bt,Avatar:()=>Fe,AvatarGroup:()=>ze,Badge:()=>Pe,Breadcrumbs:()=>Ie,Button:()=>xe,Calendar:()=>Se,Card:()=>Ue,CardActions:()=>Ve,CardBody:()=>Ke,CardTitle:()=>qe,Carousel:()=>Ge,CarouselItem:()=>We,Chat:()=>Ye,ChatBubble:()=>Qe,ChatFooter:()=>Je,ChatHeader:()=>Xe,ChatImage:()=>Ze,Checkbox:()=>et,ColorPalette:()=>_e,Colorpicker:()=>Mt,Datepicker:()=>Ot,Divider:()=>lt,Drawer:()=>tt,DrawerContent:()=>st,DrawerOverlay:()=>at,DrawerSide:()=>ot,DrawerToggle:()=>nt,Dropdown:()=>W,DropdownButton:()=>me,DropdownContent:()=>Y,Fab:()=>ct,Fieldset:()=>rt,Fileinput:()=>Ht,Icon:()=>I,Indicator:()=>it,Input:()=>Ce,Kbd:()=>dt,List:()=>ut,ListRows:()=>pt,Loading:()=>ft,Menu:()=>jt,Modal:()=>Ft,Navbar:()=>bt,Progress:()=>ht,Radial:()=>gt,Radio:()=>xt,Range:()=>mt,Rating:()=>vt,RatingItems:()=>yt,Select:()=>zt,Skeleton:()=>wt,SkeletonText:()=>kt,Stack:()=>St,Stat:()=>Pt,Stats:()=>_t,Step:()=>Tt,Steps:()=>Ct,Swap:()=>ve,SwapOff:()=>ke,SwapOn:()=>we,SwapToggle:()=>ye,Table:()=>$t,TableItems:()=>It,Tabs:()=>Ut,Textarea:()=>Et,Textrotate:()=>Dt,Timeline:()=>Nt,Toast:()=>qt,Toggle:()=>At,Tooltip:()=>Rt,cls:()=>m,filterBy:()=>fe,getBy:()=>L,hide:()=>V,lang:()=>oe,rand:()=>be,setLocale:()=>He,t:()=>ge,val:()=>k});var y=e=>typeof e=="function",re=e=>e&&typeof e=="object",B=Array.isArray,N=typeof document<"u"?document:null,ie=e=>e?._isRuntime?e.container:e instanceof Node?e:N.createTextNode(e==null?"":String(e)),C=null,D=null,q=!1,De=0,ne=new Set;var ee=new WeakMap,Ne="http://www.w3.org/2000/svg",de="http://www.w3.org/1999/xlink",Ae=new Set("svg,path,circle,rect,line,polyline,polygon,g,defs,text,textPath,tspan,use,symbol,image,marker,ellipse".split(",")),M=e=>{if(!e||e._disposed)return;e._disposed=!0;let n=[e];for(;n.length;){let s=n.pop();s._cleanups&&(s._cleanups.forEach(a=>a()),s._cleanups.clear()),s._children&&(s._children.forEach(a=>n.push(a)),s._children.clear()),s._deps&&(s._deps.forEach(a=>a.delete(s)),s._deps.clear())}},F=e=>{D&&(D._cleanups||=new Set).add(e)},Re=e=>{let n=C;C=null;try{return e()}finally{C=n}},z=(e,n=!1)=>{let s=()=>{if(s._disposed)return;s._deps&&s._deps.forEach(c=>c.delete(s)),s._cleanups&&(s._cleanups.forEach(c=>c()),s._cleanups.clear());let a=C,o=D;C=D=s;try{return s._result=e()}catch(c){console.error("[SigPro]",c)}finally{C=a,D=o}};return s._deps=s._cleanups=s._children=null,s._disposed=!1,s._isComputed=n,s._depth=C?C._depth+1:0,s._mounts=[],s._parent=D,D&&(D._children||=new Set).add(s),s},Le=()=>{if(q)return;q=!0;let e=Array.from(ne).sort((n,s)=>n._depth-s._depth);ne.clear();for(let n of e)n._disposed||n();q=!1};var j=(e,n=!1)=>{if(!n&&C&&!C._disposed)e.add(C),(C._deps||=new Set).add(e);else if(n&&e.size>0){let s=!1;for(let a of e)a===C||a._disposed||(a._isComputed?(a._dirty=!0,a._subs&&j(a._subs,!0)):(ne.add(a),s=!0));s&&!q&&De===0&&queueMicrotask(Le)}},S=(e,n=null)=>{let s=new Set;if(y(e)){let a,o=()=>{if(o._dirty){let c=C;C=o;try{let l=e();Object.is(a,l)||(a=l,j(s,!0))}finally{C=c}o._dirty=!1}return j(s),a};return o._isComputed=!0,o._subs=s,o._dirty=!0,o._deps=null,o._disposed=!1,o}if(n)try{e=JSON.parse(localStorage.getItem(n))??e}catch{}return(...a)=>{if(a.length){let o=y(a[0])?a[0](e):a[0];Object.is(e,o)||(e=o,n&&localStorage.setItem(n,JSON.stringify(e)),j(s,!0))}return j(s),e}};var H=(e,n)=>{if(n===void 0){let a=z(e);return a(),()=>M(a)}let s=z(()=>{let a=B(e)?e.map(o=>o()):e();Re(()=>n(a))});return s(),()=>M(s)},se=e=>{e&&(e._cleanups&&(e._cleanups.forEach(n=>n()),e._cleanups.clear()),e._ownerEffect&&M(e._ownerEffect),e.childNodes&&e.childNodes.forEach(n=>se(n)))},Be=/^\s*(javascript|data|vbscript):/i,Me=new Set(["src","href","formaction","action","background","code","archive"]),Oe=e=>Me.has(e)||e.startsWith("on"),te=(e,n)=>{if(n==null||n===!1)return null;if(Oe(e)){let s=String(n);if(Be.test(s))return"#"}return n},t=(e,n={},s=[])=>{if((n instanceof Node||B(n)||!re(n))&&(s=n,n={}),y(e)){let l=z(()=>{let f=e(n,{children:s,emit:(h,...g)=>n[`on${h[0].toUpperCase()}${h.slice(1)}`]?.(...g)});return l._result=f,f});l();let i=l._result;if(i==null)return null;let r=i instanceof Node||B(i)&&i.every(f=>f instanceof Node)?i:N.createTextNode(String(i)),d=f=>{re(f)&&!f._isRuntime&&(f._mounts=l._mounts||[],f._cleanups=l._cleanups||new Set,f._ownerEffect=l)};return B(r)?r.forEach(d):d(r),r}let a=Ae.has(e),o=a?N.createElementNS(Ne,e):N.createElement(e);o._cleanups=new Set;for(let l of Object.keys(n)){let i=n[l];if(l==="ref"){y(i)?i(o):i.current=o;continue}if(a&&l.startsWith("xlink:")){let r=te(l.slice(6),i);r==null?o.removeAttributeNS(de,l.slice(6)):o.setAttributeNS(de,l.slice(6),r);continue}if(l.startsWith("on")){let r=l.slice(2).toLowerCase();o.addEventListener(r,i);let d=()=>o.removeEventListener(r,i);o._cleanups.add(d),F(d)}else if(y(i)){let r=z(()=>{let d=te(l,i());l==="class"?o.className=d||"":d==null?o.removeAttribute(l):l==="style"&&typeof d=="string"?o.setAttribute("style",d):l in o&&!a?o[l]=d:o.setAttribute(l,d===!0?"":d)});if(r(),o._cleanups.add(()=>M(r)),F(()=>M(r)),/^(INPUT|TEXTAREA|SELECT)$/.test(o.tagName)&&(l==="value"||l==="checked")){let d=l==="checked"?"change":"input";o.addEventListener(d,f=>i(f.target[l]))}}else{let r=te(l,i);r!=null&&(l==="style"&&typeof r=="string"?o.setAttribute("style",r):l in o&&!a?o[l]=r:o.setAttribute(l,r===!0?"":r))}}let c=l=>{if(B(l))return l.forEach(c);if(y(l)){let i=N.createTextNode("");o.appendChild(i);let r=[],d=z(()=>{let f=l(),h=(B(f)?f:[f]).map(ie);r.forEach(x=>{x._isRuntime?x.destroy():se(x),x.parentNode&&x.remove()});let g=i;for(let x=h.length-1;x>=0;x--){let p=h[x];p.parentNode!==g.parentNode&&g.parentNode?.insertBefore(p,g),p._mounts&&p._mounts.forEach(b=>b()),g=p}r=h});d(),o._cleanups.add(()=>M(d)),F(()=>M(d))}else{let i=ie(l);o.appendChild(i),i._mounts&&i._mounts.forEach(r=>r())}};return c(s),o},K=e=>{let n=new Set,s=D,a=C,o=N.createElement("div");o.style.display="contents",o.setAttribute("role","presentation"),D={_cleanups:n},C=null;let c=l=>{l&&(l._isRuntime?(n.add(l.destroy),o.appendChild(l.container)):B(l)?l.forEach(c):o.appendChild(l instanceof Node?l:N.createTextNode(String(l??""))))};try{c(e({onCleanup:l=>n.add(l)}))}finally{D=s,C=a}return{_isRuntime:!0,container:o,destroy:()=>{n.forEach(l=>l()),se(o),o.remove()}}},ue=(e,n,s=null)=>{let a=N.createTextNode(""),o=t("div",{style:"display:contents"},[a]),c=null;return H(()=>!!(y(e)?e():e),l=>{c&&(c.destroy(),c=null);let i=l?n:s;i&&(c=K(()=>y(i)?i():i),o.insertBefore(c.container,a))}),F(()=>c?.destroy()),o},O=(e,n,s)=>{let a=N.createTextNode(""),o=t("div",{style:"display:contents"},[a]),c=new Map;return H(()=>(y(e)?e():e)||[],l=>{let i=new Map,r=[],d=l||[];for(let h=0;hn(g,h)),i.set(x,p),r.push(p)}c.forEach(h=>h.destroy());let f=a;for(let h=r.length-1;h>=0;h--){let x=r[h].container;x.nextSibling!==f&&o.insertBefore(x,f),f=x}c=i}),o},P=e=>{let n=()=>window.location.hash.slice(1)||"/",s=S(n()),a=()=>s(n());window.addEventListener("hashchange",a),F(()=>window.removeEventListener("hashchange",a));let o=t("div",{class:"router-hook"}),c=null;return H([s],()=>{let l=s(),i=e.find(r=>{let d=r.path.split("/").filter(Boolean),f=l.split("/").filter(Boolean);return d.length===f.length&&d.every((h,g)=>h[0]===":"||h===f[g])})||e.find(r=>r.path==="*");if(i){c?.destroy();let r={};i.path.split("/").filter(Boolean).forEach((d,f)=>{d[0]===":"&&(r[d.slice(1)]=l.split("/").filter(Boolean)[f])}),P.params(r),c=K(()=>y(i.component)?i.component(r):i.component),o.replaceChildren(c.container)}}),o};P.params=S({});P.to=e=>window.location.hash=e.replace(/^#?\/?/,"#/");P.back=()=>window.history.back();P.path=()=>window.location.hash.replace(/^#/,"")||"/";var pe=(e,n)=>{let s=typeof n=="string"?N.querySelector(n):n;if(!s)return;ee.has(s)&&ee.get(s).destroy();let a=K(y(e)?e:()=>e);return s.replaceChildren(a.container),ee.set(s,a),a};typeof window<"u"&&"a abbr article aside audio b blockquote br button canvas caption cite code col colgroup datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 header hr i iframe img input ins kbd label legend li main mark meter nav object ol optgroup option output p picture pre progress section select slot small source span strong sub summary sup svg table tbody td template textarea tfoot th thead time tr u ul video".split(" ").forEach(e=>{window[e]=(n,s)=>t(e,n,s)});var k=e=>typeof e=="function"?e():e,L=(e,n="label")=>e&&typeof e=="object"?e[n]:e,m=(...e)=>e.filter(Boolean).join(" ").trim(),fe=(e,n,s="label")=>{let a=String(k(n)||"").toLowerCase(),o=(k(e)||[]).map(c=>typeof c=="object"?c:{label:c,value:c});return a?o.filter(c=>String(c[s]||"").toLowerCase().includes(a)):o},be=e=>`${e}-${Math.random().toString(36).slice(2,9)}`,V=()=>document.activeElement?.blur(),he=S("en"),oe={es:{uploadFiles:"Arrastrar y soltar o click para seleccionar..."},en:{uploadFiles:"Drag and drop or click to select"}},He=e=>{oe[e]&&he(e)},ge=e=>()=>oe[he()][e]||e,U=(e,n)=>s=>t(e,{...s,class:`${n} ${s?.class||""}`.trim()}),v=(e,n)=>(s,a)=>t(e,{...s,class:`${n} ${s?.class||""}`.trim()},a),G=(e,n,s)=>a=>t(e,{type:s,...a,class:`${n} ${a?.class||""}`.trim()}),je=v("div","alert"),Fe=(e,n)=>t("div",{class:"avatar"},t("div",{class:e.class},n)),ze=v("div","avatar-group -space-x-6"),Pe=v("span","badge"),Ie=v("div","breadcrumbs"),xe=v("button","btn"),Ue=v("div","card"),qe=v("div","card-title"),Ke=v("div","card-body"),Ve=v("div","card-actions"),Ge=v("div","carousel"),We=v("div","carousel-item"),Ye=v("div","chat"),Qe=v("div","chat-bubble"),Je=v("div","chat-footer"),Xe=v("div","chat-header"),Ze=(e,n)=>t("div",{...e,class:m("chat-image avatar",e.class)},t("div",{class:"w-10 rounded-full"},typeof n=="string"?t("img",{src:n,alt:"avatar"}):n)),et=G("input","checkbox","checkbox"),tt=v("div","drawer"),nt=e=>input({...e,type:"checkbox",class:"drawer-toggle",checked:()=>k(e.checked),onchange:n=>y(e.checked)&&e.checked(n.target.checked)}),st=v("div","drawer-content"),ot=v("div","drawer-side"),at=e=>label({...e,for:e.for,class:m("drawer-overlay",e.class)}),lt=U("div","divider"),W=v("div","dropdown"),me=(e,n)=>t("div",{...e,tabindex:"0",role:"button",class:m("btn",e.class)},n),Y=(e,n)=>t("div",{...e,tabindex:"0",class:m("dropdown-content",e.class)},n),ct=(e,n)=>t("div",{class:"fab"},[t("div",{tabindex:"0",role:"button",class:m("btn",e.class)},I({},e.icon)),n]),rt=(e,n)=>t("fieldset",{class:m("fieldset",e.class)},[t("legend",{class:"fieldset-legend"},e.label),n]),I=(e,n)=>t("span",{...e,class:m(n,e.class)}),it=(e,n)=>t("div",{...e,class:m("indicator",e.class)},[e.value&&t("span",{class:m("indicator-item badge",e.class)},e.value),n]),dt=v("kbd","kbd"),ut=v("ul","list"),pt=e=>()=>(k(e.items)||[]).map((n,s)=>t("li",{class:m("list-row",e.class,n?.class)},typeof e.render=="function"?e.render(n,s):n)),ft=v("span","loading loading-spinner"),bt=v("div","navbar"),ht=U("progress","progress"),gt=(e,n)=>t("div",{class:m("radial-progress",e.class),style:`--value:${k(e.value)??0};`,role:"progressbar","aria-valuenow":e.value},n),xt=G("input","radio","radio"),mt=G("input","range","range"),vt=v("div","rating"),yt=e=>[...Array(e.count)].map((n,s)=>t("input",{class:m("mask",e.class),name:e.name,type:"radio",checked:()=>k(e.value)===s,onchange:()=>y(e.value)?e.value(s):e.onchange?.(s)})),wt=U("div","skeleton"),kt=U("span","skeleton skeleton-text"),St=v("div","stack"),_t=v("div","stats shadow"),Ct=v("ul","steps"),Tt=(e,n)=>t("li",{...e,class:m("step",e.class),"data-content":e.dataContent},n),ve=v("label","swap"),ye=e=>t("input",{type:"checkbox",checked:()=>k(e.value),onchange:n=>y(e.value)&&e.value(n.target.checked),class:e.class}),we=v("div","swap-on"),ke=v("div","swap-off"),$t=v("table","table"),Et=U("textarea","textarea"),Dt=(e,n)=>t("span",{...e,class:m("text-rotate",e.class)},t("span",{},n)),Nt=v("ul","timeline"),At=G("input","toggle","checkbox"),Rt=(e,n)=>t("div",{...e,class:m("tooltip",e.class),"data-tip":e.tip},n),Lt=e=>{let n=e.name||be("acc");return O(e.items,s=>t("div",{class:m("collapse",e.class)},[t("input",{type:"radio",name:n,checked:s.open||void 0}),s.title?t("div",{class:m("collapse-title",`${s.classTitle??" font-semibold"}`)},s.title):null,s.content?t("div",{class:m("collapse-content text-sm",`${s.classContent??" font-semibold"}`)},s.content):null]))},Bt=({items:e,value:n,onselect:s,placeholder:a="...",...o})=>{let c=S(k(n)||""),l=S(()=>fe(e,c())),i=r=>{let d=L(r),f=typeof r=="string"?r:r.value;c(d),y(n)&&n(f),s?.(r),V()};return W({class:"w-80"},[t("div",{tabindex:"0",role:"button",class:"w-full"},Ce({...o,placeholder:a,value:c,left:I({},"icon-[lucide--search]")})),Y({class:"p-2 bg-base-100 rounded-box shadow-xl w-full max-h-60 overflow-y-auto border border-base-300 z-50"},t("ul",{class:"menu flex-col flex-nowrap w-full p-0"},[O(l,r=>t("li",{},[t("a",{onmousedown:d=>d.preventDefault(),onclick:()=>i(r)},L(r))]),"value"),()=>l().length===0?t("li",{class:"p-4 opacity-50 text-center"},"Sin resultados"):null]))])},Se=e=>{let n=S(new Date),s=S(null),a=S(0),o=S(0),c=new Date,l=`${c.getFullYear()}-${String(c.getMonth()+1).padStart(2,"0")}-${String(c.getDate()).padStart(2,"0")}`,i=p=>`${p.getFullYear()}-${String(p.getMonth()+1).padStart(2,"0")}-${String(p.getDate()).padStart(2,"0")}`,r=()=>k(e.range)===!0,d=()=>k(e.value),f=p=>{let b=i(p),$=d();if(r())if(!$?.start||$.start&&$.end)e.onChange?.({start:b,end:null,...e.hour&&{startHour:a()}});else{let A=$.start,E=b{let b=n();n(new Date(b.getFullYear(),b.getMonth()+p,1))},g=p=>{let b=n();n(new Date(b.getFullYear()+p,b.getMonth(),1))},x=({value:p,onChange:b})=>t("div",{class:"flex-1"},[t("div",{class:"flex gap-2 items-center"},[t("input",{type:"range",min:0,max:23,value:p,class:"range range-xs flex-1",oninput:$=>b(+$.target.value)}),t("span",{class:"text-sm font-mono min-w-[48px] text-center"},()=>String(k(p)).padStart(2,"0")+":00")])]);return t("div",{class:m("p-4 bg-base-100 border border-base-300 shadow-2xl rounded-box w-80 select-none",e.class)},[t("div",{class:"flex justify-between items-center mb-4 gap-1"},[t("div",{class:"flex gap-0.5"},[t("button",{type:"button",class:"btn btn-ghost btn-xs px-1",onclick:()=>g(-1)},t("span",{class:"icon-[lucide--chevrons-left]"})),t("button",{type:"button",class:"btn btn-ghost btn-xs px-1",onclick:()=>h(-1)},t("span",{class:"icon-[lucide--chevron-left]"}))]),t("span",{class:"font-bold uppercase flex-1 text-center"},()=>n().toLocaleString("es-ES",{month:"short",year:"numeric"})),t("div",{class:"flex gap-0.5"},[t("button",{type:"button",class:"btn btn-ghost btn-xs px-1",onclick:()=>h(1)},t("span",{class:"icon-[lucide--chevron-right]"})),t("button",{type:"button",class:"btn btn-ghost btn-xs px-1",onclick:()=>g(1)},t("span",{class:"icon-[lucide--chevrons-right]"}))])]),t("div",{class:"grid grid-cols-7 gap-1",onmouseleave:()=>s(null)},[...["L","M","X","J","V","S","D"].map(p=>t("div",{class:"text-[10px] opacity-40 font-bold text-center"},p)),()=>{let p=n(),b=p.getFullYear(),$=p.getMonth(),A=new Date(b,$,1).getDay(),E=A===0?6:A-1,Q=new Date(b,$+1,0).getDate(),u=[];for(let w=0;w{let R=d(),J=s(),Te=typeof R=="string"?R.split("T")[0]===T:R?.start===T,$e=R?.end===T,X=!1;if(r()&&R?.start){let Z=R.start;!R.end&&J?X=T>Z&&T<=J||T=J:R.end&&(X=T>Z&&Tr()&&s(T),onclick:()=>f(_)},w.toString()))}return u}]),e.hour?t("div",{class:"mt-3 pt-2 border-t border-base-300"},r()?t("div",{class:"flex gap-4"},[x({value:a,onChange:p=>a(p)}),x({value:o,onChange:p=>o(p)})]):x({value:a,onChange:p=>a(p)})):null])},Mt=e=>{let n=()=>k(e.value)||"#000000";return W({},[me({class:"btn"},[t("div",{class:"size-5 rounded-sm",style:()=>`background-color: ${n()}`}),e.label&&t("span",{},e.label)]),Y({class:"p-0"},_e({value:e.value,onchange:s=>{y(e.value)?e.value(s):e.onchange?.(s)}}))])},_e=e=>{let n=()=>k(e.value)||"#000000",s=["#000","#1A1A1A","#333","#4D4D4D","#666","#808080","#B3B3B3","#FFF","#450a0a","#7f1d1d","#991b1b","#b91c1c","#dc2626","#ef4444","#f87171","#fca5a5","#431407","#7c2d12","#9a3412","#c2410c","#ea580c","#f97316","#fb923c","#ffedd5","#713f12","#a16207","#ca8a04","#eab308","#facc15","#fde047","#fef08a","#fff9c4","#064e3b","#065f46","#059669","#10b981","#34d399","#4ade80","#84cc16","#d9f99d","#082f49","#075985","#0284c7","#0ea5e9","#38bdf8","#7dd3fc","#22d3ee","#cffafe","#1e1b4b","#312e81","#4338ca","#4f46e5","#6366f1","#818cf8","#a5b4fc","#e0e7ff","#2e1065","#4c1d95","#6d28d9","#7c3aed","#8b5cf6","#a855f7","#d946ef","#fae8ff"],a=o=>{y(e.value)?e.value(o):e.onchange?.(o),V()};return t("div",{class:m("p-3 bg-base-100 rounded-box shadow w-64",e.class)},t("div",{class:"grid grid-cols-8 gap-1"},s.map(o=>t("button",{type:"button",style:`background-color: ${o}`,class:()=>`size-6 rounded-sm cursor-pointer transition-all hover:scale-125 hover:z-10 active:scale-95 outline-none border border-black/5 p-0 min-h-0 ${n().toLowerCase()===o.toLowerCase()?"ring-2 ring-offset-1 ring-primary z-10 scale-110":""}`,onclick:()=>{a(o)}}))))},Ot=e=>{let n=S(""),s=()=>k(e.range)===!0;H(()=>{let o=k(e.value);if(!o)return n("");let c="";if(typeof o=="string")c=e.hour&&o.includes("T")?o.replace("T"," "):o;else if(o.start&&o.end){let l=e.hour&&o.startHour!=null?`${o.start} ${String(o.startHour).padStart(2,"0")}:00`:o.start,i=e.hour&&o.endHour!=null?`${o.end} ${String(o.endHour).padStart(2,"0")}:00`:o.end;c=`${l} - ${i}`}else o.start&&(c=`${e.hour&&o.startHour!=null?`${o.start} ${String(o.startHour).padStart(2,"0")}:00`:o.start}...`);n(c)});let a=o=>{y(e.value)?e.value(o):e.onChange?.(o),(!s()||o?.end!=null)&&V()};return W({class:m("w-full",e.class)},[t("label",{tabindex:"0",role:"button",class:"input input-bordered flex items-center gap-2 cursor-pointer"},[t("span",{class:"icon-[lucide--calendar] shrink-0"}),t("span",{class:()=>`grow text-left truncate ${n()?"":"opacity-50"}`},()=>n()||e.placeholder||(s()?"Seleccionar rango...":"Seleccionar fecha...")),()=>n()?t("button",{type:"button",class:"btn btn-ghost btn-xs btn-circle -mr-2",onmousedown:o=>{o.preventDefault(),o.stopPropagation(),y(e.value)?e.value(null):e.onChange?.(null),n("")}},t("span",{class:"icon-[lucide--x] opacity-50"})):null]),Y({class:"p-0"},Se({value:e.value,range:s(),hour:e.hour,onChange:a}))])},Ht=e=>{let n=S([]),s=S(!1),a=S(null),o=(e.max||2)*1024*1024,c=i=>{let r=Array.from(i);if(a(null),r.some(f=>f.size>o)){a(`M\xE1x ${e.max||2}MB`);return}let d=[...n(),...r];n(d),y(e.onselect)?e.onselect(d):y(e.value)&&e.value(d)},l=i=>{let r=n().filter((d,f)=>f!==i);n(r),y(e.onselect)?e.onselect(r):y(e.value)&&e.value(r)};return t("div",{class:m("fieldset w-full p-0",e.class)},[t("label",{class:()=>`relative flex items-center justify-between w-full h-12 px-4 border-2 border-dashed rounded-lg cursor-pointer transition-all duration-200 ${s()?"border-primary bg-primary/10":"border-base-content/20 bg-base-100 hover:bg-base-200"}`,ondragover:i=>{i.preventDefault(),s(!0)},ondragleave:()=>s(!1),ondrop:i=>{i.preventDefault(),s(!1),c(i.dataTransfer.files)}},[t("div",{class:"flex items-center gap-3 w-full"},[t("span",{class:"icon-[lucide--upload]"}),t("span",{class:"text-sm opacity-70 truncate grow text-left"},ge("uploadFiles")),t("span",{class:"text-[10px] opacity-40 shrink-0"},`M\xE1x ${e.max||2}MB`)]),t("input",{type:"file",multiple:!0,accept:e.accept||"*",class:"hidden",onchange:i=>c(i.target.files)})]),()=>a()&&t("span",{class:"text-[10px] text-error mt-1 px-1 font-medium"},a()),ue(()=>n().length>0,()=>t("ul",{class:"mt-2 space-y-1"},O(n,(i,r)=>t("li",{class:"flex items-center justify-between p-1.5 pl-3 text-xs bg-base-200/50 rounded-md border border-base-300"},[t("div",{class:"flex items-center gap-2 truncate"},[t("span",{class:"opacity-50"},"\u{1F4C4}"),t("span",{class:"truncate font-medium max-w-[200px]"},i.name),t("span",{class:"text-[9px] opacity-40"},`(${(i.size/1024).toFixed(0)} KB)`)]),t("button",{type:"button",class:"btn btn-ghost btn-xs btn-circle",onclick:d=>{d.preventDefault(),l(r)}},t("span",{class:"icon-[lucide--x]"}))]))))])},Ce=e=>{let{label:n,icon:s,float:a,placeholder:o,value:c,left:l,right:i,rule:r,hint:d,content:f,...h}=e,g=S(!1),x=e.type==="password",p=r??null,b=()=>x?k(g)?"text":"password":e.type||"search";return t("label",{class:a?"floating-label":""},[a?t("span",{},n):null,t("label",{pattern:p,class:()=>m("input validator",e.class)},[n&&!a?t("span",{class:"label"},n):null,l??null,t("input",{...h,type:b,class:"grow",pattern:p,placeholder:o||n||" ",value:c}),i??null,x?ve({class:"ml-2"},[ye({value:g,class:"swap-rotate"}),we({},I({},"icon-[lucide--eye]")),ke({},I({},"icon-[lucide--eye-off]"))]):null]),d?t("div",{class:"validator-hint"},d):null])},jt=e=>{if(e.children!==void 0)return t("ul",{class:m("menu",e.class),...e},e.children);let{items:n}=e,s=a=>a.children?t("li",{},t("details",{open:a.open||void 0},[t("summary",{},L(a)),t("ul",{},O(()=>k(a.children)||[],s))])):t("li",{},t("a",{href:a.href,onclick:a.onclick?o=>{a.href||o.preventDefault(),a.onclick(o)}:null},L(a)));return t("ul",{class:m("menu",e.class)},O(()=>k(n)||[],s))},Ft=(e,n)=>{let s=null;H(()=>{let o=k(e.open);s&&(o?s.showModal():s.close())});let a=()=>y(e.open)&&e.open(!1);return t("dialog",{...e,ref:o=>s=o,class:m("modal",e.class),onclose:a,oncancel:a},[t("div",{class:"modal-box"},[e.title&&t("h3",{class:"text-lg font-bold"},e.title),n,t("div",{class:"modal-action"},[e.actions||xe({class:"btn",onclick:a},"Cerrar")])]),t("form",{method:"dialog",class:"modal-backdrop"},[t("button",{},"close")])])},zt=(e,n)=>{if(n!==void 0)return t("select",{class:m("select",e.class),...e},n);let{label:s,float:a,placeholder:o,placeholderDisabled:c=!0,value:l,left:i,right:r,hint:d,items:f,keyFn:h,...g}=e,x=()=>{let p=k(f)||[];return[...o?[{disabled:c,label:o,value:""}]:[],...p]};return t("label",{class:a?"floating-label":""},[a?t("span",{},s):null,t("label",{class:m("select",g.class)},[!a&&s?t("span",{class:"label"},s):null,i??null,t("select",{value:()=>k(l),onchange:p=>y(l)?l(p.target.value):g.onchange?.(p)},O(x,p=>{let b=L(p,p.value!==void 0?"value":void 0),$=L(p,"label");return t("option",{value:b,disabled:p.disabled||void 0},$)})),r??null]),d?t("div",{class:"validator-hint"},d):null])},Pt=e=>t("div",{...e,class:m("stat",e.class)},[e.title?t("div",{class:"stat-title"},e.title):null,e.value?t("div",{class:"stat-value"},e.value):null,e.desc?t("div",{class:"stat-desc"},e.desc):null]),It=({items:e,columns:n=[],header:s=!0})=>{let a=s!==!1&&n.some(c=>c.label)?t("thead",{},t("tr",{},n.map(c=>t("th",{class:c.class},c.label)))):null,o=t("tbody",{},()=>(k(e)||[]).map((l,i)=>t("tr",{},n.map(r=>{let d=r.render?r.render(l,i):l[r.key];return t("td",{class:r.class},d)}))));return[a,o].filter(Boolean)},Ut=(e,n)=>{if(!e.items){let{class:d,...f}=e;return t("div",{...f,class:m("tabs",d)},n)}let{items:s,activeIndex:a,onClose:o,class:c,...l}=e,i=d=>y(d)?d():d,r=o||(y(s)?(d,f)=>{let g=k(s).filter((x,p)=>p!==d);s(g),a()>=g.length&&a(Math.max(0,g.length-1))}:null);return t("div",{...l,class:m("tabs",c)},()=>(k(s)||[]).flatMap((f,h)=>{let g=()=>a()===h,x=t("button",{class:()=>`tab ${g()?"tab-active":""} ${f.class||""}`,onclick:b=>{b.preventDefault(),a(h),f.onclick?.(b)}},[L(f),f.closable?t("span",{class:"ml-1 inline-flex items-center justify-center w-4 h-4 rounded-full hover:bg-base-300 text-base-content/60 hover:text-base-content cursor-pointer",onclick:b=>{b.stopPropagation(),r?.(h,f)}},t("span",{class:"icon-[lucide--x] w-3 h-3"})):null]),p=t("div",{class:"tab-content bg-base-100 border-base-300 p-6",style:()=>`display: ${g()?"block":"none"};`},y(f.content)?f.content():f.content);return[x,p]}))},qt=(e,n="alert-success",s=3500)=>{let a=document.getElementById("sigpro-toast-container");a||(a=t("div",{id:"sigpro-toast-container",class:"fixed top-0 right-0 z-[9999] p-4 flex flex-col items-end gap-2 pointer-events-none"}),document.body.appendChild(a));let o=t("div",{style:"display: contents"});a.appendChild(o);let c,l,i,d=pe(()=>{let f=S(!1),h=S(!1);c=()=>{h()||(clearTimeout(l),clearTimeout(i),h(!0),setTimeout(()=>{d.destroy(),o.remove(),a.hasChildNodes()||a.remove()},300))},i=setTimeout(()=>f(!0),0);let g=typeof e=="function"?k(e):e,x=typeof g=="string"?t("span",{},g):g;return t("div",{class:()=>{let p=`alert alert-soft ${n} shadow-lg transition-all duration-300 inline-flex w-auto whitespace-nowrap pointer-events-auto`;return h()?`${p} translate-x-full opacity-0`:f()?`${p} translate-x-0 opacity-100`:`${p} translate-x-10 opacity-0`}},[x,t("button",{class:"btn btn-xs btn-circle btn-ghost",onclick:c},t("span",{class:"icon-[lucide--x]"}))])},o);return s>0&&(l=setTimeout(c,s)),c};var le={};ce(le,{Editor:()=>Kt});var Kt=e=>{let{value:n,class:s}=e,a=null,o=null,c=S(!1),l=S(""),i=S(0),r=S(0),d=S(!1),f=["\u{1F600}","\u{1F60A}","\u{1F609}","\u{1F9D0}","\u{1F62E}","\u{1F914}","\u{1F605}","\u{1F602}","\u{1F60D}","\u{1F618}","\u{1F970}","\u{1F44D}","\u{1F44E}","\u{1F44C}","\u{1F91D}","\u{1F91E}","\u{1F44B}","\u{1F44F}","\u{1F64C}","\u{1F64F}","\u{1F4AA}","\u261D\uFE0F","\u{1F447}","\u{1F448}","\u{1F449}","\u{1F595}","\u2705","\u26A0\uFE0F","\u{1F680}","\u{1F4E2}","\u2709\uFE0F","\u2764\uFE0F"],h=()=>{let u=window.getSelection();u.getRangeAt&&u.rangeCount&&(o=u.getRangeAt(0))},g=()=>{if(o){let u=window.getSelection();u.removeAllRanges(),u.addRange(o)}},x=()=>{r(r()+1),a&&i(a.innerText.length)},p=()=>{if(!a)return;let u=a.innerHTML;y(n)?n(u):e.onchange?.(u),x()},b=(u,w=null)=>{a&&(a.focus(),o&&g(),document.execCommand(u,!1,w),o=null,p())},$=u=>{let w=document.createElement("div");w.style="position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.9);z-index:9999;display:flex;align-items:center;justify-content:center;cursor:zoom-out;";let _=document.createElement("img");_.src=u,_.style="max-width:95%;max-height:95%;box-shadow:0 0 30px rgba(0,0,0,0.5);border-radius:4px;",w.onclick=()=>document.body.removeChild(w),w.appendChild(_),document.body.appendChild(w)},A=u=>{if(!u)return;let w=new FileReader;w.onload=_=>{if(u.type.startsWith("image/")){let T=`
 `;b("insertHTML",T)}else{let T=`${u.name} `;b("insertHTML",T)}},w.readAsDataURL(u)},E=(u,w=null)=>{if(r(),!a||c())return!1;try{if(u==="formatBlock"){let _=window.getSelection().getRangeAt(0).commonAncestorContainer;for(;_&&_!==a;){if(_.nodeType===1&&_.tagName===w)return!0;_=_.parentNode}return!1}return document.queryCommandState(u)}catch{return!1}},Q=t("div",{class:"flex flex-wrap items-center gap-1 p-2 border-b border-base-300 bg-base-200 sticky top-0 z-20"},[t("div",{class:"flex flex-wrap gap-1 flex-1 items-center"},[t("button",{type:"button",class:()=>`btn btn-ghost btn-xs ${E("bold")?"btn-active bg-primary/20":""}`,onclick:()=>b("bold")},t("span",{class:"icon-[lucide--bold]"})),t("button",{type:"button",class:()=>`btn btn-ghost btn-xs ${E("italic")?"btn-active bg-primary/20":""}`,onclick:()=>b("italic")},t("span",{class:"icon-[lucide--italic]"})),t("button",{type:"button",class:()=>`btn btn-ghost btn-xs ${E("underline")?"btn-active bg-primary/20":""}`,onclick:()=>b("underline")},t("span",{class:"icon-[lucide--underline]"})),t("input",{type:"color",class:"w-5 h-5 p-0 border-0 bg-transparent cursor-pointer",oninput:u=>b("foreColor",u.target.value)}),t("span",{class:"w-px h-5 bg-base-300 mx-1"}),t("button",{type:"button",class:"btn btn-ghost btn-xs",onclick:()=>b("justifyLeft")},t("span",{class:"icon-[lucide--align-left]"})),t("button",{type:"button",class:"btn btn-ghost btn-xs",onclick:()=>b("justifyCenter")},t("span",{class:"icon-[lucide--align-center]"})),t("button",{type:"button",class:"btn btn-ghost btn-xs",onclick:()=>b("justifyRight")},t("span",{class:"icon-[lucide--align-right]"})),t("span",{class:"w-px h-5 bg-base-300 mx-1"}),t("button",{type:"button",class:"btn btn-ghost btn-xs",onclick:()=>b("insertUnorderedList")},t("span",{class:"icon-[lucide--list]"})),t("button",{type:"button",class:"btn btn-ghost btn-xs",onclick:()=>b("insertOrderedList")},t("span",{class:"icon-[lucide--list-ordered]"})),t("button",{type:"button",class:"btn btn-ghost btn-xs",onclick:()=>b("outdent")},t("span",{class:"icon-[lucide--indent-decrease]"})),t("button",{type:"button",class:"btn btn-ghost btn-xs",onclick:()=>b("indent")},t("span",{class:"icon-[lucide--indent-increase]"})),t("button",{type:"button",class:()=>`btn btn-ghost btn-xs ${E("formatBlock","BLOCKQUOTE")?"btn-active":""}`,onclick:()=>b("formatBlock",E("formatBlock","BLOCKQUOTE")?"P":"BLOCKQUOTE")},t("span",{class:"icon-[lucide--quote]"})),t("span",{class:"w-px h-5 bg-base-300 mx-1"}),t("button",{type:"button",class:"btn btn-ghost btn-xs",onclick:()=>{let u=window.prompt("URL:");u&&b("createLink",u)}},t("span",{class:"icon-[lucide--link]"})),t("button",{type:"button",class:"btn btn-ghost btn-xs",onclick:()=>{let u=document.createElement("input");u.type="file",u.onchange=w=>A(w.target.files[0]),u.click()}},t("span",{class:"icon-[lucide--paperclip]"})),t("div",{class:"relative"},[t("button",{type:"button",class:"btn btn-ghost btn-xs",onclick:u=>{u.stopPropagation(),h(),d(!d())}},t("span",{class:"icon-[lucide--smile]"})),t("div",{class:"absolute top-full left-0 mt-1 p-2 bg-base-100 border border-base-300 shadow-xl rounded-box w-52 z-50 flex flex-wrap gap-1",style:()=>d()?"display:flex":"display:none"},f.map(u=>t("span",{class:"cursor-pointer hover:bg-base-200 p-1 rounded text-lg",onclick:w=>{w.stopPropagation(),b("insertText",u),d(!1)}},u)))]),t("span",{class:"w-px h-5 bg-base-300 mx-1"}),t("button",{type:"button",class:"btn btn-ghost btn-xs",onclick:()=>b("undo")},t("span",{class:"icon-[lucide--undo-2]"})),t("button",{type:"button",class:"btn btn-ghost btn-xs",onclick:()=>b("redo")},t("span",{class:"icon-[lucide--redo-2]"}))]),t("button",{type:"button",class:()=>`btn btn-ghost btn-xs ${c()?"btn-active":""}`,onclick:()=>{c()?a&&(a.innerHTML=l(),p()):l(a?.innerHTML||""),c(!c())}},t("span",{class:"icon-[lucide--code-2]"}))]);if(typeof document<"u"&&!document.getElementById("editor-styles")){let u=document.createElement("style");u.id="editor-styles",u.textContent=` [contenteditable="true"] div, [contenteditable="true"] p { margin: 0; padding: 0; } `,document.head.appendChild(u)}return t("div",{class:m("border border-base-300 rounded-box bg-base-100 overflow-hidden shadow-sm flex flex-col",s)},[Q,t("div",{class:"relative flex-1 flex flex-col",onclick:()=>d(!1)},[t("div",{ref:u=>{!a&&u&&(a=u,u.innerHTML=k(n)||"",document.execCommand("defaultParagraphSeparator",!1,"br"),u.addEventListener("click",w=>{let _=w.target.closest(".resizable-img-container");if(_){let T=_.querySelector("img");T&&$(T.src)}}))},style:()=>`min-height:22rem;${c()?"display:none":""}`,class:"p-4 outline-none text-base-content leading-relaxed [&>div]:m-0 [&>p]:m-0 [&>div]:min-h-[1em] [&_.resizable-img-container]:hover:border-primary [&_blockquote]:border-l-4 [&_blockquote]:border-base-300 [&_blockquote]:pl-4 [&_blockquote]:italic [&_ul]:list-disc [&_ul]:pl-8 [&_ol]:list-decimal [&_ol]:pl-8",contenteditable:"true",oninput:p,onkeydown:u=>{u.key==="Tab"&&(u.preventDefault(),b("indent"))},onkeyup:()=>{x(),h()},onclick:u=>{x(),h(),u.stopPropagation()},onmouseup:()=>{p(),h()},onpaste:u=>{u.preventDefault();let w=u.clipboardData.getData("text/plain");b("insertText",w)},ondragover:u=>u.preventDefault(),ondrop:u=>{u.preventDefault(),A(u.dataTransfer.files[0])}}),t("textarea",{class:"w-full flex-1 min-h-[22rem] p-4 outline-none font-mono text-sm bg-base-200 border-0",style:()=>c()?"":"display:none",value:l,oninput:u=>{l(u.target.value),a&&(a.innerHTML=u.target.value),e.onchange?.(u.target.value)}})]),t("div",{class:"px-3 py-1 border-t border-base-300 bg-base-100/50 text-[10px] text-right text-base-content/60 italic"},[t("span",()=>`${i()}`)])])};typeof window<"u"&&Object.assign(window,ae,le);})();