UNPKG

@memoraiz/frames

Version:

Easily integrate Memoraiz functionality into any website or application with the `@memoraiz/frames` package. This guide provides step-by-step instructions for embedding Memoraiz and configuring it to suit your needs.

59 lines 188 kB
import{p as zf,j as y,u as Dt,r as m,a as If,g as Wf,b as Ff,T as U,R as $f,o as qf,c as Bf,s as Hf}from"./index-CFEVtLAs.js";const Vf={from:e=>{const t=e.component;return r=>{const n=zf(e.schema,r);return y.jsx(t,{...n})}}};function Uf(){return Dt(({context:e})=>e.session)}function Gf(){const e=Uf();return e?.user}function za(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ia(...e){return t=>{let r=!1;const n=e.map(o=>{const i=za(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){const i=n[o];typeof i=="function"?i():za(e[o],null)}}}}function te(...e){return m.useCallback(Ia(...e),e)}var pe=m.forwardRef((e,t)=>{const{children:r,...n}=e,o=m.Children.toArray(r),i=o.find(Yf);if(i){const a=i.props.children,s=o.map(l=>l===i?m.Children.count(a)>1?m.Children.only(null):m.isValidElement(a)?a.props.children:null:l);return y.jsx(_r,{...n,ref:t,children:m.isValidElement(a)?m.cloneElement(a,void 0,s):null})}return y.jsx(_r,{...n,ref:t,children:r})});pe.displayName="Slot";var _r=m.forwardRef((e,t)=>{const{children:r,...n}=e;if(m.isValidElement(r)){const o=Qf(r);return m.cloneElement(r,{...Xf(n,r.props),ref:t?Ia(t,o):o})}return m.Children.count(r)>1?m.Children.only(null):null});_r.displayName="SlotClone";var Tr=({children:e})=>y.jsx(y.Fragment,{children:e});function Yf(e){return m.isValidElement(e)&&e.type===Tr}function Xf(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{i(...a),o(...a)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function Qf(e){var t,r;let n=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function Wa(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Wa(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Cr(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Wa(e))&&(n&&(n+=" "),n+=t);return n}const Fa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,$a=Cr,rt=(e,t)=>r=>{var n;if(t?.variants==null)return $a(e,r?.class,r?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=r?.[c],d=i?.[c];if(u===null)return null;const f=Fa(u)||Fa(d);return o[c][f]}),s=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(v=>{let[h,b]=v;return Array.isArray(b)?b.includes({...i,...s}[h]):{...i,...s}[h]===b})?[...c,d,f]:c},[]);return $a(e,a,l,r?.class,r?.className)},Pr="-",Jf=e=>{const t=Zf(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const i=o.split(Pr);return i[0]===""&&i.length!==1&&i.shift(),qa(i,t)||Kf(o)},getConflictingClassGroupIds:(o,i)=>{const a=r[o]||[];return i&&n[o]?[...a,...n[o]]:a}}},qa=(e,t)=>{var r;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),i=o?qa(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(Pr);return(r=t.validators.find(({validator:s})=>s(a)))==null?void 0:r.classGroupId},Ba=/^\[(.+)\]$/,Kf=e=>{if(Ba.test(e)){const t=Ba.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Zf=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return tm(Object.entries(e.classGroups),r).forEach(([o,i])=>{Or(i,n,o,t)}),n},Or=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Ha(t,o);i.classGroupId=r;return}if(typeof o=="function"){if(em(o)){Or(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([i,a])=>{Or(a,Ha(t,i),r,n)})})},Ha=(e,t)=>{let r=e;return t.split(Pr).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},em=e=>e.isThemeGetter,tm=(e,t)=>t?e.map(([r,n])=>{const o=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,s])=>[t+a,s])):i);return[r,o]}):e,rm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(i,a)=>{r.set(i,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let a=r.get(i);if(a!==void 0)return a;if((a=n.get(i))!==void 0)return o(i,a),a},set(i,a){r.has(i)?r.set(i,a):o(i,a)}}},Va="!",nm=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],i=t.length,a=s=>{const l=[];let c=0,u=0,d;for(let b=0;b<s.length;b++){let g=s[b];if(c===0){if(g===o&&(n||s.slice(b,b+i)===t)){l.push(s.slice(u,b)),u=b+i;continue}if(g==="/"){d=b;continue}}g==="["?c++:g==="]"&&c--}const f=l.length===0?s:s.substring(u),p=f.startsWith(Va),v=p?f.substring(1):f,h=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:h}};return r?s=>r({className:s,parseClassName:a}):a},om=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},im=e=>({cache:rm(e.cacheSize),parseClassName:nm(e),...Jf(e)}),am=/\s+/,sm=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(am);let s="";for(let l=a.length-1;l>=0;l-=1){const c=a[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(c);let v=!!p,h=n(v?f.substring(0,p):f);if(!h){if(!v){s=c+(s.length>0?" "+s:s);continue}if(h=n(f),!h){s=c+(s.length>0?" "+s:s);continue}v=!1}const b=om(u).join(":"),g=d?b+Va:b,w=g+h;if(i.includes(w))continue;i.push(w);const R=o(h,v);for(let x=0;x<R.length;++x){const j=R[x];i.push(g+j)}s=c+(s.length>0?" "+s:s)}return s};function lm(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ua(t))&&(n&&(n+=" "),n+=r);return n}const Ua=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Ua(e[n]))&&(r&&(r+=" "),r+=t);return r};function cm(e,...t){let r,n,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return r=im(c),n=r.cache.get,o=r.cache.set,i=s,s(l)}function s(l){const c=n(l);if(c)return c;const u=sm(l,r);return o(l,u),u}return function(){return i(lm.apply(null,arguments))}}const G=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ga=/^\[(?:([a-z-]+):)?(.+)\]$/i,um=/^\d+\/\d+$/,dm=new Set(["px","full","screen"]),fm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mm=/\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$/,pm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,hm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ke=e=>nt(e)||dm.has(e)||um.test(e),Ae=e=>ot(e,"length",Em),nt=e=>!!e&&!Number.isNaN(Number(e)),Ar=e=>ot(e,"number",nt),vt=e=>!!e&&Number.isInteger(Number(e)),gm=e=>e.endsWith("%")&&nt(e.slice(0,-1)),D=e=>Ga.test(e),Me=e=>fm.test(e),bm=new Set(["length","size","percentage"]),ym=e=>ot(e,bm,Ya),wm=e=>ot(e,"position",Ya),xm=new Set(["image","url"]),jm=e=>ot(e,xm,km),Sm=e=>ot(e,"",Rm),gt=()=>!0,ot=(e,t,r)=>{const n=Ga.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Em=e=>mm.test(e)&&!pm.test(e),Ya=()=>!1,Rm=e=>hm.test(e),km=e=>vm.test(e),Nm=()=>{const e=G("colors"),t=G("spacing"),r=G("blur"),n=G("brightness"),o=G("borderColor"),i=G("borderRadius"),a=G("borderSpacing"),s=G("borderWidth"),l=G("contrast"),c=G("grayscale"),u=G("hueRotate"),d=G("invert"),f=G("gap"),p=G("gradientColorStops"),v=G("gradientColorStopPositions"),h=G("inset"),b=G("margin"),g=G("opacity"),w=G("padding"),R=G("saturate"),x=G("scale"),j=G("sepia"),S=G("skew"),E=G("space"),k=G("translate"),T=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",D,t],N=()=>[D,t],C=()=>["",ke,Ae],M=()=>["auto",nt,D],A=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",D],re=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[nt,D];return{cacheSize:500,separator:":",theme:{colors:[gt],spacing:[ke,Ae],blur:["none","",Me,D],brightness:K(),borderColor:[e],borderRadius:["none","","full",Me,D],borderSpacing:N(),borderWidth:C(),contrast:K(),grayscale:$(),hueRotate:K(),invert:$(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[gm,Ae],inset:_(),margin:_(),opacity:K(),padding:N(),saturate:K(),scale:K(),sepia:$(),skew:K(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",D]}],container:["container"],columns:[{columns:[Me]}],"break-after":[{"break-after":re()}],"break-before":[{"break-before":re()}],"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"],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:[...A(),D]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",vt,D]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",D]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",vt,D]}],"grid-cols":[{"grid-cols":[gt]}],"col-start-end":[{col:["auto",{span:["full",vt,D]},D]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[gt]}],"row-start-end":[{row:["auto",{span:[vt,D]},D]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",D]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",D]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",D,t]}],"min-w":[{"min-w":[D,t,"min","max","fit"]}],"max-w":[{"max-w":[D,t,"none","full","min","max","fit","prose",{screen:[Me]},Me]}],h:[{h:[D,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[D,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[D,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[D,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Me,Ae]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ar]}],"font-family":[{font:[gt]}],"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:["tighter","tight","normal","wide","wider","widest",D]}],"line-clamp":[{"line-clamp":["none",nt,Ar]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ke,D]}],"list-image":[{"list-image":["none",D]}],"list-style-type":[{list:["none","disc","decimal",D]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ke,Ae]}],"underline-offset":[{"underline-offset":["auto",ke,D]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",D]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",D]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...A(),wm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ym]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},jm]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:L()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[ke,D]}],"outline-w":[{outline:[ke,Ae]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:C()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[ke,Ae]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Me,Sm]}],"shadow-color":[{shadow:[gt]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Me,D]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[R]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[R]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",D]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",D]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",D]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[vt,D]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",D]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",D]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",D]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ke,Ae,Ar]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},Xa=cm(Nm);function De(...e){return Xa(Cr(e))}const _m=Object.freeze(Object.defineProperty({__proto__:null,cn:De},Symbol.toStringTag,{value:"Module"})),Tm=rt("inline-flex items-center justify-center gap-2 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 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",brand:"bg-brand text-brand-foreground hover:bg-brand/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"}}),bt=m.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},i)=>{const a=n?pe:"button";return y.jsx(a,{className:De(Tm({variant:t,size:r,className:e})),ref:i,...o})});bt.displayName="Button";const{cn:it}=_m,Mr=m.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:it("rounded-lg border border-border bg-card text-card-foreground",e),...t}));Mr.displayName="Card";const Dr=m.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:it("flex flex-col space-y-1.5 p-6 pb-3",e),...t}));Dr.displayName="CardHeader";const Lr=m.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:it("text-lg font-semibold leading-none tracking-tight",e),...t}));Lr.displayName="CardTitle";const Qa=m.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:it("text-sm text-muted-foreground",e),...t}));Qa.displayName="CardDescription";const zr=m.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:it("p-6 pt-0",e),...t}));zr.displayName="CardContent";const Ja=m.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:it("flex items-center p-6 pt-0",e),...t}));Ja.displayName="CardFooter";/** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cm=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ka=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Pm={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"};/** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Om=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:a,...s},l)=>m.createElement("svg",{ref:l,...Pm,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Ka("lucide",o),...s},[...a.map(([c,u])=>m.createElement(c,u)),...Array.isArray(i)?i:[i]]));/** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const at=(e,t)=>{const r=m.forwardRef(({className:n,...o},i)=>m.createElement(Om,{ref:i,iconNode:t,className:Ka(`lucide-${Cm(e)}`,n),...o}));return r.displayName=`${e}`,r};/** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Am=at("Bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);/** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Mm=at("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dm=at("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lm=at("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zm=at("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Im=at("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Ir=If();const Wm=Wf(Ir);var Fm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],J=Fm.reduce((e,t)=>{const r=m.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?pe:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(s,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function $m(e,t){e&&Ir.flushSync(()=>e.dispatchEvent(t))}var Le=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{};function qm(e,t){return m.useReducer((r,n)=>t[r][n]??r,e)}var Ye=e=>{const{present:t,children:r}=e,n=Bm(t),o=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),i=te(n.ref,Hm(o));return typeof r=="function"||n.isPresent?m.cloneElement(o,{ref:i}):null};Ye.displayName="Presence";function Bm(e){const[t,r]=m.useState(),n=m.useRef({}),o=m.useRef(e),i=m.useRef("none"),a=e?"mounted":"unmounted",[s,l]=qm(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=Lt(n.current);i.current=s==="mounted"?c:"none"},[s]),Le(()=>{const c=n.current,u=o.current;if(u!==e){const d=i.current,f=Lt(c);e?l("MOUNT"):f==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&d!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Le(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=p=>{const v=Lt(n.current).includes(p.animationName);if(p.target===t&&v&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},f=p=>{p.target===t&&(i.current=Lt(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:m.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function Lt(e){return e?.animationName||"none"}function Hm(e){var t,r;let n=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function Xe(e,t=[]){let r=[];function n(i,a){const s=m.createContext(a),l=r.length;r=[...r,a];const c=d=>{var f;const{scope:p,children:v,...h}=d,b=((f=p?.[e])==null?void 0:f[l])||s,g=m.useMemo(()=>h,Object.values(h));return y.jsx(b.Provider,{value:g,children:v})};c.displayName=i+"Provider";function u(d,f){var p;const v=((p=f?.[e])==null?void 0:p[l])||s,h=m.useContext(v);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=r.map(a=>m.createContext(a));return function(a){const s=a?.[e]||i;return m.useMemo(()=>({[`__scope${e}`]:{...a,[e]:s}}),[a,s])}};return o.scopeName=e,[n,Vm(o,...t)]}function Vm(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(o){const i=n.reduce((a,{useScope:s,scopeName:l})=>{const c=s(o)[`__scope${l}`];return{...a,...c}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function oe(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}var Um=m.createContext(void 0);function Wr(e){const t=m.useContext(Um);return e||t||"ltr"}function Gm(e,[t,r]){return Math.min(r,Math.max(t,e))}function Y(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}function Ym(e,t){return m.useReducer((r,n)=>t[r][n]??r,e)}var Fr="ScrollArea",[Za,U0]=Xe(Fr),[Xm,le]=Za(Fr),es=m.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...a}=e,[s,l]=m.useState(null),[c,u]=m.useState(null),[d,f]=m.useState(null),[p,v]=m.useState(null),[h,b]=m.useState(null),[g,w]=m.useState(0),[R,x]=m.useState(0),[j,S]=m.useState(!1),[E,k]=m.useState(!1),T=te(t,_=>l(_)),P=Wr(o);return y.jsx(Xm,{scope:r,type:n,dir:P,scrollHideDelay:i,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:v,scrollbarXEnabled:j,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:b,scrollbarYEnabled:E,onScrollbarYEnabledChange:k,onCornerWidthChange:w,onCornerHeightChange:x,children:y.jsx(J.div,{dir:P,...a,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":R+"px",...e.style}})})});es.displayName=Fr;var ts="ScrollAreaViewport",rs=m.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:o,...i}=e,a=le(ts,r),s=m.useRef(null),l=te(t,s,a.onViewportChange);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),y.jsx(J.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:y.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});rs.displayName=ts;var he="ScrollAreaScrollbar",$r=m.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=le(he,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return m.useEffect(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?y.jsx(Qm,{...n,ref:t,forceMount:r}):o.type==="scroll"?y.jsx(Jm,{...n,ref:t,forceMount:r}):o.type==="auto"?y.jsx(ns,{...n,ref:t,forceMount:r}):o.type==="always"?y.jsx(qr,{...n,ref:t}):null});$r.displayName=he;var Qm=m.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=le(he,e.__scopeScrollArea),[i,a]=m.useState(!1);return m.useEffect(()=>{const s=o.scrollArea;let l=0;if(s){const c=()=>{window.clearTimeout(l),a(!0)},u=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),y.jsx(Ye,{present:r||i,children:y.jsx(ns,{"data-state":i?"visible":"hidden",...n,ref:t})})}),Jm=m.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=le(he,e.__scopeScrollArea),i=e.orientation==="horizontal",a=Ft(()=>l("SCROLL_END"),100),[s,l]=Ym("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return m.useEffect(()=>{if(s==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,o.scrollHideDelay,l]),m.useEffect(()=>{const c=o.viewport,u=i?"scrollLeft":"scrollTop";if(c){let d=c[u];const f=()=>{const p=c[u];d!==p&&(l("SCROLL"),a()),d=p};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[o.viewport,i,l,a]),y.jsx(Ye,{present:r||s!=="hidden",children:y.jsx(qr,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Y(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Y(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),ns=m.forwardRef((e,t)=>{const r=le(he,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,a]=m.useState(!1),s=e.orientation==="horizontal",l=Ft(()=>{if(r.viewport){const c=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;a(s?c:u)}},10);return st(r.viewport,l),st(r.content,l),y.jsx(Ye,{present:n||i,children:y.jsx(qr,{"data-state":i?"visible":"hidden",...o,ref:t})})}),qr=m.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=le(he,e.__scopeScrollArea),i=m.useRef(null),a=m.useRef(0),[s,l]=m.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=ls(s.viewport,s.content),u={...n,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:f=>a.current=f};function d(f,p){return np(f,a.current,s,p)}return r==="horizontal"?y.jsx(Km,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollLeft,p=cs(f,s,o.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=d(f,o.dir))}}):r==="vertical"?y.jsx(Zm,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollTop,p=cs(f,s);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=d(f))}}):null}),Km=m.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=le(he,e.__scopeScrollArea),[a,s]=m.useState(),l=m.useRef(null),c=te(t,l,i.onScrollbarXChange);return m.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),y.jsx(is,{"data-orientation":"horizontal",...o,ref:c,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Wt(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(i.viewport){const f=i.viewport.scrollLeft+u.deltaX;e.onWheelScroll(f),ds(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:It(a.paddingLeft),paddingEnd:It(a.paddingRight)}})}})}),Zm=m.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=le(he,e.__scopeScrollArea),[a,s]=m.useState(),l=m.useRef(null),c=te(t,l,i.onScrollbarYChange);return m.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),y.jsx(is,{"data-orientation":"vertical",...o,ref:c,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Wt(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(i.viewport){const f=i.viewport.scrollTop+u.deltaY;e.onWheelScroll(f),ds(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:It(a.paddingTop),paddingEnd:It(a.paddingBottom)}})}})}),[ep,os]=Za(he),is=m.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=e,p=le(he,r),[v,h]=m.useState(null),b=te(t,T=>h(T)),g=m.useRef(null),w=m.useRef(""),R=p.viewport,x=n.content-n.viewport,j=oe(u),S=oe(l),E=Ft(d,10);function k(T){if(g.current){const P=T.clientX-g.current.left,_=T.clientY-g.current.top;c({x:P,y:_})}}return m.useEffect(()=>{const T=P=>{const _=P.target;v?.contains(_)&&j(P,x)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[R,v,x,j]),m.useEffect(S,[n,S]),st(v,E),st(p.content,E),y.jsx(ep,{scope:r,scrollbar:v,hasThumb:o,onThumbChange:oe(i),onThumbPointerUp:oe(a),onThumbPositionChange:S,onThumbPointerDown:oe(s),children:y.jsx(J.div,{...f,ref:b,style:{position:"absolute",...f.style},onPointerDown:Y(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),g.current=v.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),k(T))}),onPointerMove:Y(e.onPointerMove,k),onPointerUp:Y(e.onPointerUp,T=>{const P=T.target;P.hasPointerCapture(T.pointerId)&&P.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=w.current,p.viewport&&(p.viewport.style.scrollBehavior=""),g.current=null})})})}),zt="ScrollAreaThumb",as=m.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=os(zt,e.__scopeScrollArea);return y.jsx(Ye,{present:r||o.hasThumb,children:y.jsx(tp,{ref:t,...n})})}),tp=m.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=le(zt,r),a=os(zt,r),{onThumbPositionChange:s}=a,l=te(t,d=>a.onThumbChange(d)),c=m.useRef(void 0),u=Ft(()=>{c.current&&(c.current(),c.current=void 0)},100);return m.useEffect(()=>{const d=i.viewport;if(d){const f=()=>{if(u(),!c.current){const p=op(d,s);c.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[i.viewport,u,s]),y.jsx(J.div,{"data-state":a.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Y(e.onPointerDownCapture,d=>{const f=d.target.getBoundingClientRect(),p=d.clientX-f.left,v=d.clientY-f.top;a.onThumbPointerDown({x:p,y:v})}),onPointerUp:Y(e.onPointerUp,a.onThumbPointerUp)})});as.displayName=zt;var Br="ScrollAreaCorner",ss=m.forwardRef((e,t)=>{const r=le(Br,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?y.jsx(rp,{...e,ref:t}):null});ss.displayName=Br;var rp=m.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=le(Br,r),[i,a]=m.useState(0),[s,l]=m.useState(0),c=!!(i&&s);return st(o.scrollbarX,()=>{var u;const d=((u=o.scrollbarX)==null?void 0:u.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),st(o.scrollbarY,()=>{var u;const d=((u=o.scrollbarY)==null?void 0:u.offsetWidth)||0;o.onCornerWidthChange(d),a(d)}),c?y.jsx(J.div,{...n,ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function It(e){return e?parseInt(e,10):0}function ls(e,t){const r=e/t;return isNaN(r)?0:r}function Wt(e){const t=ls(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function np(e,t,r,n="ltr"){const o=Wt(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return us([l,c],d)(e)}function cs(e,t,r="ltr"){const n=Wt(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,a]:[a*-1,0],c=Gm(e,l);return us([0,a],[0,s])(c)}function us(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function ds(e,t){return e>0&&e<t}var op=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function Ft(e,t){const r=oe(e),n=m.useRef(0);return m.useEffect(()=>()=>window.clearTimeout(n.current),[]),m.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function st(e,t){const r=oe(t);Le(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var fs=es,ip=rs,ap=ss;const ms=m.forwardRef(({className:e,children:t,...r},n)=>y.jsxs(fs,{ref:n,className:De("relative overflow-hidden",e),...r,children:[y.jsx(ip,{className:"h-full w-full rounded-[inherit]",children:t}),y.jsx(ps,{}),y.jsx(ap,{})]}));ms.displayName=fs.displayName;const ps=m.forwardRef(({className:e,orientation:t="vertical",...r},n)=>y.jsx($r,{ref:n,orientation:t,className:De("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:y.jsx(as,{className:"relative flex-1 rounded-full bg-border"})}));ps.displayName=$r.displayName;function sp({title:e,subtitle:t,children:r,slots:n={},slotProps:o}){var i;const[a,s]=m.useState(!1),[l,c]=m.useState(!1),{TriggerIcon:u=Dm}=n,d=()=>{c(!l)},f=()=>{s(!1),c(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(bt,{variant:"brand",className:"fixed bottom-4 right-4 rounded-full shadow-lg",onClick:()=>s(!0),children:y.jsx(u,{className:"h-6 w-6"})}),a&&l&&y.jsx("div",{className:"fixed inset-0 z-0 bg-background/30 backdrop-blur-[8px] supports-[backdrop-filter]:bg-background/60",onClick:f}),a&&y.jsxs(Mr,{className:De("fixed bottom-0 right-0 size-full md:max-w-4xl overflow-hidden transition-all duration-300 ease-in-out flex flex-col ",l?"md:bottom-1/2 md:right-1/2 transform md:translate-x-1/2 md:translate-y-1/2 md:w-[90vw] md:h-[90vh]":"md:bottom-20 md:right-4 md:w-100 md:max-h-[80vh]",l?"shadow-2xl":"shadow-xl",l?"":"animate-in slide-in-from-bottom-5"),"data-expanded":l?"on":"off",children:[y.jsxs(Dr,{className:"flex flex-column space-y-0.5 p-4 pb-3 bg-brand text-slate-200",children:[y.jsxs("div",{className:"flex w-full items-center justify-between",children:[y.jsx(Lr,{className:"text-lg font-semibold text-brand-foreground leading-none tracking-tight",children:e}),y.jsxs("div",{className:"flex items-center space-x-2",children:[y.jsx(bt,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:d,children:l?y.jsx(Lm,{}):y.jsx(Mm,{})}),y.jsx(bt,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:f,children:y.jsx(Im,{})})]})]}),t&&y.jsx(Qa,{style:{color:"inherit"},children:t})]}),y.jsx(ms,{className:"flex flex-col",children:y.jsx(zr,{...o?.content,className:De("p-4 pt-2",(i=o?.content)==null?void 0:i.className),children:r})})]})]})}const lp=rt("inline-block",{variants:{size:{default:"h-6 w-6",sm:"h-4 w-4",lg:"h-10 w-10"}},defaultVariants:{size:"default"}});function cp({className:e,asChild:t,size:r,...n}){const o=t?pe:"img";return y.jsx(o,{className:De(lp({size:r,className:e})),...n})}var hs={exports:{}},Hr={};/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var vs;function up(){if(vs)return Hr;vs=1;var e=Ff();function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var p=f(),v=n({inst:{value:p,getSnapshot:f}}),h=v[0].inst,b=v[1];return i(function(){h.value=p,h.getSnapshot=f,l(h)&&b({inst:h})},[d,p,f]),o(function(){return l(h)&&b({inst:h}),d(function(){l(h)&&b({inst:h})})},[d]),a(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!r(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Hr.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Hr}var gs;function dp(){return gs||(gs=1,hs.exports=up()),hs.exports}var fp=dp(),bs=Object.prototype.hasOwnProperty;function Vr(e,t){var r,n;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&Vr(e[n],t[n]););return n===-1}if(!r||typeof e=="object"){n=0;for(r in e)if(bs.call(e,r)&&++n&&!bs.call(t,r)||!(r in t)||!Vr(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}const Ne=new WeakMap,ze=()=>{},ne=ze(),Ur=Object,I=e=>e===ne,ve=e=>typeof e=="function",Ie=(e,t)=>({...e,...t}),ys=e=>ve(e.then),Gr={},$t={},Yr="undefined",qt=typeof window!=Yr,Xr=typeof document!=Yr,mp=()=>qt&&typeof window.requestAnimationFrame!=Yr,ws=(e,t)=>{const r=Ne.get(e);return[()=>!I(t)&&e.get(t)||Gr,n=>{if(!I(t)){const o=e.get(t);t in $t||($t[t]=o),r[5](t,Ie(o,n),o||Gr)}},r[6],()=>!I(t)&&t in $t?$t[t]:!I(t)&&e.get(t)||Gr]};let Qr=!0;const pp=()=>Qr,[Jr,Kr]=qt&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[ze,ze],hp=()=>{const e=Xr&&document.visibilityState;return I(e)||e!=="hidden"},vp=e=>(Xr&&document.addEventListener("visibilitychange",e),Jr("focus",e),()=>{Xr&&document.removeEventListener("visibilitychange",e),Kr("focus",e)}),gp=e=>{const t=()=>{Qr=!0,e()},r=()=>{Qr=!1};return Jr("online",t),Jr("offline",r),()=>{Kr("online",t),Kr("offline",r)}},bp={isOnline:pp,isVisible:hp},yp={initFocus:vp,initReconnect:gp},xs=!U.useId,yt=!qt||"Deno"in globalThis,wp=e=>mp()?window.reque