InvokeAI/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-80a83c5e.js
2023-07-02 22:02:53 -04:00

295 lines
80 KiB
JavaScript

import{v as p,eW as Ze,q as k,K as Mt,eX as Bt,W as dt,eY as c,eZ as v,a1 as Et,e_ as a,e$ as Dt,f0 as x,f1 as ct,f2 as jt,f3 as Rt,ar as Ht,f4 as Wt,U as Lt,f5 as Vt,f6 as Ot,f7 as qt,f8 as Nt}from"./index-4dfaefdd.js";import{u as Gt,M as Ut}from"./MantineProvider-7d837f42.js";var bt=String.raw,vt=bt`
:root,
:host {
--chakra-vh: 100vh;
}
@supports (height: -webkit-fill-available) {
:root,
:host {
--chakra-vh: -webkit-fill-available;
}
}
@supports (height: -moz-fill-available) {
:root,
:host {
--chakra-vh: -moz-fill-available;
}
}
@supports (height: 100dvh) {
:root,
:host {
--chakra-vh: 100dvh;
}
}
`,Yt=()=>p.jsx(Ze,{styles:vt}),Kt=({scope:e=""})=>p.jsx(Ze,{styles:bt`
html {
line-height: 1.5;
-webkit-text-size-adjust: 100%;
font-family: system-ui, sans-serif;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
touch-action: manipulation;
}
body {
position: relative;
min-height: 100%;
margin: 0;
font-feature-settings: "kern";
}
${e} :where(*, *::before, *::after) {
border-width: 0;
border-style: solid;
box-sizing: border-box;
word-wrap: break-word;
}
main {
display: block;
}
${e} hr {
border-top-width: 1px;
box-sizing: content-box;
height: 0;
overflow: visible;
}
${e} :where(pre, code, kbd,samp) {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: 1em;
}
${e} a {
background-color: transparent;
color: inherit;
text-decoration: inherit;
}
${e} abbr[title] {
border-bottom: none;
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
${e} :where(b, strong) {
font-weight: bold;
}
${e} small {
font-size: 80%;
}
${e} :where(sub,sup) {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
${e} sub {
bottom: -0.25em;
}
${e} sup {
top: -0.5em;
}
${e} img {
border-style: none;
}
${e} :where(button, input, optgroup, select, textarea) {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
margin: 0;
}
${e} :where(button, input) {
overflow: visible;
}
${e} :where(button, select) {
text-transform: none;
}
${e} :where(
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner
) {
border-style: none;
padding: 0;
}
${e} fieldset {
padding: 0.35em 0.75em 0.625em;
}
${e} legend {
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal;
}
${e} progress {
vertical-align: baseline;
}
${e} textarea {
overflow: auto;
}
${e} :where([type="checkbox"], [type="radio"]) {
box-sizing: border-box;
padding: 0;
}
${e} input[type="number"]::-webkit-inner-spin-button,
${e} input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none !important;
}
${e} input[type="number"] {
-moz-appearance: textfield;
}
${e} input[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
${e} input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none !important;
}
${e} ::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
${e} details {
display: block;
}
${e} summary {
display: list-item;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
${e} :where(
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre
) {
margin: 0;
}
${e} button {
background: transparent;
padding: 0;
}
${e} fieldset {
margin: 0;
padding: 0;
}
${e} :where(ol, ul) {
margin: 0;
padding: 0;
}
${e} textarea {
resize: vertical;
}
${e} :where(button, [role="button"]) {
cursor: pointer;
}
${e} button::-moz-focus-inner {
border: 0 !important;
}
${e} table {
border-collapse: collapse;
}
${e} :where(h1, h2, h3, h4, h5, h6) {
font-size: inherit;
font-weight: inherit;
}
${e} :where(button, input, optgroup, select, textarea) {
padding: 0;
line-height: inherit;
color: inherit;
}
${e} :where(img, svg, video, canvas, audio, iframe, embed, object) {
display: block;
}
${e} :where(img, video) {
max-width: 100%;
height: auto;
}
[data-js-focus-visible]
:focus:not([data-focus-visible-added]):not(
[data-focus-visible-disabled]
) {
outline: none;
box-shadow: none;
}
${e} select::-ms-expand {
display: none;
}
${vt}
`}),ze={light:"chakra-ui-light",dark:"chakra-ui-dark"};function Xt(e={}){const{preventTransition:r=!0}=e,t={setDataset:n=>{const i=r?t.preventTransition():void 0;document.documentElement.dataset.theme=n,document.documentElement.style.colorScheme=n,i==null||i()},setClassName(n){document.body.classList.add(n?ze.dark:ze.light),document.body.classList.remove(n?ze.light:ze.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(n){var i;return((i=t.query().matches)!=null?i:n==="dark")?"dark":"light"},addListener(n){const i=t.query(),l=s=>{n(s.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(l):i.addEventListener("change",l),()=>{typeof i.removeListener=="function"?i.removeListener(l):i.removeEventListener("change",l)}},preventTransition(){const n=document.createElement("style");return n.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(n)})})}}};return t}var Zt="chakra-ui-color-mode";function ut(e){return{ssr:!1,type:"localStorage",get(r){if(!(globalThis!=null&&globalThis.document))return r;let t;try{t=localStorage.getItem(e)||r}catch{}return t||r},set(r){try{localStorage.setItem(e,r)}catch{}}}}var Jt=ut(Zt),Ar=()=>{};function Pr(e,r){return e.type==="cookie"&&e.ssr?e.get(r):r}function ft(e){const{value:r,children:t,options:{useSystemColorMode:n,initialColorMode:i,disableTransitionOnChange:l}={},colorModeManager:s=Jt}=e,d=i==="dark"?"dark":"light",[b,$]=k.useState(()=>Pr(s,d)),[u,m]=k.useState(()=>Pr(s)),{getSystemTheme:_,setClassName:I,setDataset:ke,addListener:zr}=k.useMemo(()=>Xt({preventTransition:l}),[l]),_e=i==="system"&&!b?u:b,M=k.useCallback(oe=>{const we=oe==="system"?_():oe;$(we),I(we==="dark"),ke(we),s.set(we)},[s,_,I,ke]);Mt(()=>{i==="system"&&m(_())},[]),k.useEffect(()=>{const oe=s.get();if(oe){M(oe);return}if(i==="system"){M("system");return}M(d)},[s,d,i,M]);const Cr=k.useCallback(()=>{M(_e==="dark"?"light":"dark")},[_e,M]);k.useEffect(()=>{if(n)return zr(M)},[n,zr,M]);const It=k.useMemo(()=>({colorMode:r??_e,toggleColorMode:r?Ar:Cr,setColorMode:r?Ar:M,forced:r!==void 0}),[_e,Cr,M,r]);return p.jsx(Bt.Provider,{value:It,children:t})}ft.displayName="ColorModeProvider";var Qt=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function ea(e){return dt(e)?Qt.every(r=>Object.prototype.hasOwnProperty.call(e,r)):!1}var ra={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},ta={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},aa={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},oa={property:ra,easing:ta,duration:aa},na=oa,ia={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},la=ia,sa={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},da=sa,ca={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},ba=ca,va={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},ua=va,fa={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},ma=fa,ha={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},ga=ha,ya={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},pa=ya,Sa={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},mt=Sa,ht={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},xa={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},$a={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},ka={...ht,...xa,container:$a},gt=ka,_a={breakpoints:ba,zIndices:la,radii:ma,blur:pa,colors:ua,...mt,sizes:gt,shadows:ga,space:ht,borders:da,transition:na},{defineMultiStyleConfig:wa,definePartsStyle:se}=v(["stepper","step","title","description","indicator","separator","icon","number"]),D=c("stepper-indicator-size"),X=c("stepper-icon-size"),Z=c("stepper-title-font-size"),de=c("stepper-description-font-size"),ne=c("stepper-accent-color"),za=se(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[ne.variable]:`colors.${e}.500`,_dark:{[ne.variable]:`colors.${e}.200`}},title:{fontSize:Z.reference,fontWeight:"medium"},description:{fontSize:de.reference,color:"chakra-subtle-text"},number:{fontSize:Z.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:X.reference,height:X.reference},indicator:{flexShrink:0,borderRadius:"full",width:D.reference,height:D.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:ne.reference},"&[data-status=complete]":{bg:ne.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:ne.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${D.reference} - 8px)`,top:`calc(${D.reference} + 4px)`,insetStart:`calc(${D.reference} / 2 - 1px)`}}})),Ca=wa({baseStyle:za,sizes:{xs:se({stepper:{[D.variable]:"sizes.4",[X.variable]:"sizes.3",[Z.variable]:"fontSizes.xs",[de.variable]:"fontSizes.xs"}}),sm:se({stepper:{[D.variable]:"sizes.6",[X.variable]:"sizes.4",[Z.variable]:"fontSizes.sm",[de.variable]:"fontSizes.xs"}}),md:se({stepper:{[D.variable]:"sizes.8",[X.variable]:"sizes.5",[Z.variable]:"fontSizes.md",[de.variable]:"fontSizes.sm"}}),lg:se({stepper:{[D.variable]:"sizes.10",[X.variable]:"sizes.6",[Z.variable]:"fontSizes.lg",[de.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function h(e,r={}){let t=!1;function n(){if(!t){t=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...u){n();for(const m of u)r[m]=b(m);return h(e,r)}function l(...u){for(const m of u)m in r||(r[m]=b(m));return h(e,r)}function s(){return Object.fromEntries(Object.entries(r).map(([m,_])=>[m,_.selector]))}function d(){return Object.fromEntries(Object.entries(r).map(([m,_])=>[m,_.className]))}function b(u){const I=`chakra-${(["container","root"].includes(u??"")?[e]:[e,u]).filter(Boolean).join("__")}`;return{className:I,selector:`.${I}`,toString:()=>u}}return{parts:i,toPart:b,extend:l,selectors:s,classnames:d,get keys(){return Object.keys(r)},__type:{}}}var Aa=h("accordion").parts("root","container","button","panel").extend("icon"),Pa=h("alert").parts("title","description","container").extend("icon","spinner"),Ta=h("avatar").parts("label","badge","container").extend("excessLabel","group"),Fa=h("breadcrumb").parts("link","item","container").extend("separator");h("button").parts();var Ia=h("checkbox").parts("control","icon","container").extend("label");h("progress").parts("track","filledTrack").extend("label");var Ma=h("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),Ba=h("editable").parts("preview","input","textarea"),Ea=h("form").parts("container","requiredIndicator","helperText"),Da=h("formError").parts("text","icon"),ja=h("input").parts("addon","field","element"),Ra=h("list").parts("container","item","icon"),Ha=h("menu").parts("button","list","item").extend("groupTitle","command","divider"),Wa=h("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),La=h("numberinput").parts("root","field","stepperGroup","stepper");h("pininput").parts("field");var Va=h("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),Oa=h("progress").parts("label","filledTrack","track"),qa=h("radio").parts("container","control","label"),Na=h("select").parts("field","icon"),Ga=h("slider").parts("container","track","thumb","filledTrack","mark"),Ua=h("stat").parts("container","label","helpText","number","icon"),Ya=h("switch").parts("container","track","thumb"),Ka=h("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),Xa=h("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),Za=h("tag").parts("container","label","closeButton"),Ja=h("card").parts("container","header","body","footer");function N(e,r,t){return Math.min(Math.max(e,t),r)}class Qa extends Error{constructor(r){super(`Failed to parse color: "${r}"`)}}var ce=Qa;function xr(e){if(typeof e!="string")throw new ce(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let r=e.trim();r=lo.test(e)?to(e):e;const t=ao.exec(r);if(t){const s=Array.from(t).slice(1);return[...s.slice(0,3).map(d=>parseInt(ye(d,2),16)),parseInt(ye(s[3]||"f",2),16)/255]}const n=oo.exec(r);if(n){const s=Array.from(n).slice(1);return[...s.slice(0,3).map(d=>parseInt(d,16)),parseInt(s[3]||"ff",16)/255]}const i=no.exec(r);if(i){const s=Array.from(i).slice(1);return[...s.slice(0,3).map(d=>parseInt(d,10)),parseFloat(s[3]||"1")]}const l=io.exec(r);if(l){const[s,d,b,$]=Array.from(l).slice(1).map(parseFloat);if(N(0,100,d)!==d)throw new ce(e);if(N(0,100,b)!==b)throw new ce(e);return[...so(s,d,b),Number.isNaN($)?1:$]}throw new ce(e)}function eo(e){let r=5381,t=e.length;for(;t;)r=r*33^e.charCodeAt(--t);return(r>>>0)%2341}const Tr=e=>parseInt(e.replace(/_/g,""),36),ro="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,r)=>{const t=Tr(r.substring(0,3)),n=Tr(r.substring(3)).toString(16);let i="";for(let l=0;l<6-n.length;l++)i+="0";return e[t]=`${i}${n}`,e},{});function to(e){const r=e.toLowerCase().trim(),t=ro[eo(r)];if(!t)throw new ce(e);return`#${t}`}const ye=(e,r)=>Array.from(Array(r)).map(()=>e).join(""),ao=new RegExp(`^#${ye("([a-f0-9])",3)}([a-f0-9])?$`,"i"),oo=new RegExp(`^#${ye("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),no=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${ye(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),io=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,lo=/^[a-z]+$/i,Fr=e=>Math.round(e*255),so=(e,r,t)=>{let n=t/100;if(r===0)return[n,n,n].map(Fr);const i=(e%360+360)%360/60,l=(1-Math.abs(2*n-1))*(r/100),s=l*(1-Math.abs(i%2-1));let d=0,b=0,$=0;i>=0&&i<1?(d=l,b=s):i>=1&&i<2?(d=s,b=l):i>=2&&i<3?(b=l,$=s):i>=3&&i<4?(b=s,$=l):i>=4&&i<5?(d=s,$=l):i>=5&&i<6&&(d=l,$=s);const u=n-l/2,m=d+u,_=b+u,I=$+u;return[m,_,I].map(Fr)};function co(e,r,t,n){return`rgba(${N(0,255,e).toFixed()}, ${N(0,255,r).toFixed()}, ${N(0,255,t).toFixed()}, ${parseFloat(N(0,1,n).toFixed(3))})`}function bo(e,r){const[t,n,i,l]=xr(e);return co(t,n,i,l-r)}function vo(e){const[r,t,n,i]=xr(e);let l=s=>{const d=N(0,255,s).toString(16);return d.length===1?`0${d}`:d};return`#${l(r)}${l(t)}${l(n)}${i<1?l(Math.round(i*255)):""}`}function uo(e,r,t,n,i){for(r=r.split?r.split("."):r,n=0;n<r.length;n++)e=e?e[r[n]]:i;return e===i?t:e}var fo=e=>Object.keys(e).length===0,Ue=(e,r,t)=>{const n=uo(e,`colors.${r}`,r);try{return vo(n),n}catch{return t??"#000000"}},F=(e,r,t)=>{var n;return(n=Et(e,"colors",r))!=null?n:t},mo=e=>{const[r,t,n]=xr(e);return(r*299+t*587+n*114)/1e3},ho=e=>r=>{const t=Ue(r,e);return mo(t)<128?"dark":"light"},go=e=>r=>ho(e)(r)==="dark",te=(e,r)=>t=>{const n=Ue(t,e);return bo(n,1-r)};function Ir(e="1rem",r="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
45deg,
${r} 25%,
transparent 25%,
transparent 50%,
${r} 50%,
${r} 75%,
transparent 75%,
transparent
)`,backgroundSize:`${e} ${e}`}}var yo=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function po(e){const r=yo();return!e||fo(e)?r:e.string&&e.colors?xo(e.string,e.colors):e.string&&!e.colors?So(e.string):e.colors&&!e.string?$o(e.colors):r}function So(e){let r=0;if(e.length===0)return r.toString();for(let n=0;n<e.length;n+=1)r=e.charCodeAt(n)+((r<<5)-r),r=r&r;let t="#";for(let n=0;n<3;n+=1){const i=r>>n*8&255;t+=`00${i.toString(16)}`.substr(-2)}return t}function xo(e,r){let t=0;if(e.length===0)return r[0];for(let n=0;n<e.length;n+=1)t=e.charCodeAt(n)+((t<<5)-t),t=t&t;return t=(t%r.length+r.length)%r.length,r[t]}function $o(e){return e[Math.floor(Math.random()*e.length)]}function o(e,r){return t=>t.colorMode==="dark"?r:e}function $r(e){const{orientation:r,vertical:t,horizontal:n}=e;return r?r==="vertical"?t:n:{}}function yt(e){return dt(e)&&e.reference?e.reference:String(e)}var Je=(e,...r)=>r.map(yt).join(` ${e} `).replace(/calc/g,""),Mr=(...e)=>`calc(${Je("+",...e)})`,Br=(...e)=>`calc(${Je("-",...e)})`,gr=(...e)=>`calc(${Je("*",...e)})`,Er=(...e)=>`calc(${Je("/",...e)})`,Dr=e=>{const r=yt(e);return r!=null&&!Number.isNaN(parseFloat(r))?String(r).startsWith("-")?String(r).slice(1):`-${r}`:gr(r,-1)},j=Object.assign(e=>({add:(...r)=>j(Mr(e,...r)),subtract:(...r)=>j(Br(e,...r)),multiply:(...r)=>j(gr(e,...r)),divide:(...r)=>j(Er(e,...r)),negate:()=>j(Dr(e)),toString:()=>e.toString()}),{add:Mr,subtract:Br,multiply:gr,divide:Er,negate:Dr});function ko(e){return!Number.isInteger(parseFloat(e.toString()))}function _o(e,r="-"){return e.replace(/\s+/g,r)}function pt(e){const r=_o(e.toString());return r.includes("\\.")?e:ko(e)?r.replace(".","\\."):e}function wo(e,r=""){return[r,pt(e)].filter(Boolean).join("-")}function zo(e,r){return`var(${pt(e)}${r?`, ${r}`:""})`}function Co(e,r=""){return`--${wo(e,r)}`}function y(e,r){const t=Co(e,r==null?void 0:r.prefix);return{variable:t,reference:zo(t,Ao(r==null?void 0:r.fallback))}}function Ao(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:Po,definePartsStyle:He}=v(Ya.keys),ue=y("switch-track-width"),G=y("switch-track-height"),rr=y("switch-track-diff"),To=j.subtract(ue,G),yr=y("switch-thumb-x"),ie=y("switch-bg"),Fo=a(e=>{const{colorScheme:r}=e;return{borderRadius:"full",p:"0.5",width:[ue.reference],height:[G.reference],transitionProperty:"common",transitionDuration:"fast",[ie.variable]:"colors.gray.300",_dark:{[ie.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[ie.variable]:`colors.${r}.500`,_dark:{[ie.variable]:`colors.${r}.200`}},bg:ie.reference}}),Io=a({bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[G.reference],height:[G.reference],_checked:{transform:`translateX(${yr.reference})`}}),Mo=He(e=>({container:{[rr.variable]:To,[yr.variable]:rr.reference,_rtl:{[yr.variable]:j(rr).negate().toString()}},track:Fo(e),thumb:Io})),Bo={sm:He({container:{[ue.variable]:"1.375rem",[G.variable]:"sizes.3"}}),md:He({container:{[ue.variable]:"1.875rem",[G.variable]:"sizes.4"}}),lg:He({container:{[ue.variable]:"2.875rem",[G.variable]:"sizes.6"}})},Eo=Po({baseStyle:Mo,sizes:Bo,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Do,definePartsStyle:J}=v(Ka.keys),jo=J({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),Ye=a({"&[data-is-numeric=true]":{textAlign:"end"}}),Ro=J(e=>{const{colorScheme:r}=e;return{th:{color:o("gray.600","gray.400")(e),borderBottom:"1px",borderColor:o(`${r}.100`,`${r}.700`)(e),...Ye},td:{borderBottom:"1px",borderColor:o(`${r}.100`,`${r}.700`)(e),...Ye},caption:{color:o("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Ho=J(e=>{const{colorScheme:r}=e;return{th:{color:o("gray.600","gray.400")(e),borderBottom:"1px",borderColor:o(`${r}.100`,`${r}.700`)(e),...Ye},td:{borderBottom:"1px",borderColor:o(`${r}.100`,`${r}.700`)(e),...Ye},caption:{color:o("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:o(`${r}.100`,`${r}.700`)(e)},td:{background:o(`${r}.100`,`${r}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Wo={simple:Ro,striped:Ho,unstyled:a({})},Lo={sm:J({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:J({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:J({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Vo=Do({baseStyle:jo,variants:Wo,sizes:Lo,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),z=c("tabs-color"),T=c("tabs-bg"),Ce=c("tabs-border-color"),{defineMultiStyleConfig:Oo,definePartsStyle:E}=v(Xa.keys),qo=a(e=>{const{orientation:r}=e;return{display:r==="vertical"?"flex":"block"}}),No=a(e=>{const{isFitted:r}=e;return{flex:r?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}}),Go=a(e=>{const{align:r="start",orientation:t}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[r],flexDirection:t==="vertical"?"column":"row"}}),Uo=a({p:4}),Yo=E(e=>({root:qo(e),tab:No(e),tablist:Go(e),tabpanel:Uo})),Ko={sm:E({tab:{py:1,px:4,fontSize:"sm"}}),md:E({tab:{fontSize:"md",py:2,px:4}}),lg:E({tab:{fontSize:"lg",py:3,px:4}})},Xo=E(e=>{const{colorScheme:r,orientation:t}=e,n=t==="vertical",i=n?"borderStart":"borderBottom",l=n?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[l]:"-2px",_selected:{[z.variable]:`colors.${r}.600`,_dark:{[z.variable]:`colors.${r}.300`},borderColor:"currentColor"},_active:{[T.variable]:"colors.gray.200",_dark:{[T.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:z.reference,bg:T.reference}}}),Zo=E(e=>{const{colorScheme:r}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Ce.variable]:"transparent",_selected:{[z.variable]:`colors.${r}.600`,[Ce.variable]:"colors.white",_dark:{[z.variable]:`colors.${r}.300`,[Ce.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Ce.reference},color:z.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Jo=E(e=>{const{colorScheme:r}=e;return{tab:{border:"1px solid",borderColor:"inherit",[T.variable]:"colors.gray.50",_dark:{[T.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[T.variable]:"colors.white",[z.variable]:`colors.${r}.600`,_dark:{[T.variable]:"colors.gray.800",[z.variable]:`colors.${r}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:z.reference,bg:T.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Qo=E(e=>{const{colorScheme:r,theme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ue(t,`${r}.700`),bg:Ue(t,`${r}.100`)}}}}),en=E(e=>{const{colorScheme:r}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[z.variable]:"colors.gray.600",_dark:{[z.variable]:"inherit"},_selected:{[z.variable]:"colors.white",[T.variable]:`colors.${r}.600`,_dark:{[z.variable]:"colors.gray.800",[T.variable]:`colors.${r}.300`}},color:z.reference,bg:T.reference}}}),rn=E({}),tn={line:Xo,enclosed:Zo,"enclosed-colored":Jo,"soft-rounded":Qo,"solid-rounded":en,unstyled:rn},an=Oo({baseStyle:Yo,sizes:Ko,variants:tn,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),S=Dt("badge",["bg","color","shadow"]),on=a({px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:S.bg.reference,color:S.color.reference,boxShadow:S.shadow.reference}),nn=a(e=>{const{colorScheme:r,theme:t}=e,n=te(`${r}.500`,.6)(t);return{[S.bg.variable]:`colors.${r}.500`,[S.color.variable]:"colors.white",_dark:{[S.bg.variable]:n,[S.color.variable]:"colors.whiteAlpha.800"}}}),ln=a(e=>{const{colorScheme:r,theme:t}=e,n=te(`${r}.200`,.16)(t);return{[S.bg.variable]:`colors.${r}.100`,[S.color.variable]:`colors.${r}.800`,_dark:{[S.bg.variable]:n,[S.color.variable]:`colors.${r}.200`}}}),sn=a(e=>{const{colorScheme:r,theme:t}=e,n=te(`${r}.200`,.8)(t);return{[S.color.variable]:`colors.${r}.500`,_dark:{[S.color.variable]:n},[S.shadow.variable]:`inset 0 0 0px 1px ${S.color.reference}`}}),dn={solid:nn,subtle:ln,outline:sn},fe=x({baseStyle:on,variants:dn,defaultProps:{variant:"subtle",colorScheme:"gray"}}),{defineMultiStyleConfig:cn,definePartsStyle:U}=v(Za.keys),jr=c("tag-bg"),Rr=c("tag-color"),tr=c("tag-shadow"),We=c("tag-min-height"),Le=c("tag-min-width"),Ve=c("tag-font-size"),Oe=c("tag-padding-inline"),bn=a({fontWeight:"medium",lineHeight:1.2,outline:0,[Rr.variable]:S.color.reference,[jr.variable]:S.bg.reference,[tr.variable]:S.shadow.reference,color:Rr.reference,bg:jr.reference,boxShadow:tr.reference,borderRadius:"md",minH:We.reference,minW:Le.reference,fontSize:Ve.reference,px:Oe.reference,_focusVisible:{[tr.variable]:"shadows.outline"}}),vn=a({lineHeight:1.2,overflow:"visible"}),un=a({fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}}),fn=U({container:bn,label:vn,closeButton:un}),mn={sm:U({container:{[We.variable]:"sizes.5",[Le.variable]:"sizes.5",[Ve.variable]:"fontSizes.xs",[Oe.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:U({container:{[We.variable]:"sizes.6",[Le.variable]:"sizes.6",[Ve.variable]:"fontSizes.sm",[Oe.variable]:"space.2"}}),lg:U({container:{[We.variable]:"sizes.8",[Le.variable]:"sizes.8",[Ve.variable]:"fontSizes.md",[Oe.variable]:"space.3"}})},hn={subtle:U(e=>{var r;return{container:(r=fe.variants)==null?void 0:r.subtle(e)}}),solid:U(e=>{var r;return{container:(r=fe.variants)==null?void 0:r.solid(e)}}),outline:U(e=>{var r;return{container:(r=fe.variants)==null?void 0:r.outline(e)}})},gn=cn({variants:hn,baseStyle:fn,sizes:mn,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:R,defineMultiStyleConfig:yn}=v(ja.keys),pn=R({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),L={lg:a({fontSize:"lg",px:"4",h:"12",borderRadius:"md"}),md:a({fontSize:"md",px:"4",h:"10",borderRadius:"md"}),sm:a({fontSize:"sm",px:"3",h:"8",borderRadius:"sm"}),xs:a({fontSize:"xs",px:"2",h:"6",borderRadius:"sm"})},Sn={lg:R({field:L.lg,addon:L.lg}),md:R({field:L.md,addon:L.md}),sm:R({field:L.sm,addon:L.sm}),xs:R({field:L.xs,addon:L.xs})};function kr(e){const{focusBorderColor:r,errorBorderColor:t}=e;return{focusBorderColor:r||o("blue.500","blue.300")(e),errorBorderColor:t||o("red.500","red.300")(e)}}var xn=R(e=>{const{theme:r}=e,{focusBorderColor:t,errorBorderColor:n}=kr(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:o("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:F(r,n),boxShadow:`0 0 0 1px ${F(r,n)}`},_focusVisible:{zIndex:1,borderColor:F(r,t),boxShadow:`0 0 0 1px ${F(r,t)}`}},addon:{border:"1px solid",borderColor:o("inherit","whiteAlpha.50")(e),bg:o("gray.100","whiteAlpha.300")(e)}}}),$n=R(e=>{const{theme:r}=e,{focusBorderColor:t,errorBorderColor:n}=kr(e);return{field:{border:"2px solid",borderColor:"transparent",bg:o("gray.100","whiteAlpha.50")(e),_hover:{bg:o("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:F(r,n)},_focusVisible:{bg:"transparent",borderColor:F(r,t)}},addon:{border:"2px solid",borderColor:"transparent",bg:o("gray.100","whiteAlpha.50")(e)}}}),kn=R(e=>{const{theme:r}=e,{focusBorderColor:t,errorBorderColor:n}=kr(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:F(r,n),boxShadow:`0px 1px 0px 0px ${F(r,n)}`},_focusVisible:{borderColor:F(r,t),boxShadow:`0px 1px 0px 0px ${F(r,t)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),_n=R({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),wn={outline:xn,filled:$n,flushed:kn,unstyled:_n},f=yn({baseStyle:pn,sizes:Sn,variants:wn,defaultProps:{size:"md",variant:"outline"}}),Hr,zn=a({...(Hr=f.baseStyle)==null?void 0:Hr.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"}),Wr,Lr,Cn={outline:a(e=>{var r,t;return(t=(r=f.variants)==null?void 0:r.outline(e).field)!=null?t:{}}),flushed:a(e=>{var r,t;return(t=(r=f.variants)==null?void 0:r.flushed(e).field)!=null?t:{}}),filled:a(e=>{var r,t;return(t=(r=f.variants)==null?void 0:r.filled(e).field)!=null?t:{}}),unstyled:(Lr=(Wr=f.variants)==null?void 0:Wr.unstyled.field)!=null?Lr:{}},Vr,Or,qr,Nr,Gr,Ur,Yr,Kr,An={xs:(Or=(Vr=f.sizes)==null?void 0:Vr.xs.field)!=null?Or:{},sm:(Nr=(qr=f.sizes)==null?void 0:qr.sm.field)!=null?Nr:{},md:(Ur=(Gr=f.sizes)==null?void 0:Gr.md.field)!=null?Ur:{},lg:(Kr=(Yr=f.sizes)==null?void 0:Yr.lg.field)!=null?Kr:{}},Pn=x({baseStyle:zn,sizes:An,variants:Cn,defaultProps:{size:"md",variant:"outline"}}),Ae=y("tooltip-bg"),ar=y("tooltip-fg"),Tn=y("popper-arrow-bg"),Fn=a({bg:Ae.reference,color:ar.reference,[Ae.variable]:"colors.gray.700",[ar.variable]:"colors.whiteAlpha.900",_dark:{[Ae.variable]:"colors.gray.300",[ar.variable]:"colors.gray.900"},[Tn.variable]:Ae.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"}),In=x({baseStyle:Fn}),{defineMultiStyleConfig:Mn,definePartsStyle:be}=v(Oa.keys),Bn=a(e=>{const{colorScheme:r,theme:t,isIndeterminate:n,hasStripe:i}=e,l=o(Ir(),Ir("1rem","rgba(0,0,0,0.1)"))(e),s=o(`${r}.500`,`${r}.200`)(e),d=`linear-gradient(
to right,
transparent 0%,
${F(t,s)} 50%,
transparent 100%
)`;return{...!n&&i&&l,...n?{bgImage:d}:{bgColor:s}}}),En=a({lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"}),Dn=a(e=>({bg:o("gray.100","whiteAlpha.300")(e)})),jn=a(e=>({transitionProperty:"common",transitionDuration:"slow",...Bn(e)})),Rn=be(e=>({label:En,filledTrack:jn(e),track:Dn(e)})),Hn={xs:be({track:{h:"1"}}),sm:be({track:{h:"2"}}),md:be({track:{h:"3"}}),lg:be({track:{h:"4"}})},Wn=Mn({sizes:Hn,baseStyle:Rn,defaultProps:{size:"md",colorScheme:"blue"}}),Ln=e=>typeof e=="function";function w(e,...r){return Ln(e)?e(...r):e}var{definePartsStyle:qe,defineMultiStyleConfig:Vn}=v(Ia.keys),me=c("checkbox-size"),On=a(e=>{const{colorScheme:r}=e;return{w:me.reference,h:me.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:o(`${r}.500`,`${r}.200`)(e),borderColor:o(`${r}.500`,`${r}.200`)(e),color:o("white","gray.900")(e),_hover:{bg:o(`${r}.600`,`${r}.300`)(e),borderColor:o(`${r}.600`,`${r}.300`)(e)},_disabled:{borderColor:o("gray.200","transparent")(e),bg:o("gray.200","whiteAlpha.300")(e),color:o("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:o(`${r}.500`,`${r}.200`)(e),borderColor:o(`${r}.500`,`${r}.200`)(e),color:o("white","gray.900")(e)},_disabled:{bg:o("gray.100","whiteAlpha.100")(e),borderColor:o("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:o("red.500","red.300")(e)}}}),qn=a({_disabled:{cursor:"not-allowed"}}),Nn=a({userSelect:"none",_disabled:{opacity:.4}}),Gn=a({transitionProperty:"transform",transitionDuration:"normal"}),Un=qe(e=>({icon:Gn,container:qn,control:w(On,e),label:Nn})),Yn={sm:qe({control:{[me.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:qe({control:{[me.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:qe({control:{[me.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},Ke=Vn({baseStyle:Un,sizes:Yn,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Kn,definePartsStyle:Ne}=v(qa.keys),Xn=a(e=>{var r;const t=(r=w(Ke.baseStyle,e))==null?void 0:r.control;return{...t,borderRadius:"full",_checked:{...t==null?void 0:t._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}}),Zn=Ne(e=>{var r,t,n,i;return{label:(t=(r=Ke).baseStyle)==null?void 0:t.call(r,e).label,container:(i=(n=Ke).baseStyle)==null?void 0:i.call(n,e).container,control:Xn(e)}}),Jn={md:Ne({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:Ne({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:Ne({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Qn=Kn({baseStyle:Zn,sizes:Jn,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:ei,definePartsStyle:ri}=v(Na.keys),Pe=c("select-bg"),Xr,ti=a({...(Xr=f.baseStyle)==null?void 0:Xr.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Pe.reference,[Pe.variable]:"colors.white",_dark:{[Pe.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Pe.reference}}),ai=a({width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}}),oi=ri({field:ti,icon:ai}),Te=a({paddingInlineEnd:"8"}),Zr,Jr,Qr,et,rt,tt,at,ot,ni={lg:{...(Zr=f.sizes)==null?void 0:Zr.lg,field:{...(Jr=f.sizes)==null?void 0:Jr.lg.field,...Te}},md:{...(Qr=f.sizes)==null?void 0:Qr.md,field:{...(et=f.sizes)==null?void 0:et.md.field,...Te}},sm:{...(rt=f.sizes)==null?void 0:rt.sm,field:{...(tt=f.sizes)==null?void 0:tt.sm.field,...Te}},xs:{...(at=f.sizes)==null?void 0:at.xs,field:{...(ot=f.sizes)==null?void 0:ot.xs.field,...Te},icon:{insetEnd:"1"}}},ii=ei({baseStyle:oi,sizes:ni,variants:f.variants,defaultProps:f.defaultProps}),or=c("skeleton-start-color"),nr=c("skeleton-end-color"),li=a({[or.variable]:"colors.gray.100",[nr.variable]:"colors.gray.400",_dark:{[or.variable]:"colors.gray.800",[nr.variable]:"colors.gray.600"},background:or.reference,borderColor:nr.reference,opacity:.7,borderRadius:"sm"}),si=x({baseStyle:li}),ir=c("skip-link-bg"),di=a({borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[ir.variable]:"colors.white",_dark:{[ir.variable]:"colors.gray.700"},bg:ir.reference}}),ci=x({baseStyle:di}),{defineMultiStyleConfig:bi,definePartsStyle:Qe}=v(Ga.keys),pe=c("slider-thumb-size"),Se=c("slider-track-size"),O=c("slider-bg"),vi=a(e=>{const{orientation:r}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...$r({orientation:r,vertical:{h:"100%"},horizontal:{w:"100%"}})}}),ui=a(e=>({...$r({orientation:e.orientation,horizontal:{h:Se.reference},vertical:{w:Se.reference}}),overflow:"hidden",borderRadius:"sm",[O.variable]:"colors.gray.200",_dark:{[O.variable]:"colors.whiteAlpha.200"},_disabled:{[O.variable]:"colors.gray.300",_dark:{[O.variable]:"colors.whiteAlpha.300"}},bg:O.reference})),fi=a(e=>{const{orientation:r}=e;return{...$r({orientation:r,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:pe.reference,h:pe.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}}),mi=a(e=>{const{colorScheme:r}=e;return{width:"inherit",height:"inherit",[O.variable]:`colors.${r}.500`,_dark:{[O.variable]:`colors.${r}.200`},bg:O.reference}}),hi=Qe(e=>({container:vi(e),track:ui(e),thumb:fi(e),filledTrack:mi(e)})),gi=Qe({container:{[pe.variable]:"sizes.4",[Se.variable]:"sizes.1"}}),yi=Qe({container:{[pe.variable]:"sizes.3.5",[Se.variable]:"sizes.1"}}),pi=Qe({container:{[pe.variable]:"sizes.2.5",[Se.variable]:"sizes.0.5"}}),Si={lg:gi,md:yi,sm:pi},xi=bi({baseStyle:hi,sizes:Si,defaultProps:{size:"md",colorScheme:"blue"}}),q=y("spinner-size"),$i=a({width:[q.reference],height:[q.reference]}),ki={xs:a({[q.variable]:"sizes.3"}),sm:a({[q.variable]:"sizes.4"}),md:a({[q.variable]:"sizes.6"}),lg:a({[q.variable]:"sizes.8"}),xl:a({[q.variable]:"sizes.12"})},_i=x({baseStyle:$i,sizes:ki,defaultProps:{size:"md"}}),{defineMultiStyleConfig:wi,definePartsStyle:St}=v(Ua.keys),zi=a({fontWeight:"medium"}),Ci=a({opacity:.8,marginBottom:"2"}),Ai=a({verticalAlign:"baseline",fontWeight:"semibold"}),Pi=a({marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"}),Ti=St({container:{},label:zi,helpText:Ci,number:Ai,icon:Pi}),Fi={md:St({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Ii=wi({baseStyle:Ti,sizes:Fi,defaultProps:{size:"md"}}),lr=c("kbd-bg"),Mi=a({[lr.variable]:"colors.gray.100",_dark:{[lr.variable]:"colors.whiteAlpha.100"},bg:lr.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Bi=x({baseStyle:Mi}),Ei=a({transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}),Di=x({baseStyle:Ei}),{defineMultiStyleConfig:ji,definePartsStyle:Ri}=v(Ra.keys),Hi=a({marginEnd:"2",display:"inline",verticalAlign:"text-bottom"}),Wi=Ri({icon:Hi}),Li=ji({baseStyle:Wi}),{defineMultiStyleConfig:Vi,definePartsStyle:Oi}=v(Ha.keys),B=c("menu-bg"),sr=c("menu-shadow"),qi=a({[B.variable]:"#fff",[sr.variable]:"shadows.sm",_dark:{[B.variable]:"colors.gray.700",[sr.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:B.reference,boxShadow:sr.reference}),Ni=a({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[B.variable]:"colors.gray.100",_dark:{[B.variable]:"colors.whiteAlpha.100"}},_active:{[B.variable]:"colors.gray.200",_dark:{[B.variable]:"colors.whiteAlpha.200"}},_expanded:{[B.variable]:"colors.gray.100",_dark:{[B.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:B.reference}),Gi=a({mx:4,my:2,fontWeight:"semibold",fontSize:"sm"}),Ui=a({opacity:.6}),Yi=a({border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6}),Ki=a({transitionProperty:"common",transitionDuration:"normal"}),Xi=Oi({button:Ki,list:qi,item:Ni,groupTitle:Gi,command:Ui,divider:Yi}),Zi=Vi({baseStyle:Xi}),{defineMultiStyleConfig:Ji,definePartsStyle:pr}=v(Wa.keys),dr=c("modal-bg"),cr=c("modal-shadow"),Qi=a({bg:"blackAlpha.600",zIndex:"modal"}),el=a(e=>{const{isCentered:r,scrollBehavior:t}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:r?"center":"flex-start",overflow:t==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}}),rl=a(e=>{const{isCentered:r,scrollBehavior:t}=e;return{borderRadius:"md",color:"inherit",my:r?"auto":"16",mx:r?"auto":void 0,zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,[dr.variable]:"colors.white",[cr.variable]:"shadows.lg",_dark:{[dr.variable]:"colors.gray.700",[cr.variable]:"shadows.dark-lg"},bg:dr.reference,boxShadow:cr.reference}}),tl=a({px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"}),al=a({position:"absolute",top:"2",insetEnd:"3"}),ol=a(e=>{const{scrollBehavior:r}=e;return{px:"6",py:"2",flex:"1",overflow:r==="inside"?"auto":void 0}}),nl=a({px:"6",py:"4"}),il=pr(e=>({overlay:Qi,dialogContainer:w(el,e),dialog:w(rl,e),header:tl,closeButton:al,body:w(ol,e),footer:nl}));function P(e){return pr(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var ll={xs:P("xs"),sm:P("sm"),md:P("md"),lg:P("lg"),xl:P("xl"),"2xl":P("2xl"),"3xl":P("3xl"),"4xl":P("4xl"),"5xl":P("5xl"),"6xl":P("6xl"),full:P("full")},sl=Ji({baseStyle:il,sizes:ll,defaultProps:{size:"md"}}),{defineMultiStyleConfig:dl,definePartsStyle:xt}=v(La.keys),_r=y("number-input-stepper-width"),$t=y("number-input-input-padding"),cl=j(_r).add("0.5rem").toString(),br=y("number-input-bg"),vr=y("number-input-color"),ur=y("number-input-border-color"),bl=a({[_r.variable]:"sizes.6",[$t.variable]:cl}),vl=a(e=>{var r,t;return(t=(r=w(f.baseStyle,e))==null?void 0:r.field)!=null?t:{}}),ul=a({width:_r.reference}),fl=a({borderStart:"1px solid",borderStartColor:ur.reference,color:vr.reference,bg:br.reference,[vr.variable]:"colors.chakra-body-text",[ur.variable]:"colors.chakra-border-color",_dark:{[vr.variable]:"colors.whiteAlpha.800",[ur.variable]:"colors.whiteAlpha.300"},_active:{[br.variable]:"colors.gray.200",_dark:{[br.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}}),ml=xt(e=>{var r;return{root:bl,field:(r=w(vl,e))!=null?r:{},stepperGroup:ul,stepper:fl}});function Fe(e){var r,t,n;const i=(r=f.sizes)==null?void 0:r[e],l={lg:"md",md:"md",sm:"sm",xs:"sm"},s=(n=(t=i.field)==null?void 0:t.fontSize)!=null?n:"md",d=mt.fontSizes[s];return xt({field:{...i.field,paddingInlineEnd:$t.reference,verticalAlign:"top"},stepper:{fontSize:j(d).multiply(.75).toString(),_first:{borderTopEndRadius:l[e]},_last:{borderBottomEndRadius:l[e],mt:"-1px",borderTopWidth:1}}})}var hl={xs:Fe("xs"),sm:Fe("sm"),md:Fe("md"),lg:Fe("lg")},gl=dl({baseStyle:ml,sizes:hl,variants:f.variants,defaultProps:f.defaultProps}),nt,yl=a({...(nt=f.baseStyle)==null?void 0:nt.field,textAlign:"center"}),pl={lg:a({fontSize:"lg",w:12,h:12,borderRadius:"md"}),md:a({fontSize:"md",w:10,h:10,borderRadius:"md"}),sm:a({fontSize:"sm",w:8,h:8,borderRadius:"sm"}),xs:a({fontSize:"xs",w:6,h:6,borderRadius:"sm"})},it,lt,Sl={outline:a(e=>{var r,t,n;return(n=(t=w((r=f.variants)==null?void 0:r.outline,e))==null?void 0:t.field)!=null?n:{}}),flushed:a(e=>{var r,t,n;return(n=(t=w((r=f.variants)==null?void 0:r.flushed,e))==null?void 0:t.field)!=null?n:{}}),filled:a(e=>{var r,t,n;return(n=(t=w((r=f.variants)==null?void 0:r.filled,e))==null?void 0:t.field)!=null?n:{}}),unstyled:(lt=(it=f.variants)==null?void 0:it.unstyled.field)!=null?lt:{}},xl=x({baseStyle:yl,sizes:pl,variants:Sl,defaultProps:f.defaultProps}),{defineMultiStyleConfig:$l,definePartsStyle:kl}=v(Va.keys),Ie=y("popper-bg"),_l=y("popper-arrow-bg"),st=y("popper-arrow-shadow-color"),wl=a({zIndex:10}),zl=a({[Ie.variable]:"colors.white",bg:Ie.reference,[_l.variable]:Ie.reference,[st.variable]:"colors.gray.200",_dark:{[Ie.variable]:"colors.gray.700",[st.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}}),Cl=a({px:3,py:2,borderBottomWidth:"1px"}),Al=a({px:3,py:2}),Pl=a({px:3,py:2,borderTopWidth:"1px"}),Tl=a({position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2}),Fl=kl({popper:wl,content:zl,header:Cl,body:Al,footer:Pl,closeButton:Tl}),Il=$l({baseStyle:Fl}),{definePartsStyle:Sr,defineMultiStyleConfig:Ml}=v(Ma.keys),fr=c("drawer-bg"),mr=c("drawer-box-shadow");function K(e){return Sr(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Bl=a({bg:"blackAlpha.600",zIndex:"overlay"}),El=a({display:"flex",zIndex:"modal",justifyContent:"center"}),Dl=a(e=>{const{isFullHeight:r}=e;return{...r&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[fr.variable]:"colors.white",[mr.variable]:"shadows.lg",_dark:{[fr.variable]:"colors.gray.700",[mr.variable]:"shadows.dark-lg"},bg:fr.reference,boxShadow:mr.reference}}),jl=a({px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"}),Rl=a({position:"absolute",top:"2",insetEnd:"3"}),Hl=a({px:"6",py:"2",flex:"1",overflow:"auto"}),Wl=a({px:"6",py:"4"}),Ll=Sr(e=>({overlay:Bl,dialogContainer:El,dialog:w(Dl,e),header:jl,closeButton:Rl,body:Hl,footer:Wl})),Vl={xs:K("xs"),sm:K("md"),md:K("lg"),lg:K("2xl"),xl:K("4xl"),full:K("full")},Ol=Ml({baseStyle:Ll,sizes:Vl,defaultProps:{size:"xs"}}),{definePartsStyle:ql,defineMultiStyleConfig:Nl}=v(Ba.keys),Gl=a({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"}),Ul=a({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}),Yl=a({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}),Kl=ql({preview:Gl,input:Ul,textarea:Yl}),Xl=Nl({baseStyle:Kl}),{definePartsStyle:Zl,defineMultiStyleConfig:Jl}=v(Ea.keys),Q=c("form-control-color"),Ql=a({marginStart:"1",[Q.variable]:"colors.red.500",_dark:{[Q.variable]:"colors.red.300"},color:Q.reference}),es=a({mt:"2",[Q.variable]:"colors.gray.600",_dark:{[Q.variable]:"colors.whiteAlpha.600"},color:Q.reference,lineHeight:"normal",fontSize:"sm"}),rs=Zl({container:{width:"100%",position:"relative"},requiredIndicator:Ql,helperText:es}),ts=Jl({baseStyle:rs}),{definePartsStyle:as,defineMultiStyleConfig:os}=v(Da.keys),ee=c("form-error-color"),ns=a({[ee.variable]:"colors.red.500",_dark:{[ee.variable]:"colors.red.300"},color:ee.reference,mt:"2",fontSize:"sm",lineHeight:"normal"}),is=a({marginEnd:"0.5em",[ee.variable]:"colors.red.500",_dark:{[ee.variable]:"colors.red.300"},color:ee.reference}),ls=as({text:ns,icon:is}),ss=os({baseStyle:ls}),ds=a({fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}}),cs=x({baseStyle:ds}),bs=a({fontFamily:"heading",fontWeight:"bold"}),vs={"4xl":a({fontSize:["6xl",null,"7xl"],lineHeight:1}),"3xl":a({fontSize:["5xl",null,"6xl"],lineHeight:1}),"2xl":a({fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]}),xl:a({fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]}),lg:a({fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]}),md:a({fontSize:"xl",lineHeight:1.2}),sm:a({fontSize:"md",lineHeight:1.2}),xs:a({fontSize:"sm",lineHeight:1.2})},us=x({baseStyle:bs,sizes:vs,defaultProps:{size:"xl"}}),{defineMultiStyleConfig:fs,definePartsStyle:ms}=v(Fa.keys),hr=c("breadcrumb-link-decor"),hs=a({transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:hr.reference,[hr.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[hr.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}}),gs=ms({link:hs}),ys=fs({baseStyle:gs}),ps=a({lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}}),kt=a(e=>{const{colorScheme:r,theme:t}=e;if(r==="gray")return{color:o("gray.800","whiteAlpha.900")(e),_hover:{bg:o("gray.100","whiteAlpha.200")(e)},_active:{bg:o("gray.200","whiteAlpha.300")(e)}};const n=te(`${r}.200`,.12)(t),i=te(`${r}.200`,.24)(t);return{color:o(`${r}.600`,`${r}.200`)(e),bg:"transparent",_hover:{bg:o(`${r}.50`,n)(e)},_active:{bg:o(`${r}.100`,i)(e)}}}),Ss=a(e=>{const{colorScheme:r}=e,t=o("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:r==="gray"?t:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...w(kt,e)}}),xs={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},$s=a(e=>{var r;const{colorScheme:t}=e;if(t==="gray"){const b=o("gray.100","whiteAlpha.200")(e);return{bg:b,color:o("gray.800","whiteAlpha.900")(e),_hover:{bg:o("gray.200","whiteAlpha.300")(e),_disabled:{bg:b}},_active:{bg:o("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:i="white",hoverBg:l=`${t}.600`,activeBg:s=`${t}.700`}=(r=xs[t])!=null?r:{},d=o(n,`${t}.200`)(e);return{bg:d,color:o(i,"gray.800")(e),_hover:{bg:o(l,`${t}.300`)(e),_disabled:{bg:d}},_active:{bg:o(s,`${t}.400`)(e)}}}),ks=a(e=>{const{colorScheme:r}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:o(`${r}.500`,`${r}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:o(`${r}.700`,`${r}.500`)(e)}}}),_s=a({bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"}),ws={ghost:kt,outline:Ss,solid:$s,link:ks,unstyled:_s},zs={lg:a({h:"12",minW:"12",fontSize:"lg",px:"6"}),md:a({h:"10",minW:"10",fontSize:"md",px:"4"}),sm:a({h:"8",minW:"8",fontSize:"sm",px:"3"}),xs:a({h:"6",minW:"6",fontSize:"xs",px:"2"})},Cs=x({baseStyle:ps,variants:ws,sizes:zs,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}}),{definePartsStyle:Y,defineMultiStyleConfig:As}=v(Ja.keys),Xe=c("card-bg"),H=c("card-padding"),_t=c("card-shadow"),Ge=c("card-radius"),wt=c("card-border-width","0"),zt=c("card-border-color"),Ps=Y({container:{[Xe.variable]:"colors.chakra-body-bg",backgroundColor:Xe.reference,boxShadow:_t.reference,borderRadius:Ge.reference,color:"chakra-body-text",borderWidth:wt.reference,borderColor:zt.reference},body:{padding:H.reference,flex:"1 1 0%"},header:{padding:H.reference},footer:{padding:H.reference}}),Ts={sm:Y({container:{[Ge.variable]:"radii.base",[H.variable]:"space.3"}}),md:Y({container:{[Ge.variable]:"radii.md",[H.variable]:"space.5"}}),lg:Y({container:{[Ge.variable]:"radii.xl",[H.variable]:"space.7"}})},Fs={elevated:Y({container:{[_t.variable]:"shadows.base",_dark:{[Xe.variable]:"colors.gray.700"}}}),outline:Y({container:{[wt.variable]:"1px",[zt.variable]:"colors.chakra-border-color"}}),filled:Y({container:{[Xe.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[H.variable]:0},header:{[H.variable]:0},footer:{[H.variable]:0}}},Is=As({baseStyle:Ps,variants:Fs,sizes:Ts,defaultProps:{variant:"elevated",size:"md"}}),he=y("close-button-size"),le=y("close-button-bg"),Ms=a({w:[he.reference],h:[he.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[le.variable]:"colors.blackAlpha.100",_dark:{[le.variable]:"colors.whiteAlpha.100"}},_active:{[le.variable]:"colors.blackAlpha.200",_dark:{[le.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:le.reference}),Bs={lg:a({[he.variable]:"sizes.10",fontSize:"md"}),md:a({[he.variable]:"sizes.8",fontSize:"xs"}),sm:a({[he.variable]:"sizes.6",fontSize:"2xs"})},Es=x({baseStyle:Ms,sizes:Bs,defaultProps:{size:"md"}}),{variants:Ds,defaultProps:js}=fe,Rs=a({fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:S.bg.reference,color:S.color.reference,boxShadow:S.shadow.reference}),Hs=x({baseStyle:Rs,variants:Ds,defaultProps:js}),Ws=a({w:"100%",mx:"auto",maxW:"prose",px:"4"}),Ls=x({baseStyle:Ws}),Vs=a({opacity:.6,borderColor:"inherit"}),Os=a({borderStyle:"solid"}),qs=a({borderStyle:"dashed"}),Ns={solid:Os,dashed:qs},Gs=x({baseStyle:Vs,variants:Ns,defaultProps:{variant:"solid"}}),{definePartsStyle:Us,defineMultiStyleConfig:Ys}=v(Aa.keys),Ks=a({borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}}),Xs=a({transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"}),Zs=a({pt:"2",px:"4",pb:"5"}),Js=a({fontSize:"1.25em"}),Qs=Us({container:Ks,button:Xs,panel:Zs,icon:Js}),e0=Ys({baseStyle:Qs}),{definePartsStyle:$e,defineMultiStyleConfig:r0}=v(Pa.keys),C=c("alert-fg"),W=c("alert-bg"),t0=$e({container:{bg:W.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:C.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:C.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function wr(e){const{theme:r,colorScheme:t}=e,n=te(`${t}.200`,.16)(r);return{light:`colors.${t}.100`,dark:n}}var a0=$e(e=>{const{colorScheme:r}=e,t=wr(e);return{container:{[C.variable]:`colors.${r}.500`,[W.variable]:t.light,_dark:{[C.variable]:`colors.${r}.200`,[W.variable]:t.dark}}}}),o0=$e(e=>{const{colorScheme:r}=e,t=wr(e);return{container:{[C.variable]:`colors.${r}.500`,[W.variable]:t.light,_dark:{[C.variable]:`colors.${r}.200`,[W.variable]:t.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:C.reference}}}),n0=$e(e=>{const{colorScheme:r}=e,t=wr(e);return{container:{[C.variable]:`colors.${r}.500`,[W.variable]:t.light,_dark:{[C.variable]:`colors.${r}.200`,[W.variable]:t.dark},pt:"2",borderTopWidth:"4px",borderTopColor:C.reference}}}),i0=$e(e=>{const{colorScheme:r}=e;return{container:{[C.variable]:"colors.white",[W.variable]:`colors.${r}.500`,_dark:{[C.variable]:"colors.gray.900",[W.variable]:`colors.${r}.200`},color:C.reference}}}),l0={subtle:a0,"left-accent":o0,"top-accent":n0,solid:i0},s0=r0({baseStyle:t0,variants:l0,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:Ct,defineMultiStyleConfig:d0}=v(Ta.keys),re=c("avatar-border-color"),ge=c("avatar-bg"),xe=c("avatar-font-size"),ae=c("avatar-size"),c0=a({borderRadius:"full",border:"0.2em solid",borderColor:re.reference,[re.variable]:"white",_dark:{[re.variable]:"colors.gray.800"}}),b0=a({bg:ge.reference,fontSize:xe.reference,width:ae.reference,height:ae.reference,lineHeight:"1",[ge.variable]:"colors.gray.200",_dark:{[ge.variable]:"colors.whiteAlpha.400"}}),v0=a(e=>{const{name:r,theme:t}=e,n=r?po({string:r}):"colors.gray.400",i=go(n)(t);let l="white";return i||(l="gray.800"),{bg:ge.reference,fontSize:xe.reference,color:l,borderColor:re.reference,verticalAlign:"top",width:ae.reference,height:ae.reference,"&:not([data-loaded])":{[ge.variable]:n},[re.variable]:"colors.white",_dark:{[re.variable]:"colors.gray.800"}}}),u0=a({fontSize:xe.reference,lineHeight:"1"}),f0=Ct(e=>({badge:w(c0,e),excessLabel:w(b0,e),container:w(v0,e),label:u0}));function V(e){const r=e!=="100%"?gt[e]:void 0;return Ct({container:{[ae.variable]:r??e,[xe.variable]:`calc(${r??e} / 2.5)`},excessLabel:{[ae.variable]:r??e,[xe.variable]:`calc(${r??e} / 2.5)`}})}var m0={"2xs":V(4),xs:V(6),sm:V(8),md:V(12),lg:V(16),xl:V(24),"2xl":V(32),full:V("100%")},h0=d0({baseStyle:f0,sizes:m0,defaultProps:{size:"md"}}),g0={Accordion:e0,Alert:s0,Avatar:h0,Badge:fe,Breadcrumb:ys,Button:Cs,Checkbox:Ke,CloseButton:Es,Code:Hs,Container:Ls,Divider:Gs,Drawer:Ol,Editable:Xl,Form:ts,FormError:ss,FormLabel:cs,Heading:us,Input:f,Kbd:Bi,Link:Di,List:Li,Menu:Zi,Modal:sl,NumberInput:gl,PinInput:xl,Popover:Il,Progress:Wn,Radio:Qn,Select:ii,Skeleton:si,SkipLink:ci,Slider:xi,Spinner:_i,Stat:Ii,Switch:Eo,Table:Vo,Tabs:an,Tag:gn,Textarea:Pn,Tooltip:In,Card:Is,Stepper:Ca},y0={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},p0={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},S0="ltr",x0={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},At={semanticTokens:y0,direction:S0,..._a,components:g0,styles:p0,config:x0};function ve(e){return typeof e=="function"}function $0(...e){return r=>e.reduce((t,n)=>n(t),r)}var k0=e=>function(...t){let n=[...t],i=t[t.length-1];return ea(i)&&n.length>1?n=n.slice(0,n.length-1):i=e,$0(...n.map(l=>s=>ve(l)?l(s):w0(s,l)))(i)},_0=k0(At);function w0(...e){return ct({},...e,Pt)}function Pt(e,r,t,n){if((ve(e)||ve(r))&&Object.prototype.hasOwnProperty.call(n,t))return(...i)=>{const l=ve(e)?e(...i):e,s=ve(r)?r(...i):r;return ct({},l,s,Pt)}}function z0(e={}){const{strict:r=!0,errorMessage:t="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:n}=e,i=k.createContext(void 0);i.displayName=n;function l(){var s;const d=k.useContext(i);if(!d&&r){const b=new Error(t);throw b.name="ContextError",(s=Error.captureStackTrace)==null||s.call(Error,b,l),b}return d}return[i.Provider,l,i]}function C0(e){const{cssVarsRoot:r,theme:t,children:n}=e,i=k.useMemo(()=>jt(t),[t]);return p.jsxs(Rt,{theme:i,children:[p.jsx(A0,{root:r}),n]})}function A0({root:e=":host, :root"}){const r=[e,"[data-theme]"].join(",");return p.jsx(Ze,{styles:t=>({[r]:t.__cssVars})})}z0({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function P0(){const{colorMode:e}=Ht();return p.jsx(Ze,{styles:r=>{const t=Wt(r,"styles.global"),n=Lt(t,{theme:r,colorMode:e});return n?Vt(n)(r):void 0}})}var Tt=k.createContext({getDocument(){return document},getWindow(){return window}});Tt.displayName="EnvironmentContext";function Ft(e){const{children:r,environment:t,disabled:n}=e,i=k.useRef(null),l=k.useMemo(()=>t||{getDocument:()=>{var d,b;return(b=(d=i.current)==null?void 0:d.ownerDocument)!=null?b:document},getWindow:()=>{var d,b;return(b=(d=i.current)==null?void 0:d.ownerDocument.defaultView)!=null?b:window}},[t]),s=!n||!t;return p.jsxs(Tt.Provider,{value:l,children:[r,s&&p.jsx("span",{id:"__chakra_env",hidden:!0,ref:i})]})}Ft.displayName="EnvironmentProvider";var T0=e=>{const{children:r,colorModeManager:t,portalZIndex:n,resetScope:i,resetCSS:l=!0,theme:s={},environment:d,cssVarsRoot:b,disableEnvironment:$,disableGlobalStyle:u}=e,m=p.jsx(Ft,{environment:d,disabled:$,children:r});return p.jsx(C0,{theme:s,cssVarsRoot:b,children:p.jsxs(ft,{colorModeManager:t,options:s.config,children:[l?p.jsx(Kt,{scope:i}):p.jsx(Yt,{}),!u&&p.jsx(P0,{}),n?p.jsx(Ot,{zIndex:n,children:m}):m]})})},F0=e=>function({children:t,theme:n=e,toastOptions:i,...l}){return p.jsxs(T0,{theme:n,...l,children:[p.jsx(qt,{value:i==null?void 0:i.defaultOptions,children:t}),p.jsx(Nt,{...i})]})},I0=F0(At);function A(e,r,t=!1){e=String(e),r=String(r);const n=Array.from({length:21},(s,d)=>d*50),i=[0,5,10,15,20,25,30,35,40,45,50,55,59,64,68,73,77,82,86,95,100];return n.reduce((s,d,b)=>{const $=t?i[b]/100:1,u=t?50:i[n.length-1-b];return s[d]=`hsl(${e} ${r}% ${u}% / ${$})`,s},{})}const Me={H:220,S:16},Be={H:250,S:52},Ee={H:47,S:50},De={H:28,S:50},je={H:113,S:50},Re={H:0,S:50},M0={base:A(Me.H,Me.S),baseAlpha:A(Me.H,Me.S,!0),accent:A(Be.H,Be.S),accentAlpha:A(Be.H,Be.S,!0),working:A(Ee.H,Ee.S),workingAlpha:A(Ee.H,Ee.S,!0),warning:A(De.H,De.S),warningAlpha:A(De.H,De.S,!0),ok:A(je.H,je.S),okAlpha:A(je.H,je.S,!0),error:A(Re.H,Re.S),errorAlpha:A(Re.H,Re.S,!0)};function g(e,r={}){let t=!1;function n(){if(!t){t=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...u){n();for(const m of u)r[m]=b(m);return g(e,r)}function l(...u){for(const m of u)m in r||(r[m]=b(m));return g(e,r)}function s(){return Object.fromEntries(Object.entries(r).map(([m,_])=>[m,_.selector]))}function d(){return Object.fromEntries(Object.entries(r).map(([m,_])=>[m,_.className]))}function b(u){const I=`chakra-${(["container","root"].includes(u??"")?[e]:[e,u]).filter(Boolean).join("__")}`;return{className:I,selector:`.${I}`,toString:()=>u}}return{parts:i,toPart:b,extend:l,selectors:s,classnames:d,get keys(){return Object.keys(r)},__type:{}}}var B0=g("accordion").parts("root","container","button","panel").extend("icon");g("alert").parts("title","description","container").extend("icon","spinner");g("avatar").parts("label","badge","container").extend("excessLabel","group");g("breadcrumb").parts("link","item","container").extend("separator");g("button").parts();var E0=g("checkbox").parts("control","icon","container").extend("label");g("progress").parts("track","filledTrack").extend("label");g("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer");g("editable").parts("preview","input","textarea");g("form").parts("container","requiredIndicator","helperText");g("formError").parts("text","icon");var D0=g("input").parts("addon","field","element");g("list").parts("container","item","icon");var j0=g("menu").parts("button","list","item").extend("groupTitle","command","divider"),R0=g("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),H0=g("numberinput").parts("root","field","stepperGroup","stepper");g("pininput").parts("field");var W0=g("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),L0=g("progress").parts("label","filledTrack","track");g("radio").parts("container","control","label");var V0=g("select").parts("field","icon"),O0=g("slider").parts("container","track","thumb","filledTrack","mark");g("stat").parts("container","label","helpText","number","icon");var q0=g("switch").parts("container","track","thumb");g("table").parts("table","thead","tbody","tr","th","td","tfoot","caption");var N0=g("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator");g("tag").parts("container","label","closeButton");g("card").parts("container","header","body","footer");const{definePartsStyle:G0,defineMultiStyleConfig:U0}=v(B0.keys),Y0=a({border:"none"}),K0=a(e=>{const{colorScheme:r}=e;return{fontWeight:"600",fontSize:"sm",border:"none",borderRadius:"base",bg:o(`${r}.200`,`${r}.700`)(e),color:o(`${r}.900`,`${r}.100`)(e),_hover:{bg:o(`${r}.250`,`${r}.650`)(e)},_expanded:{bg:o(`${r}.250`,`${r}.650`)(e),borderBottomRadius:"none",_hover:{bg:o(`${r}.300`,`${r}.600`)(e)}}}}),X0=a(e=>{const{colorScheme:r}=e;return{bg:o(`${r}.100`,`${r}.800`)(e),borderRadius:"base",borderTopRadius:"none"}}),Z0=a({}),J0=G0(e=>({container:Y0,button:K0(e),panel:X0(e),icon:Z0})),Q0=U0({variants:{invokeAI:J0},defaultProps:{variant:"invokeAI",colorScheme:"base"}}),ed=a(e=>{const{colorScheme:r}=e;if(r==="base"){const n={bg:o("base.200","base.700")(e),color:o("base.500","base.150")(e),svg:{fill:o("base.500","base.150")(e)},opacity:1};return{bg:o("base.200","base.600")(e),color:o("base.850","base.100")(e),borderRadius:"base",textShadow:o("0 0 0.3rem var(--invokeai-colors-base-50)","0 0 0.3rem var(--invokeai-colors-base-900)")(e),svg:{fill:o("base.850","base.100")(e),filter:o("drop-shadow(0px 0px 0.3rem var(--invokeai-colors-base-100))","drop-shadow(0px 0px 0.3rem var(--invokeai-colors-base-800))")(e)},_disabled:n,_hover:{bg:o("base.300","base.500")(e),color:o("base.900","base.50")(e),svg:{fill:o("base.900","base.50")(e)},_disabled:n},_checked:{bg:o("accent.400","accent.600")(e),color:o("base.50","base.100")(e),svg:{fill:o(`${r}.50`,`${r}.100`)(e),filter:o(`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${r}-600))`,`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${r}-800))`)(e)},_disabled:n,_hover:{bg:o("accent.500","accent.500")(e),color:o("white","base.50")(e),svg:{fill:o("white","base.50")(e)},_disabled:n}}}}const t={bg:o(`${r}.200`,`${r}.700`)(e),color:o(`${r}.100`,`${r}.150`)(e),svg:{fill:o(`${r}.100`,`${r}.150`)(e)},opacity:1,filter:o(void 0,"saturate(65%)")(e)};return{bg:o(`${r}.400`,`${r}.600`)(e),color:o("base.50","base.100")(e),borderRadius:"base",textShadow:o(`0 0 0.3rem var(--invokeai-colors-${r}-600)`,`0 0 0.3rem var(--invokeai-colors-${r}-900)`)(e),svg:{fill:o("base.50","base.100")(e),filter:o(`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${r}-600))`,`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${r}-800))`)(e)},_disabled:t,_hover:{bg:o(`${r}.500`,`${r}.500`)(e),color:o("white","base.50")(e),svg:{fill:o("white","base.50")(e)},_disabled:t},_checked:{bg:o("accent.400","accent.600")(e),color:o("base.50","base.100")(e),svg:{fill:o("base.50","base.100")(e),filter:o(`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${r}-600))`,`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${r}-800))`)(e)},_disabled:t,_hover:{bg:o("accent.500","accent.500")(e),color:o("white","base.50")(e),svg:{fill:o("white","base.50")(e)},_disabled:t}}}}),rd=x({variants:{invokeAI:ed},defaultProps:{variant:"invokeAI",colorScheme:"base"}}),{definePartsStyle:td,defineMultiStyleConfig:ad}=v(E0.keys),od=a(e=>{const{colorScheme:r}=e;return{bg:o("base.200","base.700")(e),borderColor:o("base.200","base.700")(e),color:o("base.900","base.100")(e),_checked:{bg:o(`${r}.300`,`${r}.600`)(e),borderColor:o(`${r}.300`,`${r}.600`)(e),color:o(`${r}.900`,`${r}.100`)(e),_hover:{bg:o(`${r}.400`,`${r}.500`)(e),borderColor:o(`${r}.400`,`${r}.500`)(e)},_disabled:{borderColor:"transparent",bg:"whiteAlpha.300",color:"whiteAlpha.500"}},_indeterminate:{bg:o(`${r}.300`,`${r}.600`)(e),borderColor:o(`${r}.300`,`${r}.600`)(e),color:o(`${r}.900`,`${r}.100`)(e)},_disabled:{bg:"whiteAlpha.100",borderColor:"transparent"},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:o("error.600","error.300")(e)}}}),nd=td(e=>({control:od(e)})),id=ad({variants:{invokeAI:nd},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),ld=a(e=>({fontSize:"sm",marginEnd:0,mb:1,fontWeight:"400",transitionProperty:"common",transitionDuration:"normal",whiteSpace:"nowrap",_disabled:{opacity:.4},color:o("base.700","base.300")(e)})),sd=x({variants:{invokeAI:ld},defaultProps:{variant:"invokeAI"}}),er=e=>({outline:"none",borderWidth:2,borderStyle:"solid",borderColor:o("base.200","base.800")(e),bg:o("base.50","base.900")(e),borderRadius:"base",color:o("base.900","base.100")(e),boxShadow:"none",_hover:{borderColor:o("base.300","base.600")(e)},_focus:{borderColor:o("accent.200","accent.600")(e),boxShadow:"none",_hover:{borderColor:o("accent.300","accent.500")(e)}},_invalid:{borderColor:o("error.300","error.600")(e),boxShadow:"none",_hover:{borderColor:o("error.400","error.500")(e)}},_disabled:{borderColor:o("base.300","base.700")(e),bg:o("base.300","base.700")(e),color:o("base.600","base.400")(e),_hover:{borderColor:o("base.300","base.700")(e)}},_placeholder:{color:o("base.700","base.400")(e)}}),{definePartsStyle:dd,defineMultiStyleConfig:cd}=v(D0.keys),bd=dd(e=>({field:er(e)})),vd=cd({variants:{invokeAI:bd},defaultProps:{size:"sm",variant:"invokeAI"}}),{definePartsStyle:ud,defineMultiStyleConfig:fd}=v(j0.keys),md=ud(e=>({button:{fontWeight:500,bg:o("base.300","base.500")(e),color:o("base.900","base.100")(e),_hover:{bg:o("base.400","base.600")(e),color:o("base.900","base.50")(e),fontWeight:600}},list:{zIndex:9999,bg:o("base.200","base.800")(e)},item:{fontSize:"sm",bg:o("base.200","base.800")(e),_hover:{bg:o("base.300","base.700")(e)},_focus:{bg:o("base.400","base.600")(e)}}})),hd=fd({variants:{invokeAI:md},defaultProps:{variant:"invokeAI"}}),{defineMultiStyleConfig:gd,definePartsStyle:yd}=v(R0.keys),pd=a(e=>({bg:o("blackAlpha.700","blackAlpha.700")(e)})),Sd=a({}),xd=a(e=>({layerStyle:"first",maxH:"80vh"})),$d=a(e=>({fontWeight:"600",fontSize:"lg",layerStyle:"first",borderTopRadius:"base",borderInlineEndRadius:"base"})),kd=a({}),_d=a({overflowY:"scroll"}),wd=a({}),zd=yd(e=>({overlay:pd(e),dialogContainer:Sd,dialog:xd(e),header:$d(e),closeButton:kd,body:_d,footer:wd})),Cd=gd({variants:{invokeAI:zd},defaultProps:{variant:"invokeAI",size:"lg"}}),{defineMultiStyleConfig:Ad,definePartsStyle:Pd}=v(H0.keys),Td=a(e=>({height:8})),Fd=a(e=>({border:"none",fontWeight:"600",height:"auto",py:1,ps:2,pe:6,...er(e)})),Id=a(e=>({display:"flex"})),Md=a(e=>({border:"none",px:2,py:0,mx:-2,my:0,svg:{color:o("base.700","base.300")(e),width:2.5,height:2.5,_hover:{color:o("base.900","base.100")(e)}}})),Bd=Pd(e=>({root:Td(e),field:Fd(e),stepperGroup:Id(e),stepper:Md(e)})),Ed=Ad({variants:{invokeAI:Bd},defaultProps:{size:"sm",variant:"invokeAI"}}),{defineMultiStyleConfig:Dd,definePartsStyle:jd}=v(W0.keys),Rd=y("popper-bg"),Hd=y("popper-arrow-bg"),Wd=y("popper-arrow-shadow-color"),Ld=a(e=>({[Hd.variable]:o("colors.base.100","colors.base.800")(e),[Rd.variable]:o("colors.base.100","colors.base.800")(e),[Wd.variable]:o("colors.base.400","colors.base.600")(e),minW:"unset",width:"unset",p:4,bg:o("base.100","base.800")(e),border:"none",shadow:"dark-lg"})),Vd=jd(e=>({content:Ld(e)})),Od=Dd({variants:{invokeAI:Vd},defaultProps:{variant:"invokeAI"}}),{defineMultiStyleConfig:qd,definePartsStyle:Nd}=v(L0.keys),Gd=a(e=>({bg:"accent.600",_indeterminate:{bgGradient:"linear(to-r, transparent 0%, accent.600 50%, transparent 100%);"}})),Ud=a(e=>({bg:"none"})),Yd=Nd(e=>({filledTrack:Gd(e),track:Ud(e)})),Kd=qd({variants:{invokeAI:Yd},defaultProps:{variant:"invokeAI"}}),Xd={"::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"},{definePartsStyle:Zd,defineMultiStyleConfig:Jd}=v(V0.keys),Qd=a(e=>({color:o("base.200","base.300")(e)})),ec=a(e=>({fontWeight:"600",...er(e)})),rc=Zd(e=>({field:ec(e),icon:Qd(e)})),tc=Jd({variants:{invokeAI:rc},defaultProps:{size:"sm",variant:"invokeAI"}}),{definePartsStyle:ac,defineMultiStyleConfig:oc}=v(O0.keys),nc=a(e=>({bg:o("base.400","base.600")(e),h:1.5})),ic=a(e=>{const{colorScheme:r}=e;return{bg:o(`${r}.400`,`${r}.600`)(e),h:1.5}}),lc=a(e=>({w:2,h:4,bg:o("base.50","base.100")(e)})),sc=a(e=>({fontSize:"xs",fontWeight:"500",color:o("base.700","base.400")(e),mt:2,insetInlineStart:"unset"})),dc=ac(e=>({container:{_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"}},track:nc(e),filledTrack:ic(e),thumb:lc(e),mark:sc(e)})),cc=oc({variants:{invokeAI:dc},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:bc,definePartsStyle:vc}=v(q0.keys),uc=a(e=>{const{colorScheme:r}=e;return{bg:o("base.300","base.600")(e),_focusVisible:{boxShadow:"none"},_checked:{bg:o(`${r}.400`,`${r}.500`)(e)}}}),fc=a(e=>{const{colorScheme:r}=e;return{bg:o(`${r}.50`,`${r}.50`)(e)}}),mc=vc(e=>({container:{},track:uc(e),thumb:fc(e)})),hc=bc({variants:{invokeAI:mc},defaultProps:{size:"md",variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:gc,definePartsStyle:yc}=v(N0.keys),pc=a(e=>({display:"flex",columnGap:4})),Sc=a(e=>({})),xc=a(e=>{const{colorScheme:r}=e;return{display:"flex",flexDirection:"column",gap:1,color:o("base.700","base.400")(e),button:{fontSize:"sm",padding:2,borderRadius:"base",textShadow:o("0 0 0.3rem var(--invokeai-colors-accent-100)","0 0 0.3rem var(--invokeai-colors-accent-900)")(e),svg:{fill:o("base.700","base.300")(e)},_selected:{bg:o("accent.400","accent.600")(e),color:o("base.50","base.100")(e),svg:{fill:o("base.50","base.100")(e),filter:o(`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${r}-600))`,`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${r}-800))`)(e)},_hover:{bg:o("accent.500","accent.500")(e),color:o("white","base.50")(e),svg:{fill:o("white","base.50")(e)}}},_hover:{bg:o("base.100","base.800")(e),color:o("base.900","base.50")(e),svg:{fill:o("base.800","base.100")(e)}}}}}),$c=a(e=>({padding:0,height:"100%"})),kc=yc(e=>({root:pc(e),tab:Sc(e),tablist:xc(e),tabpanel:$c(e)})),_c=gc({variants:{invokeAI:kc},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),wc=a(e=>({color:o("colors.base.500","colors.base.400")(e)})),zc=x({variants:{subtext:wc}}),Cc=a(e=>er(e)),Ac=x({variants:{invokeAI:Cc},defaultProps:{size:"md",variant:"invokeAI"}}),Pc=y("popper-arrow-bg"),Tc=a(e=>({borderRadius:"base",shadow:"dark-lg",bg:o("base.700","base.200")(e),[Pc.variable]:o("colors.base.700","colors.base.200")(e),pb:1.5})),Fc=x({baseStyle:Tc}),Ic={config:{cssVarPrefix:"invokeai",initialColorMode:"dark",useSystemColorMode:!1},layerStyles:{body:{bg:"base.50",color:"base.900",".chakra-ui-dark &":{bg:"base.900",color:"base.50"}},first:{bg:"base.100",color:"base.900",".chakra-ui-dark &":{bg:"base.850",color:"base.100"}},second:{bg:"base.200",color:"base.900",".chakra-ui-dark &":{bg:"base.800",color:"base.100"}}},styles:{global:()=>({layerStyle:"body","*":{...Xd}})},direction:"ltr",fonts:{body:"'Inter Variable', sans-serif"},shadows:{light:{accent:"0 0 10px 0 var(--invokeai-colors-accent-300)",accentHover:"0 0 10px 0 var(--invokeai-colors-accent-400)",ok:"0 0 7px var(--invokeai-colors-ok-600)",working:"0 0 7px var(--invokeai-colors-working-600)",error:"0 0 7px var(--invokeai-colors-error-600)"},dark:{accent:"0 0 10px 0 var(--invokeai-colors-accent-600)",accentHover:"0 0 10px 0 var(--invokeai-colors-accent-500)",ok:"0 0 7px var(--invokeai-colors-ok-400)",working:"0 0 7px var(--invokeai-colors-working-400)",error:"0 0 7px var(--invokeai-colors-error-400)"},nodeSelectedOutline:"0 0 0 2px var(--invokeai-colors-base-500)"},colors:M0,components:{Button:rd,Input:vd,Textarea:Ac,Tabs:_c,Progress:Kd,Accordion:Q0,FormLabel:sd,Switch:hc,NumberInput:Ed,Select:tc,Slider:cc,Popover:Od,Modal:Cd,Checkbox:id,Menu:hd,Text:zc,Tooltip:Fc}};const Mc={colorScheme:"dark",fontFamily:"'Inter Variable', sans-serif",components:{ScrollArea:{defaultProps:{scrollbarSize:10},styles:{scrollbar:{"&:hover":{backgroundColor:"var(--invokeai-colors-baseAlpha-300)"}},thumb:{backgroundColor:"var(--invokeai-colors-baseAlpha-300)"}}}}};const Bc=ut("@@invokeai-color-mode");function jc({children:e}){const{i18n:r}=Gt(),t=r.dir(),n=k.useMemo(()=>_0({...Ic,direction:t}),[t]);return k.useEffect(()=>{document.body.dir=t},[t]),p.jsx(Ut,{withGlobalStyles:!0,theme:Mc,children:p.jsx(I0,{theme:n,colorModeManager:Bc,children:e})})}export{jc as default};