@homlista-devs/ui 1.0.1 → 1.2.0

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,62 +1,72 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),C=require("react"),Nr=require("effector-react"),ce=require("effector");function Sr(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const k=Sr(C);function ze(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function zr(...e){return r=>{let t=!1;const s=e.map(n=>{const a=ze(n,r);return!t&&typeof a=="function"&&(t=!0),a});if(t)return()=>{for(let n=0;n<s.length;n++){const a=s[n];typeof a=="function"?a():ze(e[n],null)}}}}function Er(e){const r=Rr(e),t=k.forwardRef((s,n)=>{const{children:a,...i}=s,c=k.Children.toArray(a),l=c.find(Ar);if(l){const d=l.props.children,g=c.map(m=>m===l?k.Children.count(d)>1?k.Children.only(null):k.isValidElement(d)?d.props.children:null:m);return o.jsx(r,{...i,ref:n,children:k.isValidElement(d)?k.cloneElement(d,void 0,g):null})}return o.jsx(r,{...i,ref:n,children:a})});return t.displayName=`${e}.Slot`,t}var Mr=Er("Slot");function Rr(e){const r=k.forwardRef((t,s)=>{const{children:n,...a}=t;if(k.isValidElement(n)){const i=Ir(n),c=Lr(a,n.props);return n.type!==k.Fragment&&(c.ref=s?zr(s,i):i),k.cloneElement(n,c)}return k.Children.count(n)>1?k.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Pr=Symbol("radix.slottable");function Ar(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pr}function Lr(e,r){const t={...r};for(const s in r){const n=e[s],a=r[s];/^on[A-Z]/.test(s)?n&&a?t[s]=(...c)=>{const l=a(...c);return n(...c),l}:n&&(t[s]=n):s==="style"?t[s]={...n,...a}:s==="className"&&(t[s]=[n,a].filter(Boolean).join(" "))}return{...e,...t}}function Ir(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}function Ve(e){var r,t,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(r=0;r<n;r++)e[r]&&(t=Ve(e[r]))&&(s&&(s+=" "),s+=t)}else for(t in e)e[t]&&(s&&(s+=" "),s+=t);return s}function De(){for(var e,r,t=0,s="",n=arguments.length;t<n;t++)(e=arguments[t])&&(r=Ve(e))&&(s&&(s+=" "),s+=r);return s}const ve="-",Tr=e=>{const r=Dr(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{const c=i.split(ve);return c[0]===""&&c.length!==1&&c.shift(),Fe(c,r)||Vr(i)},getConflictingClassGroupIds:(i,c)=>{const l=t[i]||[];return c&&s[i]?[...l,...s[i]]:l}}},Fe=(e,r)=>{if(e.length===0)return r.classGroupId;const t=e[0],s=r.nextPart.get(t),n=s?Fe(e.slice(1),s):void 0;if(n)return n;if(r.validators.length===0)return;const a=e.join(ve);return r.validators.find(({validator:i})=>i(a))?.classGroupId},Ee=/^\[(.+)\]$/,Vr=e=>{if(Ee.test(e)){const r=Ee.exec(e)[1],t=r?.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},Dr=e=>{const{theme:r,classGroups:t}=e,s={nextPart:new Map,validators:[]};for(const n in t)xe(t[n],s,n,r);return s},xe=(e,r,t,s)=>{e.forEach(n=>{if(typeof n=="string"){const a=n===""?r:Me(r,n);a.classGroupId=t;return}if(typeof n=="function"){if(Fr(n)){xe(n(s),r,t,s);return}r.validators.push({validator:n,classGroupId:t});return}Object.entries(n).forEach(([a,i])=>{xe(i,Me(r,a),t,s)})})},Me=(e,r)=>{let t=e;return r.split(ve).forEach(s=>{t.nextPart.has(s)||t.nextPart.set(s,{nextPart:new Map,validators:[]}),t=t.nextPart.get(s)}),t},Fr=e=>e.isThemeGetter,_r=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,s=new Map;const n=(a,i)=>{t.set(a,i),r++,r>e&&(r=0,s=t,t=new Map)};return{get(a){let i=t.get(a);if(i!==void 0)return i;if((i=s.get(a))!==void 0)return n(a,i),i},set(a,i){t.has(a)?t.set(a,i):n(a,i)}}},be="!",ye=":",$r=ye.length,Gr=e=>{const{prefix:r,experimentalParseClassName:t}=e;let s=n=>{const a=[];let i=0,c=0,l=0,d;for(let w=0;w<n.length;w++){let S=n[w];if(i===0&&c===0){if(S===ye){a.push(n.slice(l,w)),l=w+$r;continue}if(S==="/"){d=w;continue}}S==="["?i++:S==="]"?i--:S==="("?c++:S===")"&&c--}const g=a.length===0?n:n.substring(l),m=Br(g),b=m!==g,N=d&&d>l?d-l:void 0;return{modifiers:a,hasImportantModifier:b,baseClassName:m,maybePostfixModifierPosition:N}};if(r){const n=r+ye,a=s;s=i=>i.startsWith(n)?a(i.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(t){const n=s;s=a=>t({className:a,parseClassName:n})}return s},Br=e=>e.endsWith(be)?e.substring(0,e.length-1):e.startsWith(be)?e.substring(1):e,Wr=e=>{const r=Object.fromEntries(e.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const n=[];let a=[];return s.forEach(i=>{i[0]==="["||r[i]?(n.push(...a.sort(),i),a=[]):a.push(i)}),n.push(...a.sort()),n}},Ur=e=>({cache:_r(e.cacheSize),parseClassName:Gr(e),sortModifiers:Wr(e),...Tr(e)}),Or=/\s+/,Hr=(e,r)=>{const{parseClassName:t,getClassGroupId:s,getConflictingClassGroupIds:n,sortModifiers:a}=r,i=[],c=e.trim().split(Or);let l="";for(let d=c.length-1;d>=0;d-=1){const g=c[d],{isExternal:m,modifiers:b,hasImportantModifier:N,baseClassName:w,maybePostfixModifierPosition:S}=t(g);if(m){l=g+(l.length>0?" "+l:l);continue}let M=!!S,R=s(M?w.substring(0,S):w);if(!R){if(!M){l=g+(l.length>0?" "+l:l);continue}if(R=s(w),!R){l=g+(l.length>0?" "+l:l);continue}M=!1}const D=a(b).join(":"),$=N?D+be:D,L=$+R;if(i.includes(L))continue;i.push(L);const I=n(R,M);for(let F=0;F<I.length;++F){const G=I[F];i.push($+G)}l=g+(l.length>0?" "+l:l)}return l};function qr(){let e=0,r,t,s="";for(;e<arguments.length;)(r=arguments[e++])&&(t=_e(r))&&(s&&(s+=" "),s+=t);return s}const _e=e=>{if(typeof e=="string")return e;let r,t="";for(let s=0;s<e.length;s++)e[s]&&(r=_e(e[s]))&&(t&&(t+=" "),t+=r);return t};function Zr(e,...r){let t,s,n,a=i;function i(l){const d=r.reduce((g,m)=>m(g),e());return t=Ur(d),s=t.cache.get,n=t.cache.set,a=c,c(l)}function c(l){const d=s(l);if(d)return d;const g=Hr(l,t);return n(l,g),g}return function(){return a(qr.apply(null,arguments))}}const z=e=>{const r=t=>t[e]||[];return r.isThemeGetter=!0,r},$e=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ge=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Kr=/^\d+\/\d+$/,Qr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jr=/\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$/,Xr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Yr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,et=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Y=e=>Kr.test(e),y=e=>!!e&&!Number.isNaN(Number(e)),O=e=>!!e&&Number.isInteger(Number(e)),ge=e=>e.endsWith("%")&&y(e.slice(0,-1)),W=e=>Qr.test(e),rt=()=>!0,tt=e=>Jr.test(e)&&!Xr.test(e),Be=()=>!1,ot=e=>Yr.test(e),st=e=>et.test(e),nt=e=>!u(e)&&!f(e),at=e=>ee(e,Oe,Be),u=e=>$e.test(e),Q=e=>ee(e,He,tt),pe=e=>ee(e,mt,y),Re=e=>ee(e,We,Be),it=e=>ee(e,Ue,st),ie=e=>ee(e,qe,ot),f=e=>Ge.test(e),te=e=>re(e,He),lt=e=>re(e,ut),Pe=e=>re(e,We),ct=e=>re(e,Oe),dt=e=>re(e,Ue),le=e=>re(e,qe,!0),ee=(e,r,t)=>{const s=$e.exec(e);return s?s[1]?r(s[1]):t(s[2]):!1},re=(e,r,t=!1)=>{const s=Ge.exec(e);return s?s[1]?r(s[1]):t:!1},We=e=>e==="position"||e==="percentage",Ue=e=>e==="image"||e==="url",Oe=e=>e==="length"||e==="size"||e==="bg-size",He=e=>e==="length",mt=e=>e==="number",ut=e=>e==="family-name",qe=e=>e==="shadow",ft=()=>{const e=z("color"),r=z("font"),t=z("text"),s=z("font-weight"),n=z("tracking"),a=z("leading"),i=z("breakpoint"),c=z("container"),l=z("spacing"),d=z("radius"),g=z("shadow"),m=z("inset-shadow"),b=z("text-shadow"),N=z("drop-shadow"),w=z("blur"),S=z("perspective"),M=z("aspect"),R=z("ease"),D=z("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...L(),f,u],F=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],x=()=>[f,u,l],T=()=>[Y,"full","auto",...x()],J=()=>[O,"none","subgrid",f,u],X=()=>["auto",{span:["full",O,f,u]},O,f,u],U=()=>[O,"auto",f,u],B=()=>["auto","min","max","fr",f,u],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],v=()=>["auto",...x()],j=()=>[Y,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],h=()=>[e,f,u],ke=()=>[...L(),Pe,Re,{position:[f,u]}],je=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ce=()=>["auto","cover","contain",ct,at,{size:[f,u]}],ue=()=>[ge,te,Q],A=()=>["","none","full",d,f,u],V=()=>["",y,te,Q],oe=()=>["solid","dashed","dotted","double"],Ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>[y,ge,Pe,Re],Se=()=>["","none",w,f,u],se=()=>["none",y,f,u],ne=()=>["none",y,f,u],fe=()=>[y,f,u],ae=()=>[Y,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[W],breakpoint:[W],color:[rt],container:[W],"drop-shadow":[W],ease:["in","out","in-out"],font:[nt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[W],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[W],shadow:[W],spacing:["px",y],text:[W],"text-shadow":[W],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Y,u,f,M]}],container:["container"],columns:[{columns:[y,u,f,c]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:I()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[O,"auto",f,u]}],basis:[{basis:[Y,"full","auto",c,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[y,Y,"auto","initial","none",u]}],grow:[{grow:["",y,f,u]}],shrink:[{shrink:["",y,f,u]}],order:[{order:[O,"first","last","none",f,u]}],"grid-cols":[{"grid-cols":J()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":J()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:v()}],mx:[{mx:v()}],my:[{my:v()}],ms:[{ms:v()}],me:[{me:v()}],mt:[{mt:v()}],mr:[{mr:v()}],mb:[{mb:v()}],ml:[{ml:v()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],w:[{w:[c,"screen",...j()]}],"min-w":[{"min-w":[c,"screen","none",...j()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",t,te,Q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,f,pe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ge,u]}],"font-family":[{font:[lt,u,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:[n,f,u]}],"line-clamp":[{"line-clamp":[y,"none",f,pe]}],leading:[{leading:[a,...x()]}],"list-image":[{"list-image":["none",f,u]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",f,u]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:h()}],"text-color":[{text:h()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[y,"from-font","auto",f,Q]}],"text-decoration-color":[{decoration:h()}],"underline-offset":[{"underline-offset":[y,"auto",f,u]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",f,u]}],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",f,u]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ke()}],"bg-repeat":[{bg:je()}],"bg-size":[{bg:Ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},O,f,u],radial:["",f,u],conic:[O,f,u]},dt,it]}],"bg-color":[{bg:h()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:h()}],"gradient-via":[{via:h()}],"gradient-to":[{to:h()}],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:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":V()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:h()}],"border-color-x":[{"border-x":h()}],"border-color-y":[{"border-y":h()}],"border-color-s":[{"border-s":h()}],"border-color-e":[{"border-e":h()}],"border-color-t":[{"border-t":h()}],"border-color-r":[{"border-r":h()}],"border-color-b":[{"border-b":h()}],"border-color-l":[{"border-l":h()}],"divide-color":[{divide:h()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[y,f,u]}],"outline-w":[{outline:["",y,te,Q]}],"outline-color":[{outline:h()}],shadow:[{shadow:["","none",g,le,ie]}],"shadow-color":[{shadow:h()}],"inset-shadow":[{"inset-shadow":["none",m,le,ie]}],"inset-shadow-color":[{"inset-shadow":h()}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:h()}],"ring-offset-w":[{"ring-offset":[y,Q]}],"ring-offset-color":[{"ring-offset":h()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":h()}],"text-shadow":[{"text-shadow":["none",b,le,ie]}],"text-shadow-color":[{"text-shadow":h()}],opacity:[{opacity:[y,f,u]}],"mix-blend":[{"mix-blend":[...Ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ne()}],"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":[y]}],"mask-image-linear-from-pos":[{"mask-linear-from":E()}],"mask-image-linear-to-pos":[{"mask-linear-to":E()}],"mask-image-linear-from-color":[{"mask-linear-from":h()}],"mask-image-linear-to-color":[{"mask-linear-to":h()}],"mask-image-t-from-pos":[{"mask-t-from":E()}],"mask-image-t-to-pos":[{"mask-t-to":E()}],"mask-image-t-from-color":[{"mask-t-from":h()}],"mask-image-t-to-color":[{"mask-t-to":h()}],"mask-image-r-from-pos":[{"mask-r-from":E()}],"mask-image-r-to-pos":[{"mask-r-to":E()}],"mask-image-r-from-color":[{"mask-r-from":h()}],"mask-image-r-to-color":[{"mask-r-to":h()}],"mask-image-b-from-pos":[{"mask-b-from":E()}],"mask-image-b-to-pos":[{"mask-b-to":E()}],"mask-image-b-from-color":[{"mask-b-from":h()}],"mask-image-b-to-color":[{"mask-b-to":h()}],"mask-image-l-from-pos":[{"mask-l-from":E()}],"mask-image-l-to-pos":[{"mask-l-to":E()}],"mask-image-l-from-color":[{"mask-l-from":h()}],"mask-image-l-to-color":[{"mask-l-to":h()}],"mask-image-x-from-pos":[{"mask-x-from":E()}],"mask-image-x-to-pos":[{"mask-x-to":E()}],"mask-image-x-from-color":[{"mask-x-from":h()}],"mask-image-x-to-color":[{"mask-x-to":h()}],"mask-image-y-from-pos":[{"mask-y-from":E()}],"mask-image-y-to-pos":[{"mask-y-to":E()}],"mask-image-y-from-color":[{"mask-y-from":h()}],"mask-image-y-to-color":[{"mask-y-to":h()}],"mask-image-radial":[{"mask-radial":[f,u]}],"mask-image-radial-from-pos":[{"mask-radial-from":E()}],"mask-image-radial-to-pos":[{"mask-radial-to":E()}],"mask-image-radial-from-color":[{"mask-radial-from":h()}],"mask-image-radial-to-color":[{"mask-radial-to":h()}],"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":L()}],"mask-image-conic-pos":[{"mask-conic":[y]}],"mask-image-conic-from-pos":[{"mask-conic-from":E()}],"mask-image-conic-to-pos":[{"mask-conic-to":E()}],"mask-image-conic-from-color":[{"mask-conic-from":h()}],"mask-image-conic-to-color":[{"mask-conic-to":h()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ke()}],"mask-repeat":[{mask:je()}],"mask-size":[{mask:Ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",f,u]}],filter:[{filter:["","none",f,u]}],blur:[{blur:Se()}],brightness:[{brightness:[y,f,u]}],contrast:[{contrast:[y,f,u]}],"drop-shadow":[{"drop-shadow":["","none",N,le,ie]}],"drop-shadow-color":[{"drop-shadow":h()}],grayscale:[{grayscale:["",y,f,u]}],"hue-rotate":[{"hue-rotate":[y,f,u]}],invert:[{invert:["",y,f,u]}],saturate:[{saturate:[y,f,u]}],sepia:[{sepia:["",y,f,u]}],"backdrop-filter":[{"backdrop-filter":["","none",f,u]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[y,f,u]}],"backdrop-contrast":[{"backdrop-contrast":[y,f,u]}],"backdrop-grayscale":[{"backdrop-grayscale":["",y,f,u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y,f,u]}],"backdrop-invert":[{"backdrop-invert":["",y,f,u]}],"backdrop-opacity":[{"backdrop-opacity":[y,f,u]}],"backdrop-saturate":[{"backdrop-saturate":[y,f,u]}],"backdrop-sepia":[{"backdrop-sepia":["",y,f,u]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",f,u]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[y,"initial",f,u]}],ease:[{ease:["linear","initial",R,f,u]}],delay:[{delay:[y,f,u]}],animate:[{animate:["none",D,f,u]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,f,u]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[f,u,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:h()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:h()}],"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",f,u]}],"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":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",f,u]}],fill:[{fill:["none",...h()]}],"stroke-w":[{stroke:[y,te,Q,pe]}],stroke:[{stroke:["none",...h()]}],"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"]}},gt=Zr(ft);function p(...e){return gt(De(e))}const Ae=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Le=De,Ze=(e,r)=>t=>{var s;if(r?.variants==null)return Le(e,t?.class,t?.className);const{variants:n,defaultVariants:a}=r,i=Object.keys(n).map(d=>{const g=t?.[d],m=a?.[d];if(g===null)return null;const b=Ae(g)||Ae(m);return n[d][b]}),c=t&&Object.entries(t).reduce((d,g)=>{let[m,b]=g;return b===void 0||(d[m]=b),d},{}),l=r==null||(s=r.compoundVariants)===null||s===void 0?void 0:s.reduce((d,g)=>{let{class:m,className:b,...N}=g;return Object.entries(N).every(w=>{let[S,M]=w;return Array.isArray(M)?M.includes({...a,...c}[S]):{...a,...c}[S]===M})?[...d,m,b]:d},[]);return Le(e,i,l,t?.class,t?.className)},pt=Ze("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"}}),H=k.forwardRef(({className:e,variant:r,size:t,asChild:s=!1,disabled:n,...a},i)=>{const c=s?Mr:"button";return o.jsx(c,{className:p(pt({variant:r,size:t,className:e})),ref:i,type:a.type||"button",disabled:n,"aria-disabled":n?"true":void 0,...a})});H.displayName="Button";const ht=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"}},xt=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"}},bt=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""}},yt=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"}},P=({variant:e="body",color:r="primary",weight:t,align:s="left",truncate:n=!1,children:a,className:i,as:c,...l})=>{const d=c||vt(e),g=p("m-0",ht(e),xt(r),bt(t),yt(s),n&&"truncate",i);return o.jsx(d,{className:g,...l,children:a})};function vt(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 wt=e=>{switch(e){case"sm":return"p-4";case"md":return"p-6";case"lg":return"p-8";default:return"p-0"}},kt=e=>{switch(e){case"sm":return"shadow-sm";case"md":return"shadow-md";case"lg":return"shadow-lg";default:return"shadow-none"}},jt=e=>{switch(e){case"sm":return"rounded-sm";case"md":return"rounded-md";case"lg":return"rounded-lg";default:return"rounded-none"}},Ke=({children:e,title:r,subtitle:t,className:s,padding:n="md",shadow:a="md",borderRadius:i="md",onClick:c})=>{const l=!!c,d=p("bg-card",wt(n),kt(a),jt(i),"transition-all duration-200 ease-in-out",l&&"cursor-pointer hover:-translate-y-0.5 hover:shadow-lg active:translate-y-0",s);return o.jsxs("div",{className:d,onClick:c,children:[(r||t)&&o.jsxs("div",{className:"mb-4",children:[r&&o.jsx("div",{className:"mb-2",children:o.jsx(P,{variant:"h3",children:r})}),t&&o.jsx("div",{className:"text-muted-foreground",children:o.jsx(P,{variant:"body-sm",color:"muted",children:t})})]}),o.jsx("div",{className:"flex-1",children:e})]})},Ct=({children:e})=>o.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:e}),Nt=Object.assign(Ke,{Footer:Ct}),St=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"}},Qe=({isOpen:e,onClose:r,title:t,children:s,size:n="md",showCloseButton:a=!0,closeOnOverlayClick:i=!0,closeOnEscape:c=!0})=>{const l=C.useRef(null);if(C.useEffect(()=>{if(!e||!c)return;const w=S=>{S.key==="Escape"&&r()};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[e,c,r]),C.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[e]),C.useEffect(()=>{e&&l.current&&l.current.focus()},[e]),!e)return null;const d=p("fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4"),g=p("bg-card rounded-lg shadow-xl w-full max-h-[90vh] overflow-hidden flex flex-col",St(n)),m=p("p-6 border-b border-border flex items-center justify-between"),b=p("p-6 overflow-y-auto flex-1"),N=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 o.jsx("div",{className:d,onClick:i?r:void 0,children:o.jsxs("div",{ref:l,className:g,onClick:w=>w.stopPropagation(),tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":t?"modal-title":void 0,children:[(t||a)&&o.jsxs("div",{className:m,children:[t&&o.jsx(P,{variant:"h3",className:"text-foreground",children:t}),a&&o.jsx("button",{onClick:r,"aria-label":"Close modal",className:N,children:"×"})]}),o.jsx("div",{className:b,children:s})]})})},Je=({children:e,actions:r,...t})=>o.jsxs(Qe,{...t,children:[o.jsx("div",{className:"p-6 overflow-y-auto flex-1",children:e}),r&&o.jsx("div",{className:"p-6 border-t border-border flex justify-end gap-3",children:r})]}),zt=({isOpen:e,onClose:r,onConfirm:t,title:s,message:n,confirmText:a="Confirm",cancelText:i="Cancel"})=>o.jsx(Je,{isOpen:e,onClose:r,title:s,actions:o.jsxs(o.Fragment,{children:[o.jsx(H,{variant:"secondary",onClick:r,children:i}),o.jsx(H,{variant:"default",onClick:t,children:a})]}),children:o.jsx(P,{children:n})});function Xe(e,r){return!r||r==="all"?e:e.filter(t=>t.categoryId===r)}function Ye(e,r){const t=[...e];return t.sort((s,n)=>{let a="",i="";return r.column==="title"?(a=s.title.toLowerCase(),i=n.title.toLowerCase()):r.column==="metric"&&(a=Ie(s.metricValue),i=Ie(n.metricValue)),a<i?r.direction==="asc"?-1:1:a>i?r.direction==="asc"?1:-1:0}),t}function Ie(e){if(!e)return 0;const r=e.match(/[\d.]+/);return r?parseFloat(r[0]):0}function er(e,r){return r==="all"?e.length:e.filter(t=>t.categoryId===r).length}function Et(e,r,t={}){const{initialCategory:s=null,initialSort:n=null,enableSearch:a=!1}=t,[i,c]=C.useState(s),[l,d]=C.useState(n),[g,m]=C.useState(""),b=C.useMemo(()=>Xe(e,i),[e,i]),N=C.useMemo(()=>{if(!a||!g.trim())return b;const R=g.toLowerCase();return b.filter(D=>D.title.toLowerCase().includes(R)||D.subtitle?.toLowerCase().includes(R))},[b,g,a]),w=C.useMemo(()=>l?Ye(N,l):N,[N,l]),S=C.useCallback(R=>er(e,R),[e]),M=C.useCallback(()=>{c(s),d(n),m("")},[s,n]);return{activeCategory:i,setActiveCategory:c,sort:l,setSort:d,searchQuery:g,setSearchQuery:m,filteredEntities:w,getCategoryCount:S,resetFilters:M}}const Mt=Ze("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"}}),de=k.forwardRef(({className:e,variant:r,size:t,icon:s,selected:n,dismissible:a,onDismiss:i,children:c,disabled:l,...d},g)=>{const m=n?"selected":r;return o.jsxs("button",{type:"button",className:p(Mt({variant:m,size:t,className:e})),ref:g,disabled:l,"aria-disabled":l?"true":void 0,"aria-pressed":n?"true":"false",...d,children:[s&&o.jsx("span",{className:"mr-1.5 inline-flex items-center","aria-hidden":"true",children:s}),o.jsx("span",{children:c}),a&&i&&o.jsx("button",{type:"button",className:"ml-1.5 inline-flex items-center hover:opacity-70",onClick:b=>{b.stopPropagation(),i()},"aria-label":"Remove",children:"×"})]})});de.displayName="Chip";const we=k.forwardRef(({categories:e,activeCategory:r,onCategoryChange:t,showCount:s,getCategoryCount:n,className:a},i)=>o.jsx("div",{ref:i,role:"tablist","aria-label":"Filter by category",className:p("flex flex-wrap gap-2 overflow-x-auto pb-2",a),children:e.map(c=>{const l=r===c.id,d=s&&n?n(c.id):void 0;return o.jsxs(de,{role:"tab","aria-selected":l,"aria-controls":`entities-panel-${c.id}`,selected:l,variant:l?"selected":"outline",icon:c.icon,onClick:()=>t(l?null:c.id),children:[c.label,d!==void 0&&o.jsxs("span",{className:"ml-1.5 opacity-70",children:["(",d,")"]})]},c.id)})}));we.displayName="CategoryChips";/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),L=require("react"),Lt=require("effector-react"),fe=require("effector");function Tt(e){const t=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(t,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const v=Tt(L);function Te(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $t(...e){return t=>{let s=!1;const o=e.map(a=>{const n=Te(a,t);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():Te(e[a],null)}}}}function Vt(e){const t=Dt(e),s=v.forwardRef((o,a)=>{const{children:n,...l}=o,i=v.Children.toArray(n),c=i.find(Gt);if(c){const d=c.props.children,m=i.map(u=>u===c?v.Children.count(d)>1?v.Children.only(null):v.isValidElement(d)?d.props.children:null:u);return r.jsx(t,{...l,ref:a,children:v.isValidElement(d)?v.cloneElement(d,void 0,m):null})}return r.jsx(t,{...l,ref:a,children:n})});return s.displayName=`${e}.Slot`,s}var Ft=Vt("Slot");function Dt(e){const t=v.forwardRef((s,o)=>{const{children:a,...n}=s;if(v.isValidElement(a)){const l=Bt(a),i=Ot(n,a.props);return a.type!==v.Fragment&&(i.ref=o?$t(o,l):l),v.cloneElement(a,i)}return v.Children.count(a)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _t=Symbol("radix.slottable");function Gt(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_t}function Ot(e,t){const s={...t};for(const o in t){const a=e[o],n=t[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 Bt(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function We(e){var t,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(t=0;t<a;t++)e[t]&&(s=We(e[t]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}function Ue(){for(var e,t,s=0,o="",a=arguments.length;s<a;s++)(e=arguments[s])&&(t=We(e))&&(o&&(o+=" "),o+=t);return o}const Ce="-",Wt=e=>{const t=Ht(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{const i=l.split(Ce);return i[0]===""&&i.length!==1&&i.shift(),He(i,t)||Ut(l)},getConflictingClassGroupIds:(l,i)=>{const c=s[l]||[];return i&&o[l]?[...c,...o[l]]:c}}},He=(e,t)=>{if(e.length===0)return t.classGroupId;const s=e[0],o=t.nextPart.get(s),a=o?He(e.slice(1),o):void 0;if(a)return a;if(t.validators.length===0)return;const n=e.join(Ce);return t.validators.find(({validator:l})=>l(n))?.classGroupId},$e=/^\[(.+)\]$/,Ut=e=>{if($e.test(e)){const t=$e.exec(e)[1],s=t?.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}},Ht=e=>{const{theme:t,classGroups:s}=e,o={nextPart:new Map,validators:[]};for(const a in s)ke(s[a],o,a,t);return o},ke=(e,t,s,o)=>{e.forEach(a=>{if(typeof a=="string"){const n=a===""?t:Ve(t,a);n.classGroupId=s;return}if(typeof a=="function"){if(qt(a)){ke(a(o),t,s,o);return}t.validators.push({validator:a,classGroupId:s});return}Object.entries(a).forEach(([n,l])=>{ke(l,Ve(t,n),s,o)})})},Ve=(e,t)=>{let s=e;return t.split(Ce).forEach(o=>{s.nextPart.has(o)||s.nextPart.set(o,{nextPart:new Map,validators:[]}),s=s.nextPart.get(o)}),s},qt=e=>e.isThemeGetter,Xt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=new Map,o=new Map;const a=(n,l)=>{s.set(n,l),t++,t>e&&(t=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)}}},je="!",Ne=":",Zt=Ne.length,Kt=e=>{const{prefix:t,experimentalParseClassName:s}=e;let o=a=>{const n=[];let l=0,i=0,c=0,d;for(let y=0;y<a.length;y++){let w=a[y];if(l===0&&i===0){if(w===Ne){n.push(a.slice(c,y)),c=y+Zt;continue}if(w==="/"){d=y;continue}}w==="["?l++:w==="]"?l--:w==="("?i++:w===")"&&i--}const m=n.length===0?a:a.substring(c),u=Qt(m),h=u!==m,N=d&&d>c?d-c:void 0;return{modifiers:n,hasImportantModifier:h,baseClassName:u,maybePostfixModifierPosition:N}};if(t){const a=t+Ne,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},Qt=e=>e.endsWith(je)?e.substring(0,e.length-1):e.startsWith(je)?e.substring(1):e,Jt=e=>{const t=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]==="["||t[l]?(a.push(...n.sort(),l),n=[]):n.push(l)}),a.push(...n.sort()),a}},Yt=e=>({cache:Xt(e.cacheSize),parseClassName:Kt(e),sortModifiers:Jt(e),...Wt(e)}),er=/\s+/,tr=(e,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:n}=t,l=[],i=e.trim().split(er);let c="";for(let d=i.length-1;d>=0;d-=1){const m=i[d],{isExternal:u,modifiers:h,hasImportantModifier:N,baseClassName:y,maybePostfixModifierPosition:w}=s(m);if(u){c=m+(c.length>0?" "+c:c);continue}let S=!!w,P=o(S?y.substring(0,w):y);if(!P){if(!S){c=m+(c.length>0?" "+c:c);continue}if(P=o(y),!P){c=m+(c.length>0?" "+c:c);continue}S=!1}const R=n(h).join(":"),A=N?R+je:R,M=A+P;if(l.includes(M))continue;l.push(M);const C=a(P,S);for(let V=0;V<C.length;++V){const I=C[V];l.push(A+I)}c=m+(c.length>0?" "+c:c)}return c};function rr(){let e=0,t,s,o="";for(;e<arguments.length;)(t=arguments[e++])&&(s=qe(t))&&(o&&(o+=" "),o+=s);return o}const qe=e=>{if(typeof e=="string")return e;let t,s="";for(let o=0;o<e.length;o++)e[o]&&(t=qe(e[o]))&&(s&&(s+=" "),s+=t);return s};function sr(e,...t){let s,o,a,n=l;function l(c){const d=t.reduce((m,u)=>u(m),e());return s=Yt(d),o=s.cache.get,a=s.cache.set,n=i,i(c)}function i(c){const d=o(c);if(d)return d;const m=tr(c,s);return a(c,m),m}return function(){return n(rr.apply(null,arguments))}}const T=e=>{const t=s=>s[e]||[];return t.isThemeGetter=!0,t},Xe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ze=/^\((?:(\w[\w-]*):)?(.+)\)$/i,or=/^\d+\/\d+$/,ar=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nr=/\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$/,ir=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,te=e=>or.test(e),k=e=>!!e&&!Number.isNaN(Number(e)),q=e=>!!e&&Number.isInteger(Number(e)),be=e=>e.endsWith("%")&&k(e.slice(0,-1)),W=e=>ar.test(e),dr=()=>!0,ur=e=>nr.test(e)&&!ir.test(e),Ke=()=>!1,mr=e=>lr.test(e),fr=e=>cr.test(e),pr=e=>!f(e)&&!p(e),gr=e=>se(e,Ye,Ke),f=e=>Xe.test(e),J=e=>se(e,et,ur),ye=e=>se(e,vr,k),Fe=e=>se(e,Qe,Ke),hr=e=>se(e,Je,fr),de=e=>se(e,tt,mr),p=e=>Ze.test(e),ae=e=>oe(e,et),xr=e=>oe(e,wr),De=e=>oe(e,Qe),br=e=>oe(e,Ye),yr=e=>oe(e,Je),ue=e=>oe(e,tt,!0),se=(e,t,s)=>{const o=Xe.exec(e);return o?o[1]?t(o[1]):s(o[2]):!1},oe=(e,t,s=!1)=>{const o=Ze.exec(e);return o?o[1]?t(o[1]):s:!1},Qe=e=>e==="position"||e==="percentage",Je=e=>e==="image"||e==="url",Ye=e=>e==="length"||e==="size"||e==="bg-size",et=e=>e==="length",vr=e=>e==="number",wr=e=>e==="family-name",tt=e=>e==="shadow",kr=()=>{const e=T("color"),t=T("font"),s=T("text"),o=T("font-weight"),a=T("tracking"),n=T("leading"),l=T("breakpoint"),i=T("container"),c=T("spacing"),d=T("radius"),m=T("shadow"),u=T("inset-shadow"),h=T("text-shadow"),N=T("drop-shadow"),y=T("blur"),w=T("perspective"),S=T("aspect"),P=T("ease"),R=T("animate"),A=()=>["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"],C=()=>[...M(),p,f],V=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],b=()=>[p,f,c],D=()=>[te,"full","auto",...b()],U=()=>[q,"none","subgrid",p,f],ee=()=>["auto",{span:["full",q,p,f]},q,p,f],H=()=>[q,"auto",p,f],B=()=>["auto","min","max","fr",p,f],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...b()],z=()=>[te,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...b()],x=()=>[e,p,f],Re=()=>[...M(),De,Fe,{position:[p,f]}],Ie=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ae=()=>["auto","cover","contain",br,gr,{size:[p,f]}],he=()=>[be,ae,J],F=()=>["","none","full",d,p,f],_=()=>["",k,ae,J],ne=()=>["solid","dashed","dotted","double"],ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>[k,be,De,Fe],Le=()=>["","none",y,p,f],ie=()=>["none",k,p,f],le=()=>["none",k,p,f],xe=()=>[k,p,f],ce=()=>[te,"full",...b()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[W],breakpoint:[W],color:[dr],container:[W],"drop-shadow":[W],ease:["in","out","in-out"],font:[pr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[W],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[W],shadow:[W],spacing:["px",k],text:[W],"text-shadow":[W],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",te,f,p,S]}],container:["container"],columns:[{columns:[k,f,p,i]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:C()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[q,"auto",p,f]}],basis:[{basis:[te,"full","auto",i,...b()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[k,te,"auto","initial","none",f]}],grow:[{grow:["",k,p,f]}],shrink:[{shrink:["",k,p,f]}],order:[{order:[q,"first","last","none",p,f]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:b()}],"gap-x":[{"gap-x":b()}],"gap-y":[{"gap-y":b()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:b()}],px:[{px:b()}],py:[{py:b()}],ps:[{ps:b()}],pe:[{pe:b()}],pt:[{pt:b()}],pr:[{pr:b()}],pb:[{pb:b()}],pl:[{pl:b()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":b()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":b()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[i,"screen",...z()]}],"min-w":[{"min-w":[i,"screen","none",...z()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[l]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",s,ae,J]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,p,ye]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",be,f]}],"font-family":[{font:[xr,f,t]}],"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,p,f]}],"line-clamp":[{"line-clamp":[k,"none",p,ye]}],leading:[{leading:[n,...b()]}],"list-image":[{"list-image":["none",p,f]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",p,f]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:x()}],"text-color":[{text:x()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[k,"from-font","auto",p,J]}],"text-decoration-color":[{decoration:x()}],"underline-offset":[{"underline-offset":[k,"auto",p,f]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",p,f]}],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",p,f]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Re()}],"bg-repeat":[{bg:Ie()}],"bg-size":[{bg:Ae()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},q,p,f],radial:["",p,f],conic:[q,p,f]},yr,hr]}],"bg-color":[{bg:x()}],"gradient-from-pos":[{from:he()}],"gradient-via-pos":[{via:he()}],"gradient-to-pos":[{to:he()}],"gradient-from":[{from:x()}],"gradient-via":[{via:x()}],"gradient-to":[{to:x()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:_()}],"border-w-x":[{"border-x":_()}],"border-w-y":[{"border-y":_()}],"border-w-s":[{"border-s":_()}],"border-w-e":[{"border-e":_()}],"border-w-t":[{"border-t":_()}],"border-w-r":[{"border-r":_()}],"border-w-b":[{"border-b":_()}],"border-w-l":[{"border-l":_()}],"divide-x":[{"divide-x":_()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":_()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:x()}],"border-color-x":[{"border-x":x()}],"border-color-y":[{"border-y":x()}],"border-color-s":[{"border-s":x()}],"border-color-e":[{"border-e":x()}],"border-color-t":[{"border-t":x()}],"border-color-r":[{"border-r":x()}],"border-color-b":[{"border-b":x()}],"border-color-l":[{"border-l":x()}],"divide-color":[{divide:x()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[k,p,f]}],"outline-w":[{outline:["",k,ae,J]}],"outline-color":[{outline:x()}],shadow:[{shadow:["","none",m,ue,de]}],"shadow-color":[{shadow:x()}],"inset-shadow":[{"inset-shadow":["none",u,ue,de]}],"inset-shadow-color":[{"inset-shadow":x()}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:x()}],"ring-offset-w":[{"ring-offset":[k,J]}],"ring-offset-color":[{"ring-offset":x()}],"inset-ring-w":[{"inset-ring":_()}],"inset-ring-color":[{"inset-ring":x()}],"text-shadow":[{"text-shadow":["none",h,ue,de]}],"text-shadow-color":[{"text-shadow":x()}],opacity:[{opacity:[k,p,f]}],"mix-blend":[{"mix-blend":[...ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ze()}],"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":[k]}],"mask-image-linear-from-pos":[{"mask-linear-from":$()}],"mask-image-linear-to-pos":[{"mask-linear-to":$()}],"mask-image-linear-from-color":[{"mask-linear-from":x()}],"mask-image-linear-to-color":[{"mask-linear-to":x()}],"mask-image-t-from-pos":[{"mask-t-from":$()}],"mask-image-t-to-pos":[{"mask-t-to":$()}],"mask-image-t-from-color":[{"mask-t-from":x()}],"mask-image-t-to-color":[{"mask-t-to":x()}],"mask-image-r-from-pos":[{"mask-r-from":$()}],"mask-image-r-to-pos":[{"mask-r-to":$()}],"mask-image-r-from-color":[{"mask-r-from":x()}],"mask-image-r-to-color":[{"mask-r-to":x()}],"mask-image-b-from-pos":[{"mask-b-from":$()}],"mask-image-b-to-pos":[{"mask-b-to":$()}],"mask-image-b-from-color":[{"mask-b-from":x()}],"mask-image-b-to-color":[{"mask-b-to":x()}],"mask-image-l-from-pos":[{"mask-l-from":$()}],"mask-image-l-to-pos":[{"mask-l-to":$()}],"mask-image-l-from-color":[{"mask-l-from":x()}],"mask-image-l-to-color":[{"mask-l-to":x()}],"mask-image-x-from-pos":[{"mask-x-from":$()}],"mask-image-x-to-pos":[{"mask-x-to":$()}],"mask-image-x-from-color":[{"mask-x-from":x()}],"mask-image-x-to-color":[{"mask-x-to":x()}],"mask-image-y-from-pos":[{"mask-y-from":$()}],"mask-image-y-to-pos":[{"mask-y-to":$()}],"mask-image-y-from-color":[{"mask-y-from":x()}],"mask-image-y-to-color":[{"mask-y-to":x()}],"mask-image-radial":[{"mask-radial":[p,f]}],"mask-image-radial-from-pos":[{"mask-radial-from":$()}],"mask-image-radial-to-pos":[{"mask-radial-to":$()}],"mask-image-radial-from-color":[{"mask-radial-from":x()}],"mask-image-radial-to-color":[{"mask-radial-to":x()}],"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":[k]}],"mask-image-conic-from-pos":[{"mask-conic-from":$()}],"mask-image-conic-to-pos":[{"mask-conic-to":$()}],"mask-image-conic-from-color":[{"mask-conic-from":x()}],"mask-image-conic-to-color":[{"mask-conic-to":x()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Re()}],"mask-repeat":[{mask:Ie()}],"mask-size":[{mask:Ae()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",p,f]}],filter:[{filter:["","none",p,f]}],blur:[{blur:Le()}],brightness:[{brightness:[k,p,f]}],contrast:[{contrast:[k,p,f]}],"drop-shadow":[{"drop-shadow":["","none",N,ue,de]}],"drop-shadow-color":[{"drop-shadow":x()}],grayscale:[{grayscale:["",k,p,f]}],"hue-rotate":[{"hue-rotate":[k,p,f]}],invert:[{invert:["",k,p,f]}],saturate:[{saturate:[k,p,f]}],sepia:[{sepia:["",k,p,f]}],"backdrop-filter":[{"backdrop-filter":["","none",p,f]}],"backdrop-blur":[{"backdrop-blur":Le()}],"backdrop-brightness":[{"backdrop-brightness":[k,p,f]}],"backdrop-contrast":[{"backdrop-contrast":[k,p,f]}],"backdrop-grayscale":[{"backdrop-grayscale":["",k,p,f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[k,p,f]}],"backdrop-invert":[{"backdrop-invert":["",k,p,f]}],"backdrop-opacity":[{"backdrop-opacity":[k,p,f]}],"backdrop-saturate":[{"backdrop-saturate":[k,p,f]}],"backdrop-sepia":[{"backdrop-sepia":["",k,p,f]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":b()}],"border-spacing-x":[{"border-spacing-x":b()}],"border-spacing-y":[{"border-spacing-y":b()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",p,f]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[k,"initial",p,f]}],ease:[{ease:["linear","initial",P,p,f]}],delay:[{delay:[k,p,f]}],animate:[{animate:["none",R,p,f]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,p,f]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[p,f,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:x()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:x()}],"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",p,f]}],"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":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"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",p,f]}],fill:[{fill:["none",...x()]}],"stroke-w":[{stroke:[k,ae,J,ye]}],stroke:[{stroke:["none",...x()]}],"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"]}},jr=sr(kr);function g(...e){return jr(Ue(e))}const _e=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ge=Ue,Z=(e,t)=>s=>{var o;if(t?.variants==null)return Ge(e,s?.class,s?.className);const{variants:a,defaultVariants:n}=t,l=Object.keys(a).map(d=>{const m=s?.[d],u=n?.[d];if(m===null)return null;const h=_e(m)||_e(u);return a[d][h]}),i=s&&Object.entries(s).reduce((d,m)=>{let[u,h]=m;return h===void 0||(d[u]=h),d},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((d,m)=>{let{class:u,className:h,...N}=m;return Object.entries(N).every(y=>{let[w,S]=y;return Array.isArray(S)?S.includes({...n,...i}[w]):{...n,...i}[w]===S})?[...d,u,h]:d},[]);return Ge(e,l,c,s?.class,s?.className)},Nr=Z("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"}}),X=v.forwardRef(({className:e,variant:t,size:s,asChild:o=!1,disabled:a,...n},l)=>{const i=o?Ft:"button";return r.jsx(i,{className:g(Nr({variant:t,size:s,className:e})),ref:l,type:n.type||"button",disabled:a,"aria-disabled":a?"true":void 0,...n})});X.displayName="Button";const Cr=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"}},Mr=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"}},Sr=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""}},Pr=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"}},E=({variant:e="body",color:t="primary",weight:s,align:o="left",truncate:a=!1,children:n,className:l,as:i,...c})=>{const d=i||Er(e),m=g("m-0",Cr(e),Mr(t),Sr(s),Pr(o),a&&"truncate",l);return r.jsx(d,{className:m,...c,children:n})};function Er(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 Rr=e=>{switch(e){case"sm":return"p-4";case"md":return"p-6";case"lg":return"p-8";default:return"p-0"}},Ir=e=>{switch(e){case"sm":return"shadow-sm";case"md":return"shadow-md";case"lg":return"shadow-lg";default:return"shadow-none"}},Ar=e=>{switch(e){case"sm":return"rounded-sm";case"md":return"rounded-md";case"lg":return"rounded-lg";default:return"rounded-none"}},Me=({children:e,title:t,subtitle:s,className:o,padding:a="md",shadow:n="md",borderRadius:l="md",onClick:i})=>{const c=!!i,d=g("bg-card",Rr(a),Ir(n),Ar(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 r.jsxs("div",{className:d,onClick:i,children:[(t||s)&&r.jsxs("div",{className:"mb-4",children:[t&&r.jsx("div",{className:"mb-2",children:r.jsx(E,{variant:"h3",children:t})}),s&&r.jsx("div",{className:"text-muted-foreground",children:r.jsx(E,{variant:"body-sm",color:"muted",children:s})})]}),r.jsx("div",{className:"flex-1",children:e})]})},zr=({children:e})=>r.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:e}),Lr=Object.assign(Me,{Footer:zr}),Tr=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"}},rt=({isOpen:e,onClose:t,title:s,children:o,size:a="md",showCloseButton:n=!0,closeOnOverlayClick:l=!0,closeOnEscape:i=!0})=>{const c=L.useRef(null);if(L.useEffect(()=>{if(!e||!i)return;const y=w=>{w.key==="Escape"&&t()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[e,i,t]),L.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[e]),L.useEffect(()=>{e&&c.current&&c.current.focus()},[e]),!e)return null;const d=g("fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4"),m=g("bg-card rounded-lg shadow-xl w-full max-h-[90vh] overflow-hidden flex flex-col",Tr(a)),u=g("p-6 border-b border-border flex items-center justify-between"),h=g("p-6 overflow-y-auto flex-1"),N=g("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 r.jsx("div",{className:d,onClick:l?t:void 0,children:r.jsxs("div",{ref:c,className:m,onClick:y=>y.stopPropagation(),tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":s?"modal-title":void 0,children:[(s||n)&&r.jsxs("div",{className:u,children:[s&&r.jsx(E,{variant:"h3",className:"text-foreground",children:s}),n&&r.jsx("button",{onClick:t,"aria-label":"Close modal",className:N,children:"×"})]}),r.jsx("div",{className:h,children:o})]})})},st=({children:e,actions:t,...s})=>r.jsxs(rt,{...s,children:[r.jsx("div",{className:"p-6 overflow-y-auto flex-1",children:e}),t&&r.jsx("div",{className:"p-6 border-t border-border flex justify-end gap-3",children:t})]}),$r=({isOpen:e,onClose:t,onConfirm:s,title:o,message:a,confirmText:n="Confirm",cancelText:l="Cancel"})=>r.jsx(st,{isOpen:e,onClose:t,title:o,actions:r.jsxs(r.Fragment,{children:[r.jsx(X,{variant:"secondary",onClick:t,children:l}),r.jsx(X,{variant:"default",onClick:s,children:n})]}),children:r.jsx(E,{children:a})}),Vr=Z(["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"}}),Fr=Z(["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}}),Dr=Z("mt-1.5 text-sm",{variants:{variant:{default:"text-muted-foreground",error:"text-destructive",success:"text-success"}},defaultVariants:{variant:"default"}}),Y=v.forwardRef(({className:e,containerClassName:t,labelClassName:s,variant:o,inputSize:a,label:n,helperText:l,error:i,required:c,prefix:d,suffix:m,id:u,...h},N)=>{const y=v.useId(),w=u||y,S=`${w}-helper`,P=`${w}-error`,R=i?"error":o,A=i||l;return r.jsxs("div",{className:g("w-full",t),children:[n&&r.jsx("label",{htmlFor:w,className:g(Fr({variant:R,required:c}),s),children:n}),r.jsxs("div",{className:"relative",children:[d&&r.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:d}),r.jsx("input",{id:w,ref:N,className:g(Vr({variant:R,inputSize:a}),d&&"pl-10",m&&"pr-10",e),"aria-invalid":i?"true":"false","aria-describedby":A?i?P:S:void 0,...h}),m&&r.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m})]}),A&&r.jsx("p",{id:i?P:S,className:Dr({variant:R}),role:i?"alert":void 0,children:A})]})});Y.displayName="Input";/**
2
2
  * @license lucide-react v0.547.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const Rt=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Pt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,t,s)=>s?s.toUpperCase():t.toLowerCase()),Te=e=>{const r=Pt(e);return r.charAt(0).toUpperCase()+r.slice(1)},rr=(...e)=>e.filter((r,t,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===t).join(" ").trim(),At=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
6
+ */const _r=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,s,o)=>o?o.toUpperCase():s.toLowerCase()),Oe=e=>{const t=Gr(e);return t.charAt(0).toUpperCase()+t.slice(1)},ot=(...e)=>e.filter((t,s,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===s).join(" ").trim(),Or=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
7
7
  * @license lucide-react v0.547.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */var Lt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
11
+ */var Br={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
12
12
  * @license lucide-react v0.547.0 - ISC
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 It=C.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:t=2,absoluteStrokeWidth:s,className:n="",children:a,iconNode:i,...c},l)=>C.createElement("svg",{ref:l,...Lt,width:r,height:r,stroke:e,strokeWidth:s?Number(t)*24/Number(r):t,className:rr("lucide",n),...!a&&!At(c)&&{"aria-hidden":"true"},...c},[...i.map(([d,g])=>C.createElement(d,g)),...Array.isArray(a)?a:[a]]));/**
16
+ */const Wr=L.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:n,iconNode:l,...i},c)=>L.createElement("svg",{ref:c,...Br,width:t,height:t,stroke:e,strokeWidth:o?Number(s)*24/Number(t):s,className:ot("lucide",a),...!n&&!Or(i)&&{"aria-hidden":"true"},...i},[...l.map(([d,m])=>L.createElement(d,m)),...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 q=(e,r)=>{const t=C.forwardRef(({className:s,...n},a)=>C.createElement(It,{ref:a,iconNode:r,className:rr(`lucide-${Rt(Te(e))}`,`lucide-${e}`,s),...n}));return t.displayName=Te(e),t};/**
21
+ */const O=(e,t)=>{const s=L.forwardRef(({className:o,...a},n)=>L.createElement(Wr,{ref:n,iconNode:t,className:ot(`lucide-${_r(Oe(e))}`,`lucide-${e}`,o),...a}));return s.displayName=Oe(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 Tt=[["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"}]],Vt=q("bath",Tt);/**
26
+ */const Ur=[["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"}]],Hr=O("bath",Ur);/**
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 Dt=[["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"}]],Ft=q("bed",Dt);/**
31
+ */const qr=[["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"}]],Xr=O("bed",qr);/**
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 _t=[["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"}]],$t=q("car",_t);/**
36
+ */const Zr=[["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"}]],Kr=O("car",Zr);/**
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 Gt=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Bt=q("chevron-left",Gt);/**
41
+ */const Qr=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Jr=O("chevron-down",Qr);/**
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 Wt=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ut=q("chevron-right",Wt);/**
46
+ */const Yr=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],es=O("chevron-left",Yr);/**
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 Ot=[["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"}]],Ht=q("grid-3x3",Ot);/**
51
+ */const ts=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],rs=O("chevron-right",ts);/**
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 qt=[["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"}]],Zt=q("heart",qt);/**
56
+ */const ss=[["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"}]],os=O("grid-3x3",ss);/**
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 Kt=[["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"}]],Qt=q("maximize",Kt),Jt=e=>{switch(e.variant||Xt(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"}},Xt=e=>{switch(e){case"Venta":return"primary";case"Desarrollo":return"success";case"Renta":return"info";case"Remate":return"warning";default:return"secondary"}},Yt=({property:e,className:r,onLike:t,onImageClick:s,showLikeButton:n=!0,showNavigation:a=!0})=>{const[i,c]=C.useState(0),[l,d]=C.useState(!1),g=()=>{c(v=>v===e.images.length-1?0:v+1)},m=()=>{c(v=>v===0?e.images.length-1:v-1)},b=v=>{v.preventDefault(),v.stopPropagation();const j=!l;d(j),t?.(e.id,j)},N=v=>{v.preventDefault(),v.stopPropagation(),s?.(i,e.id)},w=(v,j)=>!v||!j?"Price not available":`$${v.toLocaleString()} ${j}`,S=p("relative overflow-hidden bg-card rounded-2xl shadow-md transition-all duration-300 ease-out cursor-pointer hover:-translate-y-1 hover:shadow-xl",r),M=p("relative overflow-hidden"),R=p("w-full h-full object-cover transition-transform duration-300 hover:scale-105"),D=p("absolute top-4 left-4 flex flex-wrap gap-1 z-10"),$=p("px-2 py-1 rounded-lg text-xs font-medium uppercase tracking-wide"),L=p("absolute top-4 right-4 z-10 bg-background/90 backdrop-blur-sm border border-border/20 text-foreground rounded-full w-10 h-10 flex items-center justify-center cursor-pointer transition-all duration-200 hover:bg-background hover:scale-105"),I=p("absolute top-1/2 -translate-y-1/2 z-10 bg-background/90 backdrop-blur-sm border border-border/20 text-foreground w-10 h-10 rounded-full p-0 flex items-center justify-center cursor-pointer transition-all duration-200 hover:bg-background hover:scale-105"),F=p("absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-1 z-10"),G=p("w-2 h-2 rounded-full border-none cursor-pointer transition-all duration-200 hover:scale-120"),x=p("p-6"),T=p("text-lg font-bold text-foreground mb-2 line-clamp-2 leading-tight"),J=p("text-xl font-bold text-primary mb-2"),X=p("text-base text-muted-foreground mb-4"),U=p("flex items-center gap-4 mb-4"),B=p("flex items-center gap-1 text-sm text-muted-foreground"),K=p("text-sm text-muted-foreground line-clamp-2"),_=o.jsxs("div",{className:S,children:[o.jsxs("div",{className:p(M,"aspect-[4/3] bg-red-500"),children:[o.jsx("img",{src:e.images[i],alt:e.title,className:R,onClick:s?N:void 0}),o.jsx("div",{className:D,children:e.transactionTypes.map((v,j)=>o.jsx("span",{className:p($,Jt(v)),children:v.type},j))}),n&&o.jsx("button",{onClick:b,className:L,"aria-label":l?"Unlike property":"Like property",children:o.jsx(Zt,{size:20,fill:l?"currentColor":"none",className:l?"text-destructive":""})}),a&&e.images.length>1&&o.jsxs(o.Fragment,{children:[o.jsx(H,{onClick:v=>{v.preventDefault(),v.stopPropagation(),m()},className:p(I,"left-4"),"aria-label":"Previous image",children:o.jsx(Bt,{size:20})}),o.jsx(H,{onClick:v=>{v.preventDefault(),v.stopPropagation(),g()},className:p(I,"right-4"),"aria-label":"Next image",children:o.jsx(Ut,{size:20})}),o.jsx("div",{className:F,children:e.images.map((v,j)=>o.jsx("button",{className:p(G,j===i?"bg-background":"bg-background/50"),onClick:h=>{h.preventDefault(),h.stopPropagation(),c(j)},"aria-label":`Go to image ${j+1}`,"aria-current":j===i},j))})]})]}),o.jsxs("div",{className:x,children:[o.jsx("h3",{className:T,children:e.title}),o.jsx("p",{className:J,children:w(e.price?.amount,e.price?.currency)}),o.jsxs("p",{className:X,children:[e.location.city,", ",e.location.state]}),o.jsxs("div",{className:U,children:[o.jsxs("div",{className:B,children:[o.jsx(Ft,{size:16}),o.jsx("span",{children:e.features.bedrooms})]}),o.jsxs("div",{className:B,children:[o.jsx(Vt,{size:16}),o.jsx("span",{children:e.features.bathrooms})]}),o.jsxs("div",{className:B,children:[o.jsx($t,{size:16}),o.jsx("span",{children:e.features.parking})]}),o.jsxs("div",{className:B,children:[o.jsx(Qt,{size:16}),o.jsxs("span",{children:[e.features.area," m²"]})]})]}),e.amenities.length>0&&o.jsx("p",{className:K,children:e.amenities.join(", ")})]})]});return e.href?o.jsx("a",{href:e.href,className:"no-underline text-inherit",children:_}):_},tr=C.forwardRef(({images:e,transactionType:r,totalPhotos:t,onViewAllClick:s,onImageClick:n,className:a},i)=>{const c=e.slice(0,5),l=d=>{n?.(d)};return o.jsxs("div",{ref:i,className:p("w-full h-full grid grid-cols-2 gap-2",a),children:[o.jsx("div",{className:"relative col-span-1 row-span-2 rounded-2xl overflow-hidden group cursor-pointer",children:c[0]?o.jsxs(o.Fragment,{children:[o.jsx("img",{src:c[0],alt:"Property main view",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>l(0)}),r&&o.jsx("div",{className:"absolute top-4 left-4 bg-white rounded-full px-4 py-2 shadow-md",children:o.jsx("span",{className:"text-sm font-medium text-foreground",children:r})})]}):o.jsx("div",{className:"w-full h-full bg-muted flex items-center justify-center",children:o.jsx("span",{className:"text-muted-foreground",children:"No image"})})}),o.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:c[1]?o.jsx("img",{src:c[1],alt:"Property view 2",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>l(1)}):o.jsx("div",{className:"w-full h-full bg-muted"})}),o.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:c[2]?o.jsx("img",{src:c[2],alt:"Property view 3",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>l(2)}):o.jsx("div",{className:"w-full h-full bg-muted"})}),o.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:c[3]?o.jsx("img",{src:c[3],alt:"Property view 4",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>l(3)}):o.jsx("div",{className:"w-full h-full bg-muted"})}),o.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:c[4]?o.jsxs(o.Fragment,{children:[o.jsx("img",{src:c[4],alt:"Property view 5",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>l(4)}),t&&t>5&&o.jsx("div",{className:"absolute bottom-4 right-4",children:o.jsxs("button",{onClick:d=>{d.stopPropagation(),s?.()},className:"flex items-center gap-2 bg-white rounded-full px-4 py-2 shadow-md hover:shadow-lg transition-all duration-200 hover:scale-105",children:[o.jsx(Ht,{className:"w-4 h-4 text-foreground"}),o.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Ver las ",t," fotos"]})]})})]}):o.jsx("div",{className:"w-full h-full bg-muted"})})]})});tr.displayName="PropertyGallery";const or=k.forwardRef(({title:e,description:r,className:t},s)=>o.jsxs("div",{ref:s,className:p("space-y-1.5",t),children:[o.jsx(P,{variant:"heading",size:"2xl",className:"font-bold",children:e}),r&&o.jsx(P,{variant:"body",size:"base",className:"text-muted-foreground",children:r})]}));or.displayName="EntityDirectoryHeader";const sr=k.forwardRef(({entity:e,categories:r,showIcon:t=!0,showCategoryBadge:s=!0,showMetric:n=!0,compact:a=!1,className:i},c)=>{const l=r?.find(b=>b.id===e.categoryId),d=!!e.onClick,g=()=>{e.onClick&&!e.disabled&&e.onClick()},m=b=>{d&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),g())};return o.jsxs("div",{ref:c,role:d?"button":"listitem",tabIndex:d&&!e.disabled?0:void 0,onClick:g,onKeyDown:m,"aria-disabled":e.disabled,className:p("flex items-center gap-4 border-b border-border transition-colors",a?"p-3":"p-4",d&&!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",i),children:[t&&o.jsx("div",{className:p("flex-shrink-0 flex items-center justify-center bg-muted rounded-full",a?"w-8 h-8 text-lg":"w-10 h-10 text-xl"),"aria-hidden":"true",children:typeof e.icon=="string"?o.jsx("span",{children:e.icon}):e.icon?e.icon:o.jsx("span",{className:"text-muted-foreground",children:"•"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx(P,{variant:"body",size:a?"sm":"base",className:"font-semibold truncate",children:e.title}),e.subtitle&&o.jsx(P,{variant:"body",size:a?"xs":"sm",className:"text-muted-foreground truncate",children:e.subtitle})]}),s&&l&&o.jsx(de,{variant:"secondary",size:a?"sm":"default",className:"flex-shrink-0 bg-foreground text-background hover:bg-foreground/90","aria-label":`Category: ${l.label}`,children:l.label}),n&&e.metricValue&&o.jsxs("div",{className:"flex-shrink-0 text-right min-w-[4rem]",children:[o.jsx(P,{variant:"body",size:a?"sm":"base",className:"font-medium",children:e.metricValue}),e.metricLabel&&o.jsx(P,{variant:"body",size:"xs",className:"text-muted-foreground",children:e.metricLabel})]})]})});sr.displayName="EntityDirectoryListItem";const nr=k.forwardRef(({columns:e,showIcon:r,sort:t,onSortChange:s,compact:n,className:a},i)=>{const c=m=>{if(!s)return;const b=t?.column===m&&t?.direction==="asc"?"desc":"asc";s({column:m,direction:b})},l=m=>{c(m)},d=(m,b)=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),c(b))},g=m=>m!=="title"&&m!=="metric"?null:!t||t.column!==m?o.jsx("span",{className:"ml-1 text-muted-foreground opacity-50","aria-hidden":"true",children:"⇅"}):o.jsx("span",{className:"ml-1","aria-hidden":"true",children:t.direction==="asc"?"↑":"↓"});return o.jsxs("div",{ref:i,role:"row",className:p("flex items-center gap-4 bg-background border-b border-border font-medium text-sm text-muted-foreground",n?"px-3 py-2":"px-4 py-3",a),children:[r&&o.jsx("div",{className:n?"w-8":"w-10"}),e.map(m=>{const b=m.sortable&&(m.key==="title"||m.key==="metric"),N=t?.column===m.key;return o.jsxs("div",{role:"columnheader","aria-sort":N?t?.direction==="asc"?"ascending":"descending":void 0,className:p(m.key==="title"&&"flex-1",m.key==="category"&&"w-40",m.key==="metric"&&"w-24 text-right",m.align==="center"&&"text-center",m.align==="right"&&"text-right",b&&"cursor-pointer hover:text-foreground transition-colors select-none",N&&"text-foreground"),style:m.width?{width:m.width}:void 0,onClick:b&&(m.key==="title"||m.key==="metric")?()=>l(m.key):void 0,tabIndex:b?0:void 0,onKeyDown:b&&(m.key==="title"||m.key==="metric")?w=>d(w,m.key):void 0,children:[m.label,b&&g(m.key)]},m.key)})]})});nr.displayName="EntityDirectoryTableHeader";const ar=k.forwardRef(({entities:e,categories:r,showIcons:t=!0,showCategoryBadges:s=!0,showMetric:n=!0,metricLabel:a,sortable:i=!1,sort:c,onSortChange:l,compact:d=!1,renderItem:g,className:m},b)=>{const N=[{key:"title",label:a?"Nombre":"Name",sortable:i},...s?[{key:"category",label:"Categoría",sortable:!1}]:[],...n&&a?[{key:"metric",label:a,sortable:i,align:"right"}]:[]];return o.jsxs("div",{ref:b,role:"table","aria-label":"Entity directory",className:p("border border-border rounded-lg overflow-hidden",m),children:[o.jsx(nr,{columns:N,showIcon:t,sort:c,onSortChange:l,compact:d}),o.jsx("div",{role:"rowgroup",children:e.map(w=>g?o.jsx(k.Fragment,{children:g(w)},w.id):o.jsx(sr,{entity:w,categories:r,showIcon:t,showCategoryBadge:s,showMetric:n,compact:d},w.id))})]})});ar.displayName="EntityDirectoryList";const ir=k.forwardRef(({message:e="No entities found",icon:r,action:t,className:s},n)=>o.jsxs("div",{ref:n,role:"status","aria-live":"polite",className:p("flex flex-col items-center justify-center py-12 px-4 text-center",s),children:[r&&o.jsx("div",{className:"mb-4 text-4xl opacity-50","aria-hidden":"true",children:r}),o.jsx(P,{variant:"body",size:"lg",className:"text-muted-foreground mb-4",children:e}),t&&o.jsx(H,{variant:"outline",onClick:t.onClick,children:t.label})]}));ir.displayName="EntityDirectoryEmptyState";const lr=k.forwardRef(({error:e,onRetry:r,className:t},s)=>{const n=typeof e=="string"?e:e.message;return o.jsxs("div",{ref:s,role:"alert","aria-live":"assertive",className:p("flex flex-col items-center justify-center py-12 px-4 text-center",t),children:[o.jsx("div",{className:"mb-4 text-4xl","aria-hidden":"true",children:"⚠️"}),o.jsx(P,{variant:"body",size:"lg",className:"text-destructive mb-2 font-semibold",children:"Error"}),o.jsx(P,{variant:"body",size:"base",className:"text-muted-foreground mb-4",children:n}),r&&o.jsx(H,{variant:"outline",onClick:r,children:"Try Again"})]})});lr.displayName="EntityDirectoryErrorState";const cr=k.forwardRef(({rows:e=5,className:r},t)=>o.jsxs("div",{ref:t,role:"status","aria-live":"polite","aria-label":"Loading entities",className:p("space-y-3",r),children:[Array.from({length:e}).map((s,n)=>o.jsxs("div",{className:"flex items-center gap-4 p-4 border border-border rounded-lg animate-pulse",children:[o.jsx("div",{className:"w-10 h-10 bg-muted rounded-full flex-shrink-0"}),o.jsxs("div",{className:"flex-1 space-y-2",children:[o.jsx("div",{className:"h-4 bg-muted rounded w-1/3"}),o.jsx("div",{className:"h-3 bg-muted rounded w-1/2"})]}),o.jsx("div",{className:"h-6 bg-muted rounded-full w-24 flex-shrink-0"}),o.jsx("div",{className:"h-4 bg-muted rounded w-16 flex-shrink-0"})]},n)),o.jsx("span",{className:"sr-only",children:"Loading..."})]}));cr.displayName="EntityDirectoryLoadingState";const dr=k.forwardRef(({value:e,onChange:r,placeholder:t="Search entities...",className:s},n)=>o.jsxs("div",{className:p("relative",s),children:[o.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none",children:o.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:o.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"})})}),o.jsx("input",{ref:n,type:"search",value:e,onChange:a=>r(a.target.value),placeholder:t,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&&o.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:o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}));dr.displayName="EntityDirectorySearchFilter";const mr=k.forwardRef(({entities:e,categories:r,title:t,description:s,activeCategory:n,onCategoryChange:a,showCategoryCount:i,getCategoryCount:c,enableSearch:l=!1,searchQuery:d="",onSearchChange:g,searchPlaceholder:m,sortable:b=!1,sort:N,onSortChange:w,showIcons:S=!0,showCategoryBadges:M=!0,showMetric:R=!0,metricLabel:D,compact:$=!1,loading:L=!1,error:I,emptyMessage:F,onRetry:G,emptyState:x,errorState:T,loadingState:J,renderItem:X,className:U,style:B},K)=>{const _=r&&r.length>0,v=!L&&!I&&e.length===0,j=!L&&!!I;return o.jsxs("div",{ref:K,className:p("space-y-6",U),style:B,children:[o.jsx(or,{title:t,description:s}),_&&a&&o.jsx(we,{categories:r,activeCategory:n,onCategoryChange:a,showCount:i,getCategoryCount:c}),l&&g&&o.jsx(dr,{value:d,onChange:g,placeholder:m}),L&&(J||o.jsx(cr,{})),j&&(T||o.jsx(lr,{error:I,onRetry:G})),v&&(x||o.jsx(ir,{message:F})),!L&&!j&&!v&&o.jsx(ar,{entities:e,categories:r,showIcons:S,showCategoryBadges:M,showMetric:R,metricLabel:D,sortable:b,sort:N,onSortChange:w,compact:$,renderItem:X})]})});mr.displayName="EntityDirectory";const eo=e=>{switch(e){case"sm":return"p-4";case"md":return"p-6";case"lg":return"p-8";default:return"p-0"}},me=({children:e,header:r,sidebar:t,footer:s,padding:n="md"})=>{const a=p("min-h-screen flex flex-col"),i=p("bg-card border-b border-border z-10"),c=p("flex flex-1"),l=p("w-70 bg-card border-r border-border p-6"),d=p("flex-1 flex flex-col"),g=p("flex-1 mx-auto w-full max-w-7xl",eo(n));return o.jsxs("div",{className:a,children:[r&&o.jsx("header",{className:i,children:r}),o.jsxs("div",{className:c,children:[t&&o.jsx("aside",{className:l,children:t}),o.jsx("div",{className:d,children:o.jsx("main",{className:g,children:e})})]}),s&&o.jsx("footer",{className:"bg-card border-t border-border mt-auto",children:s})]})},ro=({children:e,header:r,sidebar:t})=>o.jsx(me,{header:r,sidebar:t,padding:"lg",children:o.jsx("div",{className:"max-w-screen-2xl",children:e})}),to=({children:e,title:r,subtitle:t})=>o.jsx(me,{padding:"lg",children:o.jsxs("div",{className:"max-w-md mx-auto",children:[o.jsxs("div",{className:"text-center mb-8",children:[r&&o.jsx(P,{variant:"h2",className:"mb-2",children:r}),t&&o.jsx(P,{variant:"body",color:"muted",children:t})]}),e]})}),oo=({children:e,header:r,footer:t})=>o.jsx(me,{header:r,footer:t,padding:"none",children:e}),so={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)"}},no={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)"}},ao={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)"}},io={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"}},he={light:so,dark:no,corporate:ao,minimal:io},ur=ce.createEvent(),fr=ce.createEvent(),gr=ce.createEvent(),Z=ce.createStore(he.light).on(ur,(e,r)=>he[r]||e).on(fr,(e,r)=>r).on(gr,()=>he.light),lo=Z.map(e=>e.name),co=Z.map(e=>e.colors);Z.map(e=>e.shapes);Z.map(e=>e.typography);Z.map(e=>e.spacing);Z.map(e=>e.shadows);const pr=C.createContext(null),mo=()=>{const e=C.useContext(pr);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},uo=({children:e})=>{const t={theme:Nr.useUnit(Z)};return o.jsx(pr.Provider,{value:t,children:e})},fo={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"}},hr={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"}}},xr={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},br={withOpacity:(e,r)=>r!==void 0?`hsl(var(${e}) / ${r})`:`hsl(var(${e}))`,get:e=>`hsl(var(--${e}))`},yr={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"}},vr={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"}},wr={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"}},kr={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"}},jr={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")}},Cr={debounce:(e,r)=>{let t;return(...s)=>{clearTimeout(t),t=setTimeout(()=>e(...s),r)}},throttle:(e,r)=>{let t;return(...s)=>{t||(e(...s),t=!0,setTimeout(()=>t=!1,r))}}},go=({href:e,children:r})=>o.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});exports.$theme=Z;exports.$themeColors=co;exports.$themeName=lo;exports.AuthLayout=to;exports.Button=H;exports.Card=Ke;exports.CategoryChips=we;exports.Chip=de;exports.CompoundCard=Nt;exports.ConfirmModal=zt;exports.DashboardLayout=ro;exports.EntityDirectory=mr;exports.MarketingLayout=oo;exports.Modal=Qe;exports.ModalWithActions=Je;exports.PageLayout=me;exports.PropertyCard=Yt;exports.PropertyGallery=tr;exports.SkipLink=go;exports.Text=P;exports.ThemeProvider=uo;exports.a11y=yr;exports.accessibilityUtils=yr;exports.animationUtils=wr;exports.animations=wr;exports.breakpoints=xr;exports.cn=p;exports.colorUtils=br;exports.colors=br;exports.componentSizes=vr;exports.componentVariants=hr;exports.countEntitiesByCategory=er;exports.designSystem=fo;exports.filterEntitiesByCategory=Xe;exports.layout=kr;exports.layoutUtils=kr;exports.performance=Cr;exports.performanceUtils=Cr;exports.resetTheme=gr;exports.responsiveBreakpoints=xr;exports.setCustomTheme=fr;exports.setTheme=ur;exports.sizes=vr;exports.sortEntities=Ye;exports.theme=jr;exports.themeUtils=jr;exports.useEntityFilter=Et;exports.useTheme=mo;exports.variants=hr;
61
+ */const as=[["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"}]],ns=O("heart",as);/**
62
+ * @license lucide-react v0.547.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */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"}]],ls=O("maximize",is);/**
67
+ * @license lucide-react v0.547.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const cs=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],ds=O("trending-up",cs),us=Z(["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"}}),ms=Z(["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}}),fs=Z("mt-1.5 text-sm",{variants:{variant:{default:"text-muted-foreground",error:"text-destructive",success:"text-success"}},defaultVariants:{variant:"default"}}),Se=v.forwardRef(({className:e,containerClassName:t,labelClassName:s,variant:o,selectSize:a,label:n,helperText:l,error:i,required:c,options:d,placeholder:m,id:u,...h},N)=>{const y=v.useId(),w=u||y,S=`${w}-helper`,P=`${w}-error`,R=i?"error":o,A=i||l;return r.jsxs("div",{className:g("w-full",t),children:[n&&r.jsx("label",{htmlFor:w,className:g(ms({variant:R,required:c}),s),children:n}),r.jsxs("div",{className:"relative",children:[r.jsxs("select",{id:w,ref:N,className:g(us({variant:R,selectSize:a}),"pr-10",e),"aria-invalid":i?"true":"false","aria-describedby":A?i?P:S:void 0,...h,children:[m&&r.jsx("option",{value:"",disabled:!0,children:m}),d.map(M=>r.jsx("option",{value:M.value,disabled:M.disabled,children:M.label},M.value))]}),r.jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:r.jsx(Jr,{className:"h-4 w-4"})})]}),A&&r.jsx("p",{id:i?P:S,className:fs({variant:R}),role:i?"alert":void 0,children:A})]})});Se.displayName="Select";function ps(e,t,s,o,a,n){const l=(e-90)*Math.PI/180,i=(t-90)*Math.PI/180,c=a+s*Math.cos(l),d=n+s*Math.sin(l),m=a+s*Math.cos(i),u=n+s*Math.sin(i),h=a+o*Math.cos(i),N=n+o*Math.sin(i),y=a+o*Math.cos(l),w=n+o*Math.sin(l),S=t-e>180?1:0;return[`M ${c} ${d}`,`A ${s} ${s} 0 ${S} 1 ${m} ${u}`,`L ${h} ${N}`,`A ${o} ${o} 0 ${S} 0 ${y} ${w}`,"Z"].join(" ")}function gs(e,t,s,o,a){const n=e.reduce((c,d)=>c+d.value,0);if(n===0)return[];let l=0;const i=[];return e.forEach(c=>{const d=c.value/n*360,m=l,u=l+d,h=ps(m,u,t,s,o,a);i.push({path:h,segment:c}),l=u}),i}const Pe=v.forwardRef(({segments:e,size:t=300,innerRadiusRatio:s=.6,centerContent:o,showLegend:a=!1,legendPosition:n="bottom",className:l,onSegmentClick:i,onSegmentHover:c},d)=>{const[m,u]=v.useState(null),h=t/2,N=t/2,y=2,w=t/2-y,S=w*s,P=gs(e,w,S,h,N),R=M=>{u(M),c?.(M)},A=n==="left"||n==="right";return r.jsxs("div",{ref:d,className:g("flex gap-4",A?"flex-row items-center":"flex-col items-center",n==="right"&&"flex-row-reverse",n==="top"&&"flex-col-reverse",l),children:[r.jsxs("div",{className:"relative inline-block",style:{width:t,height:t},children:[r.jsx("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,children:P.map(({path:M,segment:C},V)=>r.jsx("path",{d:M,fill:C.color,stroke:"white",strokeWidth:y,className:g("transition-opacity duration-200",m&&m!==C&&"opacity-50",i&&"cursor-pointer"),onMouseEnter:()=>R(C),onMouseLeave:()=>R(null),onClick:()=>i?.(C)},`${C.label}-${V}`))}),o&&r.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center",style:{maxWidth:S*1.8},children:o})]}),a&&r.jsx("div",{className:g("flex gap-2",A?"flex-col":"flex-row flex-wrap justify-center"),children:e.map((M,C)=>r.jsxs("div",{className:g("flex items-center gap-2 text-sm transition-opacity duration-200",m&&m!==M&&"opacity-50",i&&"cursor-pointer"),onMouseEnter:()=>R(M),onMouseLeave:()=>R(null),onClick:()=>i?.(M),children:[r.jsx("div",{className:"h-3 w-3 rounded-sm flex-shrink-0",style:{backgroundColor:M.color}}),r.jsx("span",{className:"text-muted-foreground",children:M.label})]},`${M.label}-${C}`))})]})});Pe.displayName="DonutChart";function at(e,t){return!t||t==="all"?e:e.filter(s=>s.categoryId===t)}function nt(e,t){const s=[...e];return s.sort((o,a)=>{let n="",l="";return t.column==="title"?(n=o.title.toLowerCase(),l=a.title.toLowerCase()):t.column==="metric"&&(n=Be(o.metricValue),l=Be(a.metricValue)),n<l?t.direction==="asc"?-1:1:n>l?t.direction==="asc"?1:-1:0}),s}function Be(e){if(!e)return 0;const t=e.match(/[\d.]+/);return t?parseFloat(t[0]):0}function it(e,t){return t==="all"?e.length:e.filter(s=>s.categoryId===t).length}function hs(e,t,s={}){const{initialCategory:o=null,initialSort:a=null,enableSearch:n=!1}=s,[l,i]=L.useState(o),[c,d]=L.useState(a),[m,u]=L.useState(""),h=L.useMemo(()=>at(e,l),[e,l]),N=L.useMemo(()=>{if(!n||!m.trim())return h;const P=m.toLowerCase();return h.filter(R=>R.title.toLowerCase().includes(P)||R.subtitle?.toLowerCase().includes(P))},[h,m,n]),y=L.useMemo(()=>c?nt(N,c):N,[N,c]),w=L.useCallback(P=>it(e,P),[e]),S=L.useCallback(()=>{i(o),d(a),u("")},[o,a]);return{activeCategory:l,setActiveCategory:i,sort:c,setSort:d,searchQuery:m,setSearchQuery:u,filteredEntities:y,getCategoryCount:w,resetFilters:S}}const xs=Z("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"}}),pe=v.forwardRef(({className:e,variant:t,size:s,icon:o,selected:a,dismissible:n,onDismiss:l,children:i,disabled:c,...d},m)=>{const u=a?"selected":t;return r.jsxs("button",{type:"button",className:g(xs({variant:u,size:s,className:e})),ref:m,disabled:c,"aria-disabled":c?"true":void 0,"aria-pressed":a?"true":"false",...d,children:[o&&r.jsx("span",{className:"mr-1.5 inline-flex items-center","aria-hidden":"true",children:o}),r.jsx("span",{children:i}),n&&l&&r.jsx("button",{type:"button",className:"ml-1.5 inline-flex items-center hover:opacity-70",onClick:h=>{h.stopPropagation(),l()},"aria-label":"Remove",children:"×"})]})});pe.displayName="Chip";const Ee=v.forwardRef(({categories:e,activeCategory:t,onCategoryChange:s,showCount:o,getCategoryCount:a,className:n},l)=>r.jsx("div",{ref:l,role:"tablist","aria-label":"Filter by category",className:g("flex flex-wrap gap-2 overflow-x-auto pb-2",n),children:e.map(i=>{const c=t===i.id,d=o&&a?a(i.id):void 0;return r.jsxs(pe,{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?v.createElement(i.icon):void 0,onClick:()=>s(c?null:i.id),children:[i.label,d!==void 0&&r.jsxs("span",{className:"ml-1.5 opacity-70",children:["(",d,")"]})]},i.id)})}));Ee.displayName="CategoryChips";const bs=e=>{switch(e.variant||ys(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"}},ys=e=>{switch(e){case"Venta":return"primary";case"Desarrollo":return"success";case"Renta":return"info";case"Remate":return"warning";default:return"secondary"}},vs=({property:e,className:t,onLike:s,onImageClick:o,showLikeButton:a=!0,showNavigation:n=!0})=>{const[l,i]=L.useState(0),[c,d]=L.useState(!1),m=()=>{i(j=>j===e.images.length-1?0:j+1)},u=()=>{i(j=>j===0?e.images.length-1:j-1)},h=j=>{j.preventDefault(),j.stopPropagation();const z=!c;d(z),s?.(e.id,z)},N=j=>{j.preventDefault(),j.stopPropagation(),o?.(l,e.id)},y=(j,z)=>!j||!z?"Price not available":`$${j.toLocaleString()} ${z}`,w=g("relative overflow-hidden bg-card rounded-2xl shadow-md transition-all duration-300 ease-out cursor-pointer hover:-translate-y-1 hover:shadow-xl",t),S=g("relative overflow-hidden"),P=g("w-full h-full object-cover transition-transform duration-300 hover:scale-105"),R=g("absolute top-4 left-4 flex flex-wrap gap-1 z-10"),A=g("px-2 py-1 rounded-lg text-xs font-medium uppercase tracking-wide"),M=g("absolute top-4 right-4 z-10 bg-background/90 backdrop-blur-sm border border-border/20 text-foreground rounded-full w-10 h-10 flex items-center justify-center cursor-pointer transition-all duration-200 hover:bg-background hover:scale-105"),C=g("absolute top-1/2 -translate-y-1/2 z-10 bg-background/90 backdrop-blur-sm border border-border/20 text-foreground w-10 h-10 rounded-full p-0 flex items-center justify-center cursor-pointer transition-all duration-200 hover:bg-background hover:scale-105"),V=g("absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-1 z-10"),I=g("w-2 h-2 rounded-full border-none cursor-pointer transition-all duration-200 hover:scale-120"),b=g("p-6"),D=g("text-lg font-bold text-foreground mb-2 line-clamp-2 leading-tight"),U=g("text-xl font-bold text-primary mb-2"),ee=g("text-base text-muted-foreground mb-4"),H=g("flex items-center gap-4 mb-4"),B=g("flex items-center gap-1 text-sm text-muted-foreground"),Q=g("text-sm text-muted-foreground line-clamp-2"),G=r.jsxs("div",{className:w,children:[r.jsxs("div",{className:g(S,"aspect-[4/3] bg-red-500"),children:[r.jsx("img",{src:e.images[l],alt:e.title,className:P,onClick:o?N:void 0}),r.jsx("div",{className:R,children:e.transactionTypes.map((j,z)=>r.jsx("span",{className:g(A,bs(j)),children:j.type},z))}),a&&r.jsx("button",{onClick:h,className:M,"aria-label":c?"Unlike property":"Like property",children:r.jsx(ns,{size:20,fill:c?"currentColor":"none",className:c?"text-destructive":""})}),n&&e.images.length>1&&r.jsxs(r.Fragment,{children:[r.jsx(X,{onClick:j=>{j.preventDefault(),j.stopPropagation(),u()},className:g(C,"left-4"),"aria-label":"Previous image",children:r.jsx(es,{size:20})}),r.jsx(X,{onClick:j=>{j.preventDefault(),j.stopPropagation(),m()},className:g(C,"right-4"),"aria-label":"Next image",children:r.jsx(rs,{size:20})}),r.jsx("div",{className:V,children:e.images.map((j,z)=>r.jsx("button",{className:g(I,z===l?"bg-background":"bg-background/50"),onClick:x=>{x.preventDefault(),x.stopPropagation(),i(z)},"aria-label":`Go to image ${z+1}`,"aria-current":z===l},z))})]})]}),r.jsxs("div",{className:b,children:[r.jsx("h3",{className:D,children:e.title}),r.jsx("p",{className:U,children:y(e.price?.amount,e.price?.currency)}),r.jsxs("p",{className:ee,children:[e.location.city,", ",e.location.state]}),r.jsxs("div",{className:H,children:[r.jsxs("div",{className:B,children:[r.jsx(Xr,{size:16}),r.jsx("span",{children:e.features.bedrooms})]}),r.jsxs("div",{className:B,children:[r.jsx(Hr,{size:16}),r.jsx("span",{children:e.features.bathrooms})]}),r.jsxs("div",{className:B,children:[r.jsx(Kr,{size:16}),r.jsx("span",{children:e.features.parking})]}),r.jsxs("div",{className:B,children:[r.jsx(ls,{size:16}),r.jsxs("span",{children:[e.features.area," m²"]})]})]}),e.amenities.length>0&&r.jsx("p",{className:Q,children:e.amenities.join(", ")})]})]});return e.href?r.jsx("a",{href:e.href,className:"no-underline text-inherit",children:G}):G},lt=L.forwardRef(({images:e,transactionType:t,totalPhotos:s,onViewAllClick:o,onImageClick:a,className:n},l)=>{const i=e.slice(0,5),c=d=>{a?.(d)};return r.jsxs("div",{ref:l,className:g("w-full h-full grid grid-cols-2 gap-2",n),children:[r.jsx("div",{className:"relative col-span-1 row-span-2 rounded-2xl overflow-hidden group cursor-pointer",children:i[0]?r.jsxs(r.Fragment,{children:[r.jsx("img",{src:i[0],alt:"Property main view",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(0)}),t&&r.jsx("div",{className:"absolute top-4 left-4 bg-white rounded-full px-4 py-2 shadow-md",children:r.jsx("span",{className:"text-sm font-medium text-foreground",children:t})})]}):r.jsx("div",{className:"w-full h-full bg-muted flex items-center justify-center",children:r.jsx("span",{className:"text-muted-foreground",children:"No image"})})}),r.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:i[1]?r.jsx("img",{src:i[1],alt:"Property view 2",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(1)}):r.jsx("div",{className:"w-full h-full bg-muted"})}),r.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:i[2]?r.jsx("img",{src:i[2],alt:"Property view 3",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(2)}):r.jsx("div",{className:"w-full h-full bg-muted"})}),r.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:i[3]?r.jsx("img",{src:i[3],alt:"Property view 4",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(3)}):r.jsx("div",{className:"w-full h-full bg-muted"})}),r.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:i[4]?r.jsxs(r.Fragment,{children:[r.jsx("img",{src:i[4],alt:"Property view 5",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(4)}),s&&s>5&&r.jsx("div",{className:"absolute bottom-4 right-4",children:r.jsxs("button",{onClick:d=>{d.stopPropagation(),o?.()},className:"flex items-center gap-2 bg-white rounded-full px-4 py-2 shadow-md hover:shadow-lg transition-all duration-200 hover:scale-105",children:[r.jsx(os,{className:"w-4 h-4 text-foreground"}),r.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Ver las ",s," fotos"]})]})})]}):r.jsx("div",{className:"w-full h-full bg-muted"})})]})});lt.displayName="PropertyGallery";const ct=v.forwardRef(({title:e,description:t,className:s},o)=>r.jsxs("div",{ref:o,className:g("space-y-1.5",s),children:[r.jsx(E,{variant:"h2",className:"font-bold",children:e}),t&&r.jsx(E,{variant:"body",className:"text-muted-foreground",children:t})]}));ct.displayName="EntityDirectoryHeader";const dt=v.forwardRef(({entity:e,categories:t,showIcon:s=!0,showCategoryBadge:o=!0,showMetric:a=!0,compact:n=!1,className:l},i)=>{const c=t?.find(h=>h.id===e.categoryId),d=!!e.onClick,m=()=>{e.onClick&&!e.disabled&&e.onClick()},u=h=>{d&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),m())};return r.jsxs("div",{ref:i,role:d?"button":"listitem",tabIndex:d&&!e.disabled?0:void 0,onClick:m,onKeyDown:u,"aria-disabled":e.disabled,className:g("flex items-center gap-4 border-b border-border transition-colors",n?"p-3":"p-4",d&&!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&&r.jsx("div",{className:g("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"?r.jsx("span",{children:e.icon}):e.icon?v.createElement(e.icon):r.jsx("span",{className:"text-muted-foreground",children:"•"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx(E,{variant:n?"body-sm":"body",className:"font-semibold truncate",children:e.title}),e.subtitle&&r.jsx(E,{variant:n?"caption":"body-sm",className:"text-muted-foreground truncate",children:e.subtitle})]}),o&&c&&r.jsx(pe,{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&&r.jsxs("div",{className:"flex-shrink-0 text-right min-w-[4rem]",children:[r.jsx(E,{variant:n?"body-sm":"body",className:"font-medium",children:e.metricValue}),e.metricLabel&&r.jsx(E,{variant:"caption",className:"text-muted-foreground",children:e.metricLabel})]})]})});dt.displayName="EntityDirectoryListItem";const ut=v.forwardRef(({columns:e,showIcon:t,sort:s,onSortChange:o,compact:a,className:n},l)=>{const i=u=>{if(!o)return;const h=s?.column===u&&s?.direction==="asc"?"desc":"asc";o({column:u,direction:h})},c=u=>{i(u)},d=(u,h)=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),i(h))},m=u=>u!=="title"&&u!=="metric"?null:!s||s.column!==u?r.jsx("span",{className:"ml-1 text-muted-foreground opacity-50","aria-hidden":"true",children:"⇅"}):r.jsx("span",{className:"ml-1","aria-hidden":"true",children:s.direction==="asc"?"↑":"↓"});return r.jsxs("div",{ref:l,role:"row",className:g("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:[t&&r.jsx("div",{className:a?"w-8":"w-10"}),e.map(u=>{const h=u.sortable&&(u.key==="title"||u.key==="metric"),N=s?.column===u.key;return r.jsxs("div",{role:"columnheader","aria-sort":N?s?.direction==="asc"?"ascending":"descending":void 0,className:g(u.key==="title"&&"flex-1",u.key==="category"&&"w-40",u.key==="metric"&&"w-24 text-right",u.align==="center"&&"text-center",u.align==="right"&&"text-right",h&&"cursor-pointer hover:text-foreground transition-colors select-none",N&&"text-foreground"),style:u.width?{width:u.width}:void 0,onClick:h&&(u.key==="title"||u.key==="metric")?()=>c(u.key):void 0,tabIndex:h?0:void 0,onKeyDown:h&&(u.key==="title"||u.key==="metric")?y=>d(y,u.key):void 0,children:[u.label,h&&m(u.key)]},u.key)})]})});ut.displayName="EntityDirectoryTableHeader";const mt=v.forwardRef(({entities:e,categories:t,showIcons:s=!0,showCategoryBadges:o=!0,showMetric:a=!0,metricLabel:n,sortable:l=!1,sort:i,onSortChange:c,compact:d=!1,renderItem:m,className:u},h)=>{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 r.jsxs("div",{ref:h,role:"table","aria-label":"Entity directory",className:g("border border-border rounded-lg overflow-hidden",u),children:[r.jsx(ut,{columns:N,showIcon:s,sort:i,onSortChange:c,compact:d}),r.jsx("div",{role:"rowgroup",children:e.map(y=>m?r.jsx(v.Fragment,{children:m(y)},y.id):r.jsx(dt,{entity:y,categories:t,showIcon:s,showCategoryBadge:o,showMetric:a,compact:d},y.id))})]})});mt.displayName="EntityDirectoryList";const ft=v.forwardRef(({message:e="No entities found",icon:t,action:s,className:o},a)=>r.jsxs("div",{ref:a,role:"status","aria-live":"polite",className:g("flex flex-col items-center justify-center py-12 px-4 text-center",o),children:[t&&r.jsx("div",{className:"mb-4 text-4xl opacity-50","aria-hidden":"true",children:t}),r.jsx(E,{variant:"body-lg",className:"text-muted-foreground mb-4",children:e}),s&&r.jsx(X,{variant:"outline",onClick:s.onClick,children:s.label})]}));ft.displayName="EntityDirectoryEmptyState";const pt=v.forwardRef(({error:e,onRetry:t,className:s},o)=>{const a=typeof e=="string"?e:e.message;return r.jsxs("div",{ref:o,role:"alert","aria-live":"assertive",className:g("flex flex-col items-center justify-center py-12 px-4 text-center",s),children:[r.jsx("div",{className:"mb-4 text-4xl","aria-hidden":"true",children:"⚠️"}),r.jsx(E,{variant:"body-lg",className:"text-destructive mb-2 font-semibold",children:"Error"}),r.jsx(E,{variant:"body",className:"text-muted-foreground mb-4",children:a}),t&&r.jsx(X,{variant:"outline",onClick:t,children:"Try Again"})]})});pt.displayName="EntityDirectoryErrorState";const gt=v.forwardRef(({rows:e=5,className:t},s)=>r.jsxs("div",{ref:s,role:"status","aria-live":"polite","aria-label":"Loading entities",className:g("space-y-3",t),children:[Array.from({length:e}).map((o,a)=>r.jsxs("div",{className:"flex items-center gap-4 p-4 border border-border rounded-lg animate-pulse",children:[r.jsx("div",{className:"w-10 h-10 bg-muted rounded-full flex-shrink-0"}),r.jsxs("div",{className:"flex-1 space-y-2",children:[r.jsx("div",{className:"h-4 bg-muted rounded w-1/3"}),r.jsx("div",{className:"h-3 bg-muted rounded w-1/2"})]}),r.jsx("div",{className:"h-6 bg-muted rounded-full w-24 flex-shrink-0"}),r.jsx("div",{className:"h-4 bg-muted rounded w-16 flex-shrink-0"})]},a)),r.jsx("span",{className:"sr-only",children:"Loading..."})]}));gt.displayName="EntityDirectoryLoadingState";const ht=v.forwardRef(({value:e,onChange:t,placeholder:s="Search entities...",className:o},a)=>r.jsxs("div",{className:g("relative",o),children:[r.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none",children:r.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:r.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"})})}),r.jsx("input",{ref:a,type:"search",value:e,onChange:n=>t(n.target.value),placeholder:s,className:g("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&&r.jsx("button",{type:"button",onClick:()=>t(""),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}));ht.displayName="EntityDirectorySearchFilter";const xt=v.forwardRef(({entities:e,categories:t,title:s,description:o,activeCategory:a,onCategoryChange:n,showCategoryCount:l,getCategoryCount:i,enableSearch:c=!1,searchQuery:d="",onSearchChange:m,searchPlaceholder:u,sortable:h=!1,sort:N,onSortChange:y,showIcons:w=!0,showCategoryBadges:S=!0,showMetric:P=!0,metricLabel:R,compact:A=!1,loading:M=!1,error:C,emptyMessage:V,onRetry:I,emptyState:b,errorState:D,loadingState:U,renderItem:ee,className:H,style:B},Q)=>{const G=t&&t.length>0,j=!M&&!C&&e.length===0,z=!M&&!!C;return r.jsxs("div",{ref:Q,className:g("space-y-6",H),style:B,children:[r.jsx(ct,{title:s,description:o}),G&&n&&r.jsx(Ee,{categories:t,activeCategory:a,onCategoryChange:n,showCount:l,getCategoryCount:i}),c&&m&&r.jsx(ht,{value:d,onChange:m,placeholder:u}),M&&(U||r.jsx(gt,{})),z&&(D||r.jsx(pt,{error:C,onRetry:I})),j&&(b||r.jsx(ft,{message:V})),!M&&!z&&!j&&r.jsx(mt,{entities:e,categories:t,showIcons:w,showCategoryBadges:S,showMetric:P,metricLabel:R,sortable:h,sort:N,onSortChange:y,compact:A,renderItem:ee})]})});xt.displayName="EntityDirectory";function bt(e){const{propertyPrice:t,downPayment:s,loanTerm:o,interestRate:a,propertyTax:n=0,hoaFees:l=0}=e,i=t-s,c=a/100/12,d=o*12;let m;if(c===0)m=i/d;else{const y=Math.pow(1+c,d);m=i*(c*y)/(y-1)}const u=m*d,h=u-i,N=m+n+l;return{monthlyPayment:Math.round(m*100)/100,totalMonthlyPayment:Math.round(N*100)/100,totalAmount:Math.round(u*100)/100,totalInterest:Math.round(h*100)/100,loanPrincipal:Math.round(i*100)/100,breakdown:{principalAndInterest:Math.round(m*100)/100,propertyTax:Math.round(n*100)/100,hoaFees:Math.round(l*100)/100}}}function re(e,t="MXN"){return new Intl.NumberFormat("es-MX",{style:"currency",currency:t,minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}function ws(e,t=3){return`${e.toFixed(t)} %`}function ks(e){const t={};return(!e.propertyPrice||e.propertyPrice<=0)&&(t.propertyPrice="El precio de la propiedad debe ser mayor a 0"),(!e.downPayment||e.downPayment<0)&&(t.downPayment="El enganche debe ser mayor o igual a 0"),e.propertyPrice&&e.downPayment&&e.downPayment>=e.propertyPrice&&(t.downPayment="El enganche debe ser menor al precio de la propiedad"),(!e.loanTerm||e.loanTerm<=0)&&(t.loanTerm="El plazo del préstamo debe ser mayor a 0"),(e.interestRate===void 0||e.interestRate<0)&&(t.interestRate="La tasa de interés debe ser mayor o igual a 0"),{isValid:Object.keys(t).length===0,errors:t}}const yt=[{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}],js=yt.map(e=>({value:e.value,label:e.label})),me={propertyPrice:2e7,downPayment:2e5,loanProgram:"30-years",interestRate:6.5},ve={principalAndInterest:"#0a2540",propertyTax:"#4da6c7",hoaFees:"#7fc9e3"},vt=v.forwardRef(({initialPropertyPrice:e=me.propertyPrice,initialDownPayment:t=me.downPayment,initialLoanProgram:s=me.loanProgram,initialInterestRate:o=me.interestRate,showPropertyTax:a=!1,showHoaFees:n=!1,className:l,onCalculationChange:i},c)=>{const[d,m]=v.useState(e),[u,h]=v.useState(t),[N,y]=v.useState(s),[w,S]=v.useState(o),[P,R]=v.useState(0),[A,M]=v.useState(0),C=v.useMemo(()=>{const b=yt.find(U=>U.value===N)?.years||30;return bt({propertyPrice:d,downPayment:u,loanTerm:b,interestRate:w,propertyTax:a?P:void 0,hoaFees:n?A:void 0})},[d,u,N,w,P,A,a,n]);v.useEffect(()=>{i?.(C)},[C,i]);const V=v.useMemo(()=>{const I=[{label:"Principal e Intereses",value:C.breakdown.principalAndInterest,color:ve.principalAndInterest}];return a&&C.breakdown.propertyTax>0&&I.push({label:"Impuesto Predial",value:C.breakdown.propertyTax,color:ve.propertyTax}),n&&C.breakdown.hoaFees>0&&I.push({label:"Cuota HOA",value:C.breakdown.hoaFees,color:ve.hoaFees}),I},[C,a,n]);return r.jsx("div",{ref:c,className:g("w-full",l),children:r.jsx(Me,{padding:"lg",className:"w-full",children:r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx(E,{variant:"h2",className:"mb-2",children:"Calculadora de Hipotecas"}),r.jsx(E,{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."})]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[r.jsxs("div",{className:"space-y-4",children:[r.jsx(Y,{label:"Precio de la propiedad",type:"number",value:d,onChange:I=>m(Number(I.target.value)),suffix:"MXN",min:0,step:1e4}),r.jsx(Y,{label:"Enganche",type:"number",value:u,onChange:I=>h(Number(I.target.value)),suffix:"MXN",min:0,step:1e4}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsx(Se,{label:"Programa de préstamos",value:N,onChange:I=>y(I.target.value),options:js}),r.jsx(Y,{label:"Tasa de interés",type:"number",value:w,onChange:I=>S(Number(I.target.value)),suffix:"%",min:0,max:100,step:.1})]}),a&&r.jsx(Y,{label:"Impuesto predial mensual",type:"number",value:P,onChange:I=>R(Number(I.target.value)),suffix:"MXN",min:0,step:100}),n&&r.jsx(Y,{label:"Cuota HOA mensual",type:"number",value:A,onChange:I=>M(Number(I.target.value)),suffix:"MXN",min:0,step:100})]}),r.jsxs("div",{className:"flex flex-col items-center justify-center",children:[r.jsx(Pe,{segments:V,size:320,innerRadiusRatio:.65,centerContent:r.jsxs("div",{className:"text-center",children:[r.jsx(E,{variant:"h1",className:"font-bold mb-1",children:re(C.totalMonthlyPayment)}),r.jsx(E,{variant:"body-sm",color:"secondary",children:"Tu Pago"})]}),showLegend:!0,legendPosition:"bottom"}),r.jsxs("div",{className:"mt-6 text-center space-y-1",children:[r.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-success",children:[r.jsx(ds,{className:"h-4 w-4"}),r.jsx("span",{className:"font-medium",children:"Trending up by 5.2% this month"})]}),r.jsx(E,{variant:"caption",color:"secondary",children:"Showing total visitors for the last 6 months"})]})]})]}),r.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 pt-4 border-t",children:[r.jsxs("div",{children:[r.jsx(E,{variant:"caption",color:"secondary",className:"mb-1",children:"Monto del préstamo"}),r.jsx(E,{variant:"body",weight:"semibold",children:re(C.loanPrincipal)})]}),r.jsxs("div",{children:[r.jsx(E,{variant:"caption",color:"secondary",className:"mb-1",children:"Pago mensual"}),r.jsx(E,{variant:"body",weight:"semibold",children:re(C.monthlyPayment)})]}),r.jsxs("div",{children:[r.jsx(E,{variant:"caption",color:"secondary",className:"mb-1",children:"Interés total"}),r.jsx(E,{variant:"body",weight:"semibold",children:re(C.totalInterest)})]}),r.jsxs("div",{children:[r.jsx(E,{variant:"caption",color:"secondary",className:"mb-1",children:"Total a pagar"}),r.jsx(E,{variant:"body",weight:"semibold",children:re(C.totalAmount)})]})]})]})})})});vt.displayName="MortgageCalculator";const Ns=e=>{switch(e){case"sm":return"p-4";case"md":return"p-6";case"lg":return"p-8";default:return"p-0"}},ge=({children:e,header:t,sidebar:s,footer:o,padding:a="md"})=>{const n=g("min-h-screen flex flex-col"),l=g("bg-card border-b border-border z-10"),i=g("flex flex-1"),c=g("w-70 bg-card border-r border-border p-6"),d=g("flex-1 flex flex-col"),m=g("flex-1 mx-auto w-full max-w-7xl",Ns(a));return r.jsxs("div",{className:n,children:[t&&r.jsx("header",{className:l,children:t}),r.jsxs("div",{className:i,children:[s&&r.jsx("aside",{className:c,children:s}),r.jsx("div",{className:d,children:r.jsx("main",{className:m,children:e})})]}),o&&r.jsx("footer",{className:"bg-card border-t border-border mt-auto",children:o})]})},Cs=({children:e,header:t,sidebar:s})=>r.jsx(ge,{header:t,sidebar:s,padding:"lg",children:r.jsx("div",{className:"max-w-screen-2xl",children:e})}),Ms=({children:e,title:t,subtitle:s})=>r.jsx(ge,{padding:"lg",children:r.jsxs("div",{className:"max-w-md mx-auto",children:[r.jsxs("div",{className:"text-center mb-8",children:[t&&r.jsx(E,{variant:"h2",className:"mb-2",children:t}),s&&r.jsx(E,{variant:"body",color:"muted",children:s})]}),e]})}),Ss=({children:e,header:t,footer:s})=>r.jsx(ge,{header:t,footer:s,padding:"none",children:e}),Ps={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)"}},Es={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)"}},Rs={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)"}},Is={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"}},we={light:Ps,dark:Es,corporate:Rs,minimal:Is},wt=fe.createEvent(),kt=fe.createEvent(),jt=fe.createEvent(),K=fe.createStore(we.light).on(wt,(e,t)=>we[t]||e).on(kt,(e,t)=>t).on(jt,()=>we.light),As=K.map(e=>e.name),zs=K.map(e=>e.colors);K.map(e=>e.shapes);K.map(e=>e.typography);K.map(e=>e.spacing);K.map(e=>e.shadows);const Nt=L.createContext(null),Ls=()=>{const e=L.useContext(Nt);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},Ts=({children:e})=>{const s={theme:Lt.useUnit(K)};return r.jsx(Nt.Provider,{value:s,children:e})},$s={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"}},Ct={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"}}},Mt={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},St={withOpacity:(e,t)=>t!==void 0?`hsl(var(${e}) / ${t})`:`hsl(var(${e}))`,get:e=>`hsl(var(--${e}))`},Pt={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"}},Et={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"}},Rt={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"}},It={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"}},At={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")}},zt={debounce:(e,t)=>{let s;return(...o)=>{clearTimeout(s),s=setTimeout(()=>e(...o),t)}},throttle:(e,t)=>{let s;return(...o)=>{s||(e(...o),s=!0,setTimeout(()=>s=!1,t))}}},Vs=({href:e,children:t})=>r.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:t});exports.$theme=K;exports.$themeColors=zs;exports.$themeName=As;exports.AuthLayout=Ms;exports.Button=X;exports.Card=Me;exports.CategoryChips=Ee;exports.Chip=pe;exports.CompoundCard=Lr;exports.ConfirmModal=$r;exports.DashboardLayout=Cs;exports.DonutChart=Pe;exports.EntityDirectory=xt;exports.Input=Y;exports.MarketingLayout=Ss;exports.Modal=rt;exports.ModalWithActions=st;exports.MortgageCalculator=vt;exports.PageLayout=ge;exports.PropertyCard=vs;exports.PropertyGallery=lt;exports.Select=Se;exports.SkipLink=Vs;exports.Text=E;exports.ThemeProvider=Ts;exports.a11y=Pt;exports.accessibilityUtils=Pt;exports.animationUtils=Rt;exports.animations=Rt;exports.breakpoints=Mt;exports.calculateMortgage=bt;exports.cn=g;exports.colorUtils=St;exports.colors=St;exports.componentSizes=Et;exports.componentVariants=Ct;exports.countEntitiesByCategory=it;exports.designSystem=$s;exports.filterEntitiesByCategory=at;exports.formatCurrency=re;exports.formatPercentage=ws;exports.layout=It;exports.layoutUtils=It;exports.performance=zt;exports.performanceUtils=zt;exports.resetTheme=jt;exports.responsiveBreakpoints=Mt;exports.setCustomTheme=kt;exports.setTheme=wt;exports.sizes=Et;exports.sortEntities=nt;exports.theme=At;exports.themeUtils=At;exports.useEntityFilter=hs;exports.useTheme=Ls;exports.validateMortgageInput=ks;exports.variants=Ct;
62
72
  //# sourceMappingURL=design-system.cjs.js.map