@wavy/react-ui 0.0.34 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.d.ts +1 -0
- package/dist/main.js +1 -1
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -1857,6 +1857,7 @@ declare namespace CardProps {
|
|
|
1857
1857
|
style?: BasicDivProps["style"];
|
|
1858
1858
|
sx?: BasicDivProps["css"];
|
|
1859
1859
|
spill?: BasicDivProps["spill"];
|
|
1860
|
+
onClick?: () => void;
|
|
1860
1861
|
children: JSX$1.Element | [JSX$1.Element, JSX$1.Element] | [JSX$1.Element, JSX$1.Element, JSX$1.Element];
|
|
1861
1862
|
}
|
|
1862
1863
|
}
|
package/dist/main.js
CHANGED
|
@@ -14,7 +14,7 @@ import'path';import'url';import {ClientOnly,IconButton,Skeleton,Span,Drawer,Tool
|
|
|
14
14
|
transparent ${o}
|
|
15
15
|
)
|
|
16
16
|
${r}
|
|
17
|
-
`}function Km(e,r){return {display:"flex",justifyContent:"center",alignItems:"center",flexDirection:r?"column":"row",...e}}function qm(e,r){let t=n=>"affectedCorners"in e&&typeof e.affectedCorners=="string"?n.includes(e.affectedCorners)?e.radius:void 0:"affectedCorners"in e?e.affectedCorners.includes(n)?e.radius:void 0:e[n];return {...r,borderTopLeftRadius:t("top-left"),borderTopRightRadius:t("top-right"),borderBottomLeftRadius:t("bottom-left"),borderBottomRightRadius:t("bottom-right")}}function Zm(e){let r=typeof e.disabledCurves=="function"?e.disabledCurves():e.disabledCurves,t=o=>r==="both"||r===o?0:e.curveRadius||ue.md;return {borderTopLeftRadius:t("left"),borderBottomLeftRadius:t("left"),borderTopRightRadius:t("right"),borderBottomRightRadius:t("right")}}function Qm(e){let r=0,t=0,n=0,o=0;document.getElementById(e.id+"header")?document.getElementById(e.id+"header").onmousedown=i:e.onmousedown=i;function i(c){c.preventDefault(),n=c.clientX,o=c.clientY,document.onmouseup=s,document.onmousemove=l;}function l(c){c.preventDefault(),r=n-c.clientX,t=o-c.clientY,n=c.clientX,o=c.clientY,e.style.top=e.offsetTop-t+"px",e.style.left=e.offsetLeft-r+"px";}function s(){document.onmouseup=null,document.onmousemove=null;}}function e0(e){return {...e,margin:0,padding:0}}function U(e,r={apply:true}){return r.apply?Le(1,e):e}function r0(e,r={apply:true}){return r.apply?{...e,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}:e}function on(e){let r=e;for(;r&&!Ar(r);)r=r.parentElement;return r}function an(e){let r=document.createElement("span");r.textContent="A",r.style.visibility="hidden",r.style.position="absolute";let t=getComputedStyle(e);r.style.fontFamily=t.fontFamily,r.style.fontSize=t.fontSize,r.style.lineHeight=t.lineHeight,document.body.appendChild(r);let n=r.offsetHeight;return document.body.removeChild(r),e.offsetHeight>n+2}function _(e,r){if(!e||typeof e!="string")return;let t=r?.preference||"css",n=e.replaceAll(" ",""),{0:o,1:i}=n.split("["),l=()=>X[n],s=()=>i?na(oe[o],parseFloat(i)):oe[n];if(t==="css"){if(n in X)return l();if(o in oe)return s()}else if(t==="res"){if(o in oe)return s();if(n in X)return l()}return n}var ln=e=>new DOMParser().parseFromString(e,"text/html").body.textContent||"",ra=e=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e),ta=e=>parseInt(e.repeat(2/e.length),16);function na(e,r=1){let t=(g,u)=>g.match(new RegExp(`.{${u}}`,"g")),n=g=>typeof g<"u"?g/255:typeof r!="number"||r<0||r>1?1:r;if(!ra(e))throw new Error(`Invalid HEX: ${e}`);let o=Math.floor((e.length-1)/3),i=t(e.slice(1),o),[l,s,c,v]=i.map(ta);return `rgba(${l}, ${s}, ${c}, ${n(v)})`}function t0(e,r){let t=e.includes(",")?",":" ",n=e.split("").filter(o=>(t+"0123456789").includes(o)).join("").split(t);return n.length===3?n.push(`${r}`):n=n.with(3,`${r}`),"rgba("+n.join(t)+")"}function n0(e){return window.matchMedia(`(max-width:${e})`).matches}function o0(e){return window.matchMedia(`(min-width:${e})`).matches}function Le(e=2,r){return {...r,overflow:"hidden",width:"100%",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}}function oa(e){return e*16}function i0(e){return `${oa(e)}px`}function Ar(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function a0(e){let r=document.body,t=e.replace("var(","").replace(")","");return getComputedStyle(r).getPropertyValue(t)}a();var ia=Object.freeze({"2xl":"1.75rem",xl:"1.5rem",lg:"1rem",md:"0.5rem",sm:"0.25rem",xs:"0.125rem","2xs":"0.1rem"}),K=ia;a();var aa=Object.freeze({"2xl":"1.75rem",xl:"1.5rem",lg:"1.25rem",md:"1rem",sm:"0.85rem",xs:"0.75rem","2xs":"0.65rem"}),q=aa;var vr=["top","right","bottom","left"],sn=(e,r)=>`translate(${e}, ${r})`,cn=e=>`translateX(${e})`,dn=e=>`translateY(${e})`,la=(e,r)=>{let t=e.fontSize in q?q[e.fontSize]:e.fontSize,{overflowX:n,overflowY:o}=(()=>{let s=e?.spill||{};if(s)return {overflowX:typeof s=="string"?s:s?.x||"visible",overflowY:typeof s=="string"?s:s?.y||"visible"}})();function i(s){return e.style?.[s]?e.style[s]:(e.size||e.size===0)&&(s==="height"||s==="width")?e.size==="full"?"100%":e.size:e[s]==="full"?"100%":e[s]}let l={top:e.centerSelf===true||e.centerSelf==="y"?"50%":e.top,left:e.centerSelf===true||e.centerSelf==="x"?"50%":e.left,right:e.right,bottom:e.bottom,cursor:e.clickable?"pointer":e.cursor,scrollbarColor:[e.scrollbarColor?.thumb,e.scrollbarColor?.track].map(s=>s||"inherit").join(" "),transform:e.centerSelf===true?sn("-50%","-50%"):e.centerSelf==="x"?cn("-50%"):e.centerSelf==="y"?dn("-50%"):e.translate?.x&&e.translate?.y?sn(e.translate.x,e.translate.y):e.translate?.x?cn(e.translate.x):e.translate?.y?dn(e.translate.y):void 0,position:e.pos==="absolute"||e.centerSelf?"absolute":e.pos,padding:ua(e.padding),fontSize:t,fontWeight:e.fontWeight,border:e.border,borderColor:sa(e.borderColor),borderWidth:ca(e.borderWidth,e.borderColor?"1px":void 0),borderStyle:da(e.borderStyle,e.borderColor?"solid":void 0),lineHeight:t?`calc(${t} + (${t} * .15))`:void 0,borderRadius:fa(e.corners),userSelect:e.disableSelection?"none":e.allowTextSelection?"text":void 0,minHeight:i("minHeight"),minWidth:i("minWidth"),maxHeight:i("maxHeight"),maxWidth:i("maxWidth"),height:i("height"),width:i("width"),display:e.hide?"none":void 0,flexDirection:e.row?"row":"column",flex:e.flex,backgroundColor:_(e.backgroundColor),color:_(e.color),gap:ma(e.gap),overflowX:n,overflowY:o,aspectRatio:e.aspectRatio,opacity:e.fade,alignItems:e.centerContent?"center":e.align||"start",justifyContent:e.centerContent?"center":e.justify||"start",backdropFilter:e.backdropBlur?`blur(${e.backdropBlur})`:void 0,filter:e.blur?`blur(${e.blur})`:void 0,...e.style};return Object.keys(l).forEach(s=>{let c=s,v=l[c];typeof v=="string"&&(v=v.trim()),!v&&v!==0&&delete l[c];}),(r||e.debug)&&console.log({props:e,style:l}),l};function sa(e){if(!e)return;let r="transparent";return typeof e=="string"?_(e):vr.map(t=>{if(Array.isArray(e)){let{0:n,1:o}=e;return (Array.isArray(o)?o.includes(t):[t,"all"].includes(o))?_(n):r}return typeof e=="object"&&t in e?_(e[t]):r}).join(" ")}function ca(e,r){if(!e)return r;let t=0;return typeof e=="string"?e:vr.map(n=>{if(Array.isArray(e)){let{0:o,1:i}=e;return (Array.isArray(i)?i.includes(n):[n,"all"].includes(i))?o:t}return typeof e=="object"&&n in e?e[n]:t}).join(" ")}function da(e,r){if(!e)return r;let t=0;return typeof e=="string"?e:vr.map(n=>{if(Array.isArray(e)){let{0:o,1:i}=e;return (Array.isArray(i)?i.includes(n):[n,"all"].includes(i))?o:t}return typeof e=="object"&&n in e?e[n]:t}).join(" ")}function ua(e){let t=n=>n?n in K?K[n]:n:"0px";return e?typeof e=="string"?t(e):vr.map(n=>{if(Array.isArray(e)){let{0:o,1:i}=e;return (Array.isArray(i)?i.includes(n):i===n)?t(o):"0px"}return typeof e=="object"&&n in e?t(e[n]):"0px"}).join(" "):"0px"}function fa(e){let t=o=>o?o in ue?ue[o]:o:"0px";return e?typeof e=="string"?t(e):["topLeft","topRight","bottomRight","bottomLeft"].map(o=>{let i=e?.[o];return o.includes("top")&&e?.top?t(e.top):o.includes("bottom")&&e?.bottom?t(e.bottom):i?t(i):"0px"}).join(" "):"0px"}function ma(e){if(!(!e||typeof e!="string"))return e in K?K[e]:e}var p=la;var _a=["inherit","sm","md","lg","xl","2xl","xs"],ba=["sm","md","lg","xl","2xl","xs","2xs"];function un(e){let[r,t]=useState(false),n=e.disabled||r,o=async u=>{if(!n){if(!e.async)return e.onClick?.(u);t(true),await e.onClick?.(u),setTimeout(()=>t(false),e.pendingDelay||1);}},i=u=>{if(u){if(typeof u==typeof FaFolder){let y=S=>typeof S=="string"&&[..._a].includes(S);return jsx(Icon,{size:y(e.iconSize)?e.iconSize:void 0,boxSize:y(e.iconSize)?void 0:e.iconSize,as:u})}return u}},l=i(e.leadingEl),s=i(e.trailingEl),c=u=>typeof u=="string"&&[...ba].includes(u),{size:v,...g}=e;return jsxs(Button,{...de(e),disabled:n,size:c(v)?v:void 0,style:p({...g,size:c(v)?void 0:v,clickable:!n,row:true,centerContent:true,gap:e.gap||"md",corners:e.corners||"md",padding:e.padding||"md",color:e.color||(e.variant==="outline"?"onSurface":"onPrimary"),backgroundColor:e.backgroundColor||(e.variant==="outline"?"transparent":"primary"),border:e.border,borderColor:e.borderColor||(e.variant==="outline"?"onSurface[0.1]":void 0),fade:n?e.disabledOpacity||.5:e.fade||1,pos:r?"relative":e.pos,height:e.height||"fit-content",width:e.width||"fit-content"}),onClick:o,onMouseDown:e.onMouseDown,children:[l,e.text,e.children,s,r&&jsx(AbsoluteCenter,{children:jsx(Spinner,{size:"sm",animationDuration:"slowest",borderWidth:".1rem",color:e.spinnerColor?_(e.spinnerColor):"blue.500"})})]})}var fe=e=>r=>jsx(un,{...(()=>{let n={...r,...e.preset};for(let o of Object.keys(e.optional||{})){let i=o,l=i in n,s=[void 0,null].includes(n[i]);(!l||s)&&(n[i]=e.optional[i]);}return n})()}),B=un;a();a();a();a();a();function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n]);}return e},hr.apply(null,arguments)}a();a();function fn(e){for(var r=0,t,n=0,o=e.length;o>=4;++n,o-=4)t=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(t&65535)*1540483477+((t>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(o){case 3:r^=(e.charCodeAt(n+2)&255)<<16;case 2:r^=(e.charCodeAt(n+1)&255)<<8;case 1:r^=e.charCodeAt(n)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16);}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}a();var mn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};a();function pr(e){var r=Object.create(null);return function(t){return r[t]===void 0&&(r[t]=e(t)),r[t]}}var xa=/[A-Z]|^ms/g,Ba=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hn=function(r){return r.charCodeAt(1)===45},gn=function(r){return r!=null&&typeof r!="boolean"},Mr=pr(function(e){return hn(e)?e:e.replace(xa,"-$&").toLowerCase()}),vn=function(r,t){switch(r){case "animation":case "animationName":if(typeof t=="string")return t.replace(Ba,function(n,o,i){return Z={name:o,styles:i,next:Z},o})}return mn[r]!==1&&!hn(r)&&typeof t=="number"&&t!==0?t+"px":t};function Ve(e,r,t){if(t==null)return "";var n=t;if(n.__emotion_styles!==void 0)return n;switch(typeof t){case "boolean":return "";case "object":{var o=t;if(o.anim===1)return Z={name:o.name,styles:o.styles,next:Z},o.name;var i=t;if(i.styles!==void 0){var l=i.next;if(l!==void 0)for(;l!==void 0;)Z={name:l.name,styles:l.styles,next:Z},l=l.next;var s=i.styles+";";return s}return wa(e,r,t)}case "function":{if(e!==void 0){var c=Z,v=t(e);return Z=c,Ve(e,r,v)}break}}var g=t;if(r==null)return g;var u=r[g];return u!==void 0?u:g}function wa(e,r,t){var n="";if(Array.isArray(t))for(var o=0;o<t.length;o++)n+=Ve(e,r,t[o])+";";else for(var i in t){var l=t[i];if(typeof l!="object"){var s=l;r!=null&&r[s]!==void 0?n+=i+"{"+r[s]+"}":gn(s)&&(n+=Mr(i)+":"+vn(i,s)+";");}else {if(Array.isArray(l)&&typeof l[0]=="string"&&(r==null||r[l[0]]===void 0))for(var c=0;c<l.length;c++)gn(l[c])&&(n+=Mr(i)+":"+vn(i,l[c])+";");else {var v=Ve(e,r,l);switch(i){case "animation":case "animationName":{n+=Mr(i)+":"+v+";";break}default:n+=i+"{"+v+"}";}}}}return n}var yn=/label:\s*([^\s;{]+)\s*(;|$)/g,Z;function pn(e,r,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=true,o="";Z=void 0;var i=e[0];if(i==null||i.raw===void 0)n=false,o+=Ve(t,r,i);else {var l=i;o+=l[0];}for(var s=1;s<e.length;s++)if(o+=Ve(t,r,e[s]),n){var c=i;o+=c[s];}yn.lastIndex=0;for(var v="",g;(g=yn.exec(o))!==null;)v+="-"+g[1];var u=fn(o)+v;return {name:u,styles:o,next:Z}}a();var Da=typeof document<"u",Cn=function(r){return r()},Ta=ie.useInsertionEffect?ie.useInsertionEffect:false,_n=Da&&Ta||Cn;a();var Lr=typeof document<"u";function bn(e,r,t){var n="";return t.split(" ").forEach(function(o){e[o]!==void 0?r.push(e[o]+";"):o&&(n+=o+" ");}),n}var Vr=function(r,t,n){var o=r.key+"-"+t.name;(n===false||Lr===false&&r.compat!==void 0)&&r.registered[o]===void 0&&(r.registered[o]=t.styles);},Sn=function(r,t,n){Vr(r,t,n);var o=r.key+"-"+t.name;if(r.inserted[t.name]===void 0){var i="",l=t;do{var s=r.insert(t===l?"."+o:"",l,r.sheet,true);!Lr&&s!==void 0&&(i+=s),l=l.next;}while(l!==void 0);if(!Lr&&i.length!==0)return i}};a();var Ea=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Pn=pr(function(e){return Ea.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});var za=typeof document<"u",Ia=Pn,Aa=function(r){return r!=="theme"},xn=function(r){return typeof r=="string"&&r.charCodeAt(0)>96?Ia:Aa},Bn=function(r,t,n){var o;if(t){var i=t.shouldForwardProp;o=r.__emotion_forwardProp&&i?function(l){return r.__emotion_forwardProp(l)&&i(l)}:i;}return typeof o!="function"&&n&&(o=r.__emotion_forwardProp),o},Ma=function(r){var t=r.cache,n=r.serialized,o=r.isStringTag;Vr(t,n,o);var i=_n(function(){return Sn(t,n,o)});if(!za&&i!==void 0){for(var l,s=n.name,c=n.next;c!==void 0;)s+=" "+c.name,c=c.next;return ie.createElement("style",(l={},l["data-emotion"]=t.key+" "+s,l.dangerouslySetInnerHTML={__html:i},l.nonce=t.sheet.nonce,l))}return null},kn=function e(r,t){var n=r.__emotion_real===r,o=n&&r.__emotion_base||r,i,l;t!==void 0&&(i=t.label,l=t.target);var s=Bn(r,t,n),c=s||xn(o),v=!c("as");return function(){var g=arguments,u=n&&r.__emotion_styles!==void 0?r.__emotion_styles.slice(0):[];if(i!==void 0&&u.push("label:"+i+";"),g[0]==null||g[0].raw===void 0)u.push.apply(u,g);else {var y=g[0];u.push(y[0]);for(var S=g.length,R=1;R<S;R++)u.push(g[R],y[R]);}var C=withEmotionCache(function(b,k,x){var P=v&&b.as||o,I="",Me=[],we=b;if(b.theme==null){we={};for(var Ut in b)we[Ut]=b[Ut];we.theme=ie.useContext(ThemeContext);}typeof b.className=="string"?I=bn(k.registered,Me,b.className):b.className!=null&&(I=b.className+" ");var dr=pn(u.concat(Me),k.registered,we);I+=k.key+"-"+dr.name,l!==void 0&&(I+=" "+l);var Ti=v&&s===void 0?xn(P):c,ur={};for(var fr in b)v&&fr==="as"||Ti(fr)&&(ur[fr]=b[fr]);return ur.className=I,x&&(ur.ref=x),ie.createElement(ie.Fragment,null,ie.createElement(Ma,{cache:k,serialized:dr,isStringTag:typeof P=="string"}),ie.createElement(P,ur))});return C.displayName=i!==void 0?i:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",C.defaultProps=r.defaultProps,C.__emotion_real=C,C.__emotion_base=o,C.__emotion_styles=u,C.__emotion_forwardProp=s,Object.defineProperty(C,"toString",{value:function(){return "."+l}}),C.withComponent=function(b,k){var x=e(b,hr({},t,k,{shouldForwardProp:Bn(C,k,true)}));return x.apply(void 0,u)},C}};Li(wn());var La=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],De=kn.bind(null);La.forEach(function(e){De[e]=De(e);});var Wr=class{static getStyle(r){if(r)return JSON.parse(JSON.stringify(r||{}),(t,n)=>t==="backgroundColor"||t==="color"?_(n):n)}static span=r=>De.span({...this.getStyle(r)});static div=r=>De.div({...this.getStyle(r)});static img=r=>De.img({...this.getStyle(r)})},Te=Wr;function $a(e){let r=useRef(null),[t,n]=useState(false),o=E({top:0,left:0});e.rememberScrollPos&&useEffect(()=>{let g=o.read();r.current&&[g.top,g.left].some(u=>!!u)&&(r.current.scrollTop=g?.top??0,r.current.scrollLeft=g?.left??0);},e.updateScrollPosDeps),(e.rememberScrollPos||e.overflowPadding)&&useEffect(()=>{r.current&&Ar(r.current)&&!t&&n(true);},[]);let i="10%",l=`linear-gradient(to bottom, transparent, black calc(${i}/4), black calc(100% - ${i}), transparent) `,s=e.decreaseYFaderPadding?"2vh":"5rem",c=p({...e,spill:e.spill==="hidden"?"hidden":e.spill||(e.rememberScrollPos?"auto":void 0),padding:e.padding||{right:e.overflowPadding&&t?e.overflowPadding:void 0,top:e.enableYFaders?s:void 0,bottom:e.enableYFaders?s:void 0}}),v=Te.div(e.css);if(!e.hide)return e.asChildren?e.children:jsx(v,{...de(e),ref:e.rememberScrollPos||e.overflowPadding?r:e.ref,draggable:e.draggable,onScroll:g=>{let u=r?.current?.scrollTop,y=r?.current?.scrollLeft;!t&&e.overflowPadding&&n(true),isEmpty(strictArray([u,y]))||o.upsert({top:u??0,left:y??0}),e.onScroll?.(g);},style:{...c,display:e.grid?"grid":c.display||"flex",flexWrap:c.flexWrap||(e.flexWrap?"wrap":void 0),gridTemplateColumns:c?.gridTemplateColumns||e.gridCols||"1fr",gridTemplateRows:c?.gridTemplateRows||e.gridRows,WebkitMaskImage:e.enableYFaders&&l,maskImage:e.enableYFaders&&l},children:e.children})}var d=$a;a();function Xa(e){let r=!!e.tint,t=Te.img(e.sx);return jsx(t,{...de(e),loading:"lazy",decoding:"async",fetchPriority:"high",src:e.src,alt:e.alt,style:{...p(e),filter:r?`drop-shadow(0px 1000px 0 ${_(e.tint)})`:void 0,transform:r&&"translateY(-1000px)",objectFit:e.noFit?"none":e.fill?"fill":e.cover?"cover":e.scaleDown?"scale-down":"contain"}})}var me=Xa;a();function Ga(e){let r=n=>e.onItemClick?.(n),t=e.bold??e.items.some(n=>typeof n=="object");return jsx(d,{gap:e.gap||"md",width:e.width,height:e.height,children:e.items.map((n,o)=>typeof n=="string"?jsx(Nr,{index:o,item:n,bold:t,active:e.isItemActive(n),completed:e.isItemCompleted(n),onClick:r},n):jsxs(d,{width:"full",children:[jsx(Nr,{index:o,bold:t,item:n.label,active:n.nestedItems.some(i=>e.isItemActive(i)),completed:n.nestedItems.every(i=>e.isItemCompleted(i)),onClick:n.nestedItems?.[0]?()=>r(n.nestedItems[0]):void 0}),jsx(d,{width:"full",children:n.nestedItems.map((i,l)=>jsx(Nr,{index:l,fontSize:"sm",nested:true,item:i,active:e.isItemActive(i),completed:e.isItemCompleted(i),onClick:r},i))})]},n.label))})}function Nr(e){let r=oe.white,t=X.onSurface,n=e.nested?t:X.tertiaryContainer,o=e.active?n:oe.carlsbergGreen,i=e.active&&!e.nested?n:X["onSurface[0.25]"],l=e.nested?X["onSurface[0.4]"]:X["onSurface[0.5]"],s=X["onSurface[0.2]"],c=()=>e.onClick?.(e.item),v=IoMdCheckmark;return jsxs(d,{row:true,gap:"md",clickable:true,width:"full",fontSize:e.fontSize||"md",align:"center",onClick:c,css:{transition:"all 300ms linear",color:e.completed&&!(e.nested&&e.active)?i:e.active?n:l,borderColor:e.completed?o:e.active?n:s,":hover":e.active?void 0:{color:t,borderColor:e.completed&&!e.nested?void 0:t}},children:[jsx(d,{corners:"circle",centerContent:true,size:"1.5rem",style:{textAlign:"center",flexShrink:0},borderColor:"inherit",backgroundColor:e.completed?o:void 0,color:e.completed?r:"inherit",fade:e.nested?0:1,padding:e.completed?void 0:"md",children:e.completed?jsx(v,{fontSize:"1rem"}):jsx(h,{fontWeight:"bold",textAlign:"center",centerContent:true,text:`${e.index+1}`,style:{lineHeight:"0"}})}),jsx("span",{style:{width:"100%",fontWeight:e.bold?"bold":void 0,opacity:e.completed&&!e.active?e.nested?.5:.75:1},children:e.item}),e.completed&&e.nested&&jsx(v,{size:"1.25rem",opacity:.75})]})}var $r=Ga;a();function Ka(e){let r=i=>e.ellipsis?U(i):e.lineLimit?Le(e.lineLimit,i):i,t=()=>strictArray([e.underline||e.link||e.fakeHyperlink||e.hyperlink?"underline":void 0,e.strikeThrough?"line-through":void 0]).join(" ").trim(),n=p({...e,color:e.fakeHyperlink||e.hyperlink?"hyperlink":e.color,cursor:e.link||e.hyperlink||e.clickable?"pointer":e.cursor}),o=Te.span(e.sx);return jsx(o,{...de(e),ref:e.ref,style:r({...n,width:e.ellipsis?"100%":n.width,textAlign:n.textAlign||e.textAlign||"justify",fontStyle:n.fontStyle||e.italic?"italic":void 0,textDecoration:n.textDecoration||t()||void 0}),children:e.text||e.children})}var h=Ka;a();var _r="1px",zn=6,Re=createContext(null);function Qa(e){let r=e.defaultColumnWeight||"1fr",t=["none",0].includes(e.separatorColor)?void 0:e.separatorColor??"onSurface[0.25]",n=!!e.selectedRows,[o,i]=useState(e.defaultSelectedRows||[]),l=()=>e.columns.map(x=>{let P=typeof x=="object"?x:{};return {...P,name:Ee(x),weight:"weight"in P?P.weight:r,textAlign:"textAlign"in P?P.textAlign:e.textAlign||"start"}}),s=x=>(e.selectable?`auto ${_r}`:"")+l().map(I=>{let Me=I.weight||r;return Me==="auto"?x.find(we=>we.name===I.name)?.weight||"auto":Me}).join(` ${_r} `),[c,v]=useState(s(l())),g=o.length===e.entries.length&&e.entries.length>0,u=useRef(null),y=useRef(false),S=(Array.isArray(e.children)?e.children:[e.children]).filter((x,P)=>P<2),R=()=>{let x=[];g||(x=e.entries.map((P,I)=>I)),e.onSelectedRowsChange?.(x),n||i(x);},C=x=>{let P=[...o];P.includes(x)?P=P.filter(I=>I!==x):P.push(x),e.onSelectedRowsChange?.(P),n||i(P);},b=x=>{u.current?(x.forEach((P,I)=>{(u.current.get(I)||0)<P&&u.current.set(I,P);}),k()):(u.current=x,S.length===1&&k());},k=()=>{if(y.current){y.current=false;return}let x=l().map(P=>{let I=u.current.get(P.name);return I?{...P,weight:`${I}px`}:P});y.current=true,u.current=null,v(s(x));};return jsx(Re.Provider,{value:{...e,gridCols:c,selectedRowIndices:n?e.selectedRows:o,separatorColor:t,allRowsSelected:g,onSelectRowClick:C,onSelectAllRowsClick:R,columns:l(),padding:e.padding??"sm",columnGap:e.columnGap??e.gap??"lg",rowGap:e.rowGap??e.gap,onColWidthsComputed:b},children:jsx(d,{grid:true,gridRows:"auto auto",corners:e.corners,height:e.height,width:e.width,minHeight:e.minHeight,maxHeight:e.maxHeight,minWidth:e.minWidth,maxWidth:e.maxWidth,color:e.color,fontSize:e.fontSize,fontWeight:e.fontWeight,backgroundColor:e.backgroundColor,spill:e.spill,style:{gridTemplateAreas:'"header" "body"'},children:S})})}function el(e){let r=useContext(Re),t=e.separatorColor||r.separatorColor,n=useRef(new Map);return jsxs(d,{grid:true,gridCols:r.gridCols,gap:r.columnGap,borderColor:e.borderColor||(t!==0&&t!=="none"?[t,"bottom"]:void 0),borderWidth:_r,spill:"hidden",padding:e.padding??r.padding,corners:e.corners??(r.separatorColor?0:void 0),color:e.color,backgroundColor:e.backgroundColor,fontWeight:e.fontWeight,fontSize:e.fontSize,align:"center",width:"full",style:{gridArea:"header"},children:[r.selectable&&jsx(In,{selected:r.allRowsSelected,onClick:r.onSelectAllRowsClick}),r.columns.map((o,i,l)=>{let s=Ee(o);return jsxs(Fragment,{children:[jsx(h,{ref:c=>{c&&(n.current.set(s,parseFloat(getComputedStyle(c).width)+zn),i===lastIndex(l)&&r.onColWidthsComputed(n.current));},text:!e.formatColumnName||e.formatColumnName==="camelToLetter"?camelCaseToLetter(s):e.formatColumnName?.(s)??camelCaseToLetter(s),style:{flexGrow:1,textAlign:He("textAlign",o)}},s+i),i!==l.length-1&&jsx(Xr,{color:e.separatorColor})]})})]})}function rl(e){let r=useContext(Re),t=useRef(new Map);return useEffect(()=>()=>{t.current.clear();},[]),jsx(d,{width:"full",gap:r.rowGap,padding:e.padding??(r.rowGap?[r.rowGap,"top"]:void 0),color:e.color,fontSize:e.fontSize,style:{paddingTop:r.rowGap,gridArea:"body"},children:r.entries.map((n,o)=>jsx(tl,{rowData:n,index:o,style:e.styleRow?.(o),styleCell:e.styleCell,onColWidthComputed:(i,l)=>{let s=t.current.get(i);(!s||l>s)&&t.current.set(i,l);},onCellRendered:i=>{let l=o===lastIndex(r.entries),s=i===lastIndex(r.columns);l&&s&&t.current.size>0&&r.onColWidthsComputed(t.current);}},o))})}function tl(e){let r=useContext(Re),t=r.selectedRowIndices.includes(e.index),n=()=>r.onSelectRowClick(e.index),{gap:o,padding:i,backgroundColor:l}=p({gap:r.columnGap,padding:r.padding??e.padding,backgroundColor:t?"onSurface[0.1]":"transparent"});return jsxs(d,{spill:"hidden",style:{gap:o,padding:i,backgroundColor:l,width:"100%",display:"grid",alignItems:"center",gridTemplateColumns:r.gridCols,...e.style},children:[r.selectable&&jsx(In,{selected:t,onClick:n}),r.columns.map((s,c,v)=>{let g=Ee(s),u=e.rowData[g],y=typeof s=="object"?s?.placeholder:void 0,S=()=>e.onCellRendered?.(c),R=c+Ee(s),C=He("textAlign",s),b={textAlign:C,justifyContent:C,color:He("color",s),opacity:He("opacity",s,1),backgroundColor:He("backgroundColor",s),...e.styleCell?.({cellIndex:e.index*r.columns.length+c,columnName:g,columnIndex:c,rowIndex:e.index,data:typeof u=="string"?u:null,siblingData:{previous:c===0?null:run(e.rowData[Ee(v[c-1])],k=>typeof k=="string"?k:null),next:c===v.length-1?null:run(e.rowData[Ee(v[c+1])],k=>typeof k=="string"?k:null)}})||{}};return typeof s=="object"&&s.weight==="auto"?jsxs(Fragment,{children:[jsx(nl,{data:u,style:b,onRender:S,placeholder:y,onWidthComputed:k=>e.onColWidthComputed(g,k)},R),c!==v.length-1&&jsx(Xr,{})]}):jsxs(Fragment,{children:[jsx(On,{data:u,style:b,placeholder:y,onRender:S},R),c!==v.length-1&&jsx(Xr,{})]})})]})}function nl(e){let r=useRef(null);return useEffect(()=>{r.current?e.onWidthComputed(parseFloat(getComputedStyle(r.current).width)+zn):console.error(new Error("Failed to compute style for an Auto cell",{cause:{data:e.data,cellRef:r}}));},[]),jsx(On,{noWrap:true,data:e.data,placeholder:e.placeholder,ref:r,style:e.style,onRender:e.onRender})}function On(e){return useEffect(()=>{e.onRender?.();},[]),typeof e.data=="string"||!e.data?jsx(h,{ref:e.ref,children:e.data||"-",fade:e.data?1:.75,style:{...e.style,whiteSpace:e.noWrap?"nowrap":void 0,width:"100%"}}):e.ref?jsx("div",{ref:e.ref,style:{...e.style,width:"100%",overflow:"hidden"},children:e.data}):e.data}function Xr(e){let r=useContext(Re),t=e.color||r.separatorColor;return jsx(d,{width:_r,height:"full",backgroundColor:t==="none"||t===0?"transparent":t})}function In(e){let r=useContext(Re),{disableSeparator:t,separatorColor:n}=r.slotProps?.selectColumn||{},o=n||r.separatorColor;return jsx(d,{padding:t?void 0:["md","right"],borderColor:o&&!t?[o,"right"]:void 0,children:jsx(An,{padding:"sm",iconSize:".85rem",checked:e.selected,onChange:e.onClick})})}var Ee=e=>typeof e=="string"?e:e.name,He=(e,r,t)=>typeof r=="object"&&e in r?r[e]:t,ol={Root:Qa,Header:el,Body:rl},il=ol;a();a();function ll(e){return jsxs(d,{row:true,ref:r=>{r&&!e.scrollIntoView&&e.selected&&r.scrollIntoView(true);},gap:"sm",align:"center",fade:e.disabled?.5:1,width:e.width??"full",corners:e.corners??"md",padding:e.padding??"sm",fontSize:e.fontSize||"sm",cursor:e.disabled?"not-allowed":"pointer",css:{...e.sx,transition:e.sx?.transition||"all 200ms linear",color:e.color||e.sx?.color||(e.selected?"surface":"onSurface"),backgroundColor:e.backgroundColor||e.sx?.backgroundColor||(e.selected?"onSurface":void 0),":hover":e.disabled||e.selected?void 0:{...e.sx?.[":hover"],backgroundColor:e.sx?.[":hover"]?.backgroundColor||"onSurface[0.1]"}},onClick:e.disabled?void 0:e.onClick,children:[!e.hideSelectedTick&&e.selected&&jsx(LuCheck,{style:{flexShrink:0}}),e.leadingEl,jsx("span",{children:e.formatOption?.(`${e.value}`)||`${e.value}`,style:U({maxWidth:"100%",flex:"1",alignItems:"start",textAlign:"start"})}),e.trailingEl]})}var Gr=ll;var Ln=createContext(null);function ml(e){return jsx(Ln.Provider,{value:{...e,options:e.options.map(r=>typeof r=="string"||typeof r=="number"?{value:r.toString(),leadingEl:e.defaultLeadingEl,trailingEl:e.defaultTrailingEl}:{...r,leadingEl:r.leadingEl||e.defaultLeadingEl,trailingEl:r.trailingEl||e.defaultTrailingEl})},children:jsx(Fe,{...e,backdropBlur:e.backdropBlur,padding:e.padding||"md",corners:e.corners||"md",displayAction:"click",content:jsx(gl,{})})})}function gl(){let e=useContext(Ln),r=Vn(),[t,n]=useState(e.isSelected?e.options.findIndex((i,l)=>e.isSelected(i,l,e.options)):void 0),{triggerRerender:o}=V();return useEffect(()=>{setTimeout(()=>{o();},10);},[]),jsx(d,{spill:"auto",gap:e.gap||"sm",children:e.options.map((i,l)=>{let s=l===t,c=()=>{i.onClick?.(),e.onOptionClick?.(i,l,e.options),n(l),r.close();};return (!i||!i?.value)&&console.error(`Index ${l} is not defined in ${e.options.join()}`),jsx(Gr,{formatOption:e.formatOption,hideSelectedTick:e.hideSelectedTick,leadingEl:i.leadingEl,trailingEl:i.trailingEl,value:i?.value.toString(),disabled:i?.disabled,selected:s,onClick:c},l)})})}var Xe=ml;a();var yl=["sm","md","lg","xl","xs"];function Hv(e){let{animationDelay:r,animationDirection:t,animationDuration:n="slowest",size:o="sm"}=e,i=l=>l&&typeof l=="string"&&[...yl].includes(l);return jsx(Spinner,{size:i(o)?o:void 0,animationDelay:r,animationDirection:t,animationDuration:n,color:_(e.color||"seed"),borderWidth:e.thickness||".1rem",style:{padding:i(o)?void 0:o}})}a();function Gv(e){let r=useRef(false),[t,n]=useState(e.currentPage??0),o=e.maxIndicators||5,i=o-1,l=e.totalPages-1,s=async g=>{if(g===t)return;let u=g===t+1,y=Math.abs(g-t)>1;r.current=y?null:u,y||(u?await e.onNextClick?.():await e.onPreviousClick?.()),await e.beforePageChange?.(g),n(g),await e.afterPageChange?.(g);},c=async()=>s(t-1),v=async()=>s(t+1);return jsxs(d,{row:true,align:"center",gap:e.gap||"1rem",children:[jsx(Hn,{icon:SlArrowLeft,disabled:e.disableNav||t===0,onClick:c}),jsx(d,{row:true,justify:l>i?"space-evenly":void 0,align:"center",gap:".5rem",spill:"hidden",style:{width:`calc(2.05rem * ${o})`},children:buildArray(e.totalPages,g=>{let u=t===g;return jsx(d,{cursor:e.disableNav?"default":"pointer",centerContent:true,size:"1.6rem",children:`${g+1}`,corners:"circle",fade:u?1:.5,borderColor:u?void 0:"onSurface[0.1]",backgroundColor:u?"primary":void 0,color:u?"onPrimary":void 0,fontSize:"xs",style:{userSelect:"none",transition:"transform 200ms linear",transform:`translateX(calc(${t<i?0:t===l?t-i:t-(i-1)} * 2.1rem * ${r?-1:1}))`,flexShrink:0},onClick:e.disableNav?void 0:()=>s(g)},g)})}),jsx(Hn,{icon:SlArrowRight,disabled:e.disableNav||t===e.totalPages-1,onClick:v})]})}function Hn(e){return jsx(B,{async:true,disabled:e.disabled,padding:0,iconSize:"1rem",leadingEl:e.icon,backgroundColor:"transparent",color:"onSurface",onClick:e.onClick})}a();var Wn=createContext(null);function Dl(e){let r=()=>{e.onClose?.();};if(e.controller?.isOpen!==false)return jsx(Wn.Provider,{value:{sepColor:e.sepColor||"onSurface[0.1]"},children:jsxs(Drawer.Root,{open:e.controller?.isOpen,onExitComplete:r,children:[e.triggerElement&&jsx(Drawer.Trigger,{children:e.triggerElement}),jsxs(El,{container:e.container,children:[jsx(Drawer.Backdrop,{pos:e.container?"absolute":void 0,boxSize:e.container?"full":void 0}),jsx(Drawer.Positioner,{pos:e.container?"absolute":void 0,boxSize:e.container?"full":void 0,children:jsxs(Drawer.Content,{style:p({...e,spill:e.spill||"hidden",backgroundColor:e.backgroundColor,padding:e.padding??"md"}),children:[jsx(Drawer.CloseTrigger,{children:jsx(CloseButton,{})}),e.children]})})]})]})})}function Tl(){let e=useContext(Wn);return jsx(d,{backgroundColor:e.sepColor,width:"full",height:"1px"})}function El(e){return e.container?jsx(Portal,{container:e.container,children:e.children}):e.children}var iy={Root:Dl,Header:e=>jsx(Drawer.Header,{style:p({...e,width:e.width??"full"}),children:e.children}),Body:e=>jsx(Drawer.Body,{style:p({...e,width:e.width??"full"}),children:e.children}),Footer:e=>jsx(Drawer.Footer,{style:p({...e,width:e.width??"full"}),children:e.children}),Sep:Tl,ActionTrigger:Drawer.ActionTrigger,CloseTrigger:Drawer.CloseTrigger};a();a();a();var Nn=["Google"],$n=["pdf","word","excel","img","txt","unknown"],Jn=Object.freeze({txt:["text/plain"],img:["image/jpeg","image/png","image/jpg"],excel:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel","application/vnd.ms-excel.sheet.macroEnabled.12"],word:["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/vnd.microsoft.portable-executable"],pdf:["application/pdf"],unknown:[]});function Un(e){let r=t=>{e.onChange(t.currentTarget.files);};return jsxs(FileUpload.Root,{alignItems:"stretch",width:e.width,maxWidth:e.maxWidth||"xl",maxFiles:e.maxFiles||(e.multiple?1/0:1),overflow:"hidden",height:e.height,accept:Rl(e.accepts),children:[jsx(FileUpload.HiddenInput,{onChange:r}),e.children,e.showList&&jsx(FileUpload.List,{...e.slotProps?.fileList})]})}var Rl=e=>e.flatMap(r=>Jn[r]);function Sy(e){return jsx(Un,{...e,children:jsxs(FileUpload.Dropzone,{borderRadius:"xl",height:"full",width:"full",overflow:"hidden",backgroundColor:_(e.backgroundColor||"transparent"),borderColor:_(e.borderColor||"outlineVariant"),color:_(e.color||"onSurface"),cursor:"pointer",children:[jsx(Icon,{size:"md",color:"fg.muted",children:jsx(LuUpload,{})}),jsx(FileUpload.DropzoneContent,{maxHeight:"100%",overflow:"hidden",children:e.content||jsxs(Fragment,{children:[jsx(Box,{children:"Drag and drop files here"}),jsx(Box,{color:"fg.muted",children:".png, .jpg up to 5MB"})]})})]})})}a();var qn=createContext(null);function Fy(e){let r=E(null),t=E(e.defaultValue??""),[n,o]=useState(e.value??t.read()),[i,l]=useState(false),s=e.activationMode||"click",c=e.size||"md",v=P=>{e.readOnly||(e.value===void 0&&o(P),e.onChange?.(P));},g=()=>{v(t.read());},u=()=>{e.readOnly||(e.onEdit?.(),!e.preventDefault&&l(true));},y=(P={asClick:true})=>{r.upsert("cancel"),g(),P.asClick&&e.onCancelClick?.(),l(false);},S=P=>{P.preventDefault(),l(false);},R=(P=true)=>{t.upsert(n),P&&(r.upsert("save"),e.onSaveClick?.(n)),e.onSave?.(n),l(false);},C=()=>{r.upsert("edit"),e.onEditClick?.(),u();},b=()=>{R(false);},k=()=>{e.onContentClick?.(),u();},x={align:"center",gap:e.rowGap??"sm",width:e.width,maxWidth:"full"};return jsx(qn.Provider,{value:{padding:".25rem",iconSize:e.iconSize||c},children:jsxs(d,{...x,asChildren:!e.label,row:false,align:"start",children:[e.label&&jsx(h,{text:e.label,fontSize:q[c],fade:i?.75:.5,style:{transition:"all 200ms linear"}}),jsxs(d,{...x,grid:true,gap:e.columnGap??x.gap,gridCols:e.hideControls===true||Array.isArray(e.hideControls)&&["cancel","save","edit"].every(P=>e.hideControls.includes(P))?"1fr":e.control?"1fr auto":i?"1fr auto auto":"1fr auto",justify:e.spaceBetween?"space-between":void 0,children:[i&&!e.readOnly?jsx(d,{width:"full",align:"center",gap:"md",children:jsx(Y,{autoFocus:true,readOnly:e.readOnly,allowedChars:e.allowedChars,maxChars:e.maxChars,value:n,corners:"md",validateInput:e.validateInput,width:e.inputWidth,focusColor:e.focusColor,size:e.inputSize||c,placeholder:e.placeholder,showCharCounter:e.showCharCounter,slotProps:{charCounter:{fontSize:e.charCounterFontSize}},onChange:v,onBlur:S,onEnterKeyPressed:b,onEscapeKeyPressed:()=>y({asClick:false})})}):jsx(d,{spill:"hidden",width:"full",padding:e.contentPadding??["md",["top","bottom"]],corners:"sm",fontSize:e.fontSize||c,cursor:"text",css:{transition:"all 200ms linear",":hover":e.readOnly?void 0:{backgroundColor:"onSurface[0.1]"}},onDoubleClick:s==="dblclick"?()=>y({asClick:false}):void 0,onClick:s==="click"?k:void 0,children:jsx(Fe,{...e.slotProps?.popover,allowInteractions:true,asChild:e.showPopoverOnHover===false?true:e.slotProps?.popover?.asChild??!!n,content:(e.slotProps?.popover?.content||e.renderPopoverContent?.(n))??n,displayAction:"hover",maxWidth:e.slotProps?.popover?.maxWidth||"10rem",maxHeight:e.slotProps?.popover?.maxHeight||"5rem",children:jsx("span",{style:U({opacity:e.placeholder&&!n?.85:1,width:"100%"}),children:(e.formatContent?.(n)??n)||e.placeholder})})}),e.hideControls!==true&&(e.control||jsx(Wl,{editing:i,hideControl:typeof e.hideControls=="boolean"?void 0:e.hideControls,onCancel:y,onSave:R,onEdit:C}))]})]})})}function Wl(e){let r=t=>Array.isArray(e.hideControl)?e.hideControl.includes(t):e.hideControl===t;return e.editing?jsxs(Fragment,{children:[!r("cancel")&&jsx(qr,{outlined:true,icon:LuX,onClick:e.onCancel}),!r("save")&&jsx(qr,{preventDefault:true,outlined:true,icon:LuCheck,onClick:e.onSave})]}):r("edit")?void 0:jsx(qr,{icon:LuPencilLine,onClick:e.onEdit})}function qr(e){let{padding:r,iconSize:t}=useContext(qn);return jsx(d,{asChildren:e.outlined,corners:"sm",css:{transition:"all 200ms linear",":hover":{backgroundColor:"onSurface[0.1]"}},children:jsx(B,{size:t,padding:r,leadingEl:e.icon,backgroundColor:"transparent",borderColor:e.outlined?"onSurface[0.25]":void 0,onClick:e.onClick,aspectRatio:1,color:"onSurface",corners:"sm",onMouseDown:n=>{n.preventDefault();}})})}a();var Qr=createContext(null);function Jl(e){return jsx(Qr,{value:e.itemFade?{fade:e.itemFade}:{fade:.5},children:jsx(d,{...e,size:e.size??"full",centerContent:e.centerContent??true,gap:e.gap||"lg",children:e.children})})}function Xl(e){let{fade:r}=useContext(Qr);return jsx(d,{fade:e.disableFade?1:r,size:e.size||"4rem",children:e.element})}function Ul(e){let{fade:r}=useContext(Qr);return jsxs(d,{align:"center",gap:e.gap||"sm",children:[jsx(h,{fontWeight:"bold",fontSize:e.titleFontSize||"lg",text:e.title}),jsx(h,{fade:r,fontSize:e.descriptionFontSize,text:e.description})]})}var br={Root:Jl,Indicator:Xl,Content:Ul};a();function ge(e){let r=()=>{if(!e.disableFallback){if(typeof e.fallback=="string")return jsx(Avatar.Fallback,{name:e.fallback});if(e.fallback&&ie__default.isValidElement(e.fallback))return e.fallback;if(e.fallback){let t=e.fallback;return jsx(t,{size:"50%"})}return jsx(Avatar.Fallback,{})}};return jsxs(Avatar.Root,{size:e.size||"md",backgroundColor:_(e.backgroundColor),color:_(e.color),style:e.style,children:[jsx(r,{}),jsx(Avatar.Image,{src:e.src})]})}a();function eo(e){let r=useRef(null),t=useRef(null);return e.asChild?e.children:jsxs(Box,{position:"relative",ref:r,children:[e.children,jsx(Float,{ref:t,offset:e.offset||(e.circleChild?".25rem":void 0),placement:e.placement,children:e.badge})]})}a();var ro=createContext(null);function ts(e){return jsx(ro.Provider,{value:{gap:e.gap},children:jsx(d,{row:true,clickable:e.clickable,gap:e.gap??"md",padding:e.padding??"md",corners:e.corners??"lg",height:e.height,width:e.width,maxWidth:e.maxWidth,minWidth:e.minWidth,backgroundColor:e.backgroundColor,color:e.color,align:"center",style:e.style,spill:e.spill??"hidden",css:e.sx,children:e.children})})}function to(e){return r=>{let{children:t,className:n,row:o=true,spill:i="hidden",centerContent:l=true,align:s="center",...c}=r;return jsx(d,{className:n,...c,row:o,spill:i,centerContent:l,align:s,children:t})}}function no(e){return r=>jsx("span",{style:(()=>{let n=p({...e,fontSize:r.fontSize||e.fontSize,fontWeight:r.fontWeight||e.fontWeight,fade:r.fade||e.fade,color:r.color||e.color||"inherit"});return !r.truncateStyle||r.truncateStyle==="none"?n:r.truncateStyle==="ellipsis"?U(n):Le(r.truncateStyle.lineCount,n)})(),children:r.value})}var ns=to(),os=to(),is=e=>{let{gap:r=e.gap}=useContext(ro);return jsx(d,{gap:r,...e,spill:e.spill||"hidden",maxWidth:e.maxWidth||"full",children:e.children})},as=no({fontWeight:"bold",fontSize:"xs",fade:.75}),ls=no({fontSize:"sm"}),N={Root:ts,LeadingAddOn:ns,TrailingAddOn:os,Content:is,Label:as,Item:ls};a();function ds(e){let r=()=>{if(typeof e.fallback=="string"||ie__default.isValidElement(e.fallback))return e.fallback;let n=e.fallback||PiImageBrokenLight;return jsx(n,{size:"3rem"})};return jsxs(d,{className:e.className,padding:"1px",corners:"lg",backgroundColor:"onSurface",color:"surface",gap:"sm",spill:"hidden",fade:e.fade,height:e.height??"fit-content",width:e.width??"14rem",style:{...e.style,boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px"},children:[jsx(d,{centerContent:true,height:e.mediaHeight??"7rem",width:"full",backgroundColor:"surface",color:"onSurface",borderColor:"surface",corners:{top:"lg"},spill:"hidden",children:e.src?jsx(me,{cover:e.coverImg??true,size:e.imgSize??"full",corners:e.imgCorners??"md",spill:"hidden",src:e.src,style:{boxShadow:"rgba(0, 0, 0, 0.24) 0px 3px 8px"}}):jsx(r,{})}),jsxs(d,{width:"full",gap:"md",padding:"md",align:"start",spill:"hidden",children:[jsxs(d,{width:"full",gap:0,spill:"hidden",children:[jsx("span",{children:e.title,style:p({fontSize:e.titleFontSize??"md"})}),e.description&&jsx("span",{children:e.description,style:p({fontSize:e.descriptionFontSize??"xs",fade:.5})})]}),e.children]})]})}function us(e){return jsx(d,{...e,width:e.width??"full",spill:e.spill||"hidden",children:e.children})}var mh={Root:ds,Content:us};a();function fs(e){let r={backgroundColor:"onSurface",color:"surface",padding:"md",corners:"lg"},t=i=>e[i]??r[i],n=i=>{if(!e.children)return e[i]||r[i]},o=e.disableBoxShadow?"none":e.style?.boxShadow||"rgba(0, 0, 0, 0.35) 0px 5px 15px";return jsxs(d,{className:e.className,asChildren:!e.children,height:t("height"),width:t("width"),backgroundColor:t("backgroundColor"),color:t("color"),padding:t("padding"),corners:t("corners"),gap:"md",spill:"hidden",style:{...e.style,boxShadow:o},children:[jsxs(d,{row:true,className:e.children?void 0:e.className,gap:"md",align:"center",height:n("height"),width:n("width"),backgroundColor:n("backgroundColor"),color:n("color"),padding:n("padding"),corners:n("corners"),spill:"hidden",style:e.children?void 0:{...e.style,boxShadow:o},children:[jsx(ge,{src:e.avatarSrc,size:e.avatarSize??"sm",fallback:e.avatarFallback,backgroundColor:e.avatarBackgroundColor,color:e.avatarColor}),jsxs(d,{width:"full",spill:"hidden",children:[jsx("span",{children:e.title,style:U(p({fontSize:e.titleFontSize??"sm",fontWeight:e.titleFontWeight,fade:e.titleFade}))}),jsx("span",{children:e.description,style:U(p({fade:e.descriptionFade??.5,fontSize:e.descriptionFontSize??"xs",fontWeight:e.descriptionFontWeight}))})]})]}),e.children]})}var Sh={Root:fs,Content:d};a();function An(e){let[r,t]=useState(e.defaultChecked??false),n=e.checked??r,o=e.checked!==void 0,i=()=>{e.onClick?.(),o||(e.onChange?.(!n),t(!n));};return jsx(d,{cursor:e.disabled?"not-allowed":"pointer",fade:e.disabled?.5:1,size:e.size,corners:e.corners??"sm",padding:e.padding??"sm",backgroundColor:n?e.accentColor||"primaryContainer":"transparent",color:e.iconColor||"onPrimaryContainer",borderColor:e.borderColor||"onSurface[0.1]",style:{boxShadow:e.disableShadow?void 0:"rgba(0, 0, 0, 0.25) 0px 2px 4px 0px inset"},onClick:e.disabled?void 0:i,children:jsx(IoMdCheckmark,{size:e.iconSize,style:{opacity:n?1:0}})})}a();a();function hs(e){let{triggerRerender:r}=V(),t=p({...e,padding:e.padding||"xl",corners:e.corners||"md",gap:e.gap||"lg"}),n=({open:i})=>{e.onOpenChange?.(i);},o=()=>{e.onClose?.(),e.controller?.hide?.(),e.rerenderOnClose&&r();};if(e.controller?.isOpen!==false)return jsxs(Dialog.Root,{unmountOnExit:e.unmountOnExit,open:e.controller?.isOpen,onEscapeKeyDown:e.closeOnEscape??true?e.controller?.hide:void 0,scrollBehavior:e.scrollBehavior,onInteractOutside:e.closeOnInteractOutside??true?e.controller?.hide:void 0,placement:e.placement||"center",closeOnEscape:e.closeOnEscape,closeOnInteractOutside:e.closeOnInteractOutside,onOpenChange:n,onExitComplete:o,motionPreset:e.enterAnimation||"slide-in-bottom",children:[e.triggerElement&&jsx(Dialog.Trigger,{asChild:true,children:e.triggerElement}),jsxs(Portal,{children:[jsx(Dialog.Backdrop,{}),jsx(Dialog.Positioner,{children:jsxs(Dialog.Content,{style:t,children:[e.children,!e.hideCloseButton&&jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(CloseButton,{size:e.closeButtonSize||"sm",onClick:e.controller?.hide})})]})})]})]})}var ot=(e,r)=>t=>{let n=Dialog[e],o={...t,spill:t.spill||"hidden"};return Object.keys(r||{}).forEach(i=>{let l=i;o?.[l]||(o=Object.assign(o,{[l]:r[l]}));}),jsx(n,{width:"full",height:"full",overflow:"hidden",children:jsx(d,{...o,children:t.children})})},ps=ot("Header",{fontSize:"xl",fontWeight:"bold"}),Cs=ot("Body",{gap:"md"}),_s=ot("Footer",{row:true,gap:"sm"}),bs=e=>jsx(Dialog.CloseTrigger,{asChild:true,children:e.wrap?jsx("div",{...e.slotProps?.divWrapper,children:e.children}):e.children}),Ss=e=>jsx(Dialog.ActionTrigger,{asChild:true,children:e.children}),D={Root:hs,Header:ps,Body:Cs,Footer:_s,CloseTrigger:bs,ActionTrigger:Ss};function Jh(e){let r=e.severity||"error",t=_(r,{preference:"res"});return jsxs(D.Root,{controller:e.controller,width:e.width??"25rem",height:e.height,minHeight:e.minHeight,maxHeight:e.maxHeight,minWidth:e.minWidth,maxWidth:e.maxWidth,triggerElement:e.triggerElement,children:[jsx(D.Header,{fontSize:"2xl",children:e.title}),jsxs(D.Body,{fade:.75,children:[jsx("span",{children:e.message.split(`
|
|
17
|
+
`}function Km(e,r){return {display:"flex",justifyContent:"center",alignItems:"center",flexDirection:r?"column":"row",...e}}function qm(e,r){let t=n=>"affectedCorners"in e&&typeof e.affectedCorners=="string"?n.includes(e.affectedCorners)?e.radius:void 0:"affectedCorners"in e?e.affectedCorners.includes(n)?e.radius:void 0:e[n];return {...r,borderTopLeftRadius:t("top-left"),borderTopRightRadius:t("top-right"),borderBottomLeftRadius:t("bottom-left"),borderBottomRightRadius:t("bottom-right")}}function Zm(e){let r=typeof e.disabledCurves=="function"?e.disabledCurves():e.disabledCurves,t=o=>r==="both"||r===o?0:e.curveRadius||ue.md;return {borderTopLeftRadius:t("left"),borderBottomLeftRadius:t("left"),borderTopRightRadius:t("right"),borderBottomRightRadius:t("right")}}function Qm(e){let r=0,t=0,n=0,o=0;document.getElementById(e.id+"header")?document.getElementById(e.id+"header").onmousedown=i:e.onmousedown=i;function i(c){c.preventDefault(),n=c.clientX,o=c.clientY,document.onmouseup=s,document.onmousemove=l;}function l(c){c.preventDefault(),r=n-c.clientX,t=o-c.clientY,n=c.clientX,o=c.clientY,e.style.top=e.offsetTop-t+"px",e.style.left=e.offsetLeft-r+"px";}function s(){document.onmouseup=null,document.onmousemove=null;}}function e0(e){return {...e,margin:0,padding:0}}function U(e,r={apply:true}){return r.apply?Le(1,e):e}function r0(e,r={apply:true}){return r.apply?{...e,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}:e}function on(e){let r=e;for(;r&&!Ar(r);)r=r.parentElement;return r}function an(e){let r=document.createElement("span");r.textContent="A",r.style.visibility="hidden",r.style.position="absolute";let t=getComputedStyle(e);r.style.fontFamily=t.fontFamily,r.style.fontSize=t.fontSize,r.style.lineHeight=t.lineHeight,document.body.appendChild(r);let n=r.offsetHeight;return document.body.removeChild(r),e.offsetHeight>n+2}function _(e,r){if(!e||typeof e!="string")return;let t=r?.preference||"css",n=e.replaceAll(" ",""),{0:o,1:i}=n.split("["),l=()=>X[n],s=()=>i?na(oe[o],parseFloat(i)):oe[n];if(t==="css"){if(n in X)return l();if(o in oe)return s()}else if(t==="res"){if(o in oe)return s();if(n in X)return l()}return n}var ln=e=>new DOMParser().parseFromString(e,"text/html").body.textContent||"",ra=e=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e),ta=e=>parseInt(e.repeat(2/e.length),16);function na(e,r=1){let t=(g,u)=>g.match(new RegExp(`.{${u}}`,"g")),n=g=>typeof g<"u"?g/255:typeof r!="number"||r<0||r>1?1:r;if(!ra(e))throw new Error(`Invalid HEX: ${e}`);let o=Math.floor((e.length-1)/3),i=t(e.slice(1),o),[l,s,c,v]=i.map(ta);return `rgba(${l}, ${s}, ${c}, ${n(v)})`}function t0(e,r){let t=e.includes(",")?",":" ",n=e.split("").filter(o=>(t+"0123456789").includes(o)).join("").split(t);return n.length===3?n.push(`${r}`):n=n.with(3,`${r}`),"rgba("+n.join(t)+")"}function n0(e){return window.matchMedia(`(max-width:${e})`).matches}function o0(e){return window.matchMedia(`(min-width:${e})`).matches}function Le(e=2,r){return {...r,overflow:"hidden",width:"100%",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}}function oa(e){return e*16}function i0(e){return `${oa(e)}px`}function Ar(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function a0(e){let r=document.body,t=e.replace("var(","").replace(")","");return getComputedStyle(r).getPropertyValue(t)}a();var ia=Object.freeze({"2xl":"1.75rem",xl:"1.5rem",lg:"1rem",md:"0.5rem",sm:"0.25rem",xs:"0.125rem","2xs":"0.1rem"}),K=ia;a();var aa=Object.freeze({"2xl":"1.75rem",xl:"1.5rem",lg:"1.25rem",md:"1rem",sm:"0.85rem",xs:"0.75rem","2xs":"0.65rem"}),q=aa;var vr=["top","right","bottom","left"],sn=(e,r)=>`translate(${e}, ${r})`,cn=e=>`translateX(${e})`,dn=e=>`translateY(${e})`,la=(e,r)=>{let t=e.fontSize in q?q[e.fontSize]:e.fontSize,{overflowX:n,overflowY:o}=(()=>{let s=e?.spill||{};if(s)return {overflowX:typeof s=="string"?s:s?.x||"visible",overflowY:typeof s=="string"?s:s?.y||"visible"}})();function i(s){return e.style?.[s]?e.style[s]:(e.size||e.size===0)&&(s==="height"||s==="width")?e.size==="full"?"100%":e.size:e[s]==="full"?"100%":e[s]}let l={top:e.centerSelf===true||e.centerSelf==="y"?"50%":e.top,left:e.centerSelf===true||e.centerSelf==="x"?"50%":e.left,right:e.right,bottom:e.bottom,cursor:e.clickable?"pointer":e.cursor,scrollbarColor:[e.scrollbarColor?.thumb,e.scrollbarColor?.track].map(s=>s||"inherit").join(" "),transform:e.centerSelf===true?sn("-50%","-50%"):e.centerSelf==="x"?cn("-50%"):e.centerSelf==="y"?dn("-50%"):e.translate?.x&&e.translate?.y?sn(e.translate.x,e.translate.y):e.translate?.x?cn(e.translate.x):e.translate?.y?dn(e.translate.y):void 0,position:e.pos==="absolute"||e.centerSelf?"absolute":e.pos,padding:ua(e.padding),fontSize:t,fontWeight:e.fontWeight,border:e.border,borderColor:sa(e.borderColor),borderWidth:ca(e.borderWidth,e.borderColor?"1px":void 0),borderStyle:da(e.borderStyle,e.borderColor?"solid":void 0),lineHeight:t?`calc(${t} + (${t} * .15))`:void 0,borderRadius:fa(e.corners),userSelect:e.disableSelection?"none":e.allowTextSelection?"text":void 0,minHeight:i("minHeight"),minWidth:i("minWidth"),maxHeight:i("maxHeight"),maxWidth:i("maxWidth"),height:i("height"),width:i("width"),display:e.hide?"none":void 0,flexDirection:e.row?"row":"column",flex:e.flex,backgroundColor:_(e.backgroundColor),color:_(e.color),gap:ma(e.gap),overflowX:n,overflowY:o,aspectRatio:e.aspectRatio,opacity:e.fade,alignItems:e.centerContent?"center":e.align||"start",justifyContent:e.centerContent?"center":e.justify||"start",backdropFilter:e.backdropBlur?`blur(${e.backdropBlur})`:void 0,filter:e.blur?`blur(${e.blur})`:void 0,...e.style};return Object.keys(l).forEach(s=>{let c=s,v=l[c];typeof v=="string"&&(v=v.trim()),!v&&v!==0&&delete l[c];}),(r||e.debug)&&console.log({props:e,style:l}),l};function sa(e){if(!e)return;let r="transparent";return typeof e=="string"?_(e):vr.map(t=>{if(Array.isArray(e)){let{0:n,1:o}=e;return (Array.isArray(o)?o.includes(t):[t,"all"].includes(o))?_(n):r}return typeof e=="object"&&t in e?_(e[t]):r}).join(" ")}function ca(e,r){if(!e)return r;let t=0;return typeof e=="string"?e:vr.map(n=>{if(Array.isArray(e)){let{0:o,1:i}=e;return (Array.isArray(i)?i.includes(n):[n,"all"].includes(i))?o:t}return typeof e=="object"&&n in e?e[n]:t}).join(" ")}function da(e,r){if(!e)return r;let t=0;return typeof e=="string"?e:vr.map(n=>{if(Array.isArray(e)){let{0:o,1:i}=e;return (Array.isArray(i)?i.includes(n):[n,"all"].includes(i))?o:t}return typeof e=="object"&&n in e?e[n]:t}).join(" ")}function ua(e){let t=n=>n?n in K?K[n]:n:"0px";return e?typeof e=="string"?t(e):vr.map(n=>{if(Array.isArray(e)){let{0:o,1:i}=e;return (Array.isArray(i)?i.includes(n):i===n)?t(o):"0px"}return typeof e=="object"&&n in e?t(e[n]):"0px"}).join(" "):"0px"}function fa(e){let t=o=>o?o in ue?ue[o]:o:"0px";return e?typeof e=="string"?t(e):["topLeft","topRight","bottomRight","bottomLeft"].map(o=>{let i=e?.[o];return o.includes("top")&&e?.top?t(e.top):o.includes("bottom")&&e?.bottom?t(e.bottom):i?t(i):"0px"}).join(" "):"0px"}function ma(e){if(!(!e||typeof e!="string"))return e in K?K[e]:e}var p=la;var _a=["inherit","sm","md","lg","xl","2xl","xs"],ba=["sm","md","lg","xl","2xl","xs","2xs"];function un(e){let[r,t]=useState(false),n=e.disabled||r,o=async u=>{if(!n){if(!e.async)return e.onClick?.(u);t(true),await e.onClick?.(u),setTimeout(()=>t(false),e.pendingDelay||1);}},i=u=>{if(u){if(typeof u==typeof FaFolder){let y=S=>typeof S=="string"&&[..._a].includes(S);return jsx(Icon,{size:y(e.iconSize)?e.iconSize:void 0,boxSize:y(e.iconSize)?void 0:e.iconSize,as:u})}return u}},l=i(e.leadingEl),s=i(e.trailingEl),c=u=>typeof u=="string"&&[...ba].includes(u),{size:v,...g}=e;return jsxs(Button,{...de(e),disabled:n,size:c(v)?v:void 0,style:p({...g,size:c(v)?void 0:v,clickable:!n,row:true,centerContent:true,gap:e.gap||"md",corners:e.corners||"md",padding:e.padding||"md",color:e.color||(e.variant==="outline"?"onSurface":"onPrimary"),backgroundColor:e.backgroundColor||(e.variant==="outline"?"transparent":"primary"),border:e.border,borderColor:e.borderColor||(e.variant==="outline"?"onSurface[0.1]":void 0),fade:n?e.disabledOpacity||.5:e.fade||1,pos:r?"relative":e.pos,height:e.height||"fit-content",width:e.width||"fit-content"}),onClick:o,onMouseDown:e.onMouseDown,children:[l,e.text,e.children,s,r&&jsx(AbsoluteCenter,{children:jsx(Spinner,{size:"sm",animationDuration:"slowest",borderWidth:".1rem",color:e.spinnerColor?_(e.spinnerColor):"blue.500"})})]})}var fe=e=>r=>jsx(un,{...(()=>{let n={...r,...e.preset};for(let o of Object.keys(e.optional||{})){let i=o,l=i in n,s=[void 0,null].includes(n[i]);(!l||s)&&(n[i]=e.optional[i]);}return n})()}),B=un;a();a();a();a();a();function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n]);}return e},hr.apply(null,arguments)}a();a();function fn(e){for(var r=0,t,n=0,o=e.length;o>=4;++n,o-=4)t=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(t&65535)*1540483477+((t>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(o){case 3:r^=(e.charCodeAt(n+2)&255)<<16;case 2:r^=(e.charCodeAt(n+1)&255)<<8;case 1:r^=e.charCodeAt(n)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16);}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}a();var mn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};a();function pr(e){var r=Object.create(null);return function(t){return r[t]===void 0&&(r[t]=e(t)),r[t]}}var xa=/[A-Z]|^ms/g,Ba=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hn=function(r){return r.charCodeAt(1)===45},gn=function(r){return r!=null&&typeof r!="boolean"},Mr=pr(function(e){return hn(e)?e:e.replace(xa,"-$&").toLowerCase()}),vn=function(r,t){switch(r){case "animation":case "animationName":if(typeof t=="string")return t.replace(Ba,function(n,o,i){return Z={name:o,styles:i,next:Z},o})}return mn[r]!==1&&!hn(r)&&typeof t=="number"&&t!==0?t+"px":t};function Ve(e,r,t){if(t==null)return "";var n=t;if(n.__emotion_styles!==void 0)return n;switch(typeof t){case "boolean":return "";case "object":{var o=t;if(o.anim===1)return Z={name:o.name,styles:o.styles,next:Z},o.name;var i=t;if(i.styles!==void 0){var l=i.next;if(l!==void 0)for(;l!==void 0;)Z={name:l.name,styles:l.styles,next:Z},l=l.next;var s=i.styles+";";return s}return wa(e,r,t)}case "function":{if(e!==void 0){var c=Z,v=t(e);return Z=c,Ve(e,r,v)}break}}var g=t;if(r==null)return g;var u=r[g];return u!==void 0?u:g}function wa(e,r,t){var n="";if(Array.isArray(t))for(var o=0;o<t.length;o++)n+=Ve(e,r,t[o])+";";else for(var i in t){var l=t[i];if(typeof l!="object"){var s=l;r!=null&&r[s]!==void 0?n+=i+"{"+r[s]+"}":gn(s)&&(n+=Mr(i)+":"+vn(i,s)+";");}else {if(Array.isArray(l)&&typeof l[0]=="string"&&(r==null||r[l[0]]===void 0))for(var c=0;c<l.length;c++)gn(l[c])&&(n+=Mr(i)+":"+vn(i,l[c])+";");else {var v=Ve(e,r,l);switch(i){case "animation":case "animationName":{n+=Mr(i)+":"+v+";";break}default:n+=i+"{"+v+"}";}}}}return n}var yn=/label:\s*([^\s;{]+)\s*(;|$)/g,Z;function pn(e,r,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=true,o="";Z=void 0;var i=e[0];if(i==null||i.raw===void 0)n=false,o+=Ve(t,r,i);else {var l=i;o+=l[0];}for(var s=1;s<e.length;s++)if(o+=Ve(t,r,e[s]),n){var c=i;o+=c[s];}yn.lastIndex=0;for(var v="",g;(g=yn.exec(o))!==null;)v+="-"+g[1];var u=fn(o)+v;return {name:u,styles:o,next:Z}}a();var Da=typeof document<"u",Cn=function(r){return r()},Ta=ie.useInsertionEffect?ie.useInsertionEffect:false,_n=Da&&Ta||Cn;a();var Lr=typeof document<"u";function bn(e,r,t){var n="";return t.split(" ").forEach(function(o){e[o]!==void 0?r.push(e[o]+";"):o&&(n+=o+" ");}),n}var Vr=function(r,t,n){var o=r.key+"-"+t.name;(n===false||Lr===false&&r.compat!==void 0)&&r.registered[o]===void 0&&(r.registered[o]=t.styles);},Sn=function(r,t,n){Vr(r,t,n);var o=r.key+"-"+t.name;if(r.inserted[t.name]===void 0){var i="",l=t;do{var s=r.insert(t===l?"."+o:"",l,r.sheet,true);!Lr&&s!==void 0&&(i+=s),l=l.next;}while(l!==void 0);if(!Lr&&i.length!==0)return i}};a();var Ea=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Pn=pr(function(e){return Ea.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});var za=typeof document<"u",Ia=Pn,Aa=function(r){return r!=="theme"},xn=function(r){return typeof r=="string"&&r.charCodeAt(0)>96?Ia:Aa},Bn=function(r,t,n){var o;if(t){var i=t.shouldForwardProp;o=r.__emotion_forwardProp&&i?function(l){return r.__emotion_forwardProp(l)&&i(l)}:i;}return typeof o!="function"&&n&&(o=r.__emotion_forwardProp),o},Ma=function(r){var t=r.cache,n=r.serialized,o=r.isStringTag;Vr(t,n,o);var i=_n(function(){return Sn(t,n,o)});if(!za&&i!==void 0){for(var l,s=n.name,c=n.next;c!==void 0;)s+=" "+c.name,c=c.next;return ie.createElement("style",(l={},l["data-emotion"]=t.key+" "+s,l.dangerouslySetInnerHTML={__html:i},l.nonce=t.sheet.nonce,l))}return null},kn=function e(r,t){var n=r.__emotion_real===r,o=n&&r.__emotion_base||r,i,l;t!==void 0&&(i=t.label,l=t.target);var s=Bn(r,t,n),c=s||xn(o),v=!c("as");return function(){var g=arguments,u=n&&r.__emotion_styles!==void 0?r.__emotion_styles.slice(0):[];if(i!==void 0&&u.push("label:"+i+";"),g[0]==null||g[0].raw===void 0)u.push.apply(u,g);else {var y=g[0];u.push(y[0]);for(var S=g.length,R=1;R<S;R++)u.push(g[R],y[R]);}var C=withEmotionCache(function(b,k,x){var P=v&&b.as||o,I="",Me=[],we=b;if(b.theme==null){we={};for(var Ut in b)we[Ut]=b[Ut];we.theme=ie.useContext(ThemeContext);}typeof b.className=="string"?I=bn(k.registered,Me,b.className):b.className!=null&&(I=b.className+" ");var dr=pn(u.concat(Me),k.registered,we);I+=k.key+"-"+dr.name,l!==void 0&&(I+=" "+l);var Ti=v&&s===void 0?xn(P):c,ur={};for(var fr in b)v&&fr==="as"||Ti(fr)&&(ur[fr]=b[fr]);return ur.className=I,x&&(ur.ref=x),ie.createElement(ie.Fragment,null,ie.createElement(Ma,{cache:k,serialized:dr,isStringTag:typeof P=="string"}),ie.createElement(P,ur))});return C.displayName=i!==void 0?i:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",C.defaultProps=r.defaultProps,C.__emotion_real=C,C.__emotion_base=o,C.__emotion_styles=u,C.__emotion_forwardProp=s,Object.defineProperty(C,"toString",{value:function(){return "."+l}}),C.withComponent=function(b,k){var x=e(b,hr({},t,k,{shouldForwardProp:Bn(C,k,true)}));return x.apply(void 0,u)},C}};Li(wn());var La=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],De=kn.bind(null);La.forEach(function(e){De[e]=De(e);});var Wr=class{static getStyle(r){if(r)return JSON.parse(JSON.stringify(r||{}),(t,n)=>t==="backgroundColor"||t==="color"?_(n):n)}static span=r=>De.span({...this.getStyle(r)});static div=r=>De.div({...this.getStyle(r)});static img=r=>De.img({...this.getStyle(r)})},Te=Wr;function $a(e){let r=useRef(null),[t,n]=useState(false),o=E({top:0,left:0});e.rememberScrollPos&&useEffect(()=>{let g=o.read();r.current&&[g.top,g.left].some(u=>!!u)&&(r.current.scrollTop=g?.top??0,r.current.scrollLeft=g?.left??0);},e.updateScrollPosDeps),(e.rememberScrollPos||e.overflowPadding)&&useEffect(()=>{r.current&&Ar(r.current)&&!t&&n(true);},[]);let i="10%",l=`linear-gradient(to bottom, transparent, black calc(${i}/4), black calc(100% - ${i}), transparent) `,s=e.decreaseYFaderPadding?"2vh":"5rem",c=p({...e,spill:e.spill==="hidden"?"hidden":e.spill||(e.rememberScrollPos?"auto":void 0),padding:e.padding||{right:e.overflowPadding&&t?e.overflowPadding:void 0,top:e.enableYFaders?s:void 0,bottom:e.enableYFaders?s:void 0}}),v=Te.div(e.css);if(!e.hide)return e.asChildren?e.children:jsx(v,{...de(e),ref:e.rememberScrollPos||e.overflowPadding?r:e.ref,draggable:e.draggable,onScroll:g=>{let u=r?.current?.scrollTop,y=r?.current?.scrollLeft;!t&&e.overflowPadding&&n(true),isEmpty(strictArray([u,y]))||o.upsert({top:u??0,left:y??0}),e.onScroll?.(g);},style:{...c,display:e.grid?"grid":c.display||"flex",flexWrap:c.flexWrap||(e.flexWrap?"wrap":void 0),gridTemplateColumns:c?.gridTemplateColumns||e.gridCols||"1fr",gridTemplateRows:c?.gridTemplateRows||e.gridRows,WebkitMaskImage:e.enableYFaders&&l,maskImage:e.enableYFaders&&l},children:e.children})}var d=$a;a();function Xa(e){let r=!!e.tint,t=Te.img(e.sx);return jsx(t,{...de(e),loading:"lazy",decoding:"async",fetchPriority:"high",src:e.src,alt:e.alt,style:{...p(e),filter:r?`drop-shadow(0px 1000px 0 ${_(e.tint)})`:void 0,transform:r&&"translateY(-1000px)",objectFit:e.noFit?"none":e.fill?"fill":e.cover?"cover":e.scaleDown?"scale-down":"contain"}})}var me=Xa;a();function Ga(e){let r=n=>e.onItemClick?.(n),t=e.bold??e.items.some(n=>typeof n=="object");return jsx(d,{gap:e.gap||"md",width:e.width,height:e.height,children:e.items.map((n,o)=>typeof n=="string"?jsx(Nr,{index:o,item:n,bold:t,active:e.isItemActive(n),completed:e.isItemCompleted(n),onClick:r},n):jsxs(d,{width:"full",children:[jsx(Nr,{index:o,bold:t,item:n.label,active:n.nestedItems.some(i=>e.isItemActive(i)),completed:n.nestedItems.every(i=>e.isItemCompleted(i)),onClick:n.nestedItems?.[0]?()=>r(n.nestedItems[0]):void 0}),jsx(d,{width:"full",children:n.nestedItems.map((i,l)=>jsx(Nr,{index:l,fontSize:"sm",nested:true,item:i,active:e.isItemActive(i),completed:e.isItemCompleted(i),onClick:r},i))})]},n.label))})}function Nr(e){let r=oe.white,t=X.onSurface,n=e.nested?t:X.tertiaryContainer,o=e.active?n:oe.carlsbergGreen,i=e.active&&!e.nested?n:X["onSurface[0.25]"],l=e.nested?X["onSurface[0.4]"]:X["onSurface[0.5]"],s=X["onSurface[0.2]"],c=()=>e.onClick?.(e.item),v=IoMdCheckmark;return jsxs(d,{row:true,gap:"md",clickable:true,width:"full",fontSize:e.fontSize||"md",align:"center",onClick:c,css:{transition:"all 300ms linear",color:e.completed&&!(e.nested&&e.active)?i:e.active?n:l,borderColor:e.completed?o:e.active?n:s,":hover":e.active?void 0:{color:t,borderColor:e.completed&&!e.nested?void 0:t}},children:[jsx(d,{corners:"circle",centerContent:true,size:"1.5rem",style:{textAlign:"center",flexShrink:0},borderColor:"inherit",backgroundColor:e.completed?o:void 0,color:e.completed?r:"inherit",fade:e.nested?0:1,padding:e.completed?void 0:"md",children:e.completed?jsx(v,{fontSize:"1rem"}):jsx(h,{fontWeight:"bold",textAlign:"center",centerContent:true,text:`${e.index+1}`,style:{lineHeight:"0"}})}),jsx("span",{style:{width:"100%",fontWeight:e.bold?"bold":void 0,opacity:e.completed&&!e.active?e.nested?.5:.75:1},children:e.item}),e.completed&&e.nested&&jsx(v,{size:"1.25rem",opacity:.75})]})}var $r=Ga;a();function Ka(e){let r=i=>e.ellipsis?U(i):e.lineLimit?Le(e.lineLimit,i):i,t=()=>strictArray([e.underline||e.link||e.fakeHyperlink||e.hyperlink?"underline":void 0,e.strikeThrough?"line-through":void 0]).join(" ").trim(),n=p({...e,color:e.fakeHyperlink||e.hyperlink?"hyperlink":e.color,cursor:e.link||e.hyperlink||e.clickable?"pointer":e.cursor}),o=Te.span(e.sx);return jsx(o,{...de(e),ref:e.ref,style:r({...n,width:e.ellipsis?"100%":n.width,textAlign:n.textAlign||e.textAlign||"justify",fontStyle:n.fontStyle||e.italic?"italic":void 0,textDecoration:n.textDecoration||t()||void 0}),children:e.text||e.children})}var h=Ka;a();var _r="1px",zn=6,Re=createContext(null);function Qa(e){let r=e.defaultColumnWeight||"1fr",t=["none",0].includes(e.separatorColor)?void 0:e.separatorColor??"onSurface[0.25]",n=!!e.selectedRows,[o,i]=useState(e.defaultSelectedRows||[]),l=()=>e.columns.map(x=>{let P=typeof x=="object"?x:{};return {...P,name:Ee(x),weight:"weight"in P?P.weight:r,textAlign:"textAlign"in P?P.textAlign:e.textAlign||"start"}}),s=x=>(e.selectable?`auto ${_r}`:"")+l().map(I=>{let Me=I.weight||r;return Me==="auto"?x.find(we=>we.name===I.name)?.weight||"auto":Me}).join(` ${_r} `),[c,v]=useState(s(l())),g=o.length===e.entries.length&&e.entries.length>0,u=useRef(null),y=useRef(false),S=(Array.isArray(e.children)?e.children:[e.children]).filter((x,P)=>P<2),R=()=>{let x=[];g||(x=e.entries.map((P,I)=>I)),e.onSelectedRowsChange?.(x),n||i(x);},C=x=>{let P=[...o];P.includes(x)?P=P.filter(I=>I!==x):P.push(x),e.onSelectedRowsChange?.(P),n||i(P);},b=x=>{u.current?(x.forEach((P,I)=>{(u.current.get(I)||0)<P&&u.current.set(I,P);}),k()):(u.current=x,S.length===1&&k());},k=()=>{if(y.current){y.current=false;return}let x=l().map(P=>{let I=u.current.get(P.name);return I?{...P,weight:`${I}px`}:P});y.current=true,u.current=null,v(s(x));};return jsx(Re.Provider,{value:{...e,gridCols:c,selectedRowIndices:n?e.selectedRows:o,separatorColor:t,allRowsSelected:g,onSelectRowClick:C,onSelectAllRowsClick:R,columns:l(),padding:e.padding??"sm",columnGap:e.columnGap??e.gap??"lg",rowGap:e.rowGap??e.gap,onColWidthsComputed:b},children:jsx(d,{grid:true,gridRows:"auto auto",corners:e.corners,height:e.height,width:e.width,minHeight:e.minHeight,maxHeight:e.maxHeight,minWidth:e.minWidth,maxWidth:e.maxWidth,color:e.color,fontSize:e.fontSize,fontWeight:e.fontWeight,backgroundColor:e.backgroundColor,spill:e.spill,style:{gridTemplateAreas:'"header" "body"'},children:S})})}function el(e){let r=useContext(Re),t=e.separatorColor||r.separatorColor,n=useRef(new Map);return jsxs(d,{grid:true,gridCols:r.gridCols,gap:r.columnGap,borderColor:e.borderColor||(t!==0&&t!=="none"?[t,"bottom"]:void 0),borderWidth:_r,spill:"hidden",padding:e.padding??r.padding,corners:e.corners??(r.separatorColor?0:void 0),color:e.color,backgroundColor:e.backgroundColor,fontWeight:e.fontWeight,fontSize:e.fontSize,align:"center",width:"full",style:{gridArea:"header"},children:[r.selectable&&jsx(In,{selected:r.allRowsSelected,onClick:r.onSelectAllRowsClick}),r.columns.map((o,i,l)=>{let s=Ee(o);return jsxs(Fragment,{children:[jsx(h,{ref:c=>{c&&(n.current.set(s,parseFloat(getComputedStyle(c).width)+zn),i===lastIndex(l)&&r.onColWidthsComputed(n.current));},text:!e.formatColumnName||e.formatColumnName==="camelToLetter"?camelCaseToLetter(s):e.formatColumnName?.(s)??camelCaseToLetter(s),style:{flexGrow:1,textAlign:He("textAlign",o)}},s+i),i!==l.length-1&&jsx(Xr,{color:e.separatorColor})]})})]})}function rl(e){let r=useContext(Re),t=useRef(new Map);return useEffect(()=>()=>{t.current.clear();},[]),jsx(d,{width:"full",gap:r.rowGap,padding:e.padding??(r.rowGap?[r.rowGap,"top"]:void 0),color:e.color,fontSize:e.fontSize,style:{paddingTop:r.rowGap,gridArea:"body"},children:r.entries.map((n,o)=>jsx(tl,{rowData:n,index:o,style:e.styleRow?.(o),styleCell:e.styleCell,onColWidthComputed:(i,l)=>{let s=t.current.get(i);(!s||l>s)&&t.current.set(i,l);},onCellRendered:i=>{let l=o===lastIndex(r.entries),s=i===lastIndex(r.columns);l&&s&&t.current.size>0&&r.onColWidthsComputed(t.current);}},o))})}function tl(e){let r=useContext(Re),t=r.selectedRowIndices.includes(e.index),n=()=>r.onSelectRowClick(e.index),{gap:o,padding:i,backgroundColor:l}=p({gap:r.columnGap,padding:r.padding??e.padding,backgroundColor:t?"onSurface[0.1]":"transparent"});return jsxs(d,{spill:"hidden",style:{gap:o,padding:i,backgroundColor:l,width:"100%",display:"grid",alignItems:"center",gridTemplateColumns:r.gridCols,...e.style},children:[r.selectable&&jsx(In,{selected:t,onClick:n}),r.columns.map((s,c,v)=>{let g=Ee(s),u=e.rowData[g],y=typeof s=="object"?s?.placeholder:void 0,S=()=>e.onCellRendered?.(c),R=c+Ee(s),C=He("textAlign",s),b={textAlign:C,justifyContent:C,color:He("color",s),opacity:He("opacity",s,1),backgroundColor:He("backgroundColor",s),...e.styleCell?.({cellIndex:e.index*r.columns.length+c,columnName:g,columnIndex:c,rowIndex:e.index,data:typeof u=="string"?u:null,siblingData:{previous:c===0?null:run(e.rowData[Ee(v[c-1])],k=>typeof k=="string"?k:null),next:c===v.length-1?null:run(e.rowData[Ee(v[c+1])],k=>typeof k=="string"?k:null)}})||{}};return typeof s=="object"&&s.weight==="auto"?jsxs(Fragment,{children:[jsx(nl,{data:u,style:b,onRender:S,placeholder:y,onWidthComputed:k=>e.onColWidthComputed(g,k)},R),c!==v.length-1&&jsx(Xr,{})]}):jsxs(Fragment,{children:[jsx(On,{data:u,style:b,placeholder:y,onRender:S},R),c!==v.length-1&&jsx(Xr,{})]})})]})}function nl(e){let r=useRef(null);return useEffect(()=>{r.current?e.onWidthComputed(parseFloat(getComputedStyle(r.current).width)+zn):console.error(new Error("Failed to compute style for an Auto cell",{cause:{data:e.data,cellRef:r}}));},[]),jsx(On,{noWrap:true,data:e.data,placeholder:e.placeholder,ref:r,style:e.style,onRender:e.onRender})}function On(e){return useEffect(()=>{e.onRender?.();},[]),typeof e.data=="string"||!e.data?jsx(h,{ref:e.ref,children:e.data||"-",fade:e.data?1:.75,style:{...e.style,whiteSpace:e.noWrap?"nowrap":void 0,width:"100%"}}):e.ref?jsx("div",{ref:e.ref,style:{...e.style,width:"100%",overflow:"hidden"},children:e.data}):e.data}function Xr(e){let r=useContext(Re),t=e.color||r.separatorColor;return jsx(d,{width:_r,height:"full",backgroundColor:t==="none"||t===0?"transparent":t})}function In(e){let r=useContext(Re),{disableSeparator:t,separatorColor:n}=r.slotProps?.selectColumn||{},o=n||r.separatorColor;return jsx(d,{padding:t?void 0:["md","right"],borderColor:o&&!t?[o,"right"]:void 0,children:jsx(An,{padding:"sm",iconSize:".85rem",checked:e.selected,onChange:e.onClick})})}var Ee=e=>typeof e=="string"?e:e.name,He=(e,r,t)=>typeof r=="object"&&e in r?r[e]:t,ol={Root:Qa,Header:el,Body:rl},il=ol;a();a();function ll(e){return jsxs(d,{row:true,ref:r=>{r&&!e.scrollIntoView&&e.selected&&r.scrollIntoView(true);},gap:"sm",align:"center",fade:e.disabled?.5:1,width:e.width??"full",corners:e.corners??"md",padding:e.padding??"sm",fontSize:e.fontSize||"sm",cursor:e.disabled?"not-allowed":"pointer",css:{...e.sx,transition:e.sx?.transition||"all 200ms linear",color:e.color||e.sx?.color||(e.selected?"surface":"onSurface"),backgroundColor:e.backgroundColor||e.sx?.backgroundColor||(e.selected?"onSurface":void 0),":hover":e.disabled||e.selected?void 0:{...e.sx?.[":hover"],backgroundColor:e.sx?.[":hover"]?.backgroundColor||"onSurface[0.1]"}},onClick:e.disabled?void 0:e.onClick,children:[!e.hideSelectedTick&&e.selected&&jsx(LuCheck,{style:{flexShrink:0}}),e.leadingEl,jsx("span",{children:e.formatOption?.(`${e.value}`)||`${e.value}`,style:U({maxWidth:"100%",flex:"1",alignItems:"start",textAlign:"start"})}),e.trailingEl]})}var Gr=ll;var Ln=createContext(null);function ml(e){return jsx(Ln.Provider,{value:{...e,options:e.options.map(r=>typeof r=="string"||typeof r=="number"?{value:r.toString(),leadingEl:e.defaultLeadingEl,trailingEl:e.defaultTrailingEl}:{...r,leadingEl:r.leadingEl||e.defaultLeadingEl,trailingEl:r.trailingEl||e.defaultTrailingEl})},children:jsx(Fe,{...e,backdropBlur:e.backdropBlur,padding:e.padding||"md",corners:e.corners||"md",displayAction:"click",content:jsx(gl,{})})})}function gl(){let e=useContext(Ln),r=Vn(),[t,n]=useState(e.isSelected?e.options.findIndex((i,l)=>e.isSelected(i,l,e.options)):void 0),{triggerRerender:o}=V();return useEffect(()=>{setTimeout(()=>{o();},10);},[]),jsx(d,{spill:"auto",gap:e.gap||"sm",children:e.options.map((i,l)=>{let s=l===t,c=()=>{i.onClick?.(),e.onOptionClick?.(i,l,e.options),n(l),r.close();};return (!i||!i?.value)&&console.error(`Index ${l} is not defined in ${e.options.join()}`),jsx(Gr,{formatOption:e.formatOption,hideSelectedTick:e.hideSelectedTick,leadingEl:i.leadingEl,trailingEl:i.trailingEl,value:i?.value.toString(),disabled:i?.disabled,selected:s,onClick:c},l)})})}var Xe=ml;a();var yl=["sm","md","lg","xl","xs"];function Hv(e){let{animationDelay:r,animationDirection:t,animationDuration:n="slowest",size:o="sm"}=e,i=l=>l&&typeof l=="string"&&[...yl].includes(l);return jsx(Spinner,{size:i(o)?o:void 0,animationDelay:r,animationDirection:t,animationDuration:n,color:_(e.color||"seed"),borderWidth:e.thickness||".1rem",style:{padding:i(o)?void 0:o}})}a();function Gv(e){let r=useRef(false),[t,n]=useState(e.currentPage??0),o=e.maxIndicators||5,i=o-1,l=e.totalPages-1,s=async g=>{if(g===t)return;let u=g===t+1,y=Math.abs(g-t)>1;r.current=y?null:u,y||(u?await e.onNextClick?.():await e.onPreviousClick?.()),await e.beforePageChange?.(g),n(g),await e.afterPageChange?.(g);},c=async()=>s(t-1),v=async()=>s(t+1);return jsxs(d,{row:true,align:"center",gap:e.gap||"1rem",children:[jsx(Hn,{icon:SlArrowLeft,disabled:e.disableNav||t===0,onClick:c}),jsx(d,{row:true,justify:l>i?"space-evenly":void 0,align:"center",gap:".5rem",spill:"hidden",style:{width:`calc(2.05rem * ${o})`},children:buildArray(e.totalPages,g=>{let u=t===g;return jsx(d,{cursor:e.disableNav?"default":"pointer",centerContent:true,size:"1.6rem",children:`${g+1}`,corners:"circle",fade:u?1:.5,borderColor:u?void 0:"onSurface[0.1]",backgroundColor:u?"primary":void 0,color:u?"onPrimary":void 0,fontSize:"xs",style:{userSelect:"none",transition:"transform 200ms linear",transform:`translateX(calc(${t<i?0:t===l?t-i:t-(i-1)} * 2.1rem * ${r?-1:1}))`,flexShrink:0},onClick:e.disableNav?void 0:()=>s(g)},g)})}),jsx(Hn,{icon:SlArrowRight,disabled:e.disableNav||t===e.totalPages-1,onClick:v})]})}function Hn(e){return jsx(B,{async:true,disabled:e.disabled,padding:0,iconSize:"1rem",leadingEl:e.icon,backgroundColor:"transparent",color:"onSurface",onClick:e.onClick})}a();var Wn=createContext(null);function Dl(e){let r=()=>{e.onClose?.();};if(e.controller?.isOpen!==false)return jsx(Wn.Provider,{value:{sepColor:e.sepColor||"onSurface[0.1]"},children:jsxs(Drawer.Root,{open:e.controller?.isOpen,onExitComplete:r,children:[e.triggerElement&&jsx(Drawer.Trigger,{children:e.triggerElement}),jsxs(El,{container:e.container,children:[jsx(Drawer.Backdrop,{pos:e.container?"absolute":void 0,boxSize:e.container?"full":void 0}),jsx(Drawer.Positioner,{pos:e.container?"absolute":void 0,boxSize:e.container?"full":void 0,children:jsxs(Drawer.Content,{style:p({...e,spill:e.spill||"hidden",backgroundColor:e.backgroundColor,padding:e.padding??"md"}),children:[jsx(Drawer.CloseTrigger,{children:jsx(CloseButton,{})}),e.children]})})]})]})})}function Tl(){let e=useContext(Wn);return jsx(d,{backgroundColor:e.sepColor,width:"full",height:"1px"})}function El(e){return e.container?jsx(Portal,{container:e.container,children:e.children}):e.children}var iy={Root:Dl,Header:e=>jsx(Drawer.Header,{style:p({...e,width:e.width??"full"}),children:e.children}),Body:e=>jsx(Drawer.Body,{style:p({...e,width:e.width??"full"}),children:e.children}),Footer:e=>jsx(Drawer.Footer,{style:p({...e,width:e.width??"full"}),children:e.children}),Sep:Tl,ActionTrigger:Drawer.ActionTrigger,CloseTrigger:Drawer.CloseTrigger};a();a();a();var Nn=["Google"],$n=["pdf","word","excel","img","txt","unknown"],Jn=Object.freeze({txt:["text/plain"],img:["image/jpeg","image/png","image/jpg"],excel:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel","application/vnd.ms-excel.sheet.macroEnabled.12"],word:["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/vnd.microsoft.portable-executable"],pdf:["application/pdf"],unknown:[]});function Un(e){let r=t=>{e.onChange(t.currentTarget.files);};return jsxs(FileUpload.Root,{alignItems:"stretch",width:e.width,maxWidth:e.maxWidth||"xl",maxFiles:e.maxFiles||(e.multiple?1/0:1),overflow:"hidden",height:e.height,accept:Rl(e.accepts),children:[jsx(FileUpload.HiddenInput,{onChange:r}),e.children,e.showList&&jsx(FileUpload.List,{...e.slotProps?.fileList})]})}var Rl=e=>e.flatMap(r=>Jn[r]);function Sy(e){return jsx(Un,{...e,children:jsxs(FileUpload.Dropzone,{borderRadius:"xl",height:"full",width:"full",overflow:"hidden",backgroundColor:_(e.backgroundColor||"transparent"),borderColor:_(e.borderColor||"outlineVariant"),color:_(e.color||"onSurface"),cursor:"pointer",children:[jsx(Icon,{size:"md",color:"fg.muted",children:jsx(LuUpload,{})}),jsx(FileUpload.DropzoneContent,{maxHeight:"100%",overflow:"hidden",children:e.content||jsxs(Fragment,{children:[jsx(Box,{children:"Drag and drop files here"}),jsx(Box,{color:"fg.muted",children:".png, .jpg up to 5MB"})]})})]})})}a();var qn=createContext(null);function Fy(e){let r=E(null),t=E(e.defaultValue??""),[n,o]=useState(e.value??t.read()),[i,l]=useState(false),s=e.activationMode||"click",c=e.size||"md",v=P=>{e.readOnly||(e.value===void 0&&o(P),e.onChange?.(P));},g=()=>{v(t.read());},u=()=>{e.readOnly||(e.onEdit?.(),!e.preventDefault&&l(true));},y=(P={asClick:true})=>{r.upsert("cancel"),g(),P.asClick&&e.onCancelClick?.(),l(false);},S=P=>{P.preventDefault(),l(false);},R=(P=true)=>{t.upsert(n),P&&(r.upsert("save"),e.onSaveClick?.(n)),e.onSave?.(n),l(false);},C=()=>{r.upsert("edit"),e.onEditClick?.(),u();},b=()=>{R(false);},k=()=>{e.onContentClick?.(),u();},x={align:"center",gap:e.rowGap??"sm",width:e.width,maxWidth:"full"};return jsx(qn.Provider,{value:{padding:".25rem",iconSize:e.iconSize||c},children:jsxs(d,{...x,asChildren:!e.label,row:false,align:"start",children:[e.label&&jsx(h,{text:e.label,fontSize:q[c],fade:i?.75:.5,style:{transition:"all 200ms linear"}}),jsxs(d,{...x,grid:true,gap:e.columnGap??x.gap,gridCols:e.hideControls===true||Array.isArray(e.hideControls)&&["cancel","save","edit"].every(P=>e.hideControls.includes(P))?"1fr":e.control?"1fr auto":i?"1fr auto auto":"1fr auto",justify:e.spaceBetween?"space-between":void 0,children:[i&&!e.readOnly?jsx(d,{width:"full",align:"center",gap:"md",children:jsx(Y,{autoFocus:true,readOnly:e.readOnly,allowedChars:e.allowedChars,maxChars:e.maxChars,value:n,corners:"md",validateInput:e.validateInput,width:e.inputWidth,focusColor:e.focusColor,size:e.inputSize||c,placeholder:e.placeholder,showCharCounter:e.showCharCounter,slotProps:{charCounter:{fontSize:e.charCounterFontSize}},onChange:v,onBlur:S,onEnterKeyPressed:b,onEscapeKeyPressed:()=>y({asClick:false})})}):jsx(d,{spill:"hidden",width:"full",padding:e.contentPadding??["md",["top","bottom"]],corners:"sm",fontSize:e.fontSize||c,cursor:"text",css:{transition:"all 200ms linear",":hover":e.readOnly?void 0:{backgroundColor:"onSurface[0.1]"}},onDoubleClick:s==="dblclick"?()=>y({asClick:false}):void 0,onClick:s==="click"?k:void 0,children:jsx(Fe,{...e.slotProps?.popover,allowInteractions:true,asChild:e.showPopoverOnHover===false||e.slotProps?.popover?.asChild===true?true:!!n,content:(e.slotProps?.popover?.content||e.renderPopoverContent?.(n))??n,displayAction:"hover",maxWidth:e.slotProps?.popover?.maxWidth||"10rem",maxHeight:e.slotProps?.popover?.maxHeight||"5rem",children:jsx("span",{style:U({opacity:e.placeholder&&!n?.85:1,width:"100%"}),children:(e.formatContent?.(n)??n)||e.placeholder})})}),e.hideControls!==true&&(e.control||jsx(Wl,{editing:i,hideControl:typeof e.hideControls=="boolean"?void 0:e.hideControls,onCancel:y,onSave:R,onEdit:C}))]})]})})}function Wl(e){let r=t=>Array.isArray(e.hideControl)?e.hideControl.includes(t):e.hideControl===t;return e.editing?jsxs(Fragment,{children:[!r("cancel")&&jsx(qr,{outlined:true,icon:LuX,onClick:e.onCancel}),!r("save")&&jsx(qr,{preventDefault:true,outlined:true,icon:LuCheck,onClick:e.onSave})]}):r("edit")?void 0:jsx(qr,{icon:LuPencilLine,onClick:e.onEdit})}function qr(e){let{padding:r,iconSize:t}=useContext(qn);return jsx(d,{asChildren:e.outlined,corners:"sm",css:{transition:"all 200ms linear",":hover":{backgroundColor:"onSurface[0.1]"}},children:jsx(B,{size:t,padding:r,leadingEl:e.icon,backgroundColor:"transparent",borderColor:e.outlined?"onSurface[0.25]":void 0,onClick:e.onClick,aspectRatio:1,color:"onSurface",corners:"sm",onMouseDown:n=>{n.preventDefault();}})})}a();var Qr=createContext(null);function Jl(e){return jsx(Qr,{value:e.itemFade?{fade:e.itemFade}:{fade:.5},children:jsx(d,{...e,size:e.size??"full",centerContent:e.centerContent??true,gap:e.gap||"lg",children:e.children})})}function Xl(e){let{fade:r}=useContext(Qr);return jsx(d,{fade:e.disableFade?1:r,size:e.size||"4rem",children:e.element})}function Ul(e){let{fade:r}=useContext(Qr);return jsxs(d,{align:"center",gap:e.gap||"sm",children:[jsx(h,{fontWeight:"bold",fontSize:e.titleFontSize||"lg",text:e.title}),jsx(h,{fade:r,fontSize:e.descriptionFontSize,text:e.description})]})}var br={Root:Jl,Indicator:Xl,Content:Ul};a();function ge(e){let r=()=>{if(!e.disableFallback){if(typeof e.fallback=="string")return jsx(Avatar.Fallback,{name:e.fallback});if(e.fallback&&ie__default.isValidElement(e.fallback))return e.fallback;if(e.fallback){let t=e.fallback;return jsx(t,{size:"50%"})}return jsx(Avatar.Fallback,{})}};return jsxs(Avatar.Root,{size:e.size||"md",backgroundColor:_(e.backgroundColor),color:_(e.color),style:e.style,children:[jsx(r,{}),jsx(Avatar.Image,{src:e.src})]})}a();function eo(e){let r=useRef(null),t=useRef(null);return e.asChild?e.children:jsxs(Box,{position:"relative",ref:r,children:[e.children,jsx(Float,{ref:t,offset:e.offset||(e.circleChild?".25rem":void 0),placement:e.placement,children:e.badge})]})}a();var ro=createContext(null);function ts(e){return jsx(ro.Provider,{value:{gap:e.gap},children:jsx(d,{row:true,clickable:e.clickable,gap:e.gap??"md",padding:e.padding??"md",corners:e.corners??"lg",height:e.height,width:e.width,maxWidth:e.maxWidth,minWidth:e.minWidth,backgroundColor:e.backgroundColor,color:e.color,align:"center",style:e.style,spill:e.spill??"hidden",css:e.sx,onClick:e.onClick,children:e.children})})}function to(e){return r=>{let{children:t,className:n,row:o=true,spill:i="hidden",centerContent:l=true,align:s="center",...c}=r;return jsx(d,{className:n,...c,row:o,spill:i,centerContent:l,align:s,children:t})}}function no(e){return r=>jsx("span",{style:(()=>{let n=p({...e,fontSize:r.fontSize||e.fontSize,fontWeight:r.fontWeight||e.fontWeight,fade:r.fade||e.fade,color:r.color||e.color||"inherit"});return !r.truncateStyle||r.truncateStyle==="none"?n:r.truncateStyle==="ellipsis"?U(n):Le(r.truncateStyle.lineCount,n)})(),children:r.value})}var ns=to(),os=to(),is=e=>{let{gap:r=e.gap}=useContext(ro);return jsx(d,{gap:r,...e,spill:e.spill||"hidden",maxWidth:e.maxWidth||"full",children:e.children})},as=no({fontWeight:"bold",fontSize:"xs",fade:.75}),ls=no({fontSize:"sm"}),N={Root:ts,LeadingAddOn:ns,TrailingAddOn:os,Content:is,Label:as,Item:ls};a();function ds(e){let r=()=>{if(typeof e.fallback=="string"||ie__default.isValidElement(e.fallback))return e.fallback;let n=e.fallback||PiImageBrokenLight;return jsx(n,{size:"3rem"})};return jsxs(d,{className:e.className,padding:"1px",corners:"lg",backgroundColor:"onSurface",color:"surface",gap:"sm",spill:"hidden",fade:e.fade,height:e.height??"fit-content",width:e.width??"14rem",style:{...e.style,boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px"},children:[jsx(d,{centerContent:true,height:e.mediaHeight??"7rem",width:"full",backgroundColor:"surface",color:"onSurface",borderColor:"surface",corners:{top:"lg"},spill:"hidden",children:e.src?jsx(me,{cover:e.coverImg??true,size:e.imgSize??"full",corners:e.imgCorners??"md",spill:"hidden",src:e.src,style:{boxShadow:"rgba(0, 0, 0, 0.24) 0px 3px 8px"}}):jsx(r,{})}),jsxs(d,{width:"full",gap:"md",padding:"md",align:"start",spill:"hidden",children:[jsxs(d,{width:"full",gap:0,spill:"hidden",children:[jsx("span",{children:e.title,style:p({fontSize:e.titleFontSize??"md"})}),e.description&&jsx("span",{children:e.description,style:p({fontSize:e.descriptionFontSize??"xs",fade:.5})})]}),e.children]})]})}function us(e){return jsx(d,{...e,width:e.width??"full",spill:e.spill||"hidden",children:e.children})}var mh={Root:ds,Content:us};a();function fs(e){let r={backgroundColor:"onSurface",color:"surface",padding:"md",corners:"lg"},t=i=>e[i]??r[i],n=i=>{if(!e.children)return e[i]||r[i]},o=e.disableBoxShadow?"none":e.style?.boxShadow||"rgba(0, 0, 0, 0.35) 0px 5px 15px";return jsxs(d,{className:e.className,asChildren:!e.children,height:t("height"),width:t("width"),backgroundColor:t("backgroundColor"),color:t("color"),padding:t("padding"),corners:t("corners"),gap:"md",spill:"hidden",style:{...e.style,boxShadow:o},children:[jsxs(d,{row:true,className:e.children?void 0:e.className,gap:"md",align:"center",height:n("height"),width:n("width"),backgroundColor:n("backgroundColor"),color:n("color"),padding:n("padding"),corners:n("corners"),spill:"hidden",style:e.children?void 0:{...e.style,boxShadow:o},children:[jsx(ge,{src:e.avatarSrc,size:e.avatarSize??"sm",fallback:e.avatarFallback,backgroundColor:e.avatarBackgroundColor,color:e.avatarColor}),jsxs(d,{width:"full",spill:"hidden",children:[jsx("span",{children:e.title,style:U(p({fontSize:e.titleFontSize??"sm",fontWeight:e.titleFontWeight,fade:e.titleFade}))}),jsx("span",{children:e.description,style:U(p({fade:e.descriptionFade??.5,fontSize:e.descriptionFontSize??"xs",fontWeight:e.descriptionFontWeight}))})]})]}),e.children]})}var Sh={Root:fs,Content:d};a();function An(e){let[r,t]=useState(e.defaultChecked??false),n=e.checked??r,o=e.checked!==void 0,i=()=>{e.onClick?.(),o||(e.onChange?.(!n),t(!n));};return jsx(d,{cursor:e.disabled?"not-allowed":"pointer",fade:e.disabled?.5:1,size:e.size,corners:e.corners??"sm",padding:e.padding??"sm",backgroundColor:n?e.accentColor||"primaryContainer":"transparent",color:e.iconColor||"onPrimaryContainer",borderColor:e.borderColor||"onSurface[0.1]",style:{boxShadow:e.disableShadow?void 0:"rgba(0, 0, 0, 0.25) 0px 2px 4px 0px inset"},onClick:e.disabled?void 0:i,children:jsx(IoMdCheckmark,{size:e.iconSize,style:{opacity:n?1:0}})})}a();a();function hs(e){let{triggerRerender:r}=V(),t=p({...e,padding:e.padding||"xl",corners:e.corners||"md",gap:e.gap||"lg"}),n=({open:i})=>{e.onOpenChange?.(i);},o=()=>{e.onClose?.(),e.controller?.hide?.(),e.rerenderOnClose&&r();};if(e.controller?.isOpen!==false)return jsxs(Dialog.Root,{unmountOnExit:e.unmountOnExit,open:e.controller?.isOpen,onEscapeKeyDown:e.closeOnEscape??true?e.controller?.hide:void 0,scrollBehavior:e.scrollBehavior,onInteractOutside:e.closeOnInteractOutside??true?e.controller?.hide:void 0,placement:e.placement||"center",closeOnEscape:e.closeOnEscape,closeOnInteractOutside:e.closeOnInteractOutside,onOpenChange:n,onExitComplete:o,motionPreset:e.enterAnimation||"slide-in-bottom",children:[e.triggerElement&&jsx(Dialog.Trigger,{asChild:true,children:e.triggerElement}),jsxs(Portal,{children:[jsx(Dialog.Backdrop,{}),jsx(Dialog.Positioner,{children:jsxs(Dialog.Content,{style:t,children:[e.children,!e.hideCloseButton&&jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(CloseButton,{size:e.closeButtonSize||"sm",onClick:e.controller?.hide})})]})})]})]})}var ot=(e,r)=>t=>{let n=Dialog[e],o={...t,spill:t.spill||"hidden"};return Object.keys(r||{}).forEach(i=>{let l=i;o?.[l]||(o=Object.assign(o,{[l]:r[l]}));}),jsx(n,{width:"full",height:"full",overflow:"hidden",children:jsx(d,{...o,children:t.children})})},ps=ot("Header",{fontSize:"xl",fontWeight:"bold"}),Cs=ot("Body",{gap:"md"}),_s=ot("Footer",{row:true,gap:"sm"}),bs=e=>jsx(Dialog.CloseTrigger,{asChild:true,children:e.wrap?jsx("div",{...e.slotProps?.divWrapper,children:e.children}):e.children}),Ss=e=>jsx(Dialog.ActionTrigger,{asChild:true,children:e.children}),D={Root:hs,Header:ps,Body:Cs,Footer:_s,CloseTrigger:bs,ActionTrigger:Ss};function Jh(e){let r=e.severity||"error",t=_(r,{preference:"res"});return jsxs(D.Root,{controller:e.controller,width:e.width??"25rem",height:e.height,minHeight:e.minHeight,maxHeight:e.maxHeight,minWidth:e.minWidth,maxWidth:e.maxWidth,triggerElement:e.triggerElement,children:[jsx(D.Header,{fontSize:"2xl",children:e.title}),jsxs(D.Body,{fade:.75,children:[jsx("span",{children:e.message.split(`
|
|
18
18
|
`).map(n=>jsxs(Fragment,{children:[n,jsx("br",{})]}))}),e.disclaimer&&jsx(io,{width:"full",facade:n=>n==="error"?"warning":n,hideLabel:e.hideDisclaimerLabel,severity:r,message:e.disclaimer})]}),jsxs(D.Footer,{gap:"md",children:[jsx(D.ActionTrigger,{children:jsx(B,{size:"sm",fade:.75,color:"onSurface",backgroundColor:"transparent",text:e.cancelLabel||"Cancel",onClick:e.onCancelClick})}),jsx(B,{async:true,size:"sm",text:e.action.label,backgroundColor:t,color:"white",onClick:e.action.onClick})]})]})}a();var it=createContext(null);function Qh(e){let r=e.sections.flatMap(C=>typeof C=="object"?C.nestedItems:C),t=e.defaultSection?r.findIndex(C=>C===e.defaultSection):0,[n,o]=useState(t>=0?t:0),{triggerRerender:i}=V(),l=E([]),s=r[n],c=Array.isArray(e.ignoredSections)?e.ignoredSections:strictArray([e.ignoredSections]),v=n<=0;e.checkCompletionOnMount&&useEffect(()=>{r.forEach((C,b)=>{u(C,b);}),i();},[]);let g=(C=l.read())=>r.filter(b=>!C.includes(b)&&!c.includes(b)),u=(C=s,b=n)=>{let k=l.read();if(!c.includes(C)){if(e.isSectionComplete(C)&&!k.includes(C))k=[...k,C];else if(!e.isSectionComplete(C)&&k.includes(C))k=k.filter((x,P)=>P!==b);else return;l.upsert(k),e.onSectionsStatusChange?.(g(k),k);}},y=C=>{u(),o(r.findIndex(b=>b===C));},S=()=>{n>=r.length-1||(u(),o(n+1));},R=()=>{v||(u(),o(n-1));};return jsx(it.Provider,{value:{activeSection:s,completedSections:l.read(),rawSections:e.sections},children:jsx(D.Root,{controller:e.controller,triggerElement:e.triggerElement,unmountOnExit:e.unmountOnExit,height:"30rem",width:"45rem",maxWidth:"45rem",backdropBlur:"1rem",padding:"0px",rerenderOnClose:e.rerenderOnClose,backgroundColor:"transparent",spill:"hidden",children:jsxs(D.Body,{grid:true,gap:"0px",width:"full",height:"full",spill:"hidden",gridCols:".45fr 1fr",children:[jsx(Ds,{title:e.title,onSectionClick:y}),jsx(Ts,{hideSubmitButton:e.hideSubmitButton,sectionMapper:e.sectionMapper,previousDisabled:v,onPreviousClick:R,onNextClick:S,incompleteSections:g(),onSubmitClick:e.onSubmit})]})})})}function Ds(e){let{rawSections:r,activeSection:t,completedSections:n}=useContext(it);return jsxs(d,{size:"full",padding:"xl",backgroundColor:"surfaceContainer",gap:e.title?"xl":void 0,spill:"hidden",children:[e.title&&jsx(d,{fontSize:"lg",fontWeight:"bold",spill:"hidden",children:e.title}),jsx($r,{width:"full",items:r,isItemActive:o=>t===o,isItemCompleted:o=>n.includes(o),onItemClick:e.onSectionClick})]})}function Ts(e){let{activeSection:r}=useContext(it),{title:t,description:n,element:o}=e.sectionMapper[r],i=typeof o=="function"?jsx(o,{incompleteSections:e.incompleteSections}):o;return jsxs(d,{size:"full",backgroundColor:"surfaceContainer[0.5]",padding:"3rem",gap:"xl",grid:true,gridRows:"auto 1fr auto",justify:"space-between",spill:"hidden",children:[jsxs(d,{children:[jsx(h,{text:t,fontSize:"xl",fontWeight:"bold"}),jsx("span",{children:n,style:{opacity:.75}})]}),jsx(d,{size:"full",gap:"lg",children:i}),jsxs(d,{row:true,width:"full",align:"center",justify:"space-between",children:[jsx(lt,{disabled:e.previousDisabled,onClick:e.onPreviousClick}),r==="Submission"?!e.hideSubmitButton&&jsx(st,{disabled:!!e.onSubmitClick,onClick:e.onSubmitClick}):jsx(at,{onClick:e.onNextClick})]})]})}a();a();var Es=fe({preset:{text:"Save",async:true}}),ct=Es;function up(e){let{triggerRerender:r}=V(),t=E(Object.fromEntries(Object.entries(e.fields).map(([l,s])=>[l,typeof s=="object"&&"defaultValue"in s?s.defaultValue:e.defaultValue?.[l]??""]))),n=e.actionButtionSize||"lg",o=()=>{e.onSave?.(t.read());},i=()=>{e.onCancel?.();};return jsxs(D.Root,{rerenderOnClose:true,width:e.width,closeButtonSize:e.closeButtonSize||"md",controller:e.controller,triggerElement:e.triggerElement,onClose:()=>r(),children:[jsx(D.Header,{fontSize:"2rem",children:e.title||"Edit Form"}),jsx(D.Body,{padding:"xs",children:Object.keys(e.fields).map(l=>{let s=l,c=e.fields[s],v=t.read()?.[s]??"",g=typeof c.label=="function"?c.label(l):!c.label||c.label==="prop-name"?e?.formatFieldPropName?.(l)??l:c.label,u=y=>t.upsert(S=>({...S||{},[s]:y}));return c.options?jsx(Fs,{label:g,size:e.textfieldSize,defaultValue:v,disabled:c.disabled,placeholder:c.placeholder,options:c.options,onChange:u},l):jsx(Y,{width:"full",placeholder:c.placeholder,label:g,size:e.textfieldSize,defaultValue:v,disabled:c.disabled,allowedChars:c.allowedChars||e.allowedChars,onChange:u},s)})}),jsxs(D.Footer,{children:[jsx(D.ActionTrigger,{children:jsx(qe,{fade:.5,size:n,onClick:i})}),jsx(D.ActionTrigger,{children:jsx(ct,{size:n,onClick:o})})]})]})}function Fs(e){let[r,t]=useState(e.defaultValue),n=({value:o})=>{e.onChange(o),t(o);};return jsx(Xe,{wrap:true,asChild:e.disabled,width:"match-anchor",maxHeight:"10rem",isSelected:({value:o})=>r===o,options:e.options.map(o=>({value:o.trim()})),onOptionClick:n,slotProps:{divWrapper:{style:{width:"100%"}}},children:jsx(Y,{readOnly:true,size:e.size,disabled:e.disabled,label:e.label,width:"full",value:r,placeholder:e.placeholder})})}a();var te={sidebar:"fv-sidebar",topbar:"fv-topbar",viewer:"fv-viewer"},Qe=createContext(null);function As(e){let r=_(e.borderColor||"outline[0.1]"),t=ue.md;return jsx(Qe.Provider,{value:{borderColor:r,corners:t,navThickness:e.navThickness||"3rem"},children:jsx(d,{minHeight:e.minHeight,maxHeight:e.maxHeight,minWidth:e.minWidth,maxWidth:e.maxWidth,corners:t,size:e.size,backgroundColor:e.backgroundColor??"surfaceContainer",height:e.height??"30rem",width:e.width??"40rem",spill:"hidden",grid:true,gridCols:"auto 1fr",gridRows:"auto 1fr",borderColor:r,style:{gridTemplateAreas:`"${te.topbar} ${te.topbar}" "${te.sidebar} ${te.viewer}"`,boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px"},children:e.children})})}function Ms(e){let{navThickness:r}=useContext(Qe),t=xr(e.file.typeAlias);return jsxs(d,{...e,row:true,align:"center",maxWidth:e.maxWidth||"45%",children:[t&&jsx(t.filled,{style:p({size:r||e.styles?.icon?.size,color:"pdf",style:{padding:p({padding:e.styles?.icon?.padding||".65rem"})?.padding,paddingLeft:`calc(.65rem - ${K.md})`}})}),jsxs(d,{asChildren:e.hideFileMetadata,children:[jsx(h,{ellipsis:true,color:e.styles?.filename?.color,fontWeight:e.styles?.filename?.fontWeight,fontSize:e.styles?.filename?.fontSize||"1rem",text:e.file.name}),!e.hideFileMetadata&&jsxs(d,{row:true,fontSize:e.styles?.fileMetadata?.fontSize||".7rem",gap:e.styles?.fileMetadata?.gap??"sm",fade:e.styles?.fileMetadata?.fade??.5,color:e.styles?.fileMetadata?.color,align:"center",children:[jsx(h,{fontWeight:"bold",text:(e.file.ext||e.file.typeAlias)?.toUpperCase()}),jsx(d,{size:e.styles?.fileMetadataSeparator?.size||".3rem",corners:e.styles?.fileMetadataSeparator?.corners??"circle",backgroundColor:e.styles?.fileMetadataSeparator?.color||"onSurface"}),jsx(h,{fade:.75,text:format("file-size",e.file.sizeInBytes)})]})]})]})}function Ls(e){let{navThickness:r}=useContext(Qe),{children:t,...n}=e;return jsx(d,{...n,row:true,id:te.topbar,height:r,width:"full",align:"center",gap:e.gap??"md",padding:["md",["left","right"]],justify:e.justify||"space-between",style:{...e.style,gridArea:te.topbar},children:e.children})}var co=createContext(null);function Vs(e){let{children:r,onOptionClick:t,...n}=e,{navThickness:o}=useContext(Qe);return jsx(co.Provider,{value:{onOptionClick:i=>e.onOptionClick?.(i)},children:jsx(d,{...n,id:te.sidebar,height:"full",width:o,align:"center",gap:n.gap||"md",padding:["md",["top","bottom"]],style:{...n.style,gridArea:te.sidebar},children:e.children})})}function Hs(e){let{onOptionClick:r}=useContext(co),t=()=>{e.onClick?.(),r(e.label);};return jsx(Fe,{displayAction:"hover",placement:"right",fontSize:"sm",content:e.label,asChild:e.disabled,children:jsx(d,{fade:e.disabled?.5:1,cursor:e.disabled?"not-allowed":e.selected?"default":"pointer",corners:e.corners??"md",padding:e.padding??"md",borderColor:e.selected?"onPrimaryContainer[0.1]":"transparent",css:{transition:"background-color 200ms linear",backgroundColor:e.backgroundColor?.(e.selected)??(e.selected?"primaryContainer":"outline[0.1]"),color:e.color?.(e.selected)??(e.selected?"onPrimaryContainer":"onSurface"),":hover":e.selected?void 0:{...e.css?.[":hover"],backgroundColor:e.css?.[":hover"].backgroundColor||"outline[0.25]"}},onClick:e.disabled?void 0:t,children:jsx(e.icon,{size:e.iconSize??"1.1rem"})})})}function Ws(e){let{borderColor:r,corners:t}=useContext(Qe),n=useRef(null);useEffect(()=>{o();let i=new MutationObserver(l=>{for(let s of l)s.type==="childList"&&o();});return i.observe(n.current?.parentNode,{childList:true}),()=>{i.disconnect();}},[]);let o=()=>{let i=["sidebar","topbar"],l=n.current?.parentElement,s=i.filter(c=>l?.querySelector(`#${te[c]}`));i.every(c=>s.includes(c))?Object.assign(n.current?.style,{borderRadius:`${t} 0 0 0`,borderColor:`${r} transparent transparent ${r}`}):s.includes("sidebar")?Object.assign(n.current?.style,{borderRadius:`${t} 0 0 ${t}`,borderLeftColor:r}):s.includes("topbar")?Object.assign(n.current?.style,{borderRadius:0,borderTopColor:r}):Object.assign(n.current?.style,{borderRadius:t,borderColor:r});};return jsx(d,{ref:n,size:"full",centerContent:e.centerContent??true,backgroundColor:e.backgroundColor||"onSurface[0.1]",color:e.color||"onSurface",spill:"hidden",borderColor:"transparent",style:{gridArea:te.viewer,boxShadow:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset"},children:e.children})}function Ns(e){let r=e.thickness||"0.0104in",t=e.length||"70%",n={horizontal:{height:r,width:t},vertical:{height:t,width:r}}[e.orientation||"vertical"];return jsx(d,{...n,backgroundColor:e.color||"outline[0.1]"})}var _p={Root:As,Sidebar:Vs,SidebarOption:Hs,Topbar:Ls,Viewer:Ws,Indicator:Ms,Sep:Ns};a();var uo=(i=>(i["2xl"]="2rem",i.xl="1.75rem",i.lg="1.5rem",i.md="1.25rem",i.sm="1rem",i.xs=".85rem",i["2xs"]=".5rem",i))(uo||{});function fo(e){let r=uo[e.size||"sm"];return jsx(d,{hide:e.hide||e.content!==void 0&&!e.content,padding:e.padding||"xs",fontSize:e.fontSize||"xxs",corners:r,size:r,centerContent:true,backgroundColor:e.backgroundColor||"orange",color:e.color||"white",children:e.content})}a();function mo(e){return jsxs(d,{row:true,clickable:true,width:"full",align:"center",justify:"space-between",corners:"lg",backgroundColor:"surfaceVariant[0.1]",padding:"lg",onClick:()=>{let t=(n,o=false)=>typeof n=="string"?n:Object.entries(n).map(([i,l],s,c)=>`${o?" ":""}${i}: ${[void 0,null,""].includes(l)?null:typeof l=="object"?`{
|
|
19
19
|
${t(l,true)}
|
|
20
20
|
}`:l}`+(s===lastIndex(c)?"":",")).join(`
|