@homlista-devs/ui 2.0.0 → 2.0.2

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),E=require("react"),Wt=require("react-dom"),ve=require("effector"),Ut=require("effector-react");function qt(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return r.default=e,Object.freeze(r)}const j=qt(E);function Ye(e,r){return!r||r==="all"?e:e.filter(s=>s.categoryId===r)}function et(e,r){const s=[...e];return s.sort((o,a)=>{let n="",l="";return r.column==="title"?(n=o.title.toLowerCase(),l=a.title.toLowerCase()):r.column==="metric"&&(n=De(o.metricValue),l=De(a.metricValue)),n<l?r.direction==="asc"?-1:1:n>l?r.direction==="asc"?1:-1:0}),s}function De(e){if(!e)return 0;const r=e.match(/[\d.]+/);return r?parseFloat(r[0]):0}function tt(e,r){return r==="all"?e.length:e.filter(s=>s.categoryId===r).length}function rt(e){const{propertyPrice:r,downPayment:s,loanTerm:o,interestRate:a,propertyTax:n=0,hoaFees:l=0}=e,i=r-s,c=a/100/12,m=o*12;let u;if(c===0)u=i/m;else{const h=Math.pow(1+c,m);u=i*(c*h)/(h-1)}const d=u*m,x=d-i,N=u+n+l;return{monthlyPayment:Math.round(u*100)/100,totalMonthlyPayment:Math.round(N*100)/100,totalAmount:Math.round(d*100)/100,totalInterest:Math.round(x*100)/100,loanPrincipal:Math.round(i*100)/100,breakdown:{principalAndInterest:Math.round(u*100)/100,propertyTax:Math.round(n*100)/100,hoaFees:Math.round(l*100)/100}}}function ae(e,r="MXN"){return new Intl.NumberFormat("es-MX",{style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}function Kt(e,r=3){return`${e.toFixed(r)} %`}function Xt(e){const r={};return(!e.propertyPrice||e.propertyPrice<=0)&&(r.propertyPrice="El precio de la propiedad debe ser mayor a 0"),(!e.downPayment||e.downPayment<0)&&(r.downPayment="El enganche debe ser mayor o igual a 0"),e.propertyPrice&&e.downPayment&&e.downPayment>=e.propertyPrice&&(r.downPayment="El enganche debe ser menor al precio de la propiedad"),(!e.loanTerm||e.loanTerm<=0)&&(r.loanTerm="El plazo del préstamo debe ser mayor a 0"),(e.interestRate===void 0||e.interestRate<0)&&(r.interestRate="La tasa de interés debe ser mayor o igual a 0"),{isValid:Object.keys(r).length===0,errors:r}}function st(e){var r,s,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(s=st(e[r]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}function ot(){for(var e,r,s=0,o="",a=arguments.length;s<a;s++)(e=arguments[s])&&(r=st(e))&&(o&&(o+=" "),o+=r);return o}const Be=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,He=ot,J=(e,r)=>s=>{var o;if(r?.variants==null)return He(e,s?.class,s?.className);const{variants:a,defaultVariants:n}=r,l=Object.keys(a).map(m=>{const u=s?.[m],d=n?.[m];if(u===null)return null;const x=Be(u)||Be(d);return a[m][x]}),i=s&&Object.entries(s).reduce((m,u)=>{let[d,x]=u;return x===void 0||(m[d]=x),m},{}),c=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((m,u)=>{let{class:d,className:x,...N}=u;return Object.entries(N).every(h=>{let[v,g]=h;return Array.isArray(g)?g.includes({...n,...i}[v]):{...n,...i}[v]===g})?[...m,d,x]:m},[]);return He(e,l,c,s?.class,s?.className)},Zt=J("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}});function Ge(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function Jt(...e){return r=>{let s=!1;const o=e.map(a=>{const n=Ge(a,r);return!s&&typeof n=="function"&&(s=!0),n});if(s)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Ge(e[a],null)}}}}function Qt(e){const r=er(e),s=j.forwardRef((o,a)=>{const{children:n,...l}=o,i=j.Children.toArray(n),c=i.find(rr);if(c){const m=c.props.children,u=i.map(d=>d===c?j.Children.count(m)>1?j.Children.only(null):j.isValidElement(m)?m.props.children:null:d);return t.jsx(r,{...l,ref:a,children:j.isValidElement(m)?j.cloneElement(m,void 0,u):null})}return t.jsx(r,{...l,ref:a,children:n})});return s.displayName=`${e}.Slot`,s}var Yt=Qt("Slot");function er(e){const r=j.forwardRef((s,o)=>{const{children:a,...n}=s;if(j.isValidElement(a)){const l=or(a),i=sr(n,a.props);return a.type!==j.Fragment&&(i.ref=o?Jt(o,l):l),j.cloneElement(a,i)}return j.Children.count(a)>1?j.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var tr=Symbol("radix.slottable");function rr(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tr}function sr(e,r){const s={...r};for(const o in r){const a=e[o],n=r[o];/^on[A-Z]/.test(o)?a&&n?s[o]=(...i)=>{const c=n(...i);return a(...i),c}:a&&(s[o]=a):o==="style"?s[o]={...a,...n}:o==="className"&&(s[o]=[a,n].filter(Boolean).join(" "))}return{...e,...s}}function or(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}const Re="-",ar=e=>{const r=lr(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{const i=l.split(Re);return i[0]===""&&i.length!==1&&i.shift(),at(i,r)||nr(l)},getConflictingClassGroupIds:(l,i)=>{const c=s[l]||[];return i&&o[l]?[...c,...o[l]]:c}}},at=(e,r)=>{if(e.length===0)return r.classGroupId;const s=e[0],o=r.nextPart.get(s),a=o?at(e.slice(1),o):void 0;if(a)return a;if(r.validators.length===0)return;const n=e.join(Re);return r.validators.find(({validator:l})=>l(n))?.classGroupId},We=/^\[(.+)\]$/,nr=e=>{if(We.test(e)){const r=We.exec(e)[1],s=r?.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},lr=e=>{const{theme:r,classGroups:s}=e,o={nextPart:new Map,validators:[]};for(const a in s)Pe(s[a],o,a,r);return o},Pe=(e,r,s,o)=>{e.forEach(a=>{if(typeof a=="string"){const n=a===""?r:Ue(r,a);n.classGroupId=s;return}if(typeof a=="function"){if(ir(a)){Pe(a(o),r,s,o);return}r.validators.push({validator:a,classGroupId:s});return}Object.entries(a).forEach(([n,l])=>{Pe(l,Ue(r,n),s,o)})})},Ue=(e,r)=>{let s=e;return r.split(Re).forEach(o=>{s.nextPart.has(o)||s.nextPart.set(o,{nextPart:new Map,validators:[]}),s=s.nextPart.get(o)}),s},ir=e=>e.isThemeGetter,cr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,o=new Map;const a=(n,l)=>{s.set(n,l),r++,r>e&&(r=0,o=s,s=new Map)};return{get(n){let l=s.get(n);if(l!==void 0)return l;if((l=o.get(n))!==void 0)return a(n,l),l},set(n,l){s.has(n)?s.set(n,l):a(n,l)}}},ze="!",Ee=":",dr=Ee.length,mr=e=>{const{prefix:r,experimentalParseClassName:s}=e;let o=a=>{const n=[];let l=0,i=0,c=0,m;for(let h=0;h<a.length;h++){let v=a[h];if(l===0&&i===0){if(v===Ee){n.push(a.slice(c,h)),c=h+dr;continue}if(v==="/"){m=h;continue}}v==="["?l++:v==="]"?l--:v==="("?i++:v===")"&&i--}const u=n.length===0?a:a.substring(c),d=ur(u),x=d!==u,N=m&&m>c?m-c:void 0;return{modifiers:n,hasImportantModifier:x,baseClassName:d,maybePostfixModifierPosition:N}};if(r){const a=r+Ee,n=o;o=l=>l.startsWith(a)?n(l.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(s){const a=o;o=n=>s({className:n,parseClassName:a})}return o},ur=e=>e.endsWith(ze)?e.substring(0,e.length-1):e.startsWith(ze)?e.substring(1):e,pr=e=>{const r=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const a=[];let n=[];return o.forEach(l=>{l[0]==="["||r[l]?(a.push(...n.sort(),l),n=[]):n.push(l)}),a.push(...n.sort()),a}},fr=e=>({cache:cr(e.cacheSize),parseClassName:mr(e),sortModifiers:pr(e),...ar(e)}),xr=/\s+/,hr=(e,r)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:n}=r,l=[],i=e.trim().split(xr);let c="";for(let m=i.length-1;m>=0;m-=1){const u=i[m],{isExternal:d,modifiers:x,hasImportantModifier:N,baseClassName:h,maybePostfixModifierPosition:v}=s(u);if(d){c=u+(c.length>0?" "+c:c);continue}let g=!!v,f=o(g?h.substring(0,v):h);if(!f){if(!g){c=u+(c.length>0?" "+c:c);continue}if(f=o(h),!f){c=u+(c.length>0?" "+c:c);continue}g=!1}const P=n(x).join(":"),C=N?P+ze:P,M=C+f;if(l.includes(M))continue;l.push(M);const S=a(f,g);for(let R=0;R<S.length;++R){const T=S[R];l.push(C+T)}c=u+(c.length>0?" "+c:c)}return c};function gr(){let e=0,r,s,o="";for(;e<arguments.length;)(r=arguments[e++])&&(s=nt(r))&&(o&&(o+=" "),o+=s);return o}const nt=e=>{if(typeof e=="string")return e;let r,s="";for(let o=0;o<e.length;o++)e[o]&&(r=nt(e[o]))&&(s&&(s+=" "),s+=r);return s};function br(e,...r){let s,o,a,n=l;function l(c){const m=r.reduce((u,d)=>d(u),e());return s=fr(m),o=s.cache.get,a=s.cache.set,n=i,i(c)}function i(c){const m=o(c);if(m)return m;const u=hr(c,s);return a(c,u),u}return function(){return n(gr.apply(null,arguments))}}const $=e=>{const r=s=>s[e]||[];return r.isThemeGetter=!0,r},lt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,it=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yr=/^\d+\/\d+$/,vr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wr=/\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$/,jr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oe=e=>yr.test(e),z=e=>!!e&&!Number.isNaN(Number(e)),Z=e=>!!e&&Number.isInteger(Number(e)),Ce=e=>e.endsWith("%")&&z(e.slice(0,-1)),U=e=>vr.test(e),Cr=()=>!0,Mr=e=>wr.test(e)&&!jr.test(e),ct=()=>!1,Sr=e=>kr.test(e),Tr=e=>Nr.test(e),Pr=e=>!b(e)&&!y(e),zr=e=>le(e,ut,ct),b=e=>lt.test(e),ee=e=>le(e,pt,Mr),Me=e=>le(e,Lr,z),qe=e=>le(e,dt,ct),Er=e=>le(e,mt,Tr),ge=e=>le(e,ft,Sr),y=e=>it.test(e),de=e=>ie(e,pt),Ir=e=>ie(e,$r),Ke=e=>ie(e,dt),Rr=e=>ie(e,ut),Ar=e=>ie(e,mt),be=e=>ie(e,ft,!0),le=(e,r,s)=>{const o=lt.exec(e);return o?o[1]?r(o[1]):s(o[2]):!1},ie=(e,r,s=!1)=>{const o=it.exec(e);return o?o[1]?r(o[1]):s:!1},dt=e=>e==="position"||e==="percentage",mt=e=>e==="image"||e==="url",ut=e=>e==="length"||e==="size"||e==="bg-size",pt=e=>e==="length",Lr=e=>e==="number",$r=e=>e==="family-name",ft=e=>e==="shadow",Or=()=>{const e=$("color"),r=$("font"),s=$("text"),o=$("font-weight"),a=$("tracking"),n=$("leading"),l=$("breakpoint"),i=$("container"),c=$("spacing"),m=$("radius"),u=$("shadow"),d=$("inset-shadow"),x=$("text-shadow"),N=$("drop-shadow"),h=$("blur"),v=$("perspective"),g=$("aspect"),f=$("ease"),P=$("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...M(),y,b],R=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],w=()=>[y,b,c],L=()=>[oe,"full","auto",...w()],K=()=>[Z,"none","subgrid",y,b],re=()=>["auto",{span:["full",Z,y,b]},Z,y,b],X=()=>[Z,"auto",y,b],se=()=>["auto","min","max","fr",y,b],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...w()],W=()=>[oe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],k=()=>[e,y,b],ue=()=>[...M(),Ke,qe,{position:[y,b]}],ce=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",Rr,zr,{size:[y,b]}],_=()=>[Ce,de,ee],A=()=>["","none","full",m,y,b],G=()=>["",z,de,ee],pe=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],O=()=>[z,Ce,Ke,qe],Ve=()=>["","none",h,y,b],fe=()=>["none",z,y,b],xe=()=>["none",z,y,b],Ne=()=>[z,y,b],he=()=>[oe,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[U],breakpoint:[U],color:[Cr],container:[U],"drop-shadow":[U],ease:["in","out","in-out"],font:[Pr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[U],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[U],shadow:[U],spacing:["px",z],text:[U],"text-shadow":[U],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",oe,b,y,g]}],container:["container"],columns:[{columns:[z,b,y,i]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:S()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[Z,"auto",y,b]}],basis:[{basis:[oe,"full","auto",i,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[z,oe,"auto","initial","none",b]}],grow:[{grow:["",z,y,b]}],shrink:[{shrink:["",z,y,b]}],order:[{order:[Z,"first","last","none",y,b]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":se()}],"auto-rows":[{"auto-rows":se()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[i,"screen",...W()]}],"min-w":[{"min-w":[i,"screen","none",...W()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[l]},...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,de,ee]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,y,Me]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ce,b]}],"font-family":[{font:[Ir,b,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:[a,y,b]}],"line-clamp":[{"line-clamp":[z,"none",y,Me]}],leading:[{leading:[n,...w()]}],"list-image":[{"list-image":["none",y,b]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",y,b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[z,"from-font","auto",y,ee]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[z,"auto",y,b]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",y,b]}],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",y,b]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Z,y,b],radial:["",y,b],conic:[Z,y,b]},Ar,Er]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"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:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[z,y,b]}],"outline-w":[{outline:["",z,de,ee]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,be,ge]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,be,ge]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[z,ee]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",x,be,ge]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[z,y,b]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"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":[z]}],"mask-image-linear-from-pos":[{"mask-linear-from":O()}],"mask-image-linear-to-pos":[{"mask-linear-to":O()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":O()}],"mask-image-t-to-pos":[{"mask-t-to":O()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":O()}],"mask-image-r-to-pos":[{"mask-r-to":O()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":O()}],"mask-image-b-to-pos":[{"mask-b-to":O()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":O()}],"mask-image-l-to-pos":[{"mask-l-to":O()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":O()}],"mask-image-x-to-pos":[{"mask-x-to":O()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":O()}],"mask-image-y-to-pos":[{"mask-y-to":O()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[y,b]}],"mask-image-radial-from-pos":[{"mask-radial-from":O()}],"mask-image-radial-to-pos":[{"mask-radial-to":O()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":M()}],"mask-image-conic-pos":[{"mask-conic":[z]}],"mask-image-conic-from-pos":[{"mask-conic-from":O()}],"mask-image-conic-to-pos":[{"mask-conic-to":O()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",y,b]}],filter:[{filter:["","none",y,b]}],blur:[{blur:Ve()}],brightness:[{brightness:[z,y,b]}],contrast:[{contrast:[z,y,b]}],"drop-shadow":[{"drop-shadow":["","none",N,be,ge]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",z,y,b]}],"hue-rotate":[{"hue-rotate":[z,y,b]}],invert:[{invert:["",z,y,b]}],saturate:[{saturate:[z,y,b]}],sepia:[{sepia:["",z,y,b]}],"backdrop-filter":[{"backdrop-filter":["","none",y,b]}],"backdrop-blur":[{"backdrop-blur":Ve()}],"backdrop-brightness":[{"backdrop-brightness":[z,y,b]}],"backdrop-contrast":[{"backdrop-contrast":[z,y,b]}],"backdrop-grayscale":[{"backdrop-grayscale":["",z,y,b]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[z,y,b]}],"backdrop-invert":[{"backdrop-invert":["",z,y,b]}],"backdrop-opacity":[{"backdrop-opacity":[z,y,b]}],"backdrop-saturate":[{"backdrop-saturate":[z,y,b]}],"backdrop-sepia":[{"backdrop-sepia":["",z,y,b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",y,b]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[z,"initial",y,b]}],ease:[{ease:["linear","initial",f,y,b]}],delay:[{delay:[z,y,b]}],animate:[{animate:["none",P,y,b]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,y,b]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[y,b,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",y,b]}],"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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",y,b]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[z,de,ee,Me]}],stroke:[{stroke:["none",...k()]}],"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"]}},Fr=br(Or);function p(...e){return Fr(ot(e))}const q=j.forwardRef(({className:e,variant:r,size:s,asChild:o=!1,disabled:a,...n},l)=>{const i=o?Yt:"button";return t.jsx(i,{className:p(Zt({variant:r,size:s,className:e})),ref:l,type:n.type||"button",disabled:a,"aria-disabled":a?"true":void 0,...n})});q.displayName="Button";const _r=e=>{switch(e){case"h1":return"text-4xl font-bold leading-tight tracking-tight";case"h2":return"text-3xl font-bold leading-tight tracking-tight";case"h3":return"text-2xl font-semibold leading-tight tracking-normal";case"h4":return"text-xl font-semibold leading-snug tracking-normal";case"h5":return"text-lg font-medium leading-snug tracking-normal";case"h6":return"text-base font-medium leading-normal tracking-normal";case"body":return"text-base font-normal leading-normal";case"body-sm":return"text-sm font-normal leading-normal";case"body-lg":return"text-lg font-normal leading-relaxed";case"caption":return"text-xs font-normal leading-normal tracking-wide";case"label":return"text-sm font-medium leading-normal tracking-wide";default:return"text-base font-normal leading-normal"}},Vr=e=>{switch(e){case"primary":return"text-foreground";case"secondary":return"text-muted-foreground";case"muted":return"text-muted-foreground";case"error":return"text-destructive";case"success":return"text-success";case"warning":return"text-warning";default:return"text-foreground"}},Dr=e=>{switch(e){case"light":return"font-light";case"normal":return"font-normal";case"medium":return"font-medium";case"semibold":return"font-semibold";case"bold":return"font-bold";default:return""}},Br=e=>{switch(e){case"left":return"text-left";case"center":return"text-center";case"right":return"text-right";case"justify":return"text-justify";default:return"text-left"}},I=({variant:e="body",color:r="primary",weight:s,align:o="left",truncate:a=!1,children:n,className:l,as:i,...c})=>{const m=i||Hr(e),u=p("m-0",_r(e),Vr(r),Dr(s),Br(o),a&&"truncate",l);return t.jsx(m,{className:u,...c,children:n})};function Hr(e){switch(e){case"h1":return"h1";case"h2":return"h2";case"h3":return"h3";case"h4":return"h4";case"h5":return"h5";case"h6":return"h6";default:return"p"}}const Gr=e=>{switch(e){case"sm":return"p-4";case"md":return"p-6";case"lg":return"p-8";default:return"p-0"}},Wr=e=>{switch(e){case"sm":return"shadow-sm";case"md":return"shadow-md";case"lg":return"shadow-lg";default:return"shadow-none"}},Ur=e=>{switch(e){case"sm":return"rounded-sm";case"md":return"rounded-md";case"lg":return"rounded-lg";default:return"rounded-none"}},Ae=({children:e,title:r,subtitle:s,className:o,padding:a="md",shadow:n="md",borderRadius:l="md",onClick:i})=>{const c=!!i,m=p("bg-card",Gr(a),Wr(n),Ur(l),"transition-all duration-200 ease-in-out",c&&"cursor-pointer hover:-translate-y-0.5 hover:shadow-lg active:translate-y-0",o);return t.jsxs("div",{className:m,onClick:i,children:[(r||s)&&t.jsxs("div",{className:"mb-4",children:[r&&t.jsx("div",{className:"mb-2",children:t.jsx(I,{variant:"h3",children:r})}),s&&t.jsx("div",{className:"text-muted-foreground",children:t.jsx(I,{variant:"body-sm",color:"muted",children:s})})]}),t.jsx("div",{className:"flex-1",children:e})]})},qr=({children:e})=>t.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:e}),Kr=Object.assign(Ae,{Footer:qr});function Xr(e,r,s,o,a,n){const l=(e-90)*Math.PI/180,i=(r-90)*Math.PI/180,c=a+s*Math.cos(l),m=n+s*Math.sin(l),u=a+s*Math.cos(i),d=n+s*Math.sin(i),x=a+o*Math.cos(i),N=n+o*Math.sin(i),h=a+o*Math.cos(l),v=n+o*Math.sin(l),g=r-e>180?1:0;return[`M ${c} ${m}`,`A ${s} ${s} 0 ${g} 1 ${u} ${d}`,`L ${x} ${N}`,`A ${o} ${o} 0 ${g} 0 ${h} ${v}`,"Z"].join(" ")}function Zr(e,r,s,o,a){const n=e.reduce((c,m)=>c+m.value,0);if(n===0)return[];let l=0;const i=[];return e.forEach(c=>{const m=c.value/n*360,u=l,d=l+m,x=Xr(u,d,r,s,o,a);i.push({path:x,segment:c}),l=d}),i}const Le=j.forwardRef(({segments:e,size:r=300,innerRadiusRatio:s=.6,centerContent:o,showLegend:a=!1,legendPosition:n="bottom",className:l,onSegmentClick:i,onSegmentHover:c},m)=>{const[u,d]=j.useState(null),x=r/2,N=r/2,h=2,v=r/2-h,g=v*s,f=Zr(e,v,g,x,N),P=M=>{d(M),c?.(M)},C=n==="left"||n==="right";return t.jsxs("div",{ref:m,className:p("flex gap-4",C?"flex-row items-center":"flex-col items-center",n==="right"&&"flex-row-reverse",n==="top"&&"flex-col-reverse",l),children:[t.jsxs("div",{className:"relative inline-block",style:{width:r,height:r},children:[t.jsx("svg",{width:r,height:r,viewBox:`0 0 ${r} ${r}`,children:f.map(({path:M,segment:S},R)=>t.jsx("path",{d:M,fill:S.color,stroke:"white",strokeWidth:h,className:p("transition-opacity duration-200",u&&u!==S&&"opacity-50",i&&"cursor-pointer"),onMouseEnter:()=>P(S),onMouseLeave:()=>P(null),onClick:()=>i?.(S)},`${S.label}-${R}`))}),o&&t.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center",style:{maxWidth:g*1.8},children:o})]}),a&&t.jsx("div",{className:p("flex gap-2",C?"flex-col":"flex-row flex-wrap justify-center"),children:e.map((M,S)=>t.jsxs("div",{className:p("flex items-center gap-2 text-sm transition-opacity duration-200",u&&u!==M&&"opacity-50",i&&"cursor-pointer"),onMouseEnter:()=>P(M),onMouseLeave:()=>P(null),onClick:()=>i?.(M),children:[t.jsx("div",{className:"h-3 w-3 rounded-sm flex-shrink-0",style:{backgroundColor:M.color}}),t.jsx("span",{className:"text-muted-foreground",children:M.label})]},`${M.label}-${S}`))})]})});Le.displayName="DonutChart";function Jr(e,r,s={}){const{initialCategory:o=null,initialSort:a=null,enableSearch:n=!1}=s,[l,i]=E.useState(o),[c,m]=E.useState(a),[u,d]=E.useState(""),x=E.useMemo(()=>Ye(e,l),[e,l]),N=E.useMemo(()=>{if(!n||!u.trim())return x;const f=u.toLowerCase();return x.filter(P=>P.title.toLowerCase().includes(f)||P.subtitle?.toLowerCase().includes(f))},[x,u,n]),h=E.useMemo(()=>c?et(N,c):N,[N,c]),v=E.useCallback(f=>tt(e,f),[e]),g=E.useCallback(()=>{i(o),m(a),d("")},[o,a]);return{activeCategory:l,setActiveCategory:i,sort:c,setSort:m,searchQuery:u,setSearchQuery:d,filteredEntities:h,getCategoryCount:v,resetFilters:g}}const Qr=J("inline-flex items-center justify-center whitespace-nowrap rounded-full text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",selected:"bg-primary text-primary-foreground hover:bg-primary/90 ring-2 ring-primary ring-offset-2"},size:{default:"h-8 px-4 py-1.5",sm:"h-7 px-3 py-1 text-xs",lg:"h-9 px-5 py-2"}},defaultVariants:{variant:"default",size:"default"}}),we=j.forwardRef(({className:e,variant:r,size:s,icon:o,selected:a,dismissible:n,onDismiss:l,children:i,disabled:c,...m},u)=>{const d=a?"selected":r;return t.jsxs("button",{type:"button",className:p(Qr({variant:d,size:s,className:e})),ref:u,disabled:c,"aria-disabled":c?"true":void 0,"aria-pressed":a?"true":"false",...m,children:[o&&t.jsx("span",{className:"mr-1.5 inline-flex items-center","aria-hidden":"true",children:o}),t.jsx("span",{children:i}),n&&l&&t.jsx("button",{type:"button",className:"ml-1.5 inline-flex items-center hover:opacity-70",onClick:x=>{x.stopPropagation(),l()},"aria-label":"Remove",children:"×"})]})});we.displayName="Chip";const $e=j.forwardRef(({categories:e,activeCategory:r,onCategoryChange:s,showCount:o,getCategoryCount:a,className:n},l)=>t.jsx("div",{ref:l,role:"tablist","aria-label":"Filter by category",className:p("flex flex-wrap gap-2 overflow-x-auto pb-2",n),children:e.map(i=>{const c=r===i.id,m=o&&a?a(i.id):void 0;return t.jsxs(we,{role:"tab","aria-selected":c,"aria-controls":`entities-panel-${i.id}`,selected:c,variant:c?"selected":"outline",icon:typeof i.icon=="string"?i.icon:i.icon?j.createElement(i.icon):void 0,onClick:()=>s(c?null:i.id),children:[i.label,m!==void 0&&t.jsxs("span",{className:"ml-1.5 opacity-70",children:["(",m,")"]})]},i.id)})}));$e.displayName="CategoryChips";const Yr=J(["flex w-full rounded-md border bg-background px-3 py-2","text-base transition-colors","file:border-0 file:bg-transparent file:text-sm file:font-medium","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{variant:{default:["border-input","focus-visible:ring-primary"],error:["border-destructive","focus-visible:ring-destructive"],success:["border-success","focus-visible:ring-success"]},inputSize:{sm:"h-8 text-sm",default:"h-10",lg:"h-12 text-lg"}},defaultVariants:{variant:"default",inputSize:"default"}}),es=J(["block text-sm font-medium mb-1.5","transition-colors"],{variants:{variant:{default:"text-foreground",error:"text-destructive",success:"text-success"},required:{true:"after:content-['*'] after:ml-0.5 after:text-destructive",false:""}},defaultVariants:{variant:"default",required:!1}}),ts=J("mt-1.5 text-sm",{variants:{variant:{default:"text-muted-foreground",error:"text-destructive",success:"text-success"}},defaultVariants:{variant:"default"}}),te=j.forwardRef(({className:e,containerClassName:r,labelClassName:s,variant:o,inputSize:a,label:n,helperText:l,error:i,required:c,prefix:m,suffix:u,id:d,...x},N)=>{const h=j.useId(),v=d||h,g=`${v}-helper`,f=`${v}-error`,P=i?"error":o,C=i||l;return t.jsxs("div",{className:p("w-full",r),children:[n&&t.jsx("label",{htmlFor:v,className:p(es({variant:P,required:c}),s),children:n}),t.jsxs("div",{className:"relative",children:[m&&t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),t.jsx("input",{id:v,ref:N,className:p(Yr({variant:P,inputSize:a}),m&&"pl-10",u&&"pr-10",e),"aria-invalid":i?"true":"false","aria-describedby":C?i?f:g:void 0,...x}),u&&t.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:u})]}),C&&t.jsx("p",{id:i?f:g,className:ts({variant:P}),role:i?"alert":void 0,children:C})]})});te.displayName="Input";let me=0,Xe="";const rs=e=>{switch(e){case"sm":return"max-w-md";case"md":return"max-w-2xl";case"lg":return"max-w-4xl";case"xl":return"max-w-6xl";default:return"max-w-2xl"}},Oe=({isOpen:e,onClose:r,title:s,children:o,size:a="md",showCloseButton:n=!0,closeOnOverlayClick:l=!0,closeOnEscape:i=!0})=>{const c=E.useRef(null),m=E.useId(),u=E.useRef(null);if(E.useEffect(()=>{if(!e||!i)return;const g=f=>{f.key==="Escape"&&r()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[e,i,r]),E.useEffect(()=>{if(e)return me===0&&(Xe=document.body.style.overflow),me+=1,document.body.style.overflow="hidden",()=>{me=Math.max(0,me-1),me===0&&(document.body.style.overflow=Xe)}},[e]),E.useEffect(()=>{if(e)return u.current=document.activeElement instanceof HTMLElement?document.activeElement:null,e&&c.current&&c.current.focus(),()=>{u.current&&document.contains(u.current)&&u.current.focus()}},[e]),E.useEffect(()=>{if(!e||!c.current)return;const g=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", "),f=C=>{if(C.key!=="Tab"||!c.current)return;const M=Array.from(c.current.querySelectorAll(g));if(M.length===0){C.preventDefault(),c.current.focus();return}const S=M[0],R=M[M.length-1];if(C.shiftKey&&document.activeElement===S){C.preventDefault(),R.focus();return}!C.shiftKey&&document.activeElement===R&&(C.preventDefault(),S.focus())},P=c.current;return P.addEventListener("keydown",f),()=>{P.removeEventListener("keydown",f)}},[e]),!e||typeof document>"u")return null;const d=p("fixed inset-0 bg-black/50 flex items-center justify-center z-[1050] p-4"),x=p("bg-card rounded-lg shadow-xl w-full max-h-[90vh] overflow-hidden flex flex-col",rs(a)),N=p("p-6 border-b border-border flex items-center justify-between"),h=p("p-6 overflow-y-auto flex-1 min-h-0"),v=p("bg-none border-none text-xl cursor-pointer text-muted-foreground p-1 rounded-sm flex items-center justify-center hover:bg-accent hover:text-accent-foreground focus:outline-2 focus:outline-primary focus:outline-offset-2");return Wt.createPortal(t.jsx("div",{className:d,onClick:l?r:void 0,children:t.jsxs("div",{ref:c,className:x,onClick:g=>g.stopPropagation(),tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":s?m:void 0,children:[(s||n)&&t.jsxs("div",{className:N,children:[s&&t.jsx("div",{id:m,children:t.jsx(I,{variant:"h3",className:"text-foreground",children:s})}),n&&t.jsx("button",{type:"button",onClick:r,"aria-label":"Close modal",className:v,children:"×"})]}),t.jsx("div",{className:h,children:o})]})}),document.body)},xt=({children:e,actions:r,...s})=>t.jsxs(Oe,{...s,children:[t.jsx("div",{className:"p-6 overflow-y-auto flex-1",children:e}),r&&t.jsx("div",{className:"p-6 border-t border-border flex justify-end gap-3",children:r})]}),ss=({isOpen:e,onClose:r,onConfirm:s,title:o,message:a,confirmText:n="Confirm",cancelText:l="Cancel"})=>t.jsx(xt,{isOpen:e,onClose:r,title:o,actions:t.jsxs(t.Fragment,{children:[t.jsx(q,{variant:"secondary",onClick:r,children:l}),t.jsx(q,{variant:"default",onClick:s,children:n})]}),children:t.jsx(I,{children:a})}),os=J(["flex w-full rounded-md border bg-background px-3 py-2","text-base transition-colors","appearance-none cursor-pointer","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{variant:{default:["border-input","focus-visible:ring-primary"],error:["border-destructive","focus-visible:ring-destructive"],success:["border-success","focus-visible:ring-success"]},selectSize:{sm:"h-8 text-sm",default:"h-10",lg:"h-12 text-lg"}},defaultVariants:{variant:"default",selectSize:"default"}}),as=J(["block text-sm font-medium mb-1.5","transition-colors"],{variants:{variant:{default:"text-foreground",error:"text-destructive",success:"text-success"},required:{true:"after:content-['*'] after:ml-0.5 after:text-destructive",false:""}},defaultVariants:{variant:"default",required:!1}}),ns=J("mt-1.5 text-sm",{variants:{variant:{default:"text-muted-foreground",error:"text-destructive",success:"text-success"}},defaultVariants:{variant:"default"}});/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),T=require("react"),Wt=require("react-dom"),ve=require("effector"),Ut=require("effector-react");function qt(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return r.default=e,Object.freeze(r)}const j=qt(T);function Ye(e,r){return!r||r==="all"?e:e.filter(s=>s.categoryId===r)}function et(e,r){const s=[...e];return s.sort((o,a)=>{let n="",l="";return r.column==="title"?(n=o.title.toLowerCase(),l=a.title.toLowerCase()):r.column==="metric"&&(n=De(o.metricValue),l=De(a.metricValue)),n<l?r.direction==="asc"?-1:1:n>l?r.direction==="asc"?1:-1:0}),s}function De(e){if(!e)return 0;const r=e.match(/[\d.]+/);return r?parseFloat(r[0]):0}function tt(e,r){return r==="all"?e.length:e.filter(s=>s.categoryId===r).length}function rt(e){const{propertyPrice:r,downPayment:s,loanTerm:o,interestRate:a,propertyTax:n=0,hoaFees:l=0}=e,i=r-s,c=a/100/12,m=o*12;let u;if(c===0)u=i/m;else{const f=Math.pow(1+c,m);u=i*(c*f)/(f-1)}const d=u*m,x=d-i,M=u+n+l;return{monthlyPayment:Math.round(u*100)/100,totalMonthlyPayment:Math.round(M*100)/100,totalAmount:Math.round(d*100)/100,totalInterest:Math.round(x*100)/100,loanPrincipal:Math.round(i*100)/100,breakdown:{principalAndInterest:Math.round(u*100)/100,propertyTax:Math.round(n*100)/100,hoaFees:Math.round(l*100)/100}}}function ae(e,r="MXN"){return new Intl.NumberFormat("es-MX",{style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}function Kt(e,r=3){return`${e.toFixed(r)} %`}function Xt(e){const r={};return(!e.propertyPrice||e.propertyPrice<=0)&&(r.propertyPrice="El precio de la propiedad debe ser mayor a 0"),(!e.downPayment||e.downPayment<0)&&(r.downPayment="El enganche debe ser mayor o igual a 0"),e.propertyPrice&&e.downPayment&&e.downPayment>=e.propertyPrice&&(r.downPayment="El enganche debe ser menor al precio de la propiedad"),(!e.loanTerm||e.loanTerm<=0)&&(r.loanTerm="El plazo del préstamo debe ser mayor a 0"),(e.interestRate===void 0||e.interestRate<0)&&(r.interestRate="La tasa de interés debe ser mayor o igual a 0"),{isValid:Object.keys(r).length===0,errors:r}}function st(e){var r,s,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(s=st(e[r]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}function ot(){for(var e,r,s=0,o="",a=arguments.length;s<a;s++)(e=arguments[s])&&(r=st(e))&&(o&&(o+=" "),o+=r);return o}const Be=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,He=ot,Q=(e,r)=>s=>{var o;if(r?.variants==null)return He(e,s?.class,s?.className);const{variants:a,defaultVariants:n}=r,l=Object.keys(a).map(m=>{const u=s?.[m],d=n?.[m];if(u===null)return null;const x=Be(u)||Be(d);return a[m][x]}),i=s&&Object.entries(s).reduce((m,u)=>{let[d,x]=u;return x===void 0||(m[d]=x),m},{}),c=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((m,u)=>{let{class:d,className:x,...M}=u;return Object.entries(M).every(f=>{let[v,y]=f;return Array.isArray(y)?y.includes({...n,...i}[v]):{...n,...i}[v]===y})?[...m,d,x]:m},[]);return He(e,l,c,s?.class,s?.className)},Zt=Q("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}});function Ge(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function Jt(...e){return r=>{let s=!1;const o=e.map(a=>{const n=Ge(a,r);return!s&&typeof n=="function"&&(s=!0),n});if(s)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Ge(e[a],null)}}}}function Qt(e){const r=er(e),s=j.forwardRef((o,a)=>{const{children:n,...l}=o,i=j.Children.toArray(n),c=i.find(rr);if(c){const m=c.props.children,u=i.map(d=>d===c?j.Children.count(m)>1?j.Children.only(null):j.isValidElement(m)?m.props.children:null:d);return t.jsx(r,{...l,ref:a,children:j.isValidElement(m)?j.cloneElement(m,void 0,u):null})}return t.jsx(r,{...l,ref:a,children:n})});return s.displayName=`${e}.Slot`,s}var Yt=Qt("Slot");function er(e){const r=j.forwardRef((s,o)=>{const{children:a,...n}=s;if(j.isValidElement(a)){const l=or(a),i=sr(n,a.props);return a.type!==j.Fragment&&(i.ref=o?Jt(o,l):l),j.cloneElement(a,i)}return j.Children.count(a)>1?j.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var tr=Symbol("radix.slottable");function rr(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tr}function sr(e,r){const s={...r};for(const o in r){const a=e[o],n=r[o];/^on[A-Z]/.test(o)?a&&n?s[o]=(...i)=>{const c=n(...i);return a(...i),c}:a&&(s[o]=a):o==="style"?s[o]={...a,...n}:o==="className"&&(s[o]=[a,n].filter(Boolean).join(" "))}return{...e,...s}}function or(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}const Re="-",ar=e=>{const r=lr(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{const i=l.split(Re);return i[0]===""&&i.length!==1&&i.shift(),at(i,r)||nr(l)},getConflictingClassGroupIds:(l,i)=>{const c=s[l]||[];return i&&o[l]?[...c,...o[l]]:c}}},at=(e,r)=>{if(e.length===0)return r.classGroupId;const s=e[0],o=r.nextPart.get(s),a=o?at(e.slice(1),o):void 0;if(a)return a;if(r.validators.length===0)return;const n=e.join(Re);return r.validators.find(({validator:l})=>l(n))?.classGroupId},We=/^\[(.+)\]$/,nr=e=>{if(We.test(e)){const r=We.exec(e)[1],s=r?.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},lr=e=>{const{theme:r,classGroups:s}=e,o={nextPart:new Map,validators:[]};for(const a in s)Pe(s[a],o,a,r);return o},Pe=(e,r,s,o)=>{e.forEach(a=>{if(typeof a=="string"){const n=a===""?r:Ue(r,a);n.classGroupId=s;return}if(typeof a=="function"){if(ir(a)){Pe(a(o),r,s,o);return}r.validators.push({validator:a,classGroupId:s});return}Object.entries(a).forEach(([n,l])=>{Pe(l,Ue(r,n),s,o)})})},Ue=(e,r)=>{let s=e;return r.split(Re).forEach(o=>{s.nextPart.has(o)||s.nextPart.set(o,{nextPart:new Map,validators:[]}),s=s.nextPart.get(o)}),s},ir=e=>e.isThemeGetter,cr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,o=new Map;const a=(n,l)=>{s.set(n,l),r++,r>e&&(r=0,o=s,s=new Map)};return{get(n){let l=s.get(n);if(l!==void 0)return l;if((l=o.get(n))!==void 0)return a(n,l),l},set(n,l){s.has(n)?s.set(n,l):a(n,l)}}},ze="!",Ee=":",dr=Ee.length,mr=e=>{const{prefix:r,experimentalParseClassName:s}=e;let o=a=>{const n=[];let l=0,i=0,c=0,m;for(let f=0;f<a.length;f++){let v=a[f];if(l===0&&i===0){if(v===Ee){n.push(a.slice(c,f)),c=f+dr;continue}if(v==="/"){m=f;continue}}v==="["?l++:v==="]"?l--:v==="("?i++:v===")"&&i--}const u=n.length===0?a:a.substring(c),d=ur(u),x=d!==u,M=m&&m>c?m-c:void 0;return{modifiers:n,hasImportantModifier:x,baseClassName:d,maybePostfixModifierPosition:M}};if(r){const a=r+Ee,n=o;o=l=>l.startsWith(a)?n(l.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(s){const a=o;o=n=>s({className:n,parseClassName:a})}return o},ur=e=>e.endsWith(ze)?e.substring(0,e.length-1):e.startsWith(ze)?e.substring(1):e,pr=e=>{const r=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const a=[];let n=[];return o.forEach(l=>{l[0]==="["||r[l]?(a.push(...n.sort(),l),n=[]):n.push(l)}),a.push(...n.sort()),a}},fr=e=>({cache:cr(e.cacheSize),parseClassName:mr(e),sortModifiers:pr(e),...ar(e)}),xr=/\s+/,hr=(e,r)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:n}=r,l=[],i=e.trim().split(xr);let c="";for(let m=i.length-1;m>=0;m-=1){const u=i[m],{isExternal:d,modifiers:x,hasImportantModifier:M,baseClassName:f,maybePostfixModifierPosition:v}=s(u);if(d){c=u+(c.length>0?" "+c:c);continue}let y=!!v,b=o(y?f.substring(0,v):f);if(!b){if(!y){c=u+(c.length>0?" "+c:c);continue}if(b=o(f),!b){c=u+(c.length>0?" "+c:c);continue}y=!1}const z=n(x).join(":"),C=M?z+ze:z,S=C+b;if(l.includes(S))continue;l.push(S);const k=a(b,y);for(let A=0;A<k.length;++A){const E=k[A];l.push(C+E)}c=u+(c.length>0?" "+c:c)}return c};function gr(){let e=0,r,s,o="";for(;e<arguments.length;)(r=arguments[e++])&&(s=nt(r))&&(o&&(o+=" "),o+=s);return o}const nt=e=>{if(typeof e=="string")return e;let r,s="";for(let o=0;o<e.length;o++)e[o]&&(r=nt(e[o]))&&(s&&(s+=" "),s+=r);return s};function br(e,...r){let s,o,a,n=l;function l(c){const m=r.reduce((u,d)=>d(u),e());return s=fr(m),o=s.cache.get,a=s.cache.set,n=i,i(c)}function i(c){const m=o(c);if(m)return m;const u=hr(c,s);return a(c,u),u}return function(){return n(gr.apply(null,arguments))}}const $=e=>{const r=s=>s[e]||[];return r.isThemeGetter=!0,r},lt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,it=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yr=/^\d+\/\d+$/,vr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wr=/\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$/,jr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oe=e=>yr.test(e),P=e=>!!e&&!Number.isNaN(Number(e)),J=e=>!!e&&Number.isInteger(Number(e)),Ce=e=>e.endsWith("%")&&P(e.slice(0,-1)),K=e=>vr.test(e),Cr=()=>!0,Mr=e=>wr.test(e)&&!jr.test(e),ct=()=>!1,Sr=e=>kr.test(e),Tr=e=>Nr.test(e),Pr=e=>!h(e)&&!g(e),zr=e=>le(e,ut,ct),h=e=>lt.test(e),te=e=>le(e,pt,Mr),Me=e=>le(e,Lr,P),qe=e=>le(e,dt,ct),Er=e=>le(e,mt,Tr),ge=e=>le(e,ft,Sr),g=e=>it.test(e),de=e=>ie(e,pt),Ir=e=>ie(e,$r),Ke=e=>ie(e,dt),Rr=e=>ie(e,ut),Ar=e=>ie(e,mt),be=e=>ie(e,ft,!0),le=(e,r,s)=>{const o=lt.exec(e);return o?o[1]?r(o[1]):s(o[2]):!1},ie=(e,r,s=!1)=>{const o=it.exec(e);return o?o[1]?r(o[1]):s:!1},dt=e=>e==="position"||e==="percentage",mt=e=>e==="image"||e==="url",ut=e=>e==="length"||e==="size"||e==="bg-size",pt=e=>e==="length",Lr=e=>e==="number",$r=e=>e==="family-name",ft=e=>e==="shadow",Or=()=>{const e=$("color"),r=$("font"),s=$("text"),o=$("font-weight"),a=$("tracking"),n=$("leading"),l=$("breakpoint"),i=$("container"),c=$("spacing"),m=$("radius"),u=$("shadow"),d=$("inset-shadow"),x=$("text-shadow"),M=$("drop-shadow"),f=$("blur"),v=$("perspective"),y=$("aspect"),b=$("ease"),z=$("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...S(),g,h],A=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],w=()=>[g,h,c],I=()=>[oe,"full","auto",...w()],H=()=>[J,"none","subgrid",g,h],q=()=>["auto",{span:["full",J,g,h]},J,g,h],Z=()=>[J,"auto",g,h],se=()=>["auto","min","max","fr",g,h],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...w()],U=()=>[oe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],N=()=>[e,g,h],ue=()=>[...S(),Ke,qe,{position:[g,h]}],ce=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",Rr,zr,{size:[g,h]}],_=()=>[Ce,de,te],L=()=>["","none","full",m,g,h],W=()=>["",P,de,te],pe=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],O=()=>[P,Ce,Ke,qe],Ve=()=>["","none",f,g,h],fe=()=>["none",P,g,h],xe=()=>["none",P,g,h],Ne=()=>[P,g,h],he=()=>[oe,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[K],breakpoint:[K],color:[Cr],container:[K],"drop-shadow":[K],ease:["in","out","in-out"],font:[Pr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[K],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[K],shadow:[K],spacing:["px",P],text:[K],"text-shadow":[K],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",oe,h,g,y]}],container:["container"],columns:[{columns:[P,h,g,i]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[J,"auto",g,h]}],basis:[{basis:[oe,"full","auto",i,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[P,oe,"auto","initial","none",h]}],grow:[{grow:["",P,g,h]}],shrink:[{shrink:["",P,g,h]}],order:[{order:[J,"first","last","none",g,h]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":se()}],"auto-rows":[{"auto-rows":se()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[i,"screen",...U()]}],"min-w":[{"min-w":[i,"screen","none",...U()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[l]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",s,de,te]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,g,Me]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ce,h]}],"font-family":[{font:[Ir,h,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:[a,g,h]}],"line-clamp":[{"line-clamp":[P,"none",g,Me]}],leading:[{leading:[n,...w()]}],"list-image":[{"list-image":["none",g,h]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",g,h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[P,"from-font","auto",g,te]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[P,"auto",g,h]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",g,h]}],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",g,h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},J,g,h],radial:["",g,h],conic:[J,g,h]},Ar,Er]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],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:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[P,g,h]}],"outline-w":[{outline:["",P,de,te]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",u,be,ge]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",d,be,ge]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[P,te]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",x,be,ge]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[P,g,h]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"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":[P]}],"mask-image-linear-from-pos":[{"mask-linear-from":O()}],"mask-image-linear-to-pos":[{"mask-linear-to":O()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":O()}],"mask-image-t-to-pos":[{"mask-t-to":O()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":O()}],"mask-image-r-to-pos":[{"mask-r-to":O()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":O()}],"mask-image-b-to-pos":[{"mask-b-to":O()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":O()}],"mask-image-l-to-pos":[{"mask-l-to":O()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":O()}],"mask-image-x-to-pos":[{"mask-x-to":O()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":O()}],"mask-image-y-to-pos":[{"mask-y-to":O()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[g,h]}],"mask-image-radial-from-pos":[{"mask-radial-from":O()}],"mask-image-radial-to-pos":[{"mask-radial-to":O()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[P]}],"mask-image-conic-from-pos":[{"mask-conic-from":O()}],"mask-image-conic-to-pos":[{"mask-conic-to":O()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",g,h]}],filter:[{filter:["","none",g,h]}],blur:[{blur:Ve()}],brightness:[{brightness:[P,g,h]}],contrast:[{contrast:[P,g,h]}],"drop-shadow":[{"drop-shadow":["","none",M,be,ge]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",P,g,h]}],"hue-rotate":[{"hue-rotate":[P,g,h]}],invert:[{invert:["",P,g,h]}],saturate:[{saturate:[P,g,h]}],sepia:[{sepia:["",P,g,h]}],"backdrop-filter":[{"backdrop-filter":["","none",g,h]}],"backdrop-blur":[{"backdrop-blur":Ve()}],"backdrop-brightness":[{"backdrop-brightness":[P,g,h]}],"backdrop-contrast":[{"backdrop-contrast":[P,g,h]}],"backdrop-grayscale":[{"backdrop-grayscale":["",P,g,h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P,g,h]}],"backdrop-invert":[{"backdrop-invert":["",P,g,h]}],"backdrop-opacity":[{"backdrop-opacity":[P,g,h]}],"backdrop-saturate":[{"backdrop-saturate":[P,g,h]}],"backdrop-sepia":[{"backdrop-sepia":["",P,g,h]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",g,h]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[P,"initial",g,h]}],ease:[{ease:["linear","initial",b,g,h]}],delay:[{delay:[P,g,h]}],animate:[{animate:["none",z,g,h]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,g,h]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[g,h,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"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",g,h]}],"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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",g,h]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[P,de,te,Me]}],stroke:[{stroke:["none",...N()]}],"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"]}},Fr=br(Or);function p(...e){return Fr(ot(e))}const X=j.forwardRef(({className:e,variant:r,size:s,asChild:o=!1,disabled:a,...n},l)=>{const i=o?Yt:"button";return t.jsx(i,{className:p(Zt({variant:r,size:s,className:e})),ref:l,type:n.type||"button",disabled:a,"aria-disabled":a?"true":void 0,...n})});X.displayName="Button";const _r=e=>{switch(e){case"h1":return"text-4xl font-bold leading-tight tracking-tight";case"h2":return"text-3xl font-bold leading-tight tracking-tight";case"h3":return"text-2xl font-semibold leading-tight tracking-normal";case"h4":return"text-xl font-semibold leading-snug tracking-normal";case"h5":return"text-lg font-medium leading-snug tracking-normal";case"h6":return"text-base font-medium leading-normal tracking-normal";case"body":return"text-base font-normal leading-normal";case"body-sm":return"text-sm font-normal leading-normal";case"body-lg":return"text-lg font-normal leading-relaxed";case"caption":return"text-xs font-normal leading-normal tracking-wide";case"label":return"text-sm font-medium leading-normal tracking-wide";default:return"text-base font-normal leading-normal"}},Vr=e=>{switch(e){case"primary":return"text-foreground";case"secondary":return"text-muted-foreground";case"muted":return"text-muted-foreground";case"error":return"text-destructive";case"success":return"text-success";case"warning":return"text-warning";default:return"text-foreground"}},Dr=e=>{switch(e){case"light":return"font-light";case"normal":return"font-normal";case"medium":return"font-medium";case"semibold":return"font-semibold";case"bold":return"font-bold";default:return""}},Br=e=>{switch(e){case"left":return"text-left";case"center":return"text-center";case"right":return"text-right";case"justify":return"text-justify";default:return"text-left"}},R=({variant:e="body",color:r="primary",weight:s,align:o="left",truncate:a=!1,children:n,className:l,as:i,...c})=>{const m=i||Hr(e),u=p("m-0",_r(e),Vr(r),Dr(s),Br(o),a&&"truncate",l);return t.jsx(m,{className:u,...c,children:n})};function Hr(e){switch(e){case"h1":return"h1";case"h2":return"h2";case"h3":return"h3";case"h4":return"h4";case"h5":return"h5";case"h6":return"h6";default:return"p"}}const Gr=e=>{switch(e){case"sm":return"p-4";case"md":return"p-6";case"lg":return"p-8";default:return"p-0"}},Wr=e=>{switch(e){case"sm":return"shadow-sm";case"md":return"shadow-md";case"lg":return"shadow-lg";default:return"shadow-none"}},Ur=e=>{switch(e){case"sm":return"rounded-sm";case"md":return"rounded-md";case"lg":return"rounded-lg";default:return"rounded-none"}},Ae=({children:e,title:r,subtitle:s,className:o,padding:a="md",shadow:n="md",borderRadius:l="md",onClick:i})=>{const c=!!i,m=p("bg-card",Gr(a),Wr(n),Ur(l),"transition-all duration-200 ease-in-out",c&&"cursor-pointer hover:-translate-y-0.5 hover:shadow-lg active:translate-y-0",o);return t.jsxs("div",{className:m,onClick:i,children:[(r||s)&&t.jsxs("div",{className:"mb-4",children:[r&&t.jsx("div",{className:"mb-2",children:t.jsx(R,{variant:"h3",children:r})}),s&&t.jsx("div",{className:"text-muted-foreground",children:t.jsx(R,{variant:"body-sm",color:"muted",children:s})})]}),t.jsx("div",{className:"flex-1",children:e})]})},qr=({children:e})=>t.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:e}),Kr=Object.assign(Ae,{Footer:qr});function Xr(e,r,s,o,a,n){const l=(e-90)*Math.PI/180,i=(r-90)*Math.PI/180,c=a+s*Math.cos(l),m=n+s*Math.sin(l),u=a+s*Math.cos(i),d=n+s*Math.sin(i),x=a+o*Math.cos(i),M=n+o*Math.sin(i),f=a+o*Math.cos(l),v=n+o*Math.sin(l),y=r-e>180?1:0;return[`M ${c} ${m}`,`A ${s} ${s} 0 ${y} 1 ${u} ${d}`,`L ${x} ${M}`,`A ${o} ${o} 0 ${y} 0 ${f} ${v}`,"Z"].join(" ")}function Zr(e,r,s,o,a){const n=e.reduce((c,m)=>c+m.value,0);if(n===0)return[];let l=0;const i=[];return e.forEach(c=>{const m=c.value/n*360,u=l,d=l+m,x=Xr(u,d,r,s,o,a);i.push({path:x,segment:c}),l=d}),i}const Le=j.forwardRef(({segments:e,size:r=300,innerRadiusRatio:s=.6,centerContent:o,showLegend:a=!1,legendPosition:n="bottom",className:l,onSegmentClick:i,onSegmentHover:c},m)=>{const[u,d]=j.useState(null),x=r/2,M=r/2,f=2,v=r/2-f,y=v*s,b=Zr(e,v,y,x,M),z=S=>{d(S),c?.(S)},C=n==="left"||n==="right";return t.jsxs("div",{ref:m,className:p("flex gap-4",C?"flex-row items-center":"flex-col items-center",n==="right"&&"flex-row-reverse",n==="top"&&"flex-col-reverse",l),children:[t.jsxs("div",{className:"relative inline-block",style:{width:r,height:r},children:[t.jsx("svg",{width:r,height:r,viewBox:`0 0 ${r} ${r}`,children:b.map(({path:S,segment:k},A)=>t.jsx("path",{d:S,fill:k.color,stroke:"white",strokeWidth:f,className:p("transition-opacity duration-200",u&&u!==k&&"opacity-50",i&&"cursor-pointer"),onMouseEnter:()=>z(k),onMouseLeave:()=>z(null),onClick:()=>i?.(k)},`${k.label}-${A}`))}),o&&t.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center",style:{maxWidth:y*1.8},children:o})]}),a&&t.jsx("div",{className:p("flex gap-2",C?"flex-col":"flex-row flex-wrap justify-center"),children:e.map((S,k)=>t.jsxs("div",{className:p("flex items-center gap-2 text-sm transition-opacity duration-200",u&&u!==S&&"opacity-50",i&&"cursor-pointer"),onMouseEnter:()=>z(S),onMouseLeave:()=>z(null),onClick:()=>i?.(S),children:[t.jsx("div",{className:"h-3 w-3 rounded-sm flex-shrink-0",style:{backgroundColor:S.color}}),t.jsx("span",{className:"text-muted-foreground",children:S.label})]},`${S.label}-${k}`))})]})});Le.displayName="DonutChart";function Jr(e,r,s={}){const{initialCategory:o=null,initialSort:a=null,enableSearch:n=!1}=s,[l,i]=T.useState(o),[c,m]=T.useState(a),[u,d]=T.useState(""),x=T.useMemo(()=>Ye(e,l),[e,l]),M=T.useMemo(()=>{if(!n||!u.trim())return x;const b=u.toLowerCase();return x.filter(z=>z.title.toLowerCase().includes(b)||z.subtitle?.toLowerCase().includes(b))},[x,u,n]),f=T.useMemo(()=>c?et(M,c):M,[M,c]),v=T.useCallback(b=>tt(e,b),[e]),y=T.useCallback(()=>{i(o),m(a),d("")},[o,a]);return{activeCategory:l,setActiveCategory:i,sort:c,setSort:m,searchQuery:u,setSearchQuery:d,filteredEntities:f,getCategoryCount:v,resetFilters:y}}const Qr=Q("inline-flex items-center justify-center whitespace-nowrap rounded-full text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",selected:"bg-primary text-primary-foreground hover:bg-primary/90 ring-2 ring-primary ring-offset-2"},size:{default:"h-8 px-4 py-1.5",sm:"h-7 px-3 py-1 text-xs",lg:"h-9 px-5 py-2"}},defaultVariants:{variant:"default",size:"default"}}),we=j.forwardRef(({className:e,variant:r,size:s,icon:o,selected:a,dismissible:n,onDismiss:l,children:i,disabled:c,...m},u)=>{const d=a?"selected":r;return t.jsxs("button",{type:"button",className:p(Qr({variant:d,size:s,className:e})),ref:u,disabled:c,"aria-disabled":c?"true":void 0,"aria-pressed":a?"true":"false",...m,children:[o&&t.jsx("span",{className:"mr-1.5 inline-flex items-center","aria-hidden":"true",children:o}),t.jsx("span",{children:i}),n&&l&&t.jsx("button",{type:"button",className:"ml-1.5 inline-flex items-center hover:opacity-70",onClick:x=>{x.stopPropagation(),l()},"aria-label":"Remove",children:"×"})]})});we.displayName="Chip";const $e=j.forwardRef(({categories:e,activeCategory:r,onCategoryChange:s,showCount:o,getCategoryCount:a,className:n},l)=>t.jsx("div",{ref:l,role:"tablist","aria-label":"Filter by category",className:p("flex flex-wrap gap-2 overflow-x-auto pb-2",n),children:e.map(i=>{const c=r===i.id,m=o&&a?a(i.id):void 0;return t.jsxs(we,{role:"tab","aria-selected":c,"aria-controls":`entities-panel-${i.id}`,selected:c,variant:c?"selected":"outline",icon:typeof i.icon=="string"?i.icon:i.icon?j.createElement(i.icon):void 0,onClick:()=>s(c?null:i.id),children:[i.label,m!==void 0&&t.jsxs("span",{className:"ml-1.5 opacity-70",children:["(",m,")"]})]},i.id)})}));$e.displayName="CategoryChips";const Yr=Q(["flex w-full rounded-md border bg-background px-3 py-2","text-base transition-colors","file:border-0 file:bg-transparent file:text-sm file:font-medium","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{variant:{default:["border-input","focus-visible:ring-primary"],error:["border-destructive","focus-visible:ring-destructive"],success:["border-success","focus-visible:ring-success"]},inputSize:{sm:"h-8 text-sm",default:"h-10",lg:"h-12 text-lg"}},defaultVariants:{variant:"default",inputSize:"default"}}),es=Q(["block text-sm font-medium mb-1.5","transition-colors"],{variants:{variant:{default:"text-foreground",error:"text-destructive",success:"text-success"},required:{true:"after:content-['*'] after:ml-0.5 after:text-destructive",false:""}},defaultVariants:{variant:"default",required:!1}}),ts=Q("mt-1.5 text-sm",{variants:{variant:{default:"text-muted-foreground",error:"text-destructive",success:"text-success"}},defaultVariants:{variant:"default"}}),re=j.forwardRef(({className:e,containerClassName:r,labelClassName:s,variant:o,inputSize:a,label:n,helperText:l,error:i,required:c,prefix:m,suffix:u,id:d,...x},M)=>{const f=j.useId(),v=d||f,y=`${v}-helper`,b=`${v}-error`,z=i?"error":o,C=i||l;return t.jsxs("div",{className:p("w-full",r),children:[n&&t.jsx("label",{htmlFor:v,className:p(es({variant:z,required:c}),s),children:n}),t.jsxs("div",{className:"relative",children:[m&&t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),t.jsx("input",{id:v,ref:M,className:p(Yr({variant:z,inputSize:a}),m&&"pl-10",u&&"pr-10",e),"aria-invalid":i?"true":"false","aria-describedby":C?i?b:y:void 0,...x}),u&&t.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:u})]}),C&&t.jsx("p",{id:i?b:y,className:ts({variant:z}),role:i?"alert":void 0,children:C})]})});re.displayName="Input";let me=0,Xe="";const rs=e=>{switch(e){case"sm":return"max-w-md";case"md":return"max-w-2xl";case"lg":return"max-w-4xl";case"xl":return"max-w-6xl";default:return"max-w-2xl"}},Oe=({isOpen:e,onClose:r,title:s,children:o,size:a="md",showCloseButton:n=!0,closeOnOverlayClick:l=!0,closeOnEscape:i=!0})=>{const c=T.useRef(null),m=T.useId(),u=T.useRef(null);if(T.useEffect(()=>{if(!e||!i)return;const y=b=>{b.key==="Escape"&&r()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[e,i,r]),T.useEffect(()=>{if(e)return me===0&&(Xe=document.body.style.overflow),me+=1,document.body.style.overflow="hidden",()=>{me=Math.max(0,me-1),me===0&&(document.body.style.overflow=Xe)}},[e]),T.useEffect(()=>{if(e)return u.current=document.activeElement instanceof HTMLElement?document.activeElement:null,e&&c.current&&c.current.focus(),()=>{u.current&&document.contains(u.current)&&u.current.focus()}},[e]),T.useEffect(()=>{if(!e||!c.current)return;const y=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", "),b=C=>{if(C.key!=="Tab"||!c.current)return;const S=Array.from(c.current.querySelectorAll(y));if(S.length===0){C.preventDefault(),c.current.focus();return}const k=S[0],A=S[S.length-1];if(C.shiftKey&&document.activeElement===k){C.preventDefault(),A.focus();return}!C.shiftKey&&document.activeElement===A&&(C.preventDefault(),k.focus())},z=c.current;return z.addEventListener("keydown",b),()=>{z.removeEventListener("keydown",b)}},[e]),!e||typeof document>"u")return null;const d=p("fixed inset-0 bg-black/50 flex items-center justify-center z-[1050] p-4"),x=p("bg-card rounded-lg shadow-xl w-full max-h-[90vh] overflow-hidden flex flex-col",rs(a)),M=p("p-6 border-b border-border flex items-center justify-between"),f=p("p-6 overflow-y-auto flex-1 min-h-0"),v=p("bg-none border-none text-xl cursor-pointer text-muted-foreground p-1 rounded-sm flex items-center justify-center hover:bg-accent hover:text-accent-foreground focus:outline-2 focus:outline-primary focus:outline-offset-2");return Wt.createPortal(t.jsx("div",{className:d,onClick:l?r:void 0,children:t.jsxs("div",{ref:c,className:x,onClick:y=>y.stopPropagation(),tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":s?m:void 0,children:[(s||n)&&t.jsxs("div",{className:M,children:[s&&t.jsx("div",{id:m,children:t.jsx(R,{variant:"h3",className:"text-foreground",children:s})}),n&&t.jsx("button",{type:"button",onClick:r,"aria-label":"Close modal",className:v,children:"×"})]}),t.jsx("div",{className:f,children:o})]})}),document.body)},xt=({children:e,actions:r,...s})=>t.jsxs(Oe,{...s,children:[t.jsx("div",{className:"p-6 overflow-y-auto flex-1",children:e}),r&&t.jsx("div",{className:"p-6 border-t border-border flex justify-end gap-3",children:r})]}),ss=({isOpen:e,onClose:r,onConfirm:s,title:o,message:a,confirmText:n="Confirm",cancelText:l="Cancel"})=>t.jsx(xt,{isOpen:e,onClose:r,title:o,actions:t.jsxs(t.Fragment,{children:[t.jsx(X,{variant:"secondary",onClick:r,children:l}),t.jsx(X,{variant:"default",onClick:s,children:n})]}),children:t.jsx(R,{children:a})}),os=Q(["flex w-full rounded-md border bg-background px-3 py-2","text-base transition-colors","appearance-none cursor-pointer","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{variant:{default:["border-input","focus-visible:ring-primary"],error:["border-destructive","focus-visible:ring-destructive"],success:["border-success","focus-visible:ring-success"]},selectSize:{sm:"h-8 text-sm",default:"h-10",lg:"h-12 text-lg"}},defaultVariants:{variant:"default",selectSize:"default"}}),as=Q(["block text-sm font-medium mb-1.5","transition-colors"],{variants:{variant:{default:"text-foreground",error:"text-destructive",success:"text-success"},required:{true:"after:content-['*'] after:ml-0.5 after:text-destructive",false:""}},defaultVariants:{variant:"default",required:!1}}),ns=Q("mt-1.5 text-sm",{variants:{variant:{default:"text-muted-foreground",error:"text-destructive",success:"text-success"}},defaultVariants:{variant:"default"}});/**
2
2
  * @license lucide-react v0.547.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -13,85 +13,80 @@
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const ms=E.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:n,iconNode:l,...i},c)=>E.createElement("svg",{ref:c,...ds,width:r,height:r,stroke:e,strokeWidth:o?Number(s)*24/Number(r):s,className:ht("lucide",a),...!n&&!cs(i)&&{"aria-hidden":"true"},...i},[...l.map(([m,u])=>E.createElement(m,u)),...Array.isArray(n)?n:[n]]));/**
16
+ */const ms=T.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:n,iconNode:l,...i},c)=>T.createElement("svg",{ref:c,...ds,width:r,height:r,stroke:e,strokeWidth:o?Number(s)*24/Number(r):s,className:ht("lucide",a),...!n&&!cs(i)&&{"aria-hidden":"true"},...i},[...l.map(([m,u])=>T.createElement(m,u)),...Array.isArray(n)?n:[n]]));/**
17
17
  * @license lucide-react v0.547.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const D=(e,r)=>{const s=E.forwardRef(({className:o,...a},n)=>E.createElement(ms,{ref:n,iconNode:r,className:ht(`lucide-${ls(Ze(e))}`,`lucide-${e}`,o),...a}));return s.displayName=Ze(e),s};/**
21
+ */const B=(e,r)=>{const s=T.forwardRef(({className:o,...a},n)=>T.createElement(ms,{ref:n,iconNode:r,className:ht(`lucide-${ls(Ze(e))}`,`lucide-${e}`,o),...a}));return s.displayName=Ze(e),s};/**
22
22
  * @license lucide-react v0.547.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */const us=[["path",{d:"M10 4 8 6",key:"1rru8s"}],["path",{d:"M17 19v2",key:"ts1sot"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M7 19v2",key:"12npes"}],["path",{d:"M9 5 7.621 3.621A2.121 2.121 0 0 0 4 5v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5",key:"14ym8i"}]],ps=D("bath",us);/**
26
+ */const us=[["path",{d:"M10 4 8 6",key:"1rru8s"}],["path",{d:"M17 19v2",key:"ts1sot"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M7 19v2",key:"12npes"}],["path",{d:"M9 5 7.621 3.621A2.121 2.121 0 0 0 4 5v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5",key:"14ym8i"}]],ps=B("bath",us);/**
27
27
  * @license lucide-react v0.547.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const fs=[["path",{d:"M2 4v16",key:"vw9hq8"}],["path",{d:"M2 8h18a2 2 0 0 1 2 2v10",key:"1dgv2r"}],["path",{d:"M2 17h20",key:"18nfp3"}],["path",{d:"M6 8v9",key:"1yriud"}]],xs=D("bed",fs);/**
31
+ */const fs=[["path",{d:"M2 4v16",key:"vw9hq8"}],["path",{d:"M2 8h18a2 2 0 0 1 2 2v10",key:"1dgv2r"}],["path",{d:"M2 17h20",key:"18nfp3"}],["path",{d:"M6 8v9",key:"1yriud"}]],xs=B("bed",fs);/**
32
32
  * @license lucide-react v0.547.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const hs=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],gs=D("car",hs);/**
36
+ */const hs=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],gs=B("car",hs);/**
37
37
  * @license lucide-react v0.547.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */const bs=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ys=D("chevron-down",bs);/**
41
+ */const bs=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ys=B("chevron-down",bs);/**
42
42
  * @license lucide-react v0.547.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
- */const vs=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ws=D("chevron-left",vs);/**
46
+ */const vs=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ws=B("chevron-left",vs);/**
47
47
  * @license lucide-react v0.547.0 - ISC
48
48
  *
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
- */const js=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ks=D("chevron-right",js);/**
51
+ */const js=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ks=B("chevron-right",js);/**
52
52
  * @license lucide-react v0.547.0 - ISC
53
53
  *
54
54
  * This source code is licensed under the ISC license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
- */const Ns=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Cs=D("grid-3x3",Ns);/**
56
+ */const Ns=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],Cs=B("heart",Ns);/**
57
57
  * @license lucide-react v0.547.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const Ms=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],Ss=D("heart",Ms);/**
61
+ */const Ms=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Ss=B("house",Ms);/**
62
62
  * @license lucide-react v0.547.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
- */const Ts=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Ps=D("house",Ts);/**
66
+ */const Ts=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Ps=B("map-pin",Ts);/**
67
67
  * @license lucide-react v0.547.0 - ISC
68
68
  *
69
69
  * This source code is licensed under the ISC license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
- */const zs=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Es=D("map-pin",zs);/**
71
+ */const zs=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],Es=B("maximize",zs);/**
72
72
  * @license lucide-react v0.547.0 - ISC
73
73
  *
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const Is=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],Rs=D("maximize",Is);/**
76
+ */const Is=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Rs=B("menu",Is);/**
77
77
  * @license lucide-react v0.547.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const As=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Ls=D("menu",As);/**
81
+ */const As=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ie=B("search",As);/**
82
82
  * @license lucide-react v0.547.0 - ISC
83
83
  *
84
84
  * This source code is licensed under the ISC license.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */const $s=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ie=D("search",$s);/**
86
+ */const Ls=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],$s=B("trending-up",Ls);/**
87
87
  * @license lucide-react v0.547.0 - ISC
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const Os=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Fs=D("trending-up",Os);/**
92
- * @license lucide-react v0.547.0 - ISC
93
- *
94
- * This source code is licensed under the ISC license.
95
- * See the LICENSE file in the root directory of this source tree.
96
- */const _s=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Je=D("x",_s),je=j.forwardRef(({className:e,containerClassName:r,labelClassName:s,variant:o,selectSize:a,label:n,helperText:l,error:i,required:c,options:m,placeholder:u,id:d,...x},N)=>{const h=j.useId(),v=d||h,g=`${v}-helper`,f=`${v}-error`,P=i?"error":o,C=i||l;return t.jsxs("div",{className:p("w-full",r),children:[n&&t.jsx("label",{htmlFor:v,className:p(as({variant:P,required:c}),s),children:n}),t.jsxs("div",{className:"relative",children:[t.jsxs("select",{id:v,ref:N,className:p(os({variant:P,selectSize:a}),"pr-10",e),"aria-invalid":i?"true":"false","aria-describedby":C?i?f:g:void 0,...x,children:[u&&t.jsx("option",{value:"",disabled:!0,children:u}),m.map(M=>t.jsx("option",{value:M.value,disabled:M.disabled,children:M.label},M.value))]}),t.jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:t.jsx(ys,{className:"h-4 w-4"})})]}),C&&t.jsx("p",{id:i?f:g,className:ns({variant:P}),role:i?"alert":void 0,children:C})]})});je.displayName="Select";const Vs=e=>{switch(e){case"sm":return"p-4";case"md":return"p-6";case"lg":return"p-8";default:return"p-0"}},ke=({children:e,header:r,sidebar:s,footer:o,padding:a="md"})=>{const n=p("min-h-screen flex flex-col"),l=p("bg-card border-b border-border z-10"),i=p("flex flex-1"),c=p("w-70 bg-card border-r border-border p-6"),m=p("flex-1 flex flex-col"),u=p("flex-1 mx-auto w-full max-w-7xl",Vs(a));return t.jsxs("div",{className:n,children:[r&&t.jsx("header",{className:l,children:r}),t.jsxs("div",{className:i,children:[s&&t.jsx("aside",{className:c,children:s}),t.jsx("div",{className:m,children:t.jsx("main",{className:u,children:e})})]}),o&&t.jsx("footer",{className:"bg-card border-t border-border mt-auto",children:o})]})},Ds=({children:e,header:r,sidebar:s})=>t.jsx(ke,{header:r,sidebar:s,padding:"lg",children:t.jsx("div",{className:"max-w-screen-2xl",children:e})}),Bs=({children:e,title:r,subtitle:s})=>t.jsx(ke,{padding:"lg",children:t.jsxs("div",{className:"max-w-md mx-auto",children:[t.jsxs("div",{className:"text-center mb-8",children:[r&&t.jsx(I,{variant:"h2",className:"mb-2",children:r}),s&&t.jsx(I,{variant:"body",color:"muted",children:s})]}),e]})}),Hs=({children:e,header:r,footer:s})=>t.jsx(ke,{header:r,footer:s,padding:"none",children:e}),gt=j.forwardRef(({message:e="No entities found",icon:r,action:s,className:o},a)=>t.jsxs("div",{ref:a,role:"status","aria-live":"polite",className:p("flex flex-col items-center justify-center py-12 px-4 text-center",o),children:[r&&t.jsx("div",{className:"mb-4 text-4xl opacity-50","aria-hidden":"true",children:r}),t.jsx(I,{variant:"body-lg",className:"text-muted-foreground mb-4",children:e}),s&&t.jsx(q,{variant:"outline",onClick:s.onClick,children:s.label})]}));gt.displayName="EntityDirectoryEmptyState";const bt=j.forwardRef(({error:e,onRetry:r,className:s},o)=>{const a=typeof e=="string"?e:e.message;return t.jsxs("div",{ref:o,role:"alert","aria-live":"assertive",className:p("flex flex-col items-center justify-center py-12 px-4 text-center",s),children:[t.jsx("div",{className:"mb-4 text-4xl","aria-hidden":"true",children:"⚠️"}),t.jsx(I,{variant:"body-lg",className:"text-destructive mb-2 font-semibold",children:"Error"}),t.jsx(I,{variant:"body",className:"text-muted-foreground mb-4",children:a}),r&&t.jsx(q,{variant:"outline",onClick:r,children:"Try Again"})]})});bt.displayName="EntityDirectoryErrorState";const yt=j.forwardRef(({title:e,description:r,className:s},o)=>t.jsxs("div",{ref:o,className:p("space-y-1.5",s),children:[t.jsx(I,{variant:"h2",className:"font-bold",children:e}),r&&t.jsx(I,{variant:"body",className:"text-muted-foreground",children:r})]}));yt.displayName="EntityDirectoryHeader";const vt=j.forwardRef(({entity:e,categories:r,showIcon:s=!0,showCategoryBadge:o=!0,showMetric:a=!0,compact:n=!1,className:l},i)=>{const c=r?.find(x=>x.id===e.categoryId),m=!!e.onClick,u=()=>{e.onClick&&!e.disabled&&e.onClick()},d=x=>{m&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),u())};return t.jsxs("div",{ref:i,role:m?"button":"listitem",tabIndex:m&&!e.disabled?0:void 0,onClick:u,onKeyDown:d,"aria-disabled":e.disabled,className:p("flex items-center gap-4 border-b border-border transition-colors",n?"p-3":"p-4",m&&!e.disabled&&"cursor-pointer hover:bg-accent/50 focus-visible:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e.disabled&&"opacity-50 cursor-not-allowed",l),children:[s&&t.jsx("div",{className:p("flex-shrink-0 flex items-center justify-center bg-muted rounded-full",n?"w-8 h-8 text-lg":"w-10 h-10 text-xl"),"aria-hidden":"true",children:typeof e.icon=="string"?t.jsx("span",{children:e.icon}):e.icon?j.createElement(e.icon):t.jsx("span",{className:"text-muted-foreground",children:"•"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx(I,{variant:n?"body-sm":"body",className:"font-semibold truncate",children:e.title}),e.subtitle&&t.jsx(I,{variant:n?"caption":"body-sm",className:"text-muted-foreground truncate",children:e.subtitle})]}),o&&c&&t.jsx(we,{variant:"secondary",size:n?"sm":"default",className:"flex-shrink-0 bg-foreground text-background hover:bg-foreground/90","aria-label":`Category: ${c.label}`,children:c.label}),a&&e.metricValue&&t.jsxs("div",{className:"flex-shrink-0 text-right min-w-[4rem]",children:[t.jsx(I,{variant:n?"body-sm":"body",className:"font-medium",children:e.metricValue}),e.metricLabel&&t.jsx(I,{variant:"caption",className:"text-muted-foreground",children:e.metricLabel})]})]})});vt.displayName="EntityDirectoryListItem";const wt=j.forwardRef(({columns:e,showIcon:r,sort:s,onSortChange:o,compact:a,className:n},l)=>{const i=d=>{if(!o)return;const x=s?.column===d&&s?.direction==="asc"?"desc":"asc";o({column:d,direction:x})},c=d=>{i(d)},m=(d,x)=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i(x))},u=d=>d!=="title"&&d!=="metric"?null:!s||s.column!==d?t.jsx("span",{className:"ml-1 text-muted-foreground opacity-50","aria-hidden":"true",children:"⇅"}):t.jsx("span",{className:"ml-1","aria-hidden":"true",children:s.direction==="asc"?"↑":"↓"});return t.jsxs("div",{ref:l,role:"row",className:p("flex items-center gap-4 bg-background border-b border-border font-medium text-sm text-muted-foreground",a?"px-3 py-2":"px-4 py-3",n),children:[r&&t.jsx("div",{className:a?"w-8":"w-10"}),e.map(d=>{const x=d.sortable&&(d.key==="title"||d.key==="metric"),N=s?.column===d.key;return t.jsxs("div",{role:"columnheader","aria-sort":N?s?.direction==="asc"?"ascending":"descending":void 0,className:p(d.key==="title"&&"flex-1",d.key==="category"&&"w-40",d.key==="metric"&&"w-24 text-right",d.align==="center"&&"text-center",d.align==="right"&&"text-right",x&&"cursor-pointer hover:text-foreground transition-colors select-none",N&&"text-foreground"),style:d.width?{width:d.width}:void 0,onClick:x&&(d.key==="title"||d.key==="metric")?()=>c(d.key):void 0,tabIndex:x?0:void 0,onKeyDown:x&&(d.key==="title"||d.key==="metric")?h=>m(h,d.key):void 0,children:[d.label,x&&u(d.key)]},d.key)})]})});wt.displayName="EntityDirectoryTableHeader";const jt=j.forwardRef(({entities:e,categories:r,showIcons:s=!0,showCategoryBadges:o=!0,showMetric:a=!0,metricLabel:n,sortable:l=!1,sort:i,onSortChange:c,compact:m=!1,renderItem:u,className:d},x)=>{const N=[{key:"title",label:n?"Nombre":"Name",sortable:l},...o?[{key:"category",label:"Categoría",sortable:!1}]:[],...a&&n?[{key:"metric",label:n,sortable:l,align:"right"}]:[]];return t.jsxs("div",{ref:x,role:"table","aria-label":"Entity directory",className:p("border border-border rounded-lg overflow-hidden",d),children:[t.jsx(wt,{columns:N,showIcon:s,sort:i,onSortChange:c,compact:m}),t.jsx("div",{role:"rowgroup",children:e.map(h=>u?t.jsx(j.Fragment,{children:u(h)},h.id):t.jsx(vt,{entity:h,categories:r,showIcon:s,showCategoryBadge:o,showMetric:a,compact:m},h.id))})]})});jt.displayName="EntityDirectoryList";const kt=j.forwardRef(({rows:e=5,className:r},s)=>t.jsxs("div",{ref:s,role:"status","aria-live":"polite","aria-label":"Loading entities",className:p("space-y-3",r),children:[Array.from({length:e}).map((o,a)=>t.jsxs("div",{className:"flex items-center gap-4 p-4 border border-border rounded-lg animate-pulse",children:[t.jsx("div",{className:"w-10 h-10 bg-muted rounded-full flex-shrink-0"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-4 bg-muted rounded w-1/3"}),t.jsx("div",{className:"h-3 bg-muted rounded w-1/2"})]}),t.jsx("div",{className:"h-6 bg-muted rounded-full w-24 flex-shrink-0"}),t.jsx("div",{className:"h-4 bg-muted rounded w-16 flex-shrink-0"})]},a)),t.jsx("span",{className:"sr-only",children:"Loading..."})]}));kt.displayName="EntityDirectoryLoadingState";const Nt=j.forwardRef(({value:e,onChange:r,placeholder:s="Search entities...",className:o},a)=>t.jsxs("div",{className:p("relative",o),children:[t.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none",children:t.jsx("svg",{className:"w-4 h-4 text-muted-foreground","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",children:t.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"})})}),t.jsx("input",{ref:a,type:"search",value:e,onChange:n=>r(n.target.value),placeholder:s,className:p("block w-full pl-10 pr-3 py-2 border border-input rounded-md","bg-background text-foreground placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent","transition-colors"),"aria-label":"Search entities"}),e&&t.jsx("button",{type:"button",onClick:()=>r(""),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}));Nt.displayName="EntityDirectorySearchFilter";const Ct=j.forwardRef(({entities:e,categories:r,title:s,description:o,activeCategory:a,onCategoryChange:n,showCategoryCount:l,getCategoryCount:i,enableSearch:c=!1,searchQuery:m="",onSearchChange:u,searchPlaceholder:d,sortable:x=!1,sort:N,onSortChange:h,showIcons:v=!0,showCategoryBadges:g=!0,showMetric:f=!0,metricLabel:P,compact:C=!1,loading:M=!1,error:S,emptyMessage:R,onRetry:T,emptyState:w,errorState:L,loadingState:K,renderItem:re,className:X,style:se},Y)=>{const H=r&&r.length>0,B=!M&&!S&&e.length===0,W=!M&&!!S;return t.jsxs("div",{ref:Y,className:p("space-y-6",X),style:se,children:[t.jsx(yt,{title:s,description:o}),H&&n&&t.jsx($e,{categories:r,activeCategory:a,onCategoryChange:n,showCount:l,getCategoryCount:i}),c&&u&&t.jsx(Nt,{value:m,onChange:u,placeholder:d}),M&&(K||t.jsx(kt,{})),W&&(L||t.jsx(bt,{error:S,onRetry:T})),B&&(w||t.jsx(gt,{message:R})),!M&&!W&&!B&&t.jsx(jt,{entities:e,categories:r,showIcons:v,showCategoryBadges:g,showMetric:f,metricLabel:P,sortable:x,sort:N,onSortChange:h,compact:C,renderItem:re})]})});Ct.displayName="EntityDirectory";function Gs(e){return{variant:e.variant||"minimal",logo:e.logo,navigationItems:e.navigationItems||[],loginButtonText:e.loginButtonText||"Iniciar Sesión",showMobileMenu:e.showMobileMenu??!0}}const Mt=E.forwardRef(({variant:e,logo:r,navigationItems:s,loginButtonText:o,showMobileMenu:a,className:n,logoClassName:l,navigationClassName:i,navigationItemClassName:c,loginButtonClassName:m,mobileMenuButtonClassName:u,renderNavLink:d,id:x,"aria-label":N},h)=>{const[v,g]=E.useState(!1),f=Gs({variant:e,logo:r,navigationItems:s,loginButtonText:o,showMobileMenu:a}),P=f.variant==="modern",C=f.variant==="luxury",M=C&&f.showMobileMenu,S=v?M?"Close navigation panel":"Close menu":M?"Open navigation panel":"Open menu",R=({item:T,className:w,onClick:L})=>d?d({item:T,children:T.label,className:w,onClick:L}):t.jsx("a",{href:T.href,className:w,onClick:L,children:T.label});return t.jsxs(t.Fragment,{children:[t.jsxs("header",{ref:h,id:x,role:"banner","aria-label":N||"Site header",className:p("flex items-center justify-between relative w-full space-x-4",C?"px-16 py-2":"px-6 py-1",n),children:[f.logo&&t.jsx("div",{className:p("shrink-0 w-2/3 md:w-1/5 text-ellipsis overflow-hidden text-nowrap",P&&"[&_img]:brightness-0 [&_img]:saturate-0 [&_svg]:brightness-0 [&_svg]:saturate-0"),children:typeof f.logo=="string"?t.jsx("p",{className:p("leading-normal",C?"font-heading text-xl font-normal uppercase tracking-[0.04em]":"font-black tracking-wider text-xl",P?"text-black":"text-white",l),children:f.logo}):f.logo}),f.navigationItems.length>0&&t.jsx("nav",{className:p("hidden md:flex items-center max-w-fit",C?"ml-auto gap-4":P?"gap-4 bg-transparent border-0 shadow-none":"gap-4 px-6 py-2 bg-white border border-gray-200 rounded-full shadow-sm",i),"aria-label":"Main navigation",children:f.navigationItems.map((T,w)=>t.jsxs("div",{className:"flex items-center gap-4",children:[w>0&&t.jsx("div",{className:"flex items-center justify-center h-6 w-0","aria-hidden":"true",children:t.jsx("div",{className:"h-0 w-6 rotate-90",children:t.jsx("div",{className:p("h-px w-full",C?"bg-white":"bg-gray-200")})})}),R({item:T,className:p(C?"font-body text-sm font-normal uppercase tracking-[0.05em] leading-5 text-white hover:text-white/80 transition-colors":"text-gray-900 text-sm font-medium leading-5 hover:text-black transition-colors text-ellipsis overflow-hidden text-nowrap",c)})]},T.id))}),t.jsxs("div",{className:p("flex items-center shrink-0 w-1/5","gap-6 p-4"),children:[t.jsx("button",{type:"button",className:p("hidden md:flex items-center justify-center px-4 py-2 text-sm font-medium leading-5 transition-colors",C?"font-body h-9 bg-white text-zinc-900 border border-zinc-200 rounded-none hover:bg-zinc-100":P?"h-10 bg-zinc-900 text-white border-0 rounded-md hover:bg-zinc-800":"h-9 bg-white border border-gray-200 text-zinc-900 rounded-full hover:bg-zinc-200",m),children:f.loginButtonText}),f.showMobileMenu&&t.jsx("button",{type:"button",onClick:()=>g(!v),"aria-label":S,"aria-expanded":v,className:p("flex md:hidden items-center justify-center px-3 py-2 bg-white transition-colors",C?"border border-zinc-200 text-zinc-900 hover:bg-zinc-100":P?"rounded-xl border border-zinc-200 hover:bg-gray-50":"rounded-full hover:bg-gray-50",u),children:v?t.jsx(Je,{className:p("text-gray-900",C?"h-[15px] w-[15px]":"h-4 w-4")}):t.jsx(Ls,{className:p("text-gray-900",C?"h-[15px] w-[15px]":"h-4 w-4")})})]})]}),v&&f.showMobileMenu&&t.jsxs("div",{className:"fixed inset-0 z-40 md:hidden",role:"dialog","aria-modal":"true","aria-label":"Mobile menu",children:[t.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:()=>g(!1),"aria-hidden":"true"}),t.jsx("div",{className:"fixed right-0 top-0 h-full w-full max-w-sm bg-white shadow-xl",children:t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsx("div",{className:"flex items-center justify-end px-6 py-4",children:t.jsx("button",{type:"button",onClick:()=>g(!1),"aria-label":"Close menu",className:"flex h-10 w-10 items-center justify-center rounded-full bg-zinc-100 text-zinc-900 hover:bg-zinc-200",children:t.jsx(Je,{className:"h-5 w-5"})})}),t.jsx("nav",{className:"flex-1 overflow-y-auto px-6 py-4",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[f.navigationItems.map(T=>t.jsx("div",{children:R({item:T,className:"block text-base font-medium text-zinc-900 hover:text-zinc-600 transition-colors py-2",onClick:()=>g(!1)})},T.id)),t.jsx("div",{className:"mt-4 pt-4 border-t border-zinc-200",children:t.jsx("button",{type:"button",className:"w-full h-12 flex items-center justify-center rounded-full bg-zinc-100 text-zinc-900 font-semibold",children:f.loginButtonText})})]})})]})})]})]})});Mt.displayName="Header";const Ws=e=>({content:e.content,theme:e.theme||{},variant:e.variant||"modern",layout:e.layout||"centered"}),Us={center:"object-center",top:"object-top",bottom:"object-bottom",left:"object-left",right:"object-right","left-top":"object-left-top","left-bottom":"object-left-bottom","right-top":"object-right-top","right-bottom":"object-right-bottom"},St=E.forwardRef(({content:e,theme:r,variant:s="modern",layout:o="centered",searchForm:a,logo:n,navigation:l,className:i,id:c,"aria-label":m},u)=>{const d=Ws({content:e,theme:r,variant:s,layout:o}),x=d.variant==="modern",N=d.variant==="modern"||d.variant==="luxury";return t.jsx("section",{ref:u,id:c,"aria-label":m||"Hero banner",className:p("relative",x&&"px-4 lg:px-8",i),children:t.jsxs("div",{className:p("relative flex min-h-[600px] flex-col",x?"lg:min-h-[85vh] rounded-2xl overflow-hidden":"lg:min-h-screen","bg-gradient-to-br from-zinc-900 to-zinc-800","text-white"),children:[d.theme.backgroundImage&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"absolute inset-0 z-0",children:t.jsx("img",{src:d.theme.backgroundImage,alt:"",className:p("h-full w-full object-cover",d.theme.backgroundPosition&&Us[d.theme.backgroundPosition]||"object-center"),loading:"eager",decoding:"async"})}),t.jsx("div",{className:"absolute inset-0 z-[1] bg-gradient-to-b from-black/40 via-black/40 via-[68.25%] to-transparent"})]}),l&&t.jsx("div",{className:"relative z-10",children:l}),t.jsx("div",{className:"relative z-10 flex flex-col items-center justify-center px-4 py-12 lg:flex-1 lg:py-24",children:t.jsxs("div",{className:"w-full max-w-6xl text-center",children:[d.variant==="minimal"&&n&&t.jsx("div",{className:"mb-8 flex items-center justify-center",children:n}),d.content.title&&t.jsxs("div",{className:"mb-16 space-y-8",children:[t.jsx("h1",{className:"text-4xl font-bold tracking-wide text-white sm:text-5xl lg:text-6xl",children:d.content.title}),d.content.subtitle&&t.jsx("p",{className:"mt-4 text-xl text-white/90 sm:text-2xl",children:d.content.subtitle})]}),d.variant==="minimal"&&d.content.metrics&&d.content.metrics.length>0&&t.jsx("div",{className:"mb-16",children:t.jsx("div",{className:"mx-auto grid max-w-4xl grid-cols-1 gap-8 md:grid-cols-3",children:d.content.metrics.map((h,v)=>t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"mb-2 text-3xl font-bold text-white md:text-4xl",children:h.value}),t.jsx("div",{className:"text-sm text-white/80 md:text-base",children:h.label})]},v))})}),a&&t.jsx("div",{className:"relative z-20 mx-auto w-full max-w-4xl",children:a})]})}),N&&d.content.metrics&&d.content.metrics.length>0&&t.jsx("div",{className:"absolute bottom-0 right-0 z-10 hidden md:block",children:t.jsx("div",{className:"flex h-20 w-full max-w-4xl items-center gap-6 rounded-tl-2xl bg-white px-8 py-4 text-zinc-900 md:h-24 md:gap-12 md:px-12 md:py-6",children:d.content.metrics.map((h,v)=>t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-xl font-semibold leading-tight md:text-2xl",children:h.value}),t.jsx("div",{className:"text-xs leading-tight text-zinc-600 md:text-sm",children:h.label})]},v))})}),d.variant==="minimal"&&t.jsx("div",{className:"relative z-10 pb-8",children:t.jsx("div",{className:"flex justify-center",children:t.jsx("div",{className:"h-1 w-8 rounded-full bg-white/30","aria-hidden":"true"})})})]})})});St.displayName="HeroBanner";const Tt=[{value:"15-years",label:"15 años fijos",years:15},{value:"20-years",label:"20 años fijos",years:20},{value:"30-years",label:"30 años fijos",years:30},{value:"40-years",label:"40 años fijos",years:40}],qs=Tt.map(e=>({value:e.value,label:e.label})),ye={propertyPrice:2e7,downPayment:2e5,loanProgram:"30-years",interestRate:6.5},Se={principalAndInterest:"#0a2540",propertyTax:"#4da6c7",hoaFees:"#7fc9e3"},Pt=j.forwardRef(({initialPropertyPrice:e=ye.propertyPrice,initialDownPayment:r=ye.downPayment,initialLoanProgram:s=ye.loanProgram,initialInterestRate:o=ye.interestRate,showPropertyTax:a=!1,showHoaFees:n=!1,className:l,onCalculationChange:i},c)=>{const[m,u]=j.useState(e),[d,x]=j.useState(r),[N,h]=j.useState(s),[v,g]=j.useState(o),[f,P]=j.useState(0),[C,M]=j.useState(0),S=j.useMemo(()=>{const w=Tt.find(K=>K.value===N)?.years||30;return rt({propertyPrice:m,downPayment:d,loanTerm:w,interestRate:v,propertyTax:a?f:void 0,hoaFees:n?C:void 0})},[m,d,N,v,f,C,a,n]);j.useEffect(()=>{i?.(S)},[S,i]);const R=j.useMemo(()=>{const T=[{label:"Principal e Intereses",value:S.breakdown.principalAndInterest,color:Se.principalAndInterest}];return a&&S.breakdown.propertyTax>0&&T.push({label:"Impuesto Predial",value:S.breakdown.propertyTax,color:Se.propertyTax}),n&&S.breakdown.hoaFees>0&&T.push({label:"Cuota HOA",value:S.breakdown.hoaFees,color:Se.hoaFees}),T},[S,a,n]);return t.jsx("div",{ref:c,className:p("w-full",l),children:t.jsx(Ae,{padding:"lg",className:"w-full",children:t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{children:[t.jsx(I,{variant:"h2",className:"mb-2",children:"Calculadora de Hipotecas"}),t.jsx(I,{variant:"body",color:"secondary",className:"max-w-2xl",children:"Calcule el pago mensual de su hipoteca, incluyendo capital e intereses, impuestos prediales y cuota de la asociación de propietarios. Ajuste los valores para obtener una tasa más precisa."})]}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[t.jsxs("div",{className:"space-y-4",children:[t.jsx(te,{label:"Precio de la propiedad",type:"number",value:m,onChange:T=>u(Number(T.target.value)),suffix:"MXN",min:0,step:1e4}),t.jsx(te,{label:"Enganche",type:"number",value:d,onChange:T=>x(Number(T.target.value)),suffix:"MXN",min:0,step:1e4}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(je,{label:"Programa de préstamos",value:N,onChange:T=>h(T.target.value),options:qs}),t.jsx(te,{label:"Tasa de interés",type:"number",value:v,onChange:T=>g(Number(T.target.value)),suffix:"%",min:0,max:100,step:.1})]}),a&&t.jsx(te,{label:"Impuesto predial mensual",type:"number",value:f,onChange:T=>P(Number(T.target.value)),suffix:"MXN",min:0,step:100}),n&&t.jsx(te,{label:"Cuota HOA mensual",type:"number",value:C,onChange:T=>M(Number(T.target.value)),suffix:"MXN",min:0,step:100})]}),t.jsxs("div",{className:"flex flex-col items-center justify-center",children:[t.jsx(Le,{segments:R,size:320,innerRadiusRatio:.65,centerContent:t.jsxs("div",{className:"text-center",children:[t.jsx(I,{variant:"h1",className:"font-bold mb-1",children:ae(S.totalMonthlyPayment)}),t.jsx(I,{variant:"body-sm",color:"secondary",children:"Tu Pago"})]}),showLegend:!0,legendPosition:"bottom"}),t.jsxs("div",{className:"mt-6 text-center space-y-1",children:[t.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-success",children:[t.jsx(Fs,{className:"h-4 w-4"}),t.jsx("span",{className:"font-medium",children:"Trending up by 5.2% this month"})]}),t.jsx(I,{variant:"caption",color:"secondary",children:"Showing total visitors for the last 6 months"})]})]})]}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 pt-4 border-t",children:[t.jsxs("div",{children:[t.jsx(I,{variant:"caption",color:"secondary",className:"mb-1",children:"Monto del préstamo"}),t.jsx(I,{variant:"body",weight:"semibold",children:ae(S.loanPrincipal)})]}),t.jsxs("div",{children:[t.jsx(I,{variant:"caption",color:"secondary",className:"mb-1",children:"Pago mensual"}),t.jsx(I,{variant:"body",weight:"semibold",children:ae(S.monthlyPayment)})]}),t.jsxs("div",{children:[t.jsx(I,{variant:"caption",color:"secondary",className:"mb-1",children:"Interés total"}),t.jsx(I,{variant:"body",weight:"semibold",children:ae(S.totalInterest)})]}),t.jsxs("div",{children:[t.jsx(I,{variant:"caption",color:"secondary",className:"mb-1",children:"Total a pagar"}),t.jsx(I,{variant:"body",weight:"semibold",children:ae(S.totalAmount)})]})]})]})})})});Pt.displayName="MortgageCalculator";const Ks=(e,r,s)=>{if(r)return"text-white";if(s)switch(e.type){case"Venta":return"bg-stone-950 text-white";case"Desarrollo":return"bg-cyan-600 text-white";case"Renta":return"bg-cyan-950 text-white";case"Remate":return"bg-orange-700 text-white";default:return"bg-stone-950 text-white"}switch(e.variant||Xs(e.type)){case"primary":return"bg-primary text-primary-foreground";case"secondary":return"bg-secondary text-secondary-foreground";case"success":return"bg-success text-success-foreground";case"warning":return"bg-warning text-warning-foreground";case"error":return"bg-error text-error-foreground";case"info":return"bg-info text-info-foreground";default:return"bg-secondary text-secondary-foreground"}},Xs=e=>{switch(e){case"Venta":return"primary";case"Desarrollo":return"success";case"Renta":return"info";case"Remate":return"warning";default:return"secondary"}},Zs=({property:e,className:r,onLike:s,onImageClick:o,showLikeButton:a=!0,variant:n="default",badgeColors:l})=>{const[i,c]=E.useState(0),[m,u]=E.useState(!1),[d,x]=E.useState(!1),N=V=>{V.preventDefault(),V.stopPropagation();const _=!m;u(_),s?.(e.id,_)},h=V=>{V.preventDefault(),V.stopPropagation(),o?.(i,e.id)},v=(V,_)=>!V||!_?"Price not available":`$${V.toLocaleString()} ${_}`,g=n==="compact",f=n==="minimal",P=p("relative overflow-hidden bg-card transition-all duration-300 ease-out cursor-pointer",g?"rounded-xl hover:shadow-lg border px-4 shadow-md":f?"rounded-2xl w-[454px] flex flex-col gap-4":"rounded-2xl hover:-translate-y-1 hover:shadow-xl shadow-md",r),C=p("relative overflow-hidden",g?"rounded-xl px-4 shadow-md":f?"rounded-2xl":""),M=p("w-full h-full object-cover",g?"":f?"rounded-2xl":"transition-transform duration-300 hover:scale-105"),S=p("absolute z-10 flex flex-wrap gap-2",g?"top-3 left-3":"top-4 left-4"),R=p("font-semibold",g?"rounded-full px-3 py-1 text-xs":f?"rounded-full px-3 h-7 flex items-center justify-center text-base":"px-2 py-1 rounded-lg font-medium uppercase tracking-wide text-xs"),T=p("absolute z-10 cursor-pointer transition-all duration-200",g?"top-3 right-3 p-1 shadow-md rounded-full":f?"top-4 right-4 w-7 h-7 flex items-center justify-center hover:scale-105":"top-4 right-4 bg-background/90 backdrop-blur-sm border border-border/20 text-foreground w-10 h-10 flex items-center justify-center rounded-full hover:bg-background hover:scale-105"),w=p("absolute left-1/2 -translate-x-1/2 flex z-10",f?"bottom-4 gap-2 p-4":"bottom-4 gap-1"),L=p("w-2 h-2 rounded-full border-none cursor-pointer transition-all duration-200 hover:scale-120"),K=p(g?"p-2":f?"flex flex-col gap-2":"p-6"),re=p("font-semibold text-foreground line-clamp-2 leading-tight",g?"text-base mb-2":f?"text-base":"text-lg font-bold mb-2"),X=p("font-bold",g?"text-lg text-primary mb-2":f?"text-lg text-foreground":"text-xl text-primary mb-2"),se=p("text-muted-foreground",g?"text-sm flex items-center gap-1 mb-4":f?"text-base":"text-base mb-4"),Y=p("flex items-center",g?"justify-between mt-3 mb-4":f?"gap-3":"gap-4 mb-4"),H=p("flex items-center gap-1 text-muted-foreground","text-sm"),B=p("text-sm text-muted-foreground line-clamp-2",g?"mt-2":""),k=!(e.images&&e.images.length>0)||d,ue=()=>t.jsxs("div",{className:"w-full h-full bg-gradient-to-br from-primary/10 via-primary/5 to-secondary/10 flex flex-col items-center justify-center gap-3",children:[t.jsx("div",{className:"rounded-full bg-primary/10 p-6",children:t.jsx(Ps,{size:g?32:48,className:"text-primary/40"})}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"No image available"})]}),ce=t.jsxs("div",{className:P,children:[t.jsxs("div",{className:p(C,g?"h-52":f?"h-[481px]":"aspect-[4/3]"),children:[k?t.jsx(ue,{}):t.jsxs("div",{className:"relative w-full h-full","aria-hidden":"true",children:[t.jsx("img",{src:e.images[i],alt:e.title,className:M,onClick:o?h:void 0,onError:()=>x(!0)}),t.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent to-black/40 pointer-events-none rounded-2xl"})]}),t.jsx("div",{className:S,children:e.transactionTypes.map((V,_)=>{const A=l?.[V.type];return t.jsx("span",{className:p(R,Ks(V,A,f)),style:A?{backgroundColor:A}:void 0,children:V.type},_)})}),a&&t.jsx("button",{onClick:N,className:T,"aria-label":m?"Unlike property":"Like property",children:g?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:m?"red":"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:m?"red":"currentColor",className:"h-5 w-5",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733C11.285 4.876 9.623 3.75 7.688 3.75 5.099 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"})}):t.jsx(Ss,{size:20,fill:m?"currentColor":"none",className:f?"text-white":m?"text-destructive":"",strokeWidth:f?1.5:2})}),!g&&!k&&e.images.length>1&&t.jsx("div",{className:w,children:e.images.map((V,_)=>t.jsx("button",{className:p(L,_===i?"bg-white":"bg-white/50"),onClick:A=>{A.preventDefault(),A.stopPropagation(),c(_)},"aria-label":`Go to image ${_+1}`,"aria-current":_===i},_))})]}),t.jsxs("div",{className:K,children:[t.jsx("h3",{className:re,children:e.title}),t.jsx("p",{className:X,children:v(e.price?.amount,e.price?.currency)}),t.jsxs("p",{className:se,children:[g&&t.jsx(Es,{size:14}),e.location.city,", ",e.location.state]}),t.jsxs("div",{className:Y,children:[t.jsxs("div",{className:H,children:[t.jsx(xs,{size:f?20:16}),t.jsx("span",{children:e.features.bedrooms})]}),t.jsxs("div",{className:H,children:[t.jsx(ps,{size:f?20:16}),t.jsx("span",{children:e.features.bathrooms})]}),t.jsxs("div",{className:H,children:[t.jsx(gs,{size:f?20:16}),t.jsx("span",{children:e.features.parking})]}),t.jsxs("div",{className:H,children:[t.jsx(Rs,{size:f?20:16}),t.jsxs("span",{children:[e.features.area," m²"]})]})]}),e.amenities.length>0&&t.jsx("p",{className:B,children:e.amenities.join(", ")})]})]});return e.href?t.jsx("a",{href:e.href,className:"no-underline text-inherit",children:ce}):ce},Js=({images:e,onViewAllClick:r,onImageClick:s})=>{const[o,a]=E.useState(!1),[n,l]=E.useState(0),i=e.length,c=E.useCallback(h=>{s?.(h),i!==0&&(l(h),a(!0))},[s,i]),m=E.useCallback(()=>{r?.(),i!==0&&(l(0),a(!0))},[r,i]),u=E.useCallback(()=>{a(!1)},[]),d=E.useCallback(()=>{i<=1||l(h=>h===0?i-1:h-1)},[i]),x=E.useCallback(()=>{i<=1||l(h=>h===i-1?0:h+1)},[i]),N=E.useCallback(h=>{l(h)},[]);return E.useEffect(()=>{if(!o)return;const h=v=>{v.key==="ArrowLeft"&&(v.preventDefault(),d()),v.key==="ArrowRight"&&(v.preventDefault(),x())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[x,d,o]),{isModalOpen:o,activeImageIndex:n,totalImageCount:i,handlePreviewImageClick:c,handleViewAllPhotosClick:m,handleCloseModal:u,handlePreviousImage:d,handleNextImage:x,handleSelectImage:N}},Qs=({images:e,isOpen:r,activeImageIndex:s,onClose:o,onPrevious:a,onNext:n,onSelectImage:l})=>{const i=e.length;return t.jsx(Oe,{isOpen:r,onClose:o,title:`Foto ${s+1} de ${i}`,size:"xl",children:e[s]?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"relative rounded-2xl overflow-hidden bg-black",children:[t.jsx("img",{src:e[s],alt:`Property image ${s+1}`,className:"w-full max-h-[70vh] object-contain mx-auto"}),i>1&&t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:a,"aria-label":"Previous image",className:"absolute left-3 top-1/2 -translate-y-1/2 rounded-full bg-white/90 p-2 text-foreground shadow-md transition hover:bg-white",children:t.jsx(ws,{className:"h-5 w-5"})}),t.jsx("button",{type:"button",onClick:n,"aria-label":"Next image",className:"absolute right-3 top-1/2 -translate-y-1/2 rounded-full bg-white/90 p-2 text-foreground shadow-md transition hover:bg-white",children:t.jsx(ks,{className:"h-5 w-5"})})]})]}),i>1&&t.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1",children:e.map((c,m)=>t.jsx("button",{type:"button",onClick:()=>l(m),className:p("w-16 h-16 sm:w-20 sm:h-20 rounded-lg overflow-hidden border-2 flex-shrink-0 transition",m===s?"border-primary":"border-transparent"),"aria-label":`Go to image ${m+1}`,"aria-current":m===s,children:t.jsx("img",{src:c,alt:`Thumbnail ${m+1}`,className:"w-full h-full object-cover"})},`${c}-${m}`))})]}):t.jsx("div",{className:"w-full bg-muted flex items-center justify-center rounded-2xl p-8",children:t.jsx("span",{className:"text-muted-foreground",children:"No image"})})})},zt=E.forwardRef(({images:e,transactionType:r,totalPhotos:s,onViewAllClick:o,onImageClick:a,className:n},l)=>{const{activeImageIndex:i,isModalOpen:c,totalImageCount:m,handlePreviewImageClick:u,handleViewAllPhotosClick:d,handleCloseModal:x,handlePreviousImage:N,handleNextImage:h,handleSelectImage:v}=Js({images:e,onImageClick:a,onViewAllClick:o}),g=s??m,f=e.slice(0,5);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:l,className:p("w-full h-[340px] sm:h-[460px] md:h-[560px] grid grid-cols-2 gap-2 auto-rows-fr",n),children:[t.jsx("div",{className:"relative col-span-2 sm:col-span-1 sm:row-span-2 rounded-2xl overflow-hidden group cursor-pointer",children:f[0]?t.jsxs(t.Fragment,{children:[t.jsx("img",{src:f[0],alt:"Property main view",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>u(0)}),r&&t.jsx("div",{className:"absolute top-4 left-4 bg-white rounded-full px-4 py-2 shadow-md",children:t.jsx("span",{className:"text-sm font-medium text-foreground",children:r})})]}):t.jsx("div",{className:"w-full h-full bg-muted flex items-center justify-center",children:t.jsx("span",{className:"text-muted-foreground",children:"No image"})})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:f[1]?t.jsx("img",{src:f[1],alt:"Property view 2",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>u(1)}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:f[2]?t.jsx("img",{src:f[2],alt:"Property view 3",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>u(2)}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:f[3]?t.jsx("img",{src:f[3],alt:"Property view 4",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>u(3)}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:f[4]?t.jsxs(t.Fragment,{children:[t.jsx("img",{src:f[4],alt:"Property view 5",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>u(4)}),g>5&&t.jsx("div",{className:"absolute bottom-3 right-3 sm:bottom-4 sm:right-4",children:t.jsxs("button",{type:"button",onClick:P=>{P.stopPropagation(),d()},className:"flex items-center gap-2 bg-white rounded-full px-3 py-2 sm:px-4 shadow-md hover:shadow-lg transition-all duration-200 hover:scale-105",children:[t.jsx(Cs,{className:"w-4 h-4 text-foreground"}),t.jsxs("span",{className:"text-xs sm:text-sm font-medium text-foreground",children:["Ver las ",g," fotos"]})]})})]}):t.jsx("div",{className:"w-full h-full bg-muted"})})]}),t.jsx(Qs,{images:e,isOpen:c,activeImageIndex:i,onClose:x,onPrevious:N,onNext:h,onSelectImage:v})]})});zt.displayName="PropertyGallery";function Ys({onSubmit:e,defaultValues:r,propertyTypeOptions:s,transactionTypeOptions:o,locationOptions:a}){const n=j.useMemo(()=>({propertyType:r?.propertyType||s[0]?.value||"",transactionType:r?.transactionType||o[0]?.value||"",location:r?.location||a[0]?.value||""}),[r,s,o,a]),[l,i]=j.useState(n),c=j.useCallback(u=>{i(d=>{const x=typeof u=="function"?u(d):u;return JSON.stringify(d)===JSON.stringify(x)?d:x})},[]),m=j.useCallback(u=>{u.preventDefault(),e?.({propertyType:l.propertyType,transactionType:l.transactionType,location:l.location})},[l,e]);return{formData:l,setFormData:c,handleSubmit:m,propertyTypeOptions:s,transactionTypeOptions:o,locationOptions:a}}const Fe=({variant:e="pill",isSubmitting:r,className:s})=>{const o="relative size-12 rounded-full bg-black text-white transition-all duration-200 hover:bg-black/90 hover:shadow-md flex items-center justify-center",a="w-full";return e==="mobile"?t.jsxs(q,{type:"submit",className:p(a,s),children:[t.jsx(Ie,{className:"h-4 w-4"}),r?"Searching...":"Search"]}):t.jsx(q,{type:"submit",size:"icon",variant:"ghost","aria-label":r?"Searching...":"Search properties",className:p(o,s),disabled:r,children:t.jsx(Ie,{className:"h-6 w-6"})})},F=({label:e,options:r,value:s,onChange:o,className:a,containerClassName:n})=>{const l=j.useMemo(()=>r.map(c=>({value:c.value,label:c.label})),[r]),i=j.useCallback(c=>{o(c.target.value)},[o]);return t.jsx("div",{className:p("flex min-w-0 flex-1 items-center",n),children:t.jsx("div",{className:"flex-1 px-6 py-3.5",children:t.jsx(je,{label:e,options:l,value:s,className:p("w-full border-none bg-transparent focus:outline-none focus:ring-0 text-base text-muted-foreground h-auto p-0",a),labelClassName:"text-sm font-semibold text-foreground mb-1 text-left",onChange:i})})})},eo=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,error:n,className:l})=>t.jsx("div",{className:p("rounded-xl bg-white shadow-lg p-6",l),children:t.jsxs("form",{className:"space-y-6",onSubmit:a,children:[t.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[t.jsx(F,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"flex items-center",className:"placeholder:text-muted-foreground",onChange:s("propertyType")}),t.jsx(F,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,containerClassName:"flex items-center",className:"placeholder:text-muted-foreground",onChange:s("transactionType")}),t.jsx(F,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex items-center",className:"placeholder:text-muted-foreground",onChange:s("location")})]}),t.jsxs(q,{type:"submit",className:"w-full",size:"lg",disabled:o,children:[t.jsx(Ie,{className:"h-4 w-4 mr-2"}),o?"Searching...":"Search Properties"]}),n&&t.jsx("div",{className:"bg-destructive/10 text-destructive mt-3 rounded-lg p-3 text-center text-sm",role:"alert",children:n})]})}),to=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n})=>t.jsx("form",{className:p("w-full max-w-md",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex flex-col gap-3 rounded-2xl bg-white p-4 shadow-lg",children:[t.jsx(F,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"flex items-center",onChange:s("propertyType")}),t.jsx(F,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,containerClassName:"flex items-center",onChange:s("transactionType")}),t.jsx(F,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex items-center",onChange:s("location")}),t.jsx(Fe,{variant:"mobile",isSubmitting:o})]})}),ne=({className:e})=>t.jsx("div",{className:p("w-px self-stretch bg-gray-300 mx-6",e)}),ro=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n,buttonLabel:l="Conoce Más"})=>t.jsx("form",{className:p("relative mx-auto w-full max-w-5xl",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex items-stretch bg-white border border-gray-300 shadow-xl relative z-10 px-3",children:[t.jsx(F,{label:"Tipo de propiedad",options:r.propertyTypeOptions,value:e.propertyType,onChange:s("propertyType")}),t.jsx(ne,{}),t.jsx(F,{label:"Transacción",options:r.transactionTypeOptions,value:e.transactionType,onChange:s("transactionType")}),t.jsx(ne,{}),t.jsx(F,{label:"Ciudad",options:r.locationOptions,value:e.location,containerClassName:"flex min-w-0 flex-[1.2] items-center",onChange:s("location")}),t.jsx("div",{className:"flex items-center py-3",children:t.jsx("button",{type:"submit",disabled:o,className:"h-10 px-4 py-2 bg-zinc-900 text-white text-sm font-medium rounded-md hover:bg-zinc-800 transition-colors disabled:opacity-50 whitespace-nowrap","aria-label":o?"Buscando propiedades...":l,children:o?"Buscando...":l})})]})}),so=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n})=>t.jsx("form",{className:p("relative mx-auto w-full max-w-5xl",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex items-stretch rounded-full bg-white border border-gray-300 shadow-xl relative z-10 p-1.5",children:[t.jsx(F,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,onChange:s("propertyType")}),t.jsx(ne,{}),t.jsx(F,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,onChange:s("transactionType")}),t.jsx(ne,{}),t.jsx(F,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex min-w-0 flex-[1.2] items-center",onChange:s("location")}),t.jsx("div",{className:"flex items-center",children:t.jsx(Fe,{variant:"pill",isSubmitting:o,className:"bg-black"})})]})}),oo=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a})=>t.jsx("form",{className:"mt-4 block md:hidden",onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"grid grid-cols-1 gap-3 rounded-2xl bg-white p-4 shadow-lg",children:[t.jsx(F,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"flex items-center",onChange:s("propertyType")}),t.jsx(F,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,containerClassName:"flex items-center",onChange:s("transactionType")}),t.jsx(F,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex items-center",onChange:s("location")}),t.jsx(Fe,{variant:"mobile",isSubmitting:o})]})}),ao=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n,buttonLabel:l="Conoce Más"})=>t.jsx("form",{className:p("relative mx-auto w-full max-w-5xl",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex items-stretch rounded-lg bg-white border border-gray-300 shadow-xl relative z-10 px-3",children:[t.jsx(F,{label:"Tipo de propiedad",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"rounded-tl-full rounded-bl-full",onChange:s("propertyType")}),t.jsx(ne,{}),t.jsx(F,{label:"Transacción",options:r.transactionTypeOptions,value:e.transactionType,onChange:s("transactionType")}),t.jsx(ne,{}),t.jsx(F,{label:"Ciudad",options:r.locationOptions,value:e.location,containerClassName:"flex min-w-0 flex-[1.2] items-center",onChange:s("location")}),t.jsx("div",{className:"flex items-center py-3",children:t.jsx("button",{type:"submit",disabled:o,className:"h-10 px-4 py-2 bg-zinc-900 text-white text-sm font-medium rounded-md hover:bg-zinc-800 transition-colors disabled:opacity-50 whitespace-nowrap","aria-label":o?"Buscando propiedades...":l,children:o?"Buscando...":l})})]})}),Qe={minimal:so,modern:ao,luxury:ro,compact:to,card:eo},Et=({onSubmit:e,defaultValues:r,className:s,variant:o="minimal",propertyTypeOptions:a,transactionTypeOptions:n,locationOptions:l,buttonLabel:i})=>{const[c,m]=j.useState(!1),[u,d]=j.useState(null),x=Ys({onSubmit:e,defaultValues:r,propertyTypeOptions:a,transactionTypeOptions:n,locationOptions:l}),{formData:N,setFormData:h,handleSubmit:v,propertyTypeOptions:g,transactionTypeOptions:f,locationOptions:P}=x,C=j.useCallback(async T=>{T.preventDefault(),d(null),m(!0);try{await v(T)}catch(w){const L=w instanceof Error?w.message:"Search failed. Please try again.";d(L),console.error("Search error:",w)}finally{m(!1)}},[v]),M=j.useCallback(T=>w=>{d(null),h(L=>({...L,[T]:w}))},[h]),S=j.useMemo(()=>({propertyTypeOptions:g,transactionTypeOptions:f,locationOptions:P}),[g,f,P]),R=Qe[o]||Qe.minimal;return t.jsxs(t.Fragment,{children:[t.jsx(R,{formData:N,options:S,isSubmitting:c,error:u,className:s,onFieldChange:M,onSubmit:C,...(o==="modern"||o==="luxury")&&{buttonLabel:i}}),o==="minimal"&&t.jsx(oo,{formData:N,options:S,isSubmitting:c,onFieldChange:M,onSubmit:C})]})};Et.displayName="SearchFeature";const no=({href:e,children:r})=>t.jsx("a",{href:e,className:"sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-50 focus:px-4 focus:py-2 focus:bg-primary focus:text-white focus:rounded",children:r}),lo={spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem"},radius:{none:"0",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},typography:{fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}]},fontWeight:{thin:"100",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"}},shadows:{none:"none",xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",DEFAULT:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",md:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",lg:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",xl:"0 25px 50px -12px rgb(0 0 0 / 0.25)"},zIndex:{dropdown:1e3,sticky:1020,fixed:1030,modalBackdrop:1040,modal:1050,popover:1060,tooltip:1070,toast:1080},duration:{instant:"0ms",fast:"150ms",normal:"300ms",slow:"500ms"},easing:{linear:"linear",in:"ease-in",out:"ease-out",inOut:"ease-in-out"}},It={button:{size:{sm:"h-9 px-3 text-sm",md:"h-10 px-4 py-2",lg:"h-11 px-8",icon:"h-10 w-10"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"}},input:{size:{sm:"h-9 px-3 text-sm",md:"h-10 px-3 py-2",lg:"h-11 px-3 py-2"}},card:{variant:{default:"bg-card text-card-foreground",elevated:"bg-card text-card-foreground shadow-lg",outlined:"bg-card text-card-foreground border-2"}}},Rt={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},At={withOpacity:(e,r)=>r!==void 0?`hsl(var(${e}) / ${r})`:`hsl(var(${e}))`,get:e=>`hsl(var(--${e}))`},Lt={generateId:(e="ds")=>`${e}-${Math.random().toString(36).substr(2,9)}`,focus:{visible:"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",within:"focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2"},sr:{only:"absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0",not:"not-sr-only"}},$t={icon:{xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",xl:"w-8 h-8"},avatar:{xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10",lg:"w-12 h-12",xl:"w-16 h-16"}},Ot={fade:{in:"animate-in fade-in duration-200",out:"animate-out fade-out duration-200"},slide:{inFromLeft:"animate-in slide-in-from-left duration-200",inFromRight:"animate-in slide-in-from-right duration-200",inFromTop:"animate-in slide-in-from-top duration-200",inFromBottom:"animate-in slide-in-from-bottom duration-200"},scale:{in:"animate-in scale-in duration-200",out:"animate-out scale-out duration-200"}},Ft={container:{responsive:"container mx-auto px-4 sm:px-6 lg:px-8",fluid:"w-full max-w-none",centered:"container mx-auto px-4 flex items-center justify-center min-h-screen"},grid:{responsive:"grid gap-4 sm:gap-6 lg:gap-8",cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5",6:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6"}},flex:{center:"flex items-center justify-center",between:"flex items-center justify-between",start:"flex items-center justify-start",end:"flex items-center justify-end",col:"flex flex-col",colCenter:"flex flex-col items-center justify-center"}},_t={isDark:()=>typeof window>"u"?!1:document.documentElement.classList.contains("dark"),toggle:()=>{typeof window>"u"||document.documentElement.classList.toggle("dark")},set:e=>{typeof window>"u"||document.documentElement.classList.toggle("dark",e==="dark")}},Vt={debounce:(e,r)=>{let s;return(...o)=>{clearTimeout(s),s=setTimeout(()=>e(...o),r)}},throttle:(e,r)=>{let s;return(...o)=>{s||(e(...o),s=!0,setTimeout(()=>s=!1,r))}}},Dt=E.createContext(null),io=()=>{const e=E.useContext(Dt);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},co={name:"light",colors:{primary:"#007bff",secondary:"#6c757d",success:"#28a745",warning:"#ffc107",error:"#dc3545",info:"#17a2b8",background:"#ffffff",surface:"#f8f9fa",text:"#212529",textSecondary:"#6c757d",border:"#dee2e6",borderLight:"#e9ecef"},shapes:{borderRadius:{small:"4px",medium:"8px",large:"12px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)",medium:"0 3px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12)",large:"0 10px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.10)",xl:"0 15px 25px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.05)"}},mo={name:"dark",colors:{primary:"#0d6efd",secondary:"#6c757d",success:"#198754",warning:"#fd7e14",error:"#dc3545",info:"#0dcaf0",background:"#121212",surface:"#1e1e1e",text:"#ffffff",textSecondary:"#adb5bd",border:"#495057",borderLight:"#343a40"},shapes:{borderRadius:{small:"4px",medium:"8px",large:"12px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.4)",medium:"0 3px 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3)",large:"0 10px 20px rgba(0, 0, 0, 0.4), 0 3px 6px rgba(0, 0, 0, 0.3)",xl:"0 15px 25px rgba(0, 0, 0, 0.4), 0 5px 10px rgba(0, 0, 0, 0.3)"}},uo={name:"corporate",colors:{primary:"#1a365d",secondary:"#2d3748",success:"#38a169",warning:"#d69e2e",error:"#e53e3e",info:"#3182ce",background:"#f7fafc",surface:"#ffffff",text:"#1a202c",textSecondary:"#4a5568",border:"#e2e8f0",borderLight:"#edf2f7"},shapes:{borderRadius:{small:"2px",medium:"4px",large:"6px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:'Georgia, "Times New Roman", serif',fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06)",medium:"0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06)",large:"0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04)"}},po={name:"minimal",colors:{primary:"#000000",secondary:"#666666",success:"#00aa00",warning:"#ffaa00",error:"#aa0000",info:"#00aaaa",background:"#ffffff",surface:"#fafafa",text:"#000000",textSecondary:"#666666",border:"#cccccc",borderLight:"#e0e0e0"},shapes:{borderRadius:{small:"0px",medium:"0px",large:"0px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:"Helvetica, Arial, sans-serif",fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"none",medium:"none",large:"none",xl:"none"}},Te={light:co,dark:mo,corporate:uo,minimal:po},Bt=ve.createEvent(),Ht=ve.createEvent(),Gt=ve.createEvent(),Q=ve.createStore(Te.light).on(Bt,(e,r)=>Te[r]||e).on(Ht,(e,r)=>r).on(Gt,()=>Te.light),fo=Q.map(e=>e.name),xo=Q.map(e=>e.colors);Q.map(e=>e.shapes);Q.map(e=>e.typography);Q.map(e=>e.spacing);Q.map(e=>e.shadows);const ho=({children:e})=>{const s={theme:Ut.useUnit(Q)};return t.jsx(Dt.Provider,{value:s,children:e})};exports.$theme=Q;exports.$themeColors=xo;exports.$themeName=fo;exports.AuthLayout=Bs;exports.Button=q;exports.Card=Ae;exports.CategoryChips=$e;exports.Chip=we;exports.CompoundCard=Kr;exports.ConfirmModal=ss;exports.DashboardLayout=Ds;exports.DonutChart=Le;exports.EntityDirectory=Ct;exports.Header=Mt;exports.HeroBanner=St;exports.Input=te;exports.MarketingLayout=Hs;exports.Modal=Oe;exports.ModalWithActions=xt;exports.MortgageCalculator=Pt;exports.PageLayout=ke;exports.PropertyCard=Zs;exports.PropertyGallery=zt;exports.SearchFeature=Et;exports.Select=je;exports.SkipLink=no;exports.Text=I;exports.ThemeProvider=ho;exports.a11y=Lt;exports.accessibilityUtils=Lt;exports.animationUtils=Ot;exports.animations=Ot;exports.breakpoints=Rt;exports.calculateMortgage=rt;exports.cn=p;exports.colorUtils=At;exports.colors=At;exports.componentSizes=$t;exports.componentVariants=It;exports.countEntitiesByCategory=tt;exports.designSystem=lo;exports.filterEntitiesByCategory=Ye;exports.formatCurrency=ae;exports.formatPercentage=Kt;exports.layout=Ft;exports.layoutUtils=Ft;exports.performance=Vt;exports.performanceUtils=Vt;exports.resetTheme=Gt;exports.responsiveBreakpoints=Rt;exports.setCustomTheme=Ht;exports.setTheme=Bt;exports.sizes=$t;exports.sortEntities=et;exports.theme=_t;exports.themeUtils=_t;exports.useEntityFilter=Jr;exports.useTheme=io;exports.validateMortgageInput=Xt;exports.variants=It;
91
+ */const Os=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Je=B("x",Os),je=j.forwardRef(({className:e,containerClassName:r,labelClassName:s,variant:o,selectSize:a,label:n,helperText:l,error:i,required:c,options:m,placeholder:u,id:d,...x},M)=>{const f=j.useId(),v=d||f,y=`${v}-helper`,b=`${v}-error`,z=i?"error":o,C=i||l;return t.jsxs("div",{className:p("w-full",r),children:[n&&t.jsx("label",{htmlFor:v,className:p(as({variant:z,required:c}),s),children:n}),t.jsxs("div",{className:"relative",children:[t.jsxs("select",{id:v,ref:M,className:p(os({variant:z,selectSize:a}),"pr-10",e),"aria-invalid":i?"true":"false","aria-describedby":C?i?b:y:void 0,...x,children:[u&&t.jsx("option",{value:"",disabled:!0,children:u}),m.map(S=>t.jsx("option",{value:S.value,disabled:S.disabled,children:S.label},S.value))]}),t.jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:t.jsx(ys,{className:"h-4 w-4"})})]}),C&&t.jsx("p",{id:i?b:y,className:ns({variant:z}),role:i?"alert":void 0,children:C})]})});je.displayName="Select";const Fs=e=>{switch(e){case"sm":return"p-4";case"md":return"p-6";case"lg":return"p-8";default:return"p-0"}},ke=({children:e,header:r,sidebar:s,footer:o,padding:a="md"})=>{const n=p("min-h-screen flex flex-col"),l=p("bg-card border-b border-border z-10"),i=p("flex flex-1"),c=p("w-70 bg-card border-r border-border p-6"),m=p("flex-1 flex flex-col"),u=p("flex-1 mx-auto w-full max-w-7xl",Fs(a));return t.jsxs("div",{className:n,children:[r&&t.jsx("header",{className:l,children:r}),t.jsxs("div",{className:i,children:[s&&t.jsx("aside",{className:c,children:s}),t.jsx("div",{className:m,children:t.jsx("main",{className:u,children:e})})]}),o&&t.jsx("footer",{className:"bg-card border-t border-border mt-auto",children:o})]})},_s=({children:e,header:r,sidebar:s})=>t.jsx(ke,{header:r,sidebar:s,padding:"lg",children:t.jsx("div",{className:"max-w-screen-2xl",children:e})}),Vs=({children:e,title:r,subtitle:s})=>t.jsx(ke,{padding:"lg",children:t.jsxs("div",{className:"max-w-md mx-auto",children:[t.jsxs("div",{className:"text-center mb-8",children:[r&&t.jsx(R,{variant:"h2",className:"mb-2",children:r}),s&&t.jsx(R,{variant:"body",color:"muted",children:s})]}),e]})}),Ds=({children:e,header:r,footer:s})=>t.jsx(ke,{header:r,footer:s,padding:"none",children:e}),gt=j.forwardRef(({message:e="No entities found",icon:r,action:s,className:o},a)=>t.jsxs("div",{ref:a,role:"status","aria-live":"polite",className:p("flex flex-col items-center justify-center py-12 px-4 text-center",o),children:[r&&t.jsx("div",{className:"mb-4 text-4xl opacity-50","aria-hidden":"true",children:r}),t.jsx(R,{variant:"body-lg",className:"text-muted-foreground mb-4",children:e}),s&&t.jsx(X,{variant:"outline",onClick:s.onClick,children:s.label})]}));gt.displayName="EntityDirectoryEmptyState";const bt=j.forwardRef(({error:e,onRetry:r,className:s},o)=>{const a=typeof e=="string"?e:e.message;return t.jsxs("div",{ref:o,role:"alert","aria-live":"assertive",className:p("flex flex-col items-center justify-center py-12 px-4 text-center",s),children:[t.jsx("div",{className:"mb-4 text-4xl","aria-hidden":"true",children:"⚠️"}),t.jsx(R,{variant:"body-lg",className:"text-destructive mb-2 font-semibold",children:"Error"}),t.jsx(R,{variant:"body",className:"text-muted-foreground mb-4",children:a}),r&&t.jsx(X,{variant:"outline",onClick:r,children:"Try Again"})]})});bt.displayName="EntityDirectoryErrorState";const yt=j.forwardRef(({title:e,description:r,className:s},o)=>t.jsxs("div",{ref:o,className:p("space-y-1.5",s),children:[t.jsx(R,{variant:"h2",className:"font-bold",children:e}),r&&t.jsx(R,{variant:"body",className:"text-muted-foreground",children:r})]}));yt.displayName="EntityDirectoryHeader";const vt=j.forwardRef(({entity:e,categories:r,showIcon:s=!0,showCategoryBadge:o=!0,showMetric:a=!0,compact:n=!1,className:l},i)=>{const c=r?.find(x=>x.id===e.categoryId),m=!!e.onClick,u=()=>{e.onClick&&!e.disabled&&e.onClick()},d=x=>{m&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),u())};return t.jsxs("div",{ref:i,role:m?"button":"listitem",tabIndex:m&&!e.disabled?0:void 0,onClick:u,onKeyDown:d,"aria-disabled":e.disabled,className:p("flex items-center gap-4 border-b border-border transition-colors",n?"p-3":"p-4",m&&!e.disabled&&"cursor-pointer hover:bg-accent/50 focus-visible:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e.disabled&&"opacity-50 cursor-not-allowed",l),children:[s&&t.jsx("div",{className:p("flex-shrink-0 flex items-center justify-center bg-muted rounded-full",n?"w-8 h-8 text-lg":"w-10 h-10 text-xl"),"aria-hidden":"true",children:typeof e.icon=="string"?t.jsx("span",{children:e.icon}):e.icon?j.createElement(e.icon):t.jsx("span",{className:"text-muted-foreground",children:"•"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx(R,{variant:n?"body-sm":"body",className:"font-semibold truncate",children:e.title}),e.subtitle&&t.jsx(R,{variant:n?"caption":"body-sm",className:"text-muted-foreground truncate",children:e.subtitle})]}),o&&c&&t.jsx(we,{variant:"secondary",size:n?"sm":"default",className:"flex-shrink-0 bg-foreground text-background hover:bg-foreground/90","aria-label":`Category: ${c.label}`,children:c.label}),a&&e.metricValue&&t.jsxs("div",{className:"flex-shrink-0 text-right min-w-[4rem]",children:[t.jsx(R,{variant:n?"body-sm":"body",className:"font-medium",children:e.metricValue}),e.metricLabel&&t.jsx(R,{variant:"caption",className:"text-muted-foreground",children:e.metricLabel})]})]})});vt.displayName="EntityDirectoryListItem";const wt=j.forwardRef(({columns:e,showIcon:r,sort:s,onSortChange:o,compact:a,className:n},l)=>{const i=d=>{if(!o)return;const x=s?.column===d&&s?.direction==="asc"?"desc":"asc";o({column:d,direction:x})},c=d=>{i(d)},m=(d,x)=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i(x))},u=d=>d!=="title"&&d!=="metric"?null:!s||s.column!==d?t.jsx("span",{className:"ml-1 text-muted-foreground opacity-50","aria-hidden":"true",children:"⇅"}):t.jsx("span",{className:"ml-1","aria-hidden":"true",children:s.direction==="asc"?"↑":"↓"});return t.jsxs("div",{ref:l,role:"row",className:p("flex items-center gap-4 bg-background border-b border-border font-medium text-sm text-muted-foreground",a?"px-3 py-2":"px-4 py-3",n),children:[r&&t.jsx("div",{className:a?"w-8":"w-10"}),e.map(d=>{const x=d.sortable&&(d.key==="title"||d.key==="metric"),M=s?.column===d.key;return t.jsxs("div",{role:"columnheader","aria-sort":M?s?.direction==="asc"?"ascending":"descending":void 0,className:p(d.key==="title"&&"flex-1",d.key==="category"&&"w-40",d.key==="metric"&&"w-24 text-right",d.align==="center"&&"text-center",d.align==="right"&&"text-right",x&&"cursor-pointer hover:text-foreground transition-colors select-none",M&&"text-foreground"),style:d.width?{width:d.width}:void 0,onClick:x&&(d.key==="title"||d.key==="metric")?()=>c(d.key):void 0,tabIndex:x?0:void 0,onKeyDown:x&&(d.key==="title"||d.key==="metric")?f=>m(f,d.key):void 0,children:[d.label,x&&u(d.key)]},d.key)})]})});wt.displayName="EntityDirectoryTableHeader";const jt=j.forwardRef(({entities:e,categories:r,showIcons:s=!0,showCategoryBadges:o=!0,showMetric:a=!0,metricLabel:n,sortable:l=!1,sort:i,onSortChange:c,compact:m=!1,renderItem:u,className:d},x)=>{const M=[{key:"title",label:n?"Nombre":"Name",sortable:l},...o?[{key:"category",label:"Categoría",sortable:!1}]:[],...a&&n?[{key:"metric",label:n,sortable:l,align:"right"}]:[]];return t.jsxs("div",{ref:x,role:"table","aria-label":"Entity directory",className:p("border border-border rounded-lg overflow-hidden",d),children:[t.jsx(wt,{columns:M,showIcon:s,sort:i,onSortChange:c,compact:m}),t.jsx("div",{role:"rowgroup",children:e.map(f=>u?t.jsx(j.Fragment,{children:u(f)},f.id):t.jsx(vt,{entity:f,categories:r,showIcon:s,showCategoryBadge:o,showMetric:a,compact:m},f.id))})]})});jt.displayName="EntityDirectoryList";const kt=j.forwardRef(({rows:e=5,className:r},s)=>t.jsxs("div",{ref:s,role:"status","aria-live":"polite","aria-label":"Loading entities",className:p("space-y-3",r),children:[Array.from({length:e}).map((o,a)=>t.jsxs("div",{className:"flex items-center gap-4 p-4 border border-border rounded-lg animate-pulse",children:[t.jsx("div",{className:"w-10 h-10 bg-muted rounded-full flex-shrink-0"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-4 bg-muted rounded w-1/3"}),t.jsx("div",{className:"h-3 bg-muted rounded w-1/2"})]}),t.jsx("div",{className:"h-6 bg-muted rounded-full w-24 flex-shrink-0"}),t.jsx("div",{className:"h-4 bg-muted rounded w-16 flex-shrink-0"})]},a)),t.jsx("span",{className:"sr-only",children:"Loading..."})]}));kt.displayName="EntityDirectoryLoadingState";const Nt=j.forwardRef(({value:e,onChange:r,placeholder:s="Search entities...",className:o},a)=>t.jsxs("div",{className:p("relative",o),children:[t.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none",children:t.jsx("svg",{className:"w-4 h-4 text-muted-foreground","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",children:t.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"})})}),t.jsx("input",{ref:a,type:"search",value:e,onChange:n=>r(n.target.value),placeholder:s,className:p("block w-full pl-10 pr-3 py-2 border border-input rounded-md","bg-background text-foreground placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent","transition-colors"),"aria-label":"Search entities"}),e&&t.jsx("button",{type:"button",onClick:()=>r(""),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}));Nt.displayName="EntityDirectorySearchFilter";const Ct=j.forwardRef(({entities:e,categories:r,title:s,description:o,activeCategory:a,onCategoryChange:n,showCategoryCount:l,getCategoryCount:i,enableSearch:c=!1,searchQuery:m="",onSearchChange:u,searchPlaceholder:d,sortable:x=!1,sort:M,onSortChange:f,showIcons:v=!0,showCategoryBadges:y=!0,showMetric:b=!0,metricLabel:z,compact:C=!1,loading:S=!1,error:k,emptyMessage:A,onRetry:E,emptyState:w,errorState:I,loadingState:H,renderItem:q,className:Z,style:se},ee)=>{const G=r&&r.length>0,D=!S&&!k&&e.length===0,U=!S&&!!k;return t.jsxs("div",{ref:ee,className:p("space-y-6",Z),style:se,children:[t.jsx(yt,{title:s,description:o}),G&&n&&t.jsx($e,{categories:r,activeCategory:a,onCategoryChange:n,showCount:l,getCategoryCount:i}),c&&u&&t.jsx(Nt,{value:m,onChange:u,placeholder:d}),S&&(H||t.jsx(kt,{})),U&&(I||t.jsx(bt,{error:k,onRetry:E})),D&&(w||t.jsx(gt,{message:A})),!S&&!U&&!D&&t.jsx(jt,{entities:e,categories:r,showIcons:v,showCategoryBadges:y,showMetric:b,metricLabel:z,sortable:x,sort:M,onSortChange:f,compact:C,renderItem:q})]})});Ct.displayName="EntityDirectory";function Bs(e){return{variant:e.variant||"minimal",logo:e.logo,navigationItems:e.navigationItems||[],loginButtonText:e.loginButtonText||"Iniciar Sesión",showMobileMenu:e.showMobileMenu??!0}}const Mt=T.forwardRef(({variant:e,logo:r,navigationItems:s,loginButtonText:o,rightActions:a,showMobileMenu:n,className:l,logoClassName:i,navigationClassName:c,navigationItemClassName:m,loginButtonClassName:u,rightActionsClassName:d,mobileMenuButtonClassName:x,renderNavLink:M,id:f,"aria-label":v},y)=>{const[b,z]=T.useState(!1),C=Bs({variant:e,logo:r,navigationItems:s,loginButtonText:o,showMobileMenu:n}),S=C.variant==="modern",k=C.variant==="luxury",A=k&&C.showMobileMenu,E=b?A?"Close navigation panel":"Close menu":A?"Open navigation panel":"Open menu",w=({item:I,className:H,onClick:q})=>M?M({item:I,children:I.label,className:H,onClick:q}):t.jsx("a",{href:I.href,className:H,onClick:q,children:I.label});return t.jsxs(t.Fragment,{children:[t.jsxs("header",{ref:y,id:f,role:"banner","aria-label":v||"Site header",className:p("relative flex w-full items-center gap-3 md:gap-4",k?"px-16 py-2":"px-6 py-1",l),children:[C.logo&&t.jsx("div",{className:p("min-w-0 max-w-[65%] shrink text-ellipsis overflow-hidden text-nowrap md:max-w-[28%] md:basis-auto",S&&"[&_img]:brightness-0 [&_img]:saturate-0 [&_svg]:brightness-0 [&_svg]:saturate-0"),children:typeof C.logo=="string"?t.jsx("p",{className:p("leading-normal",k?"font-heading text-xl font-normal uppercase tracking-[0.04em]":"font-black tracking-wider text-xl",S?"text-black":"text-white",i),children:C.logo}):C.logo}),C.navigationItems.length>0&&t.jsx("div",{className:"hidden min-w-0 flex-1 items-center justify-center px-2 lg:flex",children:t.jsx("nav",{className:p("flex min-w-0 max-w-full items-center overflow-x-auto whitespace-nowrap",k?"gap-4":S?"gap-4 bg-transparent border-0 shadow-none":"gap-4 px-6 py-2 bg-white border border-gray-200 rounded-full shadow-sm",c),"aria-label":"Main navigation",children:C.navigationItems.map((I,H)=>t.jsxs("div",{className:"flex shrink-0 items-center gap-4",children:[H>0&&t.jsx("div",{className:"flex items-center justify-center h-6 w-0","aria-hidden":"true",children:t.jsx("div",{className:"h-0 w-6 rotate-90",children:t.jsx("div",{className:p("h-px w-full",k?"bg-white":"bg-gray-200")})})}),w({item:I,className:p(k?"font-body text-sm font-normal uppercase tracking-[0.05em] leading-5 text-white hover:text-white/80 transition-colors":"text-gray-900 text-sm font-medium leading-5 hover:text-black transition-colors text-ellipsis overflow-hidden text-nowrap",m)})]},I.id))})}),t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2 md:gap-3 lg:gap-4",children:[t.jsx("button",{type:"button",className:p("hidden shrink-0 whitespace-nowrap lg:flex items-center justify-center px-4 py-2 text-sm font-medium leading-5 transition-colors",k?"font-body h-9 bg-white text-zinc-900 border border-zinc-200 rounded-none hover:bg-zinc-100":S?"h-10 bg-zinc-900 text-white border-0 rounded-md hover:bg-zinc-800":"h-9 bg-white border border-gray-200 text-zinc-900 rounded-full hover:bg-zinc-200",u),children:C.loginButtonText}),a&&t.jsx("div",{className:p("hidden shrink-0 items-center gap-2 lg:flex",d),children:a}),C.showMobileMenu&&t.jsx("button",{type:"button",onClick:()=>z(!b),"aria-label":E,"aria-expanded":b,className:p("flex lg:hidden items-center justify-center px-3 py-2 bg-white transition-colors",k?"border border-zinc-200 text-zinc-900 hover:bg-zinc-100":S?"rounded-xl border border-zinc-200 hover:bg-gray-50":"rounded-full hover:bg-gray-50",x),children:b?t.jsx(Je,{className:p("text-gray-900",k?"h-[15px] w-[15px]":"h-4 w-4")}):t.jsx(Rs,{className:p("text-gray-900",k?"h-[15px] w-[15px]":"h-4 w-4")})})]})]}),b&&C.showMobileMenu&&t.jsxs("div",{className:"fixed inset-0 z-40 lg:hidden",role:"dialog","aria-modal":"true","aria-label":"Mobile menu",children:[t.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:()=>z(!1),"aria-hidden":"true"}),t.jsx("div",{className:"fixed right-0 top-0 h-full w-full max-w-sm bg-white shadow-xl",children:t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsx("div",{className:"flex items-center justify-end px-6 py-4",children:t.jsx("button",{type:"button",onClick:()=>z(!1),"aria-label":"Close menu",className:"flex h-10 w-10 items-center justify-center rounded-full bg-zinc-100 text-zinc-900 hover:bg-zinc-200",children:t.jsx(Je,{className:"h-5 w-5"})})}),t.jsx("nav",{className:"flex-1 overflow-y-auto px-6 py-4",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[C.navigationItems.map(I=>t.jsx("div",{children:w({item:I,className:"block text-base font-medium text-zinc-900 hover:text-zinc-600 transition-colors py-2",onClick:()=>z(!1)})},I.id)),t.jsx("div",{className:"mt-4 pt-4 border-t border-zinc-200",children:t.jsx("button",{type:"button",className:"w-full h-12 flex items-center justify-center rounded-full bg-zinc-100 text-zinc-900 font-semibold",children:C.loginButtonText})})]})})]})})]})]})});Mt.displayName="Header";const Hs=e=>({content:e.content,theme:e.theme||{},variant:e.variant||"modern",layout:e.layout||"centered"}),Gs={center:"object-center",top:"object-top",bottom:"object-bottom",left:"object-left",right:"object-right","left-top":"object-left-top","left-bottom":"object-left-bottom","right-top":"object-right-top","right-bottom":"object-right-bottom"},St=T.forwardRef(({content:e,theme:r,variant:s="modern",layout:o="centered",searchForm:a,logo:n,navigation:l,className:i,id:c,"aria-label":m},u)=>{const d=Hs({content:e,theme:r,variant:s,layout:o}),x=d.variant==="modern",M=d.variant==="modern"||d.variant==="luxury";return t.jsx("section",{ref:u,id:c,"aria-label":m||"Hero banner",className:p("relative",x&&"px-4 lg:px-8",i),children:t.jsxs("div",{className:p("relative flex min-h-[600px] flex-col",x?"lg:min-h-[85vh] rounded-2xl overflow-hidden":"lg:min-h-screen","bg-gradient-to-br from-zinc-900 to-zinc-800","text-white"),children:[d.theme.backgroundImage&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"absolute inset-0 z-0",children:t.jsx("img",{src:d.theme.backgroundImage,alt:"",className:p("h-full w-full object-cover",d.theme.backgroundPosition&&Gs[d.theme.backgroundPosition]||"object-center"),loading:"eager",decoding:"async"})}),t.jsx("div",{className:"absolute inset-0 z-[1] bg-gradient-to-b from-black/40 via-black/40 via-[68.25%] to-transparent"})]}),l&&t.jsx("div",{className:"relative z-10",children:l}),t.jsx("div",{className:"relative z-10 flex flex-1 flex-col items-center justify-center px-4 py-12 lg:py-24",children:t.jsxs("div",{className:"w-full max-w-6xl text-center",children:[d.variant==="minimal"&&n&&t.jsx("div",{className:"mb-8 flex items-center justify-center",children:n}),d.content.title&&t.jsxs("div",{className:"mb-8 space-y-4 lg:mb-16 lg:space-y-8",children:[t.jsx("h1",{className:"text-4xl font-bold tracking-wide text-white sm:text-5xl lg:text-6xl",children:d.content.title}),d.content.subtitle&&t.jsx("p",{className:"mt-4 text-xl text-white/90 sm:text-2xl",children:d.content.subtitle})]}),d.variant==="minimal"&&d.content.metrics&&d.content.metrics.length>0&&t.jsx("div",{className:"mb-16",children:t.jsx("div",{className:"mx-auto grid max-w-4xl grid-cols-1 gap-8 md:grid-cols-3",children:d.content.metrics.map((f,v)=>t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"mb-2 text-3xl font-bold text-white md:text-4xl",children:f.value}),t.jsx("div",{className:"text-sm text-white/80 md:text-base",children:f.label})]},v))})}),a&&t.jsx("div",{className:"relative z-20 mx-auto w-full max-w-4xl",children:a})]})}),M&&d.content.metrics&&d.content.metrics.length>0&&t.jsx("div",{className:"absolute bottom-0 right-0 z-10 hidden md:block",children:t.jsx("div",{className:"flex h-20 w-full max-w-4xl items-center gap-6 rounded-tl-2xl bg-white px-8 py-4 text-zinc-900 md:h-24 md:gap-12 md:px-12 md:py-6",children:d.content.metrics.map((f,v)=>t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-xl font-semibold leading-tight md:text-2xl",children:f.value}),t.jsx("div",{className:"text-xs leading-tight text-zinc-600 md:text-sm",children:f.label})]},v))})}),d.variant==="minimal"&&t.jsx("div",{className:"relative z-10 pb-8",children:t.jsx("div",{className:"flex justify-center",children:t.jsx("div",{className:"h-1 w-8 rounded-full bg-white/30","aria-hidden":"true"})})})]})})});St.displayName="HeroBanner";const Tt=[{value:"15-years",label:"15 años fijos",years:15},{value:"20-years",label:"20 años fijos",years:20},{value:"30-years",label:"30 años fijos",years:30},{value:"40-years",label:"40 años fijos",years:40}],Ws=Tt.map(e=>({value:e.value,label:e.label})),ye={propertyPrice:2e7,downPayment:2e5,loanProgram:"30-years",interestRate:6.5},Se={principalAndInterest:"#0a2540",propertyTax:"#4da6c7",hoaFees:"#7fc9e3"},Pt=j.forwardRef(({initialPropertyPrice:e=ye.propertyPrice,initialDownPayment:r=ye.downPayment,initialLoanProgram:s=ye.loanProgram,initialInterestRate:o=ye.interestRate,showPropertyTax:a=!1,showHoaFees:n=!1,className:l,onCalculationChange:i},c)=>{const[m,u]=j.useState(e),[d,x]=j.useState(r),[M,f]=j.useState(s),[v,y]=j.useState(o),[b,z]=j.useState(0),[C,S]=j.useState(0),k=j.useMemo(()=>{const w=Tt.find(H=>H.value===M)?.years||30;return rt({propertyPrice:m,downPayment:d,loanTerm:w,interestRate:v,propertyTax:a?b:void 0,hoaFees:n?C:void 0})},[m,d,M,v,b,C,a,n]);j.useEffect(()=>{i?.(k)},[k,i]);const A=j.useMemo(()=>{const E=[{label:"Principal e Intereses",value:k.breakdown.principalAndInterest,color:Se.principalAndInterest}];return a&&k.breakdown.propertyTax>0&&E.push({label:"Impuesto Predial",value:k.breakdown.propertyTax,color:Se.propertyTax}),n&&k.breakdown.hoaFees>0&&E.push({label:"Cuota HOA",value:k.breakdown.hoaFees,color:Se.hoaFees}),E},[k,a,n]);return t.jsx("div",{ref:c,className:p("w-full",l),children:t.jsx(Ae,{padding:"lg",className:"w-full",children:t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{children:[t.jsx(R,{variant:"h2",className:"mb-2",children:"Calculadora de Hipotecas"}),t.jsx(R,{variant:"body",color:"secondary",className:"max-w-2xl",children:"Calcule el pago mensual de su hipoteca, incluyendo capital e intereses, impuestos prediales y cuota de la asociación de propietarios. Ajuste los valores para obtener una tasa más precisa."})]}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[t.jsxs("div",{className:"space-y-4",children:[t.jsx(re,{label:"Precio de la propiedad",type:"number",value:m,onChange:E=>u(Number(E.target.value)),suffix:"MXN",min:0,step:1e4}),t.jsx(re,{label:"Enganche",type:"number",value:d,onChange:E=>x(Number(E.target.value)),suffix:"MXN",min:0,step:1e4}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(je,{label:"Programa de préstamos",value:M,onChange:E=>f(E.target.value),options:Ws}),t.jsx(re,{label:"Tasa de interés",type:"number",value:v,onChange:E=>y(Number(E.target.value)),suffix:"%",min:0,max:100,step:.1})]}),a&&t.jsx(re,{label:"Impuesto predial mensual",type:"number",value:b,onChange:E=>z(Number(E.target.value)),suffix:"MXN",min:0,step:100}),n&&t.jsx(re,{label:"Cuota HOA mensual",type:"number",value:C,onChange:E=>S(Number(E.target.value)),suffix:"MXN",min:0,step:100})]}),t.jsxs("div",{className:"flex flex-col items-center justify-center",children:[t.jsx(Le,{segments:A,size:320,innerRadiusRatio:.65,centerContent:t.jsxs("div",{className:"text-center",children:[t.jsx(R,{variant:"h1",className:"font-bold mb-1",children:ae(k.totalMonthlyPayment)}),t.jsx(R,{variant:"body-sm",color:"secondary",children:"Tu Pago"})]}),showLegend:!0,legendPosition:"bottom"}),t.jsxs("div",{className:"mt-6 text-center space-y-1",children:[t.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-success",children:[t.jsx($s,{className:"h-4 w-4"}),t.jsx("span",{className:"font-medium",children:"Trending up by 5.2% this month"})]}),t.jsx(R,{variant:"caption",color:"secondary",children:"Showing total visitors for the last 6 months"})]})]})]}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 pt-4 border-t",children:[t.jsxs("div",{children:[t.jsx(R,{variant:"caption",color:"secondary",className:"mb-1",children:"Monto del préstamo"}),t.jsx(R,{variant:"body",weight:"semibold",children:ae(k.loanPrincipal)})]}),t.jsxs("div",{children:[t.jsx(R,{variant:"caption",color:"secondary",className:"mb-1",children:"Pago mensual"}),t.jsx(R,{variant:"body",weight:"semibold",children:ae(k.monthlyPayment)})]}),t.jsxs("div",{children:[t.jsx(R,{variant:"caption",color:"secondary",className:"mb-1",children:"Interés total"}),t.jsx(R,{variant:"body",weight:"semibold",children:ae(k.totalInterest)})]}),t.jsxs("div",{children:[t.jsx(R,{variant:"caption",color:"secondary",className:"mb-1",children:"Total a pagar"}),t.jsx(R,{variant:"body",weight:"semibold",children:ae(k.totalAmount)})]})]})]})})})});Pt.displayName="MortgageCalculator";const Us=(e,r,s)=>{if(r)return"text-white";if(s)switch(e.type){case"Venta":return"bg-stone-950 text-white";case"Desarrollo":return"bg-cyan-600 text-white";case"Renta":return"bg-cyan-950 text-white";case"Remate":return"bg-orange-700 text-white";default:return"bg-stone-950 text-white"}switch(e.variant||qs(e.type)){case"primary":return"bg-primary text-primary-foreground";case"secondary":return"bg-secondary text-secondary-foreground";case"success":return"bg-success text-success-foreground";case"warning":return"bg-warning text-warning-foreground";case"error":return"bg-error text-error-foreground";case"info":return"bg-info text-info-foreground";default:return"bg-secondary text-secondary-foreground"}},qs=e=>{switch(e){case"Venta":return"primary";case"Desarrollo":return"success";case"Renta":return"info";case"Remate":return"warning";default:return"secondary"}},Ks=({property:e,className:r,onLike:s,onImageClick:o,showLikeButton:a=!0,variant:n="default",badgeColors:l})=>{const[i,c]=T.useState(0),[m,u]=T.useState(!1),[d,x]=T.useState(!1),M=V=>{V.preventDefault(),V.stopPropagation();const _=!m;u(_),s?.(e.id,_)},f=V=>{V.preventDefault(),V.stopPropagation(),o?.(i,e.id)},v=(V,_)=>!V||!_?"Price not available":`$${V.toLocaleString()} ${_}`,y=n==="compact",b=n==="minimal",z=p("relative overflow-hidden bg-card transition-all duration-300 ease-out cursor-pointer",y?"rounded-xl hover:shadow-lg border px-4 shadow-md":b?"rounded-2xl w-[454px] flex flex-col gap-4":"rounded-2xl hover:-translate-y-1 hover:shadow-xl shadow-md",r),C=p("relative overflow-hidden",y?"rounded-xl px-4 shadow-md":b?"rounded-2xl":""),S=p("w-full h-full object-cover",y?"":b?"rounded-2xl":"transition-transform duration-300 hover:scale-105"),k=p("absolute z-10 flex flex-wrap gap-2",y?"top-3 left-3":"top-4 left-4"),A=p("font-semibold",y?"rounded-full px-3 py-1 text-xs":b?"rounded-full px-3 h-7 flex items-center justify-center text-base":"px-2 py-1 rounded-lg font-medium uppercase tracking-wide text-xs"),E=p("absolute z-10 cursor-pointer transition-all duration-200",y?"top-3 right-3 p-1 shadow-md rounded-full":b?"top-4 right-4 w-7 h-7 flex items-center justify-center hover:scale-105":"top-4 right-4 bg-background/90 backdrop-blur-sm border border-border/20 text-foreground w-10 h-10 flex items-center justify-center rounded-full hover:bg-background hover:scale-105"),w=p("absolute left-1/2 -translate-x-1/2 flex z-10",b?"bottom-4 gap-2 p-4":"bottom-4 gap-1"),I=p("w-2 h-2 rounded-full border-none cursor-pointer transition-all duration-200 hover:scale-120"),H=p(y?"p-2":b?"flex flex-col gap-2":"p-6"),q=p("font-semibold text-foreground line-clamp-2 leading-tight",y?"text-base mb-2":b?"text-base":"text-lg font-bold mb-2"),Z=p("font-bold",y?"text-lg text-primary mb-2":b?"text-lg text-foreground":"text-xl text-primary mb-2"),se=p("text-muted-foreground",y?"text-sm flex items-center gap-1 mb-4":b?"text-base":"text-base mb-4"),ee=p("flex items-center",y?"justify-between mt-3 mb-4":b?"gap-3":"gap-4 mb-4"),G=p("flex items-center gap-1 text-muted-foreground","text-sm"),D=p("text-sm text-muted-foreground line-clamp-2",y?"mt-2":""),N=!(e.images&&e.images.length>0)||d,ue=()=>t.jsxs("div",{className:"w-full h-full bg-gradient-to-br from-primary/10 via-primary/5 to-secondary/10 flex flex-col items-center justify-center gap-3",children:[t.jsx("div",{className:"rounded-full bg-primary/10 p-6",children:t.jsx(Ss,{size:y?32:48,className:"text-primary/40"})}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"No image available"})]}),ce=t.jsxs("div",{className:z,children:[t.jsxs("div",{className:p(C,y?"h-52":b?"h-[481px]":"aspect-[4/3]"),children:[N?t.jsx(ue,{}):t.jsxs("div",{className:"relative w-full h-full","aria-hidden":"true",children:[t.jsx("img",{src:e.images[i],alt:e.title,className:S,onClick:o?f:void 0,onError:()=>x(!0)}),t.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent to-black/40 pointer-events-none rounded-2xl"})]}),t.jsx("div",{className:k,children:e.transactionTypes.map((V,_)=>{const L=l?.[V.type];return t.jsx("span",{className:p(A,Us(V,L,b)),style:L?{backgroundColor:L}:void 0,children:V.type},_)})}),a&&t.jsx("button",{onClick:M,className:E,"aria-label":m?"Unlike property":"Like property",children:y?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:m?"red":"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:m?"red":"currentColor",className:"h-5 w-5",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733C11.285 4.876 9.623 3.75 7.688 3.75 5.099 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"})}):t.jsx(Cs,{size:20,fill:m?"currentColor":"none",className:b?"text-white":m?"text-destructive":"",strokeWidth:b?1.5:2})}),!y&&!N&&e.images.length>1&&t.jsx("div",{className:w,children:e.images.map((V,_)=>t.jsx("button",{className:p(I,_===i?"bg-white":"bg-white/50"),onClick:L=>{L.preventDefault(),L.stopPropagation(),c(_)},"aria-label":`Go to image ${_+1}`,"aria-current":_===i},_))})]}),t.jsxs("div",{className:H,children:[t.jsx("h3",{className:q,children:e.title}),t.jsx("p",{className:Z,children:v(e.price?.amount,e.price?.currency)}),t.jsxs("p",{className:se,children:[y&&t.jsx(Ps,{size:14}),e.location.city,", ",e.location.state]}),t.jsxs("div",{className:ee,children:[t.jsxs("div",{className:G,children:[t.jsx(xs,{size:b?20:16}),t.jsx("span",{children:e.features.bedrooms})]}),t.jsxs("div",{className:G,children:[t.jsx(ps,{size:b?20:16}),t.jsx("span",{children:e.features.bathrooms})]}),t.jsxs("div",{className:G,children:[t.jsx(gs,{size:b?20:16}),t.jsx("span",{children:e.features.parking})]}),t.jsxs("div",{className:G,children:[t.jsx(Es,{size:b?20:16}),t.jsxs("span",{children:[e.features.area," m²"]})]})]}),e.amenities.length>0&&t.jsx("p",{className:D,children:e.amenities.join(", ")})]})]});return e.href?t.jsx("a",{href:e.href,className:"no-underline text-inherit",children:ce}):ce},Xs=({images:e,onViewAllClick:r,onImageClick:s})=>{const[o,a]=T.useState(!1),[n,l]=T.useState(0),i=e.length,c=T.useCallback(f=>{s?.(f),i!==0&&(l(f),a(!0))},[s,i]),m=T.useCallback(()=>{r?.(),i!==0&&(l(0),a(!0))},[r,i]),u=T.useCallback(()=>{a(!1)},[]),d=T.useCallback(()=>{i<=1||l(f=>f===0?i-1:f-1)},[i]),x=T.useCallback(()=>{i<=1||l(f=>f===i-1?0:f+1)},[i]),M=T.useCallback(f=>{l(f)},[]);return T.useEffect(()=>{if(!o)return;const f=v=>{v.key==="ArrowLeft"&&(v.preventDefault(),d()),v.key==="ArrowRight"&&(v.preventDefault(),x())};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[x,d,o]),{isModalOpen:o,activeImageIndex:n,totalImageCount:i,handlePreviewImageClick:c,handleViewAllPhotosClick:m,handleCloseModal:u,handlePreviousImage:d,handleNextImage:x,handleSelectImage:M}},Zs=({images:e,isOpen:r,activeImageIndex:s,onClose:o,onPrevious:a,onNext:n,onSelectImage:l})=>{const i=e.length;return t.jsx(Oe,{isOpen:r,onClose:o,title:`Foto ${s+1} de ${i}`,size:"xl",children:e[s]?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"relative rounded-2xl overflow-hidden bg-black",children:[t.jsx("img",{src:e[s],alt:`Property image ${s+1}`,className:"w-full max-h-[70vh] object-contain mx-auto"}),i>1&&t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:a,"aria-label":"Previous image",className:"absolute left-3 top-1/2 -translate-y-1/2 rounded-full bg-white/90 p-2 text-foreground shadow-md transition hover:bg-white",children:t.jsx(ws,{className:"h-5 w-5"})}),t.jsx("button",{type:"button",onClick:n,"aria-label":"Next image",className:"absolute right-3 top-1/2 -translate-y-1/2 rounded-full bg-white/90 p-2 text-foreground shadow-md transition hover:bg-white",children:t.jsx(ks,{className:"h-5 w-5"})})]})]}),i>1&&t.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1",children:e.map((c,m)=>t.jsx("button",{type:"button",onClick:()=>l(m),className:p("w-16 h-16 sm:w-20 sm:h-20 rounded-lg overflow-hidden border-2 flex-shrink-0 transition",m===s?"border-primary":"border-transparent"),"aria-label":`Go to image ${m+1}`,"aria-current":m===s,children:t.jsx("img",{src:c,alt:`Thumbnail ${m+1}`,className:"w-full h-full object-cover"})},`${c}-${m}`))})]}):t.jsx("div",{className:"w-full bg-muted flex items-center justify-center rounded-2xl p-8",children:t.jsx("span",{className:"text-muted-foreground",children:"No image"})})})},zt=T.forwardRef(({images:e,transactionType:r,onViewAllClick:s,onImageClick:o,className:a},n)=>{const l=T.useMemo(()=>e.filter(v=>typeof v=="string"&&v.trim().length>0).slice(0,5),[e]),{activeImageIndex:i,isModalOpen:c,handlePreviewImageClick:m,handleCloseModal:u,handlePreviousImage:d,handleNextImage:x,handleSelectImage:M}=Xs({images:l,onImageClick:o,onViewAllClick:s}),f=l;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:n,className:p("w-full h-[340px] sm:h-[460px] md:h-[560px] grid grid-cols-2 gap-2 auto-rows-fr",a),children:[t.jsx("div",{className:"relative col-span-2 sm:col-span-1 sm:row-span-2 rounded-2xl overflow-hidden group cursor-pointer",children:f[0]?t.jsxs(t.Fragment,{children:[t.jsx("img",{src:f[0],alt:"Property main view",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>m(0)}),r&&t.jsx("div",{className:"absolute top-4 left-4 bg-white rounded-full px-4 py-2 shadow-md",children:t.jsx("span",{className:"text-sm font-medium text-foreground",children:r})})]}):t.jsx("div",{className:"w-full h-full bg-muted flex items-center justify-center",children:t.jsx("span",{className:"text-muted-foreground",children:"No image"})})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:f[1]?t.jsx("img",{src:f[1],alt:"Property view 2",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>m(1)}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:f[2]?t.jsx("img",{src:f[2],alt:"Property view 3",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>m(2)}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:f[3]?t.jsx("img",{src:f[3],alt:"Property view 4",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>m(3)}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:f[4]?t.jsx("img",{src:f[4],alt:"Property view 5",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>m(4)}):t.jsx("div",{className:"w-full h-full bg-muted"})})]}),t.jsx(Zs,{images:l,isOpen:c,activeImageIndex:i,onClose:u,onPrevious:d,onNext:x,onSelectImage:M})]})});zt.displayName="PropertyGallery";function Js({onSubmit:e,defaultValues:r,propertyTypeOptions:s,transactionTypeOptions:o,locationOptions:a}){const n=j.useMemo(()=>({propertyType:r?.propertyType||s[0]?.value||"",transactionType:r?.transactionType||o[0]?.value||"",location:r?.location||a[0]?.value||""}),[r,s,o,a]),[l,i]=j.useState(n),c=j.useCallback(u=>{i(d=>{const x=typeof u=="function"?u(d):u;return JSON.stringify(d)===JSON.stringify(x)?d:x})},[]),m=j.useCallback(u=>{u.preventDefault(),e?.({propertyType:l.propertyType,transactionType:l.transactionType,location:l.location})},[l,e]);return{formData:l,setFormData:c,handleSubmit:m,propertyTypeOptions:s,transactionTypeOptions:o,locationOptions:a}}const Fe=({variant:e="pill",isSubmitting:r,className:s})=>{const o="relative size-12 rounded-full bg-black text-white transition-all duration-200 hover:bg-black/90 hover:shadow-md flex items-center justify-center",a="w-full";return e==="mobile"?t.jsxs(X,{type:"submit",className:p(a,s),children:[t.jsx(Ie,{className:"h-4 w-4"}),r?"Searching...":"Search"]}):t.jsx(X,{type:"submit",size:"icon",variant:"ghost","aria-label":r?"Searching...":"Search properties",className:p(o,s),disabled:r,children:t.jsx(Ie,{className:"h-6 w-6"})})},F=({label:e,options:r,value:s,onChange:o,className:a,containerClassName:n})=>{const l=j.useMemo(()=>r.map(c=>({value:c.value,label:c.label})),[r]),i=j.useCallback(c=>{o(c.target.value)},[o]);return t.jsx("div",{className:p("flex min-w-0 flex-1 items-center",n),children:t.jsx("div",{className:"flex-1 px-6 py-3.5",children:t.jsx(je,{label:e,options:l,value:s,className:p("w-full border-none bg-transparent focus:outline-none focus:ring-0 text-base text-muted-foreground h-auto p-0",a),labelClassName:"text-sm font-semibold text-foreground mb-1 text-left",onChange:i})})})},Qs=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,error:n,className:l})=>t.jsx("div",{className:p("rounded-xl bg-white shadow-lg p-6",l),children:t.jsxs("form",{className:"space-y-6",onSubmit:a,children:[t.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[t.jsx(F,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"flex items-center",className:"placeholder:text-muted-foreground",onChange:s("propertyType")}),t.jsx(F,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,containerClassName:"flex items-center",className:"placeholder:text-muted-foreground",onChange:s("transactionType")}),t.jsx(F,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex items-center",className:"placeholder:text-muted-foreground",onChange:s("location")})]}),t.jsxs(X,{type:"submit",className:"w-full",size:"lg",disabled:o,children:[t.jsx(Ie,{className:"h-4 w-4 mr-2"}),o?"Searching...":"Search Properties"]}),n&&t.jsx("div",{className:"bg-destructive/10 text-destructive mt-3 rounded-lg p-3 text-center text-sm",role:"alert",children:n})]})}),Ys=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n})=>t.jsx("form",{className:p("w-full max-w-md",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex flex-col gap-3 rounded-2xl bg-white p-4 shadow-lg",children:[t.jsx(F,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"flex items-center",onChange:s("propertyType")}),t.jsx(F,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,containerClassName:"flex items-center",onChange:s("transactionType")}),t.jsx(F,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex items-center",onChange:s("location")}),t.jsx(Fe,{variant:"mobile",isSubmitting:o})]})}),ne=({className:e})=>t.jsx("div",{className:p("w-px self-stretch bg-gray-300 mx-6",e)}),eo=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n,buttonLabel:l="Conoce Más"})=>t.jsx("form",{className:p("relative mx-auto w-full max-w-5xl",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex items-stretch bg-white border border-gray-300 shadow-xl relative z-10 px-3",children:[t.jsx(F,{label:"Tipo de propiedad",options:r.propertyTypeOptions,value:e.propertyType,onChange:s("propertyType")}),t.jsx(ne,{}),t.jsx(F,{label:"Transacción",options:r.transactionTypeOptions,value:e.transactionType,onChange:s("transactionType")}),t.jsx(ne,{}),t.jsx(F,{label:"Ciudad",options:r.locationOptions,value:e.location,containerClassName:"flex min-w-0 flex-[1.2] items-center",onChange:s("location")}),t.jsx("div",{className:"flex items-center py-3",children:t.jsx("button",{type:"submit",disabled:o,className:"h-10 px-4 py-2 bg-zinc-900 text-white text-sm font-medium rounded-md hover:bg-zinc-800 transition-colors disabled:opacity-50 whitespace-nowrap","aria-label":o?"Buscando propiedades...":l,children:o?"Buscando...":l})})]})}),to=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n})=>t.jsx("form",{className:p("relative mx-auto w-full max-w-5xl",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex items-stretch rounded-full bg-white border border-gray-300 shadow-xl relative z-10 p-1.5",children:[t.jsx(F,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,onChange:s("propertyType")}),t.jsx(ne,{}),t.jsx(F,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,onChange:s("transactionType")}),t.jsx(ne,{}),t.jsx(F,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex min-w-0 flex-[1.2] items-center",onChange:s("location")}),t.jsx("div",{className:"flex items-center",children:t.jsx(Fe,{variant:"pill",isSubmitting:o,className:"bg-black"})})]})}),ro=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a})=>t.jsx("form",{className:"mt-4 block md:hidden",onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"grid grid-cols-1 gap-3 rounded-2xl bg-white p-4 shadow-lg",children:[t.jsx(F,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"flex items-center",onChange:s("propertyType")}),t.jsx(F,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,containerClassName:"flex items-center",onChange:s("transactionType")}),t.jsx(F,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex items-center",onChange:s("location")}),t.jsx(Fe,{variant:"mobile",isSubmitting:o})]})}),so=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n,buttonLabel:l="Conoce Más"})=>t.jsx("form",{className:p("relative mx-auto w-full max-w-5xl",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex items-stretch rounded-lg bg-white border border-gray-300 shadow-xl relative z-10 px-3",children:[t.jsx(F,{label:"Tipo de propiedad",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"rounded-tl-full rounded-bl-full",onChange:s("propertyType")}),t.jsx(ne,{}),t.jsx(F,{label:"Transacción",options:r.transactionTypeOptions,value:e.transactionType,onChange:s("transactionType")}),t.jsx(ne,{}),t.jsx(F,{label:"Ciudad",options:r.locationOptions,value:e.location,containerClassName:"flex min-w-0 flex-[1.2] items-center",onChange:s("location")}),t.jsx("div",{className:"flex items-center py-3",children:t.jsx("button",{type:"submit",disabled:o,className:"h-10 px-4 py-2 bg-zinc-900 text-white text-sm font-medium rounded-md hover:bg-zinc-800 transition-colors disabled:opacity-50 whitespace-nowrap","aria-label":o?"Buscando propiedades...":l,children:o?"Buscando...":l})})]})}),Qe={minimal:to,modern:so,luxury:eo,compact:Ys,card:Qs},Et=({onSubmit:e,defaultValues:r,className:s,variant:o="minimal",propertyTypeOptions:a,transactionTypeOptions:n,locationOptions:l,buttonLabel:i})=>{const[c,m]=j.useState(!1),[u,d]=j.useState(null),x=Js({onSubmit:e,defaultValues:r,propertyTypeOptions:a,transactionTypeOptions:n,locationOptions:l}),{formData:M,setFormData:f,handleSubmit:v,propertyTypeOptions:y,transactionTypeOptions:b,locationOptions:z}=x,C=j.useCallback(async E=>{E.preventDefault(),d(null),m(!0);try{await v(E)}catch(w){const I=w instanceof Error?w.message:"Search failed. Please try again.";d(I),console.error("Search error:",w)}finally{m(!1)}},[v]),S=j.useCallback(E=>w=>{d(null),f(I=>({...I,[E]:w}))},[f]),k=j.useMemo(()=>({propertyTypeOptions:y,transactionTypeOptions:b,locationOptions:z}),[y,b,z]),A=Qe[o]||Qe.minimal;return t.jsxs(t.Fragment,{children:[t.jsx(A,{formData:M,options:k,isSubmitting:c,error:u,className:s,onFieldChange:S,onSubmit:C,...(o==="modern"||o==="luxury")&&{buttonLabel:i}}),o==="minimal"&&t.jsx(ro,{formData:M,options:k,isSubmitting:c,onFieldChange:S,onSubmit:C})]})};Et.displayName="SearchFeature";const oo=({href:e,children:r})=>t.jsx("a",{href:e,className:"sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-50 focus:px-4 focus:py-2 focus:bg-primary focus:text-white focus:rounded",children:r}),ao={spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem"},radius:{none:"0",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},typography:{fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}]},fontWeight:{thin:"100",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"}},shadows:{none:"none",xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",DEFAULT:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",md:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",lg:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",xl:"0 25px 50px -12px rgb(0 0 0 / 0.25)"},zIndex:{dropdown:1e3,sticky:1020,fixed:1030,modalBackdrop:1040,modal:1050,popover:1060,tooltip:1070,toast:1080},duration:{instant:"0ms",fast:"150ms",normal:"300ms",slow:"500ms"},easing:{linear:"linear",in:"ease-in",out:"ease-out",inOut:"ease-in-out"}},It={button:{size:{sm:"h-9 px-3 text-sm",md:"h-10 px-4 py-2",lg:"h-11 px-8",icon:"h-10 w-10"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"}},input:{size:{sm:"h-9 px-3 text-sm",md:"h-10 px-3 py-2",lg:"h-11 px-3 py-2"}},card:{variant:{default:"bg-card text-card-foreground",elevated:"bg-card text-card-foreground shadow-lg",outlined:"bg-card text-card-foreground border-2"}}},Rt={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},At={withOpacity:(e,r)=>r!==void 0?`hsl(var(${e}) / ${r})`:`hsl(var(${e}))`,get:e=>`hsl(var(--${e}))`},Lt={generateId:(e="ds")=>`${e}-${Math.random().toString(36).substr(2,9)}`,focus:{visible:"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",within:"focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2"},sr:{only:"absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0",not:"not-sr-only"}},$t={icon:{xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",xl:"w-8 h-8"},avatar:{xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10",lg:"w-12 h-12",xl:"w-16 h-16"}},Ot={fade:{in:"animate-in fade-in duration-200",out:"animate-out fade-out duration-200"},slide:{inFromLeft:"animate-in slide-in-from-left duration-200",inFromRight:"animate-in slide-in-from-right duration-200",inFromTop:"animate-in slide-in-from-top duration-200",inFromBottom:"animate-in slide-in-from-bottom duration-200"},scale:{in:"animate-in scale-in duration-200",out:"animate-out scale-out duration-200"}},Ft={container:{responsive:"container mx-auto px-4 sm:px-6 lg:px-8",fluid:"w-full max-w-none",centered:"container mx-auto px-4 flex items-center justify-center min-h-screen"},grid:{responsive:"grid gap-4 sm:gap-6 lg:gap-8",cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5",6:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6"}},flex:{center:"flex items-center justify-center",between:"flex items-center justify-between",start:"flex items-center justify-start",end:"flex items-center justify-end",col:"flex flex-col",colCenter:"flex flex-col items-center justify-center"}},_t={isDark:()=>typeof window>"u"?!1:document.documentElement.classList.contains("dark"),toggle:()=>{typeof window>"u"||document.documentElement.classList.toggle("dark")},set:e=>{typeof window>"u"||document.documentElement.classList.toggle("dark",e==="dark")}},Vt={debounce:(e,r)=>{let s;return(...o)=>{clearTimeout(s),s=setTimeout(()=>e(...o),r)}},throttle:(e,r)=>{let s;return(...o)=>{s||(e(...o),s=!0,setTimeout(()=>s=!1,r))}}},Dt=T.createContext(null),no=()=>{const e=T.useContext(Dt);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},lo={name:"light",colors:{primary:"#007bff",secondary:"#6c757d",success:"#28a745",warning:"#ffc107",error:"#dc3545",info:"#17a2b8",background:"#ffffff",surface:"#f8f9fa",text:"#212529",textSecondary:"#6c757d",border:"#dee2e6",borderLight:"#e9ecef"},shapes:{borderRadius:{small:"4px",medium:"8px",large:"12px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)",medium:"0 3px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12)",large:"0 10px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.10)",xl:"0 15px 25px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.05)"}},io={name:"dark",colors:{primary:"#0d6efd",secondary:"#6c757d",success:"#198754",warning:"#fd7e14",error:"#dc3545",info:"#0dcaf0",background:"#121212",surface:"#1e1e1e",text:"#ffffff",textSecondary:"#adb5bd",border:"#495057",borderLight:"#343a40"},shapes:{borderRadius:{small:"4px",medium:"8px",large:"12px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.4)",medium:"0 3px 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3)",large:"0 10px 20px rgba(0, 0, 0, 0.4), 0 3px 6px rgba(0, 0, 0, 0.3)",xl:"0 15px 25px rgba(0, 0, 0, 0.4), 0 5px 10px rgba(0, 0, 0, 0.3)"}},co={name:"corporate",colors:{primary:"#1a365d",secondary:"#2d3748",success:"#38a169",warning:"#d69e2e",error:"#e53e3e",info:"#3182ce",background:"#f7fafc",surface:"#ffffff",text:"#1a202c",textSecondary:"#4a5568",border:"#e2e8f0",borderLight:"#edf2f7"},shapes:{borderRadius:{small:"2px",medium:"4px",large:"6px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:'Georgia, "Times New Roman", serif',fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06)",medium:"0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06)",large:"0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04)"}},mo={name:"minimal",colors:{primary:"#000000",secondary:"#666666",success:"#00aa00",warning:"#ffaa00",error:"#aa0000",info:"#00aaaa",background:"#ffffff",surface:"#fafafa",text:"#000000",textSecondary:"#666666",border:"#cccccc",borderLight:"#e0e0e0"},shapes:{borderRadius:{small:"0px",medium:"0px",large:"0px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:"Helvetica, Arial, sans-serif",fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"none",medium:"none",large:"none",xl:"none"}},Te={light:lo,dark:io,corporate:co,minimal:mo},Bt=ve.createEvent(),Ht=ve.createEvent(),Gt=ve.createEvent(),Y=ve.createStore(Te.light).on(Bt,(e,r)=>Te[r]||e).on(Ht,(e,r)=>r).on(Gt,()=>Te.light),uo=Y.map(e=>e.name),po=Y.map(e=>e.colors);Y.map(e=>e.shapes);Y.map(e=>e.typography);Y.map(e=>e.spacing);Y.map(e=>e.shadows);const fo=({children:e})=>{const s={theme:Ut.useUnit(Y)};return t.jsx(Dt.Provider,{value:s,children:e})};exports.$theme=Y;exports.$themeColors=po;exports.$themeName=uo;exports.AuthLayout=Vs;exports.Button=X;exports.Card=Ae;exports.CategoryChips=$e;exports.Chip=we;exports.CompoundCard=Kr;exports.ConfirmModal=ss;exports.DashboardLayout=_s;exports.DonutChart=Le;exports.EntityDirectory=Ct;exports.Header=Mt;exports.HeroBanner=St;exports.Input=re;exports.MarketingLayout=Ds;exports.Modal=Oe;exports.ModalWithActions=xt;exports.MortgageCalculator=Pt;exports.PageLayout=ke;exports.PropertyCard=Ks;exports.PropertyGallery=zt;exports.SearchFeature=Et;exports.Select=je;exports.SkipLink=oo;exports.Text=R;exports.ThemeProvider=fo;exports.a11y=Lt;exports.accessibilityUtils=Lt;exports.animationUtils=Ot;exports.animations=Ot;exports.breakpoints=Rt;exports.calculateMortgage=rt;exports.cn=p;exports.colorUtils=At;exports.colors=At;exports.componentSizes=$t;exports.componentVariants=It;exports.countEntitiesByCategory=tt;exports.designSystem=ao;exports.filterEntitiesByCategory=Ye;exports.formatCurrency=ae;exports.formatPercentage=Kt;exports.layout=Ft;exports.layoutUtils=Ft;exports.performance=Vt;exports.performanceUtils=Vt;exports.resetTheme=Gt;exports.responsiveBreakpoints=Rt;exports.setCustomTheme=Ht;exports.setTheme=Bt;exports.sizes=$t;exports.sortEntities=et;exports.theme=_t;exports.themeUtils=_t;exports.useEntityFilter=Jr;exports.useTheme=no;exports.validateMortgageInput=Xt;exports.variants=It;
97
92
  //# sourceMappingURL=design-system.cjs.js.map