From a2071cbe47fd4a013fe7c06a7dab532dde23ac20 Mon Sep 17 00:00:00 2001 From: Weixuan Fu Date: Wed, 7 Feb 2024 20:53:53 +0800 Subject: [PATCH 1/5] share to lcoud --- dist/workspace_web/GalleryModal-QhA3VXHP.js | 1 - .../InstallMissingModelsButton-yxToOGGc.js | 1 - dist/workspace_web/MediaPreview--EU0VBUV.js | 1 - .../RecentFilesDrawer-lxFpPifg.js | 18 - dist/workspace_web/assets/App-JXePnJiV.css | 1 - .../assets/ModelManagerTopbar--iv3sdjQ.css | 1 - dist/workspace_web/chunk-JARCRF6W-71z2fzu3.js | 1 - dist/workspace_web/chunk-NTCQBYKE-5Z1buvob.js | 1 - dist/workspace_web/input.js | 688 ------------------ ui/src/components/CustomSelector.tsx | 24 +- ui/src/components/DropdownTitle.tsx | 4 +- ui/src/db-tables/UserSettingsTable.ts | 1 + ui/src/gallery/GalleryModal.tsx | 5 + ui/src/share/ShareDialog.tsx | 67 +- ui/src/share/SharedTopbarButton.tsx | 4 +- ui/src/topbar/Topbar.tsx | 2 + ui/src/types/dbTypes.ts | 1 + 17 files changed, 82 insertions(+), 739 deletions(-) delete mode 100644 dist/workspace_web/GalleryModal-QhA3VXHP.js delete mode 100644 dist/workspace_web/InstallMissingModelsButton-yxToOGGc.js delete mode 100644 dist/workspace_web/MediaPreview--EU0VBUV.js delete mode 100644 dist/workspace_web/RecentFilesDrawer-lxFpPifg.js delete mode 100644 dist/workspace_web/assets/App-JXePnJiV.css delete mode 100644 dist/workspace_web/assets/ModelManagerTopbar--iv3sdjQ.css delete mode 100644 dist/workspace_web/chunk-JARCRF6W-71z2fzu3.js delete mode 100644 dist/workspace_web/chunk-NTCQBYKE-5Z1buvob.js delete mode 100644 dist/workspace_web/input.js diff --git a/dist/workspace_web/GalleryModal-QhA3VXHP.js b/dist/workspace_web/GalleryModal-QhA3VXHP.js deleted file mode 100644 index bf47dfa..0000000 --- a/dist/workspace_web/GalleryModal-QhA3VXHP.js +++ /dev/null @@ -1 +0,0 @@ -import{f as L,l as J,o as Z,j as n,g as Y,h as Q,r as u,K as ie,F as ce,B as E,U as re,M as ae,L as he,N as xe,O as ue,R as de,Q as ge}from"./input.js";import{W as fe,h as M,F as j,a9 as je,I as w,B as X,k as q,T as z,o as C,w as V,z as D,a1 as ee,j as we,H as _,i as ve,aa as se,x as T,ab as ye,y as pe}from"./App-jF2-L8lr.js";import{I as be,i as Ie,a as Ce,b as ke,g as Pe,S as ze,M as Me}from"./MediaPreview--EU0VBUV.js";import{I as Oe,C as ne}from"./chunk-JARCRF6W-71z2fzu3.js";import{V as te}from"./chunk-NTCQBYKE-5Z1buvob.js";import"/scripts/app.js";import"/scripts/api.js";var F=L(function(e,t){const l=J("Link",e),{className:o,isExternal:i,...c}=Z(e);return n.jsx(Y.a,{target:i?"_blank":void 0,rel:i?"noopener":void 0,ref:t,className:Q("chakra-link",o),...c,__css:l})});F.displayName="Link";function Se(s,e=[]){const t=Object.assign({},s);for(const l of e)l in t&&delete t[l];return t}var _e=["h","minH","height","minHeight"],B=L((s,e)=>{const t=J("Textarea",s),{className:l,rows:o,...i}=Z(s),c=fe(i),d=o?Se(t,_e):t;return n.jsx(Y.textarea,{ref:e,rows:o,...c,className:Q("chakra-textarea",l),__css:d})});B.displayName="Textarea";var Fe=M("arrow-left","IconArrowLeft",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]]),Ne=M("chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]),oe=M("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]),Te=M("pin-filled","IconPinFilled",[["path",{d:"M15.113 3.21l.094 .083l5.5 5.5a1 1 0 0 1 -1.175 1.59l-3.172 3.171l-1.424 3.797a1 1 0 0 1 -.158 .277l-.07 .08l-1.5 1.5a1 1 0 0 1 -1.32 .082l-.095 -.083l-2.793 -2.792l-3.793 3.792a1 1 0 0 1 -1.497 -1.32l.083 -.094l3.792 -3.793l-2.792 -2.793a1 1 0 0 1 -.083 -1.32l.083 -.094l1.5 -1.5a1 1 0 0 1 .258 -.187l.098 -.042l3.796 -1.425l3.171 -3.17a1 1 0 0 1 1.497 -1.26z",fill:"currentColor",key:"svg-0",strokeWidth:"0"}]]),Ee=M("pin","IconPin",[["path",{d:"M15 4.5l-4 4l-4 1.5l-1.5 1.5l7 7l1.5 -1.5l1.5 -4l4 -4",key:"svg-0"}],["path",{d:"M9 15l-4.5 4.5",key:"svg-1"}],["path",{d:"M14.5 4l5.5 5.5",key:"svg-2"}]]);const Be=({setMediaAct:s,media:e,currentNum:t})=>{const[l,o]=u.useState(0);u.useEffect(()=>{t!==void 0&&o(t)},[t]);const i=r=>{const h=(l+r+e.length)%e.length;o(h),s&&s(e[h])},c={width:"100%",height:"100%"},d={enter:r=>({x:r>0?500:-500,opacity:1}),center:{x:0,opacity:1},exit:r=>({x:r<0?500:-500,opacity:1})};return n.jsxs(j,{justifyContent:"center",alignItems:"center",position:"relative",width:c.width,height:c.height,overflow:"hidden",children:[n.jsx(ie,{custom:l,children:e.map((r,h)=>n.jsx(ce.div,{custom:h-l,variants:d,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},style:{position:"absolute",cursor:"pointer",width:"100%",height:"100%",display:h===l?"block":"none"},onClick:()=>{window.open(r.imageUrl)},children:je(r.imageUrl)?n.jsx(Oe,{src:r.imageUrl,alt:`image-${r.id}`,width:"100%",height:"100%",objectFit:"contain"}):n.jsx("video",{style:{objectFit:"contain"},width:"100%",height:"100%",src:r.imageUrl,loop:!0,autoPlay:!0,muted:!0,children:n.jsx("track",{kind:"captions"})})},r.id))}),n.jsx(w,{size:"sm",color:"white",bgColor:"whiteAlpha.400","aria-label":"Previous image",icon:n.jsx(Ne,{}),onClick:()=>i(-1),position:"absolute",left:"0",zIndex:"2"}),n.jsx(w,{size:"sm",color:"white",bgColor:"whiteAlpha.400","aria-label":"Next image",icon:n.jsx(be,{}),onClick:()=>i(1),position:"absolute",right:"0",zIndex:"2"})]})};function Ae(s){const e=s.split(".").pop();return fetch(s).then(t=>{if(!t.ok)throw new Error("Network response was not ok");return t.blob()}).then(async t=>{const l=s.split("/").pop()??"",o=new File([t],l);if(Ie(s))return Ce(o);if(e==="webp")return ke(o);const i=await Pe(o),c=JSON.parse(i==null?void 0:i.prompt),d=JSON.parse(i==null?void 0:i.workflow);return{prompt:c,workflow:d}})}const S=s=>{if(typeof s=="string")return s};function N(s){navigator.clipboard.writeText(s).then(function(){}).catch(function(e){console.error("Unable to copy to clipboard: ",e)})}function le(s,e){var h,g,f,y,v,p,b,k,a,x,A,K,$,G,U,m,H,R;const t=S((y=(f=s==null?void 0:s[(g=(h=e==null?void 0:e.inputs)==null?void 0:h.model)==null?void 0:g[0]])==null?void 0:f.inputs)==null?void 0:y.ckpt_name)??S((b=(p=s==null?void 0:s[((v=Object.keys(s))==null?void 0:v.find(O=>{var I,P;return(P=(I=s[O])==null?void 0:I.inputs)==null?void 0:P.ckpt_name}))??""])==null?void 0:p.inputs)==null?void 0:b.ckpt_name)??"",l=S((A=(x=s==null?void 0:s[(a=(k=e==null?void 0:e.inputs)==null?void 0:k.positive)==null?void 0:a[0]])==null?void 0:x.inputs)==null?void 0:A.text),o=S((U=(G=s==null?void 0:s[($=(K=e==null?void 0:e.inputs)==null?void 0:K.negative)==null?void 0:$[0]])==null?void 0:G.inputs)==null?void 0:U.text),i=["seed","sampler_name","scheduler","steps","cfg"].reduce((O,I)=>{var P,W;return(P=e==null?void 0:e.inputs)!=null&&P[I]?{...O,[I]:(W=e==null?void 0:e.inputs)==null?void 0:W[I]}:O},{}),c=(R=s==null?void 0:s[(H=(m=e==null?void 0:e.inputs)==null?void 0:m.latent_image)==null?void 0:H[0]])==null?void 0:R.inputs,d=c==null?void 0:c.width,r=c==null?void 0:c.height;return{ckptName:t,positive:l,negative:o,...i,width:d,height:r}}const Ke=s=>{var o;const{prompt:e,workflow:t}=s;console.log(t);const l=e==null?void 0:e[((o=Object.keys(e))==null?void 0:o.find(i=>e[i].class_type==="KSampler"))??""];return le(e,l)},$e=({metaData:s})=>{const e=Ke(s);return n.jsxs(te,{spacing:2,align:"stretch",children:[n.jsx(X,{children:n.jsx(E,{size:"sm",onClick:()=>N(JSON.stringify(e)),children:"Copy all"})}),Object.keys(e??{}).map(t=>{var l,o;return n.jsxs(j,{gap:2,children:[n.jsxs(j,{gap:1,alignItems:"center",flexBasis:"200px",children:[t,n.jsx(w,{size:"xm",onClick:()=>N((e==null?void 0:e[t])??""),"aria-label":"copy text",icon:n.jsx(oe,{}),variant:"ghost"})]}),(l=e==null?void 0:e[t])!=null&&l.length&&((o=e==null?void 0:e[t])==null?void 0:o.length)>300?n.jsx(B,{readOnly:!0,value:e==null?void 0:e[t]}):n.jsx(q,{readOnly:!0,value:e==null?void 0:e[t]})]},`meta${t}`)})]})},Ge=s=>{var e,t,l;return((l=(t=(e=Object.keys(s==null?void 0:s.prompt))==null?void 0:e.filter)==null?void 0:t.call(e,o=>{var i,c;return((c=(i=s==null?void 0:s.prompt)==null?void 0:i[o])==null?void 0:c.class_type)==="KSampler"}))==null?void 0:l.length)>1},Ue=s=>{const{prompt:e}=s,t=Object.keys(e);return(t==null?void 0:t.filter(o=>{var i;return((i=e==null?void 0:e[o])==null?void 0:i.class_type)==="KSampler"})).reduce((o,i,c)=>{const d=e==null?void 0:e[i],r=le(e,d),h=Object.keys(r).reduce((g,f)=>({...g,[`${f}_${c+1}`]:r==null?void 0:r[f]}),{});return{...o,...h}},{})},me=({metaData:s})=>{var t;const e=Ue(s);return n.jsxs(te,{spacing:2,align:"stretch",children:[n.jsx(X,{children:n.jsx(E,{size:"sm",onClick:()=>N(JSON.stringify(e)),children:"Copy all"})}),(t=Object.keys(e??{}))==null?void 0:t.filter(l=>!!(e!=null&&e[l])).map(l=>{var o,i;return n.jsxs(j,{gap:2,children:[n.jsxs(j,{gap:1,alignItems:"center",flexBasis:"200px",children:[l,n.jsx(w,{size:"xm",onClick:()=>N((e==null?void 0:e[l])??""),"aria-label":"copy text",icon:n.jsx(oe,{}),variant:"ghost"})]}),(o=e==null?void 0:e[l])!=null&&o.length&&((i=e==null?void 0:e[l])==null?void 0:i.length)>300?n.jsx(B,{readOnly:!0,value:e==null?void 0:e[l]}):n.jsx(q,{readOnly:!0,value:e==null?void 0:e[l]})]},`meta${l}`)})]})},He=({media:s})=>{const[e,t]=u.useState(),l=async o=>{try{const i=await Ae(`/workspace/view_media?filename=${o.localPath}`);t(i)}catch(i){console.log(i)}};return u.useEffect(()=>{s&&l(s)},[s]),n.jsxs(j,{overflowY:"auto",mb:4,direction:"column",gap:2,flex:1,children:[n.jsxs(ze,{alignItems:"center",columns:2,spacing:2,children:[n.jsxs(j,{alignItems:"center",gap:1,children:[n.jsx(z,{children:s==null?void 0:s.localPath}),n.jsx(C,{label:"Donwload image from gallery",children:n.jsx(F,{href:`/workspace/view_media?filename=${s==null?void 0:s.localPath}`,download:s==null?void 0:s.localPath,children:n.jsx(w,{size:"sm",icon:n.jsx(V,{size:19}),"aria-label":"donwload image from gallery"})})})]}),n.jsxs(j,{gap:1,alignItems:"center",children:[n.jsx(z,{children:"Create Time:"}),n.jsx(z,{children:D((s==null?void 0:s.createTime)??0,!0)})]})]}),(()=>{if(!s||!e)return null;const o={metaData:e,media:s};return Ge(e)&&n.jsx(me,{...o})||n.jsx($e,{...o})})()]})},Re=({mediaList:s,media:e})=>{const[t,l]=u.useState();return u.useEffect(()=>{e&&l(e)},[e]),n.jsxs(j,{gap:3,h:"100%",children:[n.jsx(j,{flex:1,children:n.jsx(Be,{media:s.map(o=>({id:o.id,imageUrl:`/workspace/view_media?filename=${o.localPath}`})),currentNum:s==null?void 0:s.findIndex(o=>o.id===(t==null?void 0:t.id)),setMediaAct:o=>l(s==null?void 0:s.find(i=>i.id===o.id))})}),n.jsx(He,{media:t})]})},We=({media:s,isSelecting:e,selectedID:t,onClickMedia:l,onRefreshImagesList:o,coverPath:i,setCoverPath:c})=>{const{curFlowID:r,loadFilePath:h}=u.useContext(ee),{showDialog:g}=re();if(s.localPath==null)return null;const f=i!=null&&i===s.localPath;if(r==null)return null;const y=n.jsxs(F,{isExternal:!0,onClick:()=>l(s),position:"relative",children:[e&&n.jsx(ne,{isChecked:t.includes(s.id),position:"absolute",top:2,left:2}),n.jsx(Me,{mediaLocalPath:s.localPath,size:180,onBrokenLink:()=>{},autoPlay:!0})]});return n.jsxs(we,{width:180,mb:2,children:[n.jsx(C,{label:D(s.createTime,!0),children:y}),n.jsx(C,{label:s.localPath,children:n.jsx(z,{color:"GrayText",noOfLines:1,children:s.localPath})}),n.jsxs(_,{hidden:e,gap:0,children:[n.jsx(C,{label:"Set as cover",children:n.jsx(w,{size:"sm",variant:"ghost",icon:f?n.jsx(Te,{size:19}):n.jsx(Ee,{size:19}),"aria-label":"set as cover",onClick:()=>{var v;(v=T)==null||v.updateFlow(r,{coverMediaPath:s.localPath}),c(s.localPath)}})}),n.jsx(E,{flexGrow:1,onClick:()=>g("How do you want to load this workflow?",[{label:"Load in new workflow",onClick:()=>{h(s.localPath)},colorScheme:"teal"},{label:"Overwrite current workflow",onClick:()=>h(s.localPath,!0),colorScheme:"red"}]),size:"sm",children:"Load"}),n.jsx(C,{label:"Donwload image from gallery",children:n.jsx(F,{href:`/workspace/view_media?filename=${s.localPath}`,download:s.localPath,children:n.jsx(w,{size:"sm",variant:"ghost",icon:n.jsx(V,{size:19}),"aria-label":"donwload image from gallery"})})}),n.jsx(C,{label:"Remove image from gallery",children:n.jsx(w,{size:"sm",variant:"ghost",icon:n.jsx(ve,{size:19}),"aria-label":"remove image from gallery",colorScheme:"red",onClick:async()=>{var p,b;confirm("Are you sure to remove this image from gallery? (won't delete image on your disk)")&&(await((p=se)==null?void 0:p.delete(s.id)),f&&(await((b=T)==null?void 0:b.updateFlow(r,{coverMediaPath:void 0})),c("")),o())}})})]})]})},Le=We;function De({onclose:s}){const{curFlowID:e}=u.useContext(ee),[t,l]=u.useState(""),[o,i]=u.useState([]),[c,d]=u.useState(!1),[r,h]=u.useState(""),[g,f]=u.useState([]),[y,v]=u.useState(),p=async()=>{var x;if(e==null)return;const a=await((x=se)==null?void 0:x.listByWorkflowID(e));f(a??[])};if(u.useEffect(()=>{var a;p(),e&&((a=T)==null||a.get(e).then(x=>{x&&(l(x.name),x!=null&&x.coverMediaPath&&h(x==null?void 0:x.coverMediaPath))}))},[]),e==null)return null;const b=a=>{if(c){o.includes(a.id)?i(o.filter(x=>x!==a.id)):i([...o,a.id]);return}v(a)},k=g.length>0&&o.length===g.length;return n.jsxs(ae,{isOpen:!0,onClose:s,blockScrollOnMount:!0,children:[n.jsx(he,{}),n.jsxs(xe,{width:"90%",maxWidth:"90vw",height:"90vh",children:[n.jsxs(ue,{children:[n.jsx(_,{gap:2,mb:2,children:n.jsxs(ye,{size:"md",mr:2,children:[!!y&&n.jsx(w,{onClick:()=>v(void 0),variant:"ghost",mr:1,"aria-label":"back",icon:n.jsx(Fe,{})}),"Gallery - ",t]})}),c&&n.jsxs(_,{gap:3,children:[n.jsx(ne,{isChecked:k,onChange:()=>{i(k?[]:g.map(a=>a.id))},children:"All"}),n.jsxs(z,{fontSize:16,children:[o.length," Selected"]}),n.jsx(w,{size:"sm",icon:n.jsx(pe,{size:19}),onClick:()=>d(!1),"aria-label":"cancel"})]})]}),n.jsx(de,{}),n.jsx(ge,{overflowY:"auto",children:y?n.jsx(Re,{mediaList:g,media:y}):n.jsx(_,{wrap:"wrap",children:g.map(a=>n.jsx(Le,{selectedID:o,media:a,isSelecting:c,onClickMedia:b,onRefreshImagesList:p,coverPath:r,setCoverPath:h},a.id))})})]})]})}export{De as default}; diff --git a/dist/workspace_web/InstallMissingModelsButton-yxToOGGc.js b/dist/workspace_web/InstallMissingModelsButton-yxToOGGc.js deleted file mode 100644 index 1ea8166..0000000 --- a/dist/workspace_web/InstallMissingModelsButton-yxToOGGc.js +++ /dev/null @@ -1 +0,0 @@ -import{r as o,j as e,B as p,P as f}from"./input.js";import{app as l}from"/scripts/app.js";import{G as x,I as j}from"./ModelManagerTopbar-Zgx14Jgk.js";import{T as h,H as v,a3 as m,B as _,a5 as w,a6 as M,al as y,F as E,ab as I}from"./App-jF2-L8lr.js";import{V as S}from"./chunk-NTCQBYKE-5Z1buvob.js";import{I as b,G as k}from"./chunk-JARCRF6W-71z2fzu3.js";import"/scripts/api.js";function C({model:s}){const[n,t]=o.useState([]),r=D(s.received_value),d=async()=>{const i=await(await fetch(`https://huggingface.co/api/models?limit=3&search=${r}&full=true`)).json(),a=[];i.slice(0,1).forEach(({modelId:c,siblings:g})=>{a.push({name:c,downloadUrl:`https://huggingface.co/${c}/resolve/main/`,url:`https://huggingface.co/${c}/tree/main`})}),t(a)};return o.useEffect(()=>{d()},[]),e.jsx(x,{p:3,shadow:"md",borderWidth:"1px",children:e.jsxs(S,{align:"start",children:[e.jsx(h,{children:s.class_type}),e.jsxs(v,{ml:3,children:[e.jsxs(h,{children:[s.input_name,": "]}),e.jsx(h,{color:"red.400",children:s.received_value})]}),n.map(({url:u,name:i})=>e.jsx(p,{size:"sm",onClick:a=>{a.stopPropagation(),window.open(u,"_blank")},leftIcon:e.jsx(b,{width:5,src:"https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo.png"}),rightIcon:e.jsx(m,{size:20}),children:i})),e.jsx(p,{colorScheme:"blue",mt:5,iconSpacing:1,leftIcon:e.jsx(m,{size:20}),size:"sm",onClick:()=>{window.open(`https://civitai.com/search/models?sortBy=models_v5&query=${r}`,"_blank")},children:"Search in CivitAI"})]})})}function D(s){return s.replace(/^.*(\\|\/|\:)/,"").replace(/\.[^/.]+$/,"").replaceAll("_"," ").replace(/([A-Z])/g," $1").trim()}function z({onClose:s,missingModels:n}){o.useEffect(()=>(l.canvasEl.addEventListener("click",s),()=>{l.canvasEl.removeEventListener("click",s)}),[]);const t=440;return e.jsx(f,{children:e.jsx(_,{style:{width:t},children:e.jsxs(w,{width:t,height:"100vh",p:4,gap:2,position:"fixed",top:0,left:0,shadow:"xl",zIndex:M,overflowY:"auto",children:[e.jsx(y,{children:e.jsxs(E,{justifyContent:"space-between",alignContent:"center",children:[e.jsxs(I,{size:"md",mr:2,children:["Missing Models (",n.length,")"]}),e.jsx(j,{})]})}),e.jsx(k,{templateColumns:"1",gap:1,marginTop:2,children:n.map(r=>e.jsx(C,{model:r},r.received_value))})]})})})}function F({}){const[s,n]=o.useState(!1),[t,r]=o.useState([]);return o.useEffect(()=>{const d=l.queuePrompt;l.queuePrompt=async function(){try{await d.apply(l,[...arguments])}finally{const u=l.lastNodeErrors??{};r(Object.values(u).flatMap(i=>i.errors.filter(a=>a.type==="value_not_in_list").map(a=>{const{input_name:c,received_value:g}=a.extra_info;return{class_type:i.class_type,input_name:c,received_value:g}})))}}},[]),t.length===0?null:e.jsxs(e.Fragment,{children:[e.jsxs(p,{size:"sm","aria-label":"missing models",px:2,onClick:()=>n(!0),children:["Install Missing (",t.length,")"]}),s&&e.jsx(z,{onClose:()=>n(!1),missingModels:t})]})}export{F as default}; diff --git a/dist/workspace_web/MediaPreview--EU0VBUV.js b/dist/workspace_web/MediaPreview--EU0VBUV.js deleted file mode 100644 index b153d79..0000000 --- a/dist/workspace_web/MediaPreview--EU0VBUV.js +++ /dev/null @@ -1 +0,0 @@ -import{G as U,I as C}from"./chunk-JARCRF6W-71z2fzu3.js";import{f as x,D as b,j as p,aa as S,r as h}from"./input.js";import{ac as y,h as v,a9 as E}from"./App-jF2-L8lr.js";var V=x(function(o,s){const{columns:l,spacingX:a,spacingY:n,spacing:r,minChildWidth:e,...c}=o,i=b(),f=e?A(e,i):M(l);return p.jsx(U,{ref:s,gap:r,columnGap:a,rowGap:n,templateColumns:f,...c})});V.displayName="SimpleGrid";function k(t){return typeof t=="number"?`${t}px`:t}function A(t,o){return y(t,s=>{const l=S("sizes",s,k(s))(o);return s===null?null:`repeat(auto-fit, minmax(${l}, 1fr))`})}function M(t){return y(t,o=>o===null?null:`repeat(${o}, minmax(0, 1fr))`)}var R=v("chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]);function O(t){return new Promise((o,s)=>{const l=new FileReader;l.onload=a=>{const n=new Uint8Array(a.target.result),r=new DataView(n.buffer);r.getUint32(0)!==2303741511&&(console.error("Not a valid PNG file"),s());let e=8;const c={};for(;eString.fromCharCode(w)).join("");c[g]=m}e+=12+i}o(c)},l.readAsArrayBuffer(t)})}function D(t){const o=new Uint16Array(t.slice(0,2))[0]===18761;function s(r,e,c){const i=t.slice(r,r+c);if(c===2)return new DataView(i.buffer,i.byteOffset,i.byteLength).getUint16(0,e);if(c===4)return new DataView(i.buffer,i.byteOffset,i.byteLength).getUint32(0,e)}const l=s(4,o,4);function a(r){const e=s(r,o,2),c={};for(let i=0;i{const s=new FileReader;s.onload=l=>{var c;const a=new Uint8Array((c=l==null?void 0:l.target)==null?void 0:c.result),n=new DataView(a.buffer);if(n.getUint32(0)!==1380533830||n.getUint32(8)!==1464156752){console.error("Not a valid WEBP file"),o();return}let r=12;const e={};for(;r{const s=new FileReader;s.onload=l=>{const a=new Uint8Array(l.target.result),n=new DataView(a.buffer),r=new TextDecoder;if(n.getUint32(0)==440786851){let e=12;for(;e>8*(4-f)&~(1<<7*f),g=r.decode(a.slice(e+2+f,e+2+f+u)),d=JSON.parse(g);o(d);return}}e+=1}}else if(n.getUint32(4)==1718909296&&n.getUint32(8)==1769172845){let e=a.length-4;for(;e>16;){if(n.getUint32(e)==1684108385&&n.getUint32(e-8)==2841865588){n.getUint32(e+4),n.getUint32(e+8);const c=n.getUint32(e-4)-4*4,i=r.decode(a.slice(e+12,e+12+c)),f=JSON.parse(i);o(f);return}e-=1}}else{console.error("Unknown magic: "+n.getUint32(0)),o();return}},s.readAsArrayBuffer(t)})}function $({mediaLocalPath:t,size:o,autoPlay:s,hideBrokenImage:l,onBrokenLink:a}){const[n,r]=h.useState(!0);return h.useEffect(()=>{l&&(async()=>{try{if(!(await fetch(`/workspace/view_media?filename=${t}`)).ok)throw new Error("Media not found");r(!0)}catch{r(!1),a==null||a()}})()},[]),n?E(t)?p.jsx(C,{borderRadius:3,boxSize:`${o}px`,objectFit:"cover",src:`/workspace/view_media?filename=${t}`,alt:"workflow image renamed or moved from output folder"}):p.jsx("video",{width:o,height:o,src:`/workspace/view_media?filename=${t}`,loop:!0,autoPlay:s??!1,muted:!0,children:p.jsx("track",{kind:"captions"})}):null}export{R as I,$ as M,V as S,F as a,G as b,O as g,N as i}; diff --git a/dist/workspace_web/RecentFilesDrawer-lxFpPifg.js b/dist/workspace_web/RecentFilesDrawer-lxFpPifg.js deleted file mode 100644 index 92ad057..0000000 --- a/dist/workspace_web/RecentFilesDrawer-lxFpPifg.js +++ /dev/null @@ -1,18 +0,0 @@ -import{f as De,l as Bn,o as $n,j as S,g as ze,h as Ke,W as Ur,r as R,D as jt,v as Un,b as Hr,i as Ne,I as Xe,M as gt,L as bt,N as yt,O as xt,R as wt,Q as St,B as Ce,X as Qt,Y as ct,q as Wr,S as Zr,U as Gr,Z as nt,$ as Yr,a0 as Kr,a1 as Xr,a2 as Hn,a3 as qr,a4 as ie,a5 as ae,a6 as Jr,a7 as Wn,V as se,a8 as Qr,a9 as fn}from"./input.js";import{b as ei,a as ti,u as Zn,c as ni,d as ri,e as ii,S as ai,M as Gn,f as si,g as oi,h as Ie,H as be,I as xe,t as We,i as Yn,j as He,T as ke,k as at,l as Oe,R as $e,m as li,n as ui,B as de,F as rt,o as Te,p as pn,v as ci,q as qe,r as st,s as Ae,w as di,D as Kn,x as ye,y as en,z as Xn,A as tn,C as hi,E as qn,G as Be,J as fi,K as pi,L as mi,N as nn,O as vi,P as gi,Q as Ft,U as Ze,V as Ht,W as bi,X as yi,Y as xi,Z as wi,_ as Si,$ as _i,a0 as Ci,a1 as rn,a2 as ki,a3 as Oi,a4 as mn,a5 as Ii,a6 as Ei,a7 as Pi,a8 as Tt}from"./App-jF2-L8lr.js";import{C as ot}from"./chunk-JARCRF6W-71z2fzu3.js";import{V as vn}from"./chunk-NTCQBYKE-5Z1buvob.js";import{S as Mi,g as ji,I as Di,M as zi}from"./MediaPreview--EU0VBUV.js";import{app as dt}from"/scripts/app.js";import"/scripts/api.js";var Jn=De(function(e,n){const{borderLeftWidth:a,borderBottomWidth:t,borderTopWidth:i,borderRightWidth:s,borderWidth:r,borderStyle:l,borderColor:c,...f}=Bn("Divider",e),{className:p,orientation:y="horizontal",__css:u,...g}=$n(e),d={vertical:{borderLeftWidth:a||s||r||"1px",height:"100%"},horizontal:{borderBottomWidth:t||i||r||"1px",width:"100%"}};return S.jsx(ze.hr,{ref:n,"aria-orientation":y,...g,__css:{...f,border:"0",borderColor:c,borderStyle:l,...d[y],...u},className:Ke("chakra-divider",p)})});Jn.displayName="Divider";function Ri(o,e={}){const{ssr:n=!0,fallback:a}=e,{getWindow:t}=Ur(),i=Array.isArray(o)?o:[o];let s=Array.isArray(a)?a:[a];s=s.filter(c=>c!=null);const[r,l]=R.useState(()=>i.map((c,f)=>({media:c,matches:n?!!s[f]:t().matchMedia(c).matches})));return R.useEffect(()=>{const c=t();l(i.map(y=>({media:y,matches:c.matchMedia(y).matches})));const f=i.map(y=>c.matchMedia(y)),p=y=>{l(u=>u.slice().map(g=>g.media===y.media?{...g,matches:y.matches}:g))};return f.forEach(y=>{typeof y.addListener=="function"?y.addListener(p):y.addEventListener("change",p)}),()=>{f.forEach(y=>{typeof y.removeListener=="function"?y.removeListener(p):y.removeEventListener("change",p)})}},[t]),r.map(c=>c.matches)}function Fi(o,e,n=ei){let a=Object.keys(o).indexOf(e);if(a!==-1)return o[e];let t=n.indexOf(e);for(;t>=0;){const i=n[t];if(o.hasOwnProperty(i)){a=t;break}t-=1}if(a!==-1){const i=n[a];return o[i]}}function Ti(o){var e,n;const a=Un(o)?o:{fallback:o??"base"},i=jt().__breakpoints.details.map(({minMaxQuery:c,breakpoint:f})=>({breakpoint:f,query:c.replace("@media screen and ","")})),s=i.map(c=>c.breakpoint===a.fallback),l=Ri(i.map(c=>c.query),{fallback:s,ssr:a.ssr}).findIndex(c=>c==!0);return(n=(e=i[l])==null?void 0:e.breakpoint)!=null?n:a.fallback}function Ai(o,e){var n;const a=Un(e)?e:{fallback:e??"base"},t=Ti(a),i=jt();if(!t)return;const s=Array.from(((n=i.__breakpoints)==null?void 0:n.keys)||[]),r=Array.isArray(o)?Object.fromEntries(Object.entries(ti(o,s)).map(([l,c])=>[l,c])):o;return Fi(r,t,s)}var Qn=De((o,e)=>{const{title:n,children:a,className:t,...i}=o,s=Ke("chakra-menu__group__title",t),r=Zn();return S.jsxs("div",{ref:e,className:"chakra-menu__group",role:"group",children:[n&&S.jsx(ze.p,{className:s,...i,__css:r.groupTitle,children:n}),a]})});Qn.displayName="MenuGroup";var er=o=>{const{className:e,title:n,...a}=o,t=ni(a);return S.jsx(Qn,{title:n,className:Ke("chakra-menu__option-group",e),...t})};er.displayName="MenuOptionGroup";var Li=De((o,e)=>{const n=Zn();return S.jsx(ze.button,{ref:e,...o,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...n.button}})}),Dt=De((o,e)=>{const{children:n,as:a,...t}=o,i=ri(t,e),s=a||Li;return S.jsx(s,{...i,className:Ke("chakra-menu__menu-button",o.className),children:S.jsx(ze.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:o.children})})});Dt.displayName="MenuButton";var Vi=o=>S.jsx("svg",{viewBox:"0 0 14 14",width:"1em",height:"1em",...o,children:S.jsx("polygon",{fill:"currentColor",points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})}),an=De((o,e)=>{const{icon:n,iconSpacing:a="0.75rem",...t}=o,i=ii(t,e);return S.jsxs(ai,{...i,className:Ke("chakra-menu__menuitem-option",t.className),children:[n!==null&&S.jsx(Gn,{fontSize:"0.8em",marginEnd:a,opacity:o.isChecked?1:0,children:n||S.jsx(Vi,{})}),S.jsx("span",{style:{flex:1},children:i.children})]})});an.id="MenuItemOption";an.displayName="MenuItemOption";var tr=De(function(e,n){const{getHeaderProps:a}=si(),t=oi();return S.jsx(ze.header,{...a(e,n),className:Ke("chakra-popover__header",e.className),__css:t.header})});tr.displayName="PopoverHeader";var[Ni,nr]=Hr({name:"TagStylesContext",errorMessage:`useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),sn=De((o,e)=>{const n=Ne("Tag",o),a=$n(o),t={display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%",...n.container};return S.jsx(Ni,{value:n,children:S.jsx(ze.span,{ref:e,...a,__css:t})})});sn.displayName="Tag";var Bi=De((o,e)=>{const n=nr();return S.jsx(ze.span,{ref:e,noOfLines:1,...o,__css:n.label})});Bi.displayName="TagLabel";var $i=De((o,e)=>S.jsx(Xe,{ref:e,verticalAlign:"top",marginEnd:"0.5rem",...o}));$i.displayName="TagLeftIcon";var Ui=De((o,e)=>S.jsx(Xe,{ref:e,verticalAlign:"top",marginStart:"0.5rem",...o}));Ui.displayName="TagRightIcon";var rr=o=>S.jsx(Xe,{verticalAlign:"inherit",viewBox:"0 0 512 512",...o,children:S.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})});rr.displayName="TagCloseIcon";var Hi=De((o,e)=>{const{isDisabled:n,children:a,...t}=o,s={display:"flex",alignItems:"center",justifyContent:"center",outline:"0",...nr().closeButton};return S.jsx(ze.button,{ref:e,"aria-label":"close",...t,type:"button",disabled:n,__css:s,children:a||S.jsx(rr,{})})});Hi.displayName="TagCloseButton";var Wi=Ie("chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]),Zi=Ie("edit","IconEdit",[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]]),gn=Ie("file-import","IconFileImport",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 13v-8a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-5.5m-9.5 -2h7m-3 -3l3 3l-3 3",key:"svg-1"}]]),Gi=Ie("file","IconFile",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}]]),ir=Ie("folder-plus","IconFolderPlus",[["path",{d:"M12 19h-7a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v3.5",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}]]),Yi=Ie("list-check","IconListCheck",[["path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5",key:"svg-0"}],["path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5",key:"svg-1"}],["path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5",key:"svg-2"}],["path",{d:"M11 6l9 0",key:"svg-3"}],["path",{d:"M11 12l9 0",key:"svg-4"}],["path",{d:"M11 18l9 0",key:"svg-5"}]]),Ki=Ie("menu-2","IconMenu2",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]]),Xi=Ie("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),qi=Ie("pencil","IconPencil",[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]]),Ji=Ie("search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]),Qi=Ie("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),ea=Ie("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),ar=Ie("tag","IconTag",[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]]);function ta({onclose:o}){const[e,n]=R.useState([]),a=async()=>{var i;const t=await((i=We)==null?void 0:i.listAll());n(t??[])};return R.useEffect(()=>{a()},[]),S.jsxs(gt,{isOpen:!0,onClose:o,children:[S.jsx(bt,{}),S.jsxs(yt,{children:[S.jsx(xt,{children:"My Tags"}),S.jsx(wt,{}),S.jsx(St,{children:e.map(t=>S.jsxs(be,{children:[S.jsx(sn,{children:t.name}),S.jsx(xe,{onClick:async()=>{var i;await((i=We)==null?void 0:i.delete(t.name)),a()},"aria-label":"delete-tag",colorScheme:"red",variant:"ghost",icon:S.jsx(Yn,{})})]}))})]})]})}function na(){const[o,e]=R.useState(""),[n,a]=R.useState(!1),t=()=>a(!0),i=()=>a(!1),s=async l=>{var f;l.preventDefault();let c="";l.ctrlKey&&(c+="Control+"),l.shiftKey&&(c+="Shift+"),l.altKey&&(c+="Alt+"),c.length>0&&!["Control","Shift","Alt"].includes(l.key)&&(c+=l.key.toUpperCase(),await((f=Oe)==null?void 0:f.upsert({shortcuts:{save:c}})),r())},r=()=>{var l;(l=Oe)==null||l.getSetting("shortcuts").then(c=>{var f;e((c==null?void 0:c.save)??((f=Oe)==null?void 0:f.defaultSettings.shortcuts))})};return R.useEffect(()=>{r()},[]),S.jsxs(He,{children:[S.jsx(ke,{children:"Keyboard Shortcut - Save current workflow"}),n&&S.jsx(ke,{color:"gray.500",children:"Press shortcut key combinations to setup"}),S.jsx(at,{value:o,onKeyDown:s,onFocus:t,onBlur:i,placeholder:"Press a key combination",readOnly:!0})]})}function ra(){const[o,e]=R.useState(!1),n=()=>{var a;(a=Oe)==null||a.getSetting("autoSave").then(t=>{e(!!t)})};return R.useEffect(()=>{n()},[]),S.jsx(He,{children:S.jsx(ot,{isChecked:o,onChange:async a=>{var t;await((t=Oe)==null?void 0:t.upsert({autoSave:a.target.checked})),n()},children:"Enable auto save workflow"})})}function ia(){const{setRefreshFolderStamp:o}=R.useContext($e),[e,n]=R.useState(!1),a=()=>{var i;(i=Oe)==null||i.getSetting("foldersOnTop").then(s=>{n(!!s)})},t=i=>{var r;const s=i.target.checked;(r=Oe)==null||r.upsert({foldersOnTop:s}).then(()=>{a(),o(Date.now())})};return R.useEffect(()=>{a()},[]),S.jsx(He,{children:S.jsx(ot,{isChecked:e,onChange:t,children:"Folders always on top"})})}function aa(){const[o,e]=R.useState(!1),n=()=>{var a;(a=Oe)==null||a.getSetting("twoWaySync").then(t=>{e(!!t)})};return R.useEffect(()=>{n()},[]),S.jsxs(He,{children:[S.jsx(ke,{color:"GrayText",children:"If true this will auto detect when you have new .json files added to your workspace saving directory in your disk and automatically import them into your workspace for you"}),S.jsx(ot,{isChecked:o,onChange:async a=>{var t;await((t=Oe)==null?void 0:t.upsert({twoWaySync:a.target.checked})),n()},children:"Enable two way sync (Experimental)"})]})}function sa({onClose:o}){const[e,n]=R.useState(!1),[a,t]=R.useState(!1),[i,s]=R.useState(""),[r,l]=R.useState([]),[c,f]=R.useState([]),[p,y]=R.useState(!1),u=R.useRef(null),g=li();R.useEffect(()=>{var E;(E=Oe)==null||E.getSetting("myWorkflowsDir").then(D=>{s(D)})},[]);const d=async E=>{const{dir_path:D="",dir_contents:j=[],error:U=""}=await pn(E??"");return U.includes("Operation not permitted")?(y(!0),m(),{isError:!0}):{dirList:j,dirPath:D}},b=async()=>{const{isError:E=!1,dirList:D=[]}=await d(i);E||(f(D),t(!0),l(i&&i.split("/").filter(j=>!!j)||[]))},m=()=>{t(!1),n(!1),l([])},x=async E=>{var U,q;if(E){const{error:O=""}=await pn(E);if(O.includes("Not a directory")){g({title:"The directory address you entered is invalid, please re-enter it.",status:"warning",duration:5e3,position:"top",isClosable:!0});return}}const D=E??`/${r.join("/")}`;await((U=Oe)==null?void 0:U.upsert({myWorkflowsDir:D}));const j=await((q=Oe)==null?void 0:q.getSetting("myWorkflowsDir"))??"";s(j),E&&y(!1),m(),ci()},w=async()=>{const{dirPath:E,dirList:D}=await d("");l(E.split("/").filter(j=>!!j)),f(D)},C=async(E,D)=>{var O;let j="";E===-1&&D?j=`/${r.concat([D]).join("/")}`:j=`/${r.slice(0,E+1).join("/")}`;const{isError:U=!1,dirList:q=[]}=await d(j);U||(f(q),l((O=j.slice(1))==null?void 0:O.split("/")))},I=()=>{t(!0),n(!0)},P=S.jsxs(de,{textAlign:"end",mb:4,children:[S.jsx(at,{placeholder:"Please enter the absolute path directory address",ref:u,mt:2,mb:2}),S.jsx(Ce,{colorScheme:"teal",mr:3,size:"sm",onClick:()=>{var E,D;(E=u==null?void 0:u.current)!=null&&E.value&&x((D=u==null?void 0:u.current)==null?void 0:D.value)},children:"Save"})]});return S.jsxs(S.Fragment,{children:[S.jsxs(gt,{isOpen:!0,onClose:o,size:"xl",children:[S.jsx(bt,{}),S.jsxs(yt,{children:[S.jsx(xt,{children:"Settings"}),S.jsx(wt,{}),S.jsx(St,{pb:14,children:S.jsx(be,{children:S.jsxs(vn,{divider:S.jsx(ui,{borderColor:"gray.500"}),spacing:4,align:"stretch",w:"100%",children:[S.jsxs(de,{mb:4,children:[S.jsx(ke,{mb:2,fontWeight:500,children:"Workspace Save Directory"}),a?e?P:S.jsxs(vn,{spacing:2,alignItems:"start",children:[S.jsx(He,{spacing:"2px",direction:"row",wrap:"wrap",children:r.map((E,D)=>S.jsxs(S.Fragment,{children:["/",S.jsx(Ce,{colorScheme:"teal",variant:"link",minW:1,onClick:()=>{C(D)},children:E},`${E}-${D}`)]}))}),S.jsx(Mi,{columns:2,spacing:3,maxHeight:500,width:"100%",overflowY:"auto",children:c.map((E,D)=>S.jsx(Ce,{size:"sm",leftIcon:S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#EFC54D",style:{width:"1.2rem",height:"1.2rem"},children:S.jsx("path",{d:"M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"})}),justifyContent:"start",onClick:()=>{C(-1,E)},children:E},`${E}-${D}`))}),S.jsxs(de,{w:"100%",textAlign:"end",children:[S.jsx(Ce,{colorScheme:"teal",size:"sm",onClick:()=>{x()},children:"Save"}),S.jsx(Ce,{size:"sm",onClick:w,mr:2,ml:2,children:"Reset"}),S.jsx(Ce,{size:"sm",onClick:m,children:"Cancel"})]})]}):S.jsxs(rt,{children:[S.jsx(sn,{overflowWrap:"anywhere",children:i}),S.jsx(Te,{label:"Choose folder",children:S.jsx(xe,{"aria-label":"Select folder",size:"sm",ml:2,icon:S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#EFC54D",style:{width:"1.4rem",height:"1.4srem"},children:S.jsx("path",{d:"M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"})}),onClick:b})}),S.jsx(Te,{label:"Input absolute path",children:S.jsx(xe,{"aria-label":"Enter folder address",size:"sm",ml:2,icon:S.jsx(Zi,{size:19}),onClick:I,variant:"ghost"})})]})]}),S.jsx(na,{}),S.jsx(ra,{}),S.jsx(aa,{}),S.jsx(ia,{})]})})})]})]}),S.jsxs(gt,{isOpen:p,onClose:()=>y(!1),size:"xl",children:[S.jsx(bt,{}),S.jsxs(yt,{children:[S.jsx(xt,{children:"Kind tips"}),S.jsx(wt,{}),S.jsx(St,{children:S.jsxs(de,{children:[navigator.userAgent.indexOf("Mac OS X")!==-1?S.jsxs(ke,{fontWeight:500,children:["There is no permission to access the folder. You need to grant full disk access permission to the terminal that starts the ComfyUI program. For details, refer to the",S.jsx(Ce,{colorScheme:"teal",variant:"link",as:"a",ml:2,target:"_block",href:`https://stackoverflow.com/questions/58479686/permissionerror-errno-1-operation-not-permitted-after-macos - -catalina-update`,children:"Document"}),", or you can manually enter the absolute path of the folder in the input box below to save."]}):S.jsx(ke,{fontWeight:500,children:"You do not have permission to access the folder. It is recommended that you manually enter the absolute path address of the required folder."}),P]})})]})]})]})}const At=16;function oa({}){const[o,e]=R.useState(!1),[n,a]=R.useState(!1),{colorMode:t,toggleColorMode:i}=Qt();return S.jsxs(S.Fragment,{children:[S.jsxs(qe,{isLazy:!0,children:[S.jsx(Dt,{as:xe,"aria-label":"Options",icon:S.jsx(Ki,{}),size:"sm",variant:"outline"}),S.jsxs(st,{children:[S.jsx(Ae,{onClick:()=>a(!0),icon:S.jsx(Qi,{size:16}),fontSize:16,children:"Settings"}),S.jsx(Ae,{onClick:()=>e(!0),icon:S.jsx(ar,{size:At}),fontSize:16,children:"Manage Tags"}),S.jsxs(Ae,{onClick:i,icon:t==="light"?S.jsx(Xi,{size:At}):S.jsx(ea,{size:At}),fontSize:16,children:[t==="light"?"Dark":"Light"," Mode"]})]})]}),o&&S.jsx(ta,{onclose:()=>e(!1)}),n&&S.jsx(sa,{onClose:()=>a(!1)})]})}function ht(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var sr={exports:{}};/*! - -JSZip v3.10.1 - A JavaScript class for generating and reading zip files - - -(c) 2009-2016 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. - -JSZip uses the library pako released under the MIT license : -https://github.com/nodeca/pako/blob/main/LICENSE -*/(function(o,e){(function(n){o.exports=n()})(function(){return function n(a,t,i){function s(c,f){if(!t[c]){if(!a[c]){var p=typeof ht=="function"&&ht;if(!f&&p)return p(c,!0);if(r)return r(c,!0);var y=new Error("Cannot find module '"+c+"'");throw y.code="MODULE_NOT_FOUND",y}var u=t[c]={exports:{}};a[c][0].call(u.exports,function(g){var d=a[c][1][g];return s(d||g)},u,u.exports,n,a,t,i)}return t[c].exports}for(var r=typeof ht=="function"&&ht,l=0;l>2,u=(3&c)<<4|f>>4,g=1>6:64,d=2>4,f=(15&y)<<4|(u=r.indexOf(l.charAt(d++)))>>2,p=(3&u)<<6|(g=r.indexOf(l.charAt(d++))),x[b++]=c,u!==64&&(x[b++]=f),g!==64&&(x[b++]=p);return x}},{"./support":30,"./utils":32}],2:[function(n,a,t){var i=n("./external"),s=n("./stream/DataWorker"),r=n("./stream/Crc32Probe"),l=n("./stream/DataLengthProbe");function c(f,p,y,u,g){this.compressedSize=f,this.uncompressedSize=p,this.crc32=y,this.compression=u,this.compressedContent=g}c.prototype={getContentWorker:function(){var f=new s(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),p=this;return f.on("end",function(){if(this.streamInfo.data_length!==p.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new s(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(f,p,y){return f.pipe(new r).pipe(new l("uncompressedSize")).pipe(p.compressWorker(y)).pipe(new l("compressedSize")).withStreamInfo("compression",p)},a.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,a,t){var i=n("./stream/GenericWorker");t.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},t.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,a,t){var i=n("./utils"),s=function(){for(var r,l=[],c=0;c<256;c++){r=c;for(var f=0;f<8;f++)r=1&r?3988292384^r>>>1:r>>>1;l[c]=r}return l}();a.exports=function(r,l){return r!==void 0&&r.length?i.getTypeOf(r)!=="string"?function(c,f,p,y){var u=s,g=y+p;c^=-1;for(var d=y;d>>8^u[255&(c^f[d])];return-1^c}(0|l,r,r.length,0):function(c,f,p,y){var u=s,g=y+p;c^=-1;for(var d=y;d>>8^u[255&(c^f.charCodeAt(d))];return-1^c}(0|l,r,r.length,0):0}},{"./utils":32}],5:[function(n,a,t){t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},{}],6:[function(n,a,t){var i=null;i=typeof Promise<"u"?Promise:n("lie"),a.exports={Promise:i}},{lie:37}],7:[function(n,a,t){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=n("pako"),r=n("./utils"),l=n("./stream/GenericWorker"),c=i?"uint8array":"array";function f(p,y){l.call(this,"FlateWorker/"+p),this._pako=null,this._pakoAction=p,this._pakoOptions=y,this.meta={}}t.magic="\b\0",r.inherits(f,l),f.prototype.processChunk=function(p){this.meta=p.meta,this._pako===null&&this._createPako(),this._pako.push(r.transformTo(c,p.data),!1)},f.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var p=this;this._pako.onData=function(y){p.push({data:y,meta:p.meta})}},t.compressWorker=function(p){return new f("Deflate",p)},t.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,a,t){function i(u,g){var d,b="";for(d=0;d>>=8;return b}function s(u,g,d,b,m,x){var w,C,I=u.file,P=u.compression,E=x!==c.utf8encode,D=r.transformTo("string",x(I.name)),j=r.transformTo("string",c.utf8encode(I.name)),U=I.comment,q=r.transformTo("string",x(U)),O=r.transformTo("string",c.utf8encode(U)),L=j.length!==I.name.length,v=O.length!==U.length,N="",te="",A="",J=I.dir,B=I.date,K={crc32:0,compressedSize:0,uncompressedSize:0};g&&!d||(K.crc32=u.crc32,K.compressedSize=u.compressedSize,K.uncompressedSize=u.uncompressedSize);var T=0;g&&(T|=8),E||!L&&!v||(T|=2048);var z=0,ee=0;J&&(z|=16),m==="UNIX"?(ee=798,z|=function(Z,ce){var he=Z;return Z||(he=ce?16893:33204),(65535&he)<<16}(I.unixPermissions,J)):(ee=20,z|=function(Z){return 63&(Z||0)}(I.dosPermissions)),w=B.getUTCHours(),w<<=6,w|=B.getUTCMinutes(),w<<=5,w|=B.getUTCSeconds()/2,C=B.getUTCFullYear()-1980,C<<=4,C|=B.getUTCMonth()+1,C<<=5,C|=B.getUTCDate(),L&&(te=i(1,1)+i(f(D),4)+j,N+="up"+i(te.length,2)+te),v&&(A=i(1,1)+i(f(q),4)+O,N+="uc"+i(A.length,2)+A);var X="";return X+=` -\0`,X+=i(T,2),X+=P.magic,X+=i(w,2),X+=i(C,2),X+=i(K.crc32,4),X+=i(K.compressedSize,4),X+=i(K.uncompressedSize,4),X+=i(D.length,2),X+=i(N.length,2),{fileRecord:p.LOCAL_FILE_HEADER+X+D+N,dirRecord:p.CENTRAL_FILE_HEADER+i(ee,2)+X+i(q.length,2)+"\0\0\0\0"+i(z,4)+i(b,4)+D+N+q}}var r=n("../utils"),l=n("../stream/GenericWorker"),c=n("../utf8"),f=n("../crc32"),p=n("../signature");function y(u,g,d,b){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=d,this.encodeFileName=b,this.streamFiles=u,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}r.inherits(y,l),y.prototype.push=function(u){var g=u.meta.percent||0,d=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(u):(this.bytesWritten+=u.data.length,l.prototype.push.call(this,{data:u.data,meta:{currentFile:this.currentFile,percent:d?(g+100*(d-b-1))/d:100}}))},y.prototype.openedSource=function(u){this.currentSourceOffset=this.bytesWritten,this.currentFile=u.file.name;var g=this.streamFiles&&!u.file.dir;if(g){var d=s(u,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:d.fileRecord,meta:{percent:0}})}else this.accumulate=!0},y.prototype.closedSource=function(u){this.accumulate=!1;var g=this.streamFiles&&!u.file.dir,d=s(u,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(d.dirRecord),g)this.push({data:function(b){return p.DATA_DESCRIPTOR+i(b.crc32,4)+i(b.compressedSize,4)+i(b.uncompressedSize,4)}(u),meta:{percent:100}});else for(this.push({data:d.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},y.prototype.flush=function(){for(var u=this.bytesWritten,g=0;g=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=r,c},readString:function(r){return i.transformTo("string",this.readData(r))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var r=this.readInt(4);return new Date(Date.UTC(1980+(r>>25&127),(r>>21&15)-1,r>>16&31,r>>11&31,r>>5&63,(31&r)<<1))}},a.exports=s},{"../utils":32}],19:[function(n,a,t){var i=n("./Uint8ArrayReader");function s(r){i.call(this,r)}n("../utils").inherits(s,i),s.prototype.readData=function(r){this.checkOffset(r);var l=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,l},a.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,a,t){var i=n("./DataReader");function s(r){i.call(this,r)}n("../utils").inherits(s,i),s.prototype.byteAt=function(r){return this.data.charCodeAt(this.zero+r)},s.prototype.lastIndexOfSignature=function(r){return this.data.lastIndexOf(r)-this.zero},s.prototype.readAndCheckSignature=function(r){return r===this.readData(4)},s.prototype.readData=function(r){this.checkOffset(r);var l=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,l},a.exports=s},{"../utils":32,"./DataReader":18}],21:[function(n,a,t){var i=n("./ArrayReader");function s(r){i.call(this,r)}n("../utils").inherits(s,i),s.prototype.readData=function(r){if(this.checkOffset(r),r===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+r);return this.index+=r,l},a.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(n,a,t){var i=n("../utils"),s=n("../support"),r=n("./ArrayReader"),l=n("./StringReader"),c=n("./NodeBufferReader"),f=n("./Uint8ArrayReader");a.exports=function(p){var y=i.getTypeOf(p);return i.checkSupport(y),y!=="string"||s.uint8array?y==="nodebuffer"?new c(p):s.uint8array?new f(i.transformTo("uint8array",p)):new r(i.transformTo("array",p)):new l(p)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,a,t){t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,a,t){var i=n("./GenericWorker"),s=n("../utils");function r(l){i.call(this,"ConvertWorker to "+l),this.destType=l}s.inherits(r,i),r.prototype.processChunk=function(l){this.push({data:s.transformTo(this.destType,l.data),meta:l.meta})},a.exports=r},{"../utils":32,"./GenericWorker":28}],25:[function(n,a,t){var i=n("./GenericWorker"),s=n("../crc32");function r(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(r,i),r.prototype.processChunk=function(l){this.streamInfo.crc32=s(l.data,this.streamInfo.crc32||0),this.push(l)},a.exports=r},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,a,t){var i=n("../utils"),s=n("./GenericWorker");function r(l){s.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(r,s),r.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}s.prototype.processChunk.call(this,l)},a.exports=r},{"../utils":32,"./GenericWorker":28}],27:[function(n,a,t){var i=n("../utils"),s=n("./GenericWorker");function r(l){s.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(f){c.dataIsReady=!0,c.data=f,c.max=f&&f.length||0,c.type=i.getTypeOf(f),c.isPaused||c._tickAndRepeat()},function(f){c.error(f)})}i.inherits(r,s),r.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},r.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},r.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},r.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},a.exports=r},{"../utils":32,"./GenericWorker":28}],28:[function(n,a,t){function i(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,r){return this._listeners[s].push(r),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,r){if(this._listeners[s])for(var l=0;l "+s:s}},a.exports=i},{}],29:[function(n,a,t){var i=n("../utils"),s=n("./ConvertWorker"),r=n("./GenericWorker"),l=n("../base64"),c=n("../support"),f=n("../external"),p=null;if(c.nodestream)try{p=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function y(g,d){return new f.Promise(function(b,m){var x=[],w=g._internalType,C=g._outputType,I=g._mimeType;g.on("data",function(P,E){x.push(P),d&&d(E)}).on("error",function(P){x=[],m(P)}).on("end",function(){try{var P=function(E,D,j){switch(E){case"blob":return i.newBlob(i.transformTo("arraybuffer",D),j);case"base64":return l.encode(D);default:return i.transformTo(E,D)}}(C,function(E,D){var j,U=0,q=null,O=0;for(j=0;j"u")t.blob=!1;else{var i=new ArrayBuffer(0);try{t.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(i),t.blob=s.getBlob("application/zip").size===0}catch{t.blob=!1}}}try{t.nodestream=!!n("readable-stream").Readable}catch{t.nodestream=!1}},{"readable-stream":16}],31:[function(n,a,t){for(var i=n("./utils"),s=n("./support"),r=n("./nodejsUtils"),l=n("./stream/GenericWorker"),c=new Array(256),f=0;f<256;f++)c[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;c[254]=c[254]=1;function p(){l.call(this,"utf-8 decode"),this.leftOver=null}function y(){l.call(this,"utf-8 encode")}t.utf8encode=function(u){return s.nodebuffer?r.newBufferFrom(u,"utf-8"):function(g){var d,b,m,x,w,C=g.length,I=0;for(x=0;x>>6:(b<65536?d[w++]=224|b>>>12:(d[w++]=240|b>>>18,d[w++]=128|b>>>12&63),d[w++]=128|b>>>6&63),d[w++]=128|63&b);return d}(u)},t.utf8decode=function(u){return s.nodebuffer?i.transformTo("nodebuffer",u).toString("utf-8"):function(g){var d,b,m,x,w=g.length,C=new Array(2*w);for(d=b=0;d>10&1023,C[b++]=56320|1023&m)}return C.length!==b&&(C.subarray?C=C.subarray(0,b):C.length=b),i.applyFromCharCode(C)}(u=i.transformTo(s.uint8array?"uint8array":"array",u))},i.inherits(p,l),p.prototype.processChunk=function(u){var g=i.transformTo(s.uint8array?"uint8array":"array",u.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var d=g;(g=new Uint8Array(d.length+this.leftOver.length)).set(this.leftOver,0),g.set(d,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var b=function(x,w){var C;for((w=w||x.length)>x.length&&(w=x.length),C=w-1;0<=C&&(192&x[C])==128;)C--;return C<0||C===0?w:C+c[x[C]]>w?C:w}(g),m=g;b!==g.length&&(s.uint8array?(m=g.subarray(0,b),this.leftOver=g.subarray(b,g.length)):(m=g.slice(0,b),this.leftOver=g.slice(b,g.length))),this.push({data:t.utf8decode(m),meta:u.meta})},p.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=p,i.inherits(y,l),y.prototype.processChunk=function(u){this.push({data:t.utf8encode(u.data),meta:u.meta})},t.Utf8EncodeWorker=y},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,a,t){var i=n("./support"),s=n("./base64"),r=n("./nodejsUtils"),l=n("./external");function c(d){return d}function f(d,b){for(var m=0;m>8;this.dir=!!(16&this.externalFileAttributes),u==0&&(this.dosPermissions=63&this.externalFileAttributes),u==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var u=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=u.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=u.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=u.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=u.readInt(4))}},readExtraFields:function(u){var g,d,b,m=u.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});u.index+4>>6:(u<65536?y[b++]=224|u>>>12:(y[b++]=240|u>>>18,y[b++]=128|u>>>12&63),y[b++]=128|u>>>6&63),y[b++]=128|63&u);return y},t.buf2binstring=function(p){return f(p,p.length)},t.binstring2buf=function(p){for(var y=new i.Buf8(p.length),u=0,g=y.length;u>10&1023,x[g++]=56320|1023&d)}return f(x,g)},t.utf8border=function(p,y){var u;for((y=y||p.length)>p.length&&(y=p.length),u=y-1;0<=u&&(192&p[u])==128;)u--;return u<0||u===0?y:u+l[p[u]]>y?u:y}},{"./common":41}],43:[function(n,a,t){a.exports=function(i,s,r,l){for(var c=65535&i|0,f=i>>>16&65535|0,p=0;r!==0;){for(r-=p=2e3>>1:s>>>1;r[l]=s}return r}();a.exports=function(s,r,l,c){var f=i,p=c+l;s^=-1;for(var y=c;y>>8^f[255&(s^r[y])];return-1^s}},{}],46:[function(n,a,t){var i,s=n("../utils/common"),r=n("./trees"),l=n("./adler32"),c=n("./crc32"),f=n("./messages"),p=0,y=4,u=0,g=-2,d=-1,b=4,m=2,x=8,w=9,C=286,I=30,P=19,E=2*C+1,D=15,j=3,U=258,q=U+j+1,O=42,L=113,v=1,N=2,te=3,A=4;function J(h,$){return h.msg=f[$],$}function B(h){return(h<<1)-(4h.avail_out&&(V=h.avail_out),V!==0&&(s.arraySet(h.output,$.pending_buf,$.pending_out,V,h.next_out),h.next_out+=V,$.pending_out+=V,h.total_out+=V,h.avail_out-=V,$.pending-=V,$.pending===0&&($.pending_out=0))}function z(h,$){r._tr_flush_block(h,0<=h.block_start?h.block_start:-1,h.strstart-h.block_start,$),h.block_start=h.strstart,T(h.strm)}function ee(h,$){h.pending_buf[h.pending++]=$}function X(h,$){h.pending_buf[h.pending++]=$>>>8&255,h.pending_buf[h.pending++]=255&$}function Z(h,$){var V,k,_=h.max_chain_length,M=h.strstart,H=h.prev_length,W=h.nice_match,F=h.strstart>h.w_size-q?h.strstart-(h.w_size-q):0,G=h.window,Q=h.w_mask,Y=h.prev,ne=h.strstart+U,fe=G[M+H-1],ue=G[M+H];h.prev_length>=h.good_match&&(_>>=2),W>h.lookahead&&(W=h.lookahead);do if(G[(V=$)+H]===ue&&G[V+H-1]===fe&&G[V]===G[M]&&G[++V]===G[M+1]){M+=2,V++;do;while(G[++M]===G[++V]&&G[++M]===G[++V]&&G[++M]===G[++V]&&G[++M]===G[++V]&&G[++M]===G[++V]&&G[++M]===G[++V]&&G[++M]===G[++V]&&G[++M]===G[++V]&&MF&&--_!=0);return H<=h.lookahead?H:h.lookahead}function ce(h){var $,V,k,_,M,H,W,F,G,Q,Y=h.w_size;do{if(_=h.window_size-h.lookahead-h.strstart,h.strstart>=Y+(Y-q)){for(s.arraySet(h.window,h.window,Y,Y,0),h.match_start-=Y,h.strstart-=Y,h.block_start-=Y,$=V=h.hash_size;k=h.head[--$],h.head[$]=Y<=k?k-Y:0,--V;);for($=V=Y;k=h.prev[--$],h.prev[$]=Y<=k?k-Y:0,--V;);_+=Y}if(h.strm.avail_in===0)break;if(H=h.strm,W=h.window,F=h.strstart+h.lookahead,G=_,Q=void 0,Q=H.avail_in,G=j)for(M=h.strstart-h.insert,h.ins_h=h.window[M],h.ins_h=(h.ins_h<=j&&(h.ins_h=(h.ins_h<=j)if(k=r._tr_tally(h,h.strstart-h.match_start,h.match_length-j),h.lookahead-=h.match_length,h.match_length<=h.max_lazy_match&&h.lookahead>=j){for(h.match_length--;h.strstart++,h.ins_h=(h.ins_h<=j&&(h.ins_h=(h.ins_h<=j&&h.match_length<=h.prev_length){for(_=h.strstart+h.lookahead-j,k=r._tr_tally(h,h.strstart-1-h.prev_match,h.prev_length-j),h.lookahead-=h.prev_length-1,h.prev_length-=2;++h.strstart<=_&&(h.ins_h=(h.ins_h<h.pending_buf_size-5&&(V=h.pending_buf_size-5);;){if(h.lookahead<=1){if(ce(h),h.lookahead===0&&$===p)return v;if(h.lookahead===0)break}h.strstart+=h.lookahead,h.lookahead=0;var k=h.block_start+V;if((h.strstart===0||h.strstart>=k)&&(h.lookahead=h.strstart-k,h.strstart=k,z(h,!1),h.strm.avail_out===0)||h.strstart-h.block_start>=h.w_size-q&&(z(h,!1),h.strm.avail_out===0))return v}return h.insert=0,$===y?(z(h,!0),h.strm.avail_out===0?te:A):(h.strstart>h.block_start&&(z(h,!1),h.strm.avail_out),v)}),new le(4,4,8,4,he),new le(4,5,16,8,he),new le(4,6,32,32,he),new le(4,4,16,16,oe),new le(8,16,32,32,oe),new le(8,16,128,128,oe),new le(8,32,128,256,oe),new le(32,128,258,1024,oe),new le(32,258,258,4096,oe)],t.deflateInit=function(h,$){return _e(h,$,x,15,8,0)},t.deflateInit2=_e,t.deflateReset=Se,t.deflateResetKeep=pe,t.deflateSetHeader=function(h,$){return h&&h.state?h.state.wrap!==2?g:(h.state.gzhead=$,u):g},t.deflate=function(h,$){var V,k,_,M;if(!h||!h.state||5<$||$<0)return h?J(h,g):g;if(k=h.state,!h.output||!h.input&&h.avail_in!==0||k.status===666&&$!==y)return J(h,h.avail_out===0?-5:g);if(k.strm=h,V=k.last_flush,k.last_flush=$,k.status===O)if(k.wrap===2)h.adler=0,ee(k,31),ee(k,139),ee(k,8),k.gzhead?(ee(k,(k.gzhead.text?1:0)+(k.gzhead.hcrc?2:0)+(k.gzhead.extra?4:0)+(k.gzhead.name?8:0)+(k.gzhead.comment?16:0)),ee(k,255&k.gzhead.time),ee(k,k.gzhead.time>>8&255),ee(k,k.gzhead.time>>16&255),ee(k,k.gzhead.time>>24&255),ee(k,k.level===9?2:2<=k.strategy||k.level<2?4:0),ee(k,255&k.gzhead.os),k.gzhead.extra&&k.gzhead.extra.length&&(ee(k,255&k.gzhead.extra.length),ee(k,k.gzhead.extra.length>>8&255)),k.gzhead.hcrc&&(h.adler=c(h.adler,k.pending_buf,k.pending,0)),k.gzindex=0,k.status=69):(ee(k,0),ee(k,0),ee(k,0),ee(k,0),ee(k,0),ee(k,k.level===9?2:2<=k.strategy||k.level<2?4:0),ee(k,3),k.status=L);else{var H=x+(k.w_bits-8<<4)<<8;H|=(2<=k.strategy||k.level<2?0:k.level<6?1:k.level===6?2:3)<<6,k.strstart!==0&&(H|=32),H+=31-H%31,k.status=L,X(k,H),k.strstart!==0&&(X(k,h.adler>>>16),X(k,65535&h.adler)),h.adler=1}if(k.status===69)if(k.gzhead.extra){for(_=k.pending;k.gzindex<(65535&k.gzhead.extra.length)&&(k.pending!==k.pending_buf_size||(k.gzhead.hcrc&&k.pending>_&&(h.adler=c(h.adler,k.pending_buf,k.pending-_,_)),T(h),_=k.pending,k.pending!==k.pending_buf_size));)ee(k,255&k.gzhead.extra[k.gzindex]),k.gzindex++;k.gzhead.hcrc&&k.pending>_&&(h.adler=c(h.adler,k.pending_buf,k.pending-_,_)),k.gzindex===k.gzhead.extra.length&&(k.gzindex=0,k.status=73)}else k.status=73;if(k.status===73)if(k.gzhead.name){_=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>_&&(h.adler=c(h.adler,k.pending_buf,k.pending-_,_)),T(h),_=k.pending,k.pending===k.pending_buf_size)){M=1;break}M=k.gzindex_&&(h.adler=c(h.adler,k.pending_buf,k.pending-_,_)),M===0&&(k.gzindex=0,k.status=91)}else k.status=91;if(k.status===91)if(k.gzhead.comment){_=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>_&&(h.adler=c(h.adler,k.pending_buf,k.pending-_,_)),T(h),_=k.pending,k.pending===k.pending_buf_size)){M=1;break}M=k.gzindex_&&(h.adler=c(h.adler,k.pending_buf,k.pending-_,_)),M===0&&(k.status=103)}else k.status=103;if(k.status===103&&(k.gzhead.hcrc?(k.pending+2>k.pending_buf_size&&T(h),k.pending+2<=k.pending_buf_size&&(ee(k,255&h.adler),ee(k,h.adler>>8&255),h.adler=0,k.status=L)):k.status=L),k.pending!==0){if(T(h),h.avail_out===0)return k.last_flush=-1,u}else if(h.avail_in===0&&B($)<=B(V)&&$!==y)return J(h,-5);if(k.status===666&&h.avail_in!==0)return J(h,-5);if(h.avail_in!==0||k.lookahead!==0||$!==p&&k.status!==666){var W=k.strategy===2?function(F,G){for(var Q;;){if(F.lookahead===0&&(ce(F),F.lookahead===0)){if(G===p)return v;break}if(F.match_length=0,Q=r._tr_tally(F,0,F.window[F.strstart]),F.lookahead--,F.strstart++,Q&&(z(F,!1),F.strm.avail_out===0))return v}return F.insert=0,G===y?(z(F,!0),F.strm.avail_out===0?te:A):F.last_lit&&(z(F,!1),F.strm.avail_out===0)?v:N}(k,$):k.strategy===3?function(F,G){for(var Q,Y,ne,fe,ue=F.window;;){if(F.lookahead<=U){if(ce(F),F.lookahead<=U&&G===p)return v;if(F.lookahead===0)break}if(F.match_length=0,F.lookahead>=j&&0F.lookahead&&(F.match_length=F.lookahead)}if(F.match_length>=j?(Q=r._tr_tally(F,1,F.match_length-j),F.lookahead-=F.match_length,F.strstart+=F.match_length,F.match_length=0):(Q=r._tr_tally(F,0,F.window[F.strstart]),F.lookahead--,F.strstart++),Q&&(z(F,!1),F.strm.avail_out===0))return v}return F.insert=0,G===y?(z(F,!0),F.strm.avail_out===0?te:A):F.last_lit&&(z(F,!1),F.strm.avail_out===0)?v:N}(k,$):i[k.level].func(k,$);if(W!==te&&W!==A||(k.status=666),W===v||W===te)return h.avail_out===0&&(k.last_flush=-1),u;if(W===N&&($===1?r._tr_align(k):$!==5&&(r._tr_stored_block(k,0,0,!1),$===3&&(K(k.head),k.lookahead===0&&(k.strstart=0,k.block_start=0,k.insert=0))),T(h),h.avail_out===0))return k.last_flush=-1,u}return $!==y?u:k.wrap<=0?1:(k.wrap===2?(ee(k,255&h.adler),ee(k,h.adler>>8&255),ee(k,h.adler>>16&255),ee(k,h.adler>>24&255),ee(k,255&h.total_in),ee(k,h.total_in>>8&255),ee(k,h.total_in>>16&255),ee(k,h.total_in>>24&255)):(X(k,h.adler>>>16),X(k,65535&h.adler)),T(h),0=V.w_size&&(M===0&&(K(V.head),V.strstart=0,V.block_start=0,V.insert=0),G=new s.Buf8(V.w_size),s.arraySet(G,$,Q-V.w_size,V.w_size,0),$=G,Q=V.w_size),H=h.avail_in,W=h.next_in,F=h.input,h.avail_in=Q,h.next_in=0,h.input=$,ce(V);V.lookahead>=j;){for(k=V.strstart,_=V.lookahead-(j-1);V.ins_h=(V.ins_h<>>=j=D>>>24,w-=j,(j=D>>>16&255)===0)N[f++]=65535&D;else{if(!(16&j)){if(!(64&j)){D=C[(65535&D)+(x&(1<>>=j,w-=j),w<15&&(x+=v[l++]<>>=j=D>>>24,w-=j,!(16&(j=D>>>16&255))){if(!(64&j)){D=I[(65535&D)+(x&(1<>>=j,w-=j,(j=f-p)>3,x&=(1<<(w-=U<<3))-1,i.next_in=l,i.next_out=f,i.avail_in=l>>24&255)+(O>>>8&65280)+((65280&O)<<8)+((255&O)<<24)}function x(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(O){var L;return O&&O.state?(L=O.state,O.total_in=O.total_out=L.total=0,O.msg="",L.wrap&&(O.adler=1&L.wrap),L.mode=g,L.last=0,L.havedict=0,L.dmax=32768,L.head=null,L.hold=0,L.bits=0,L.lencode=L.lendyn=new i.Buf32(d),L.distcode=L.distdyn=new i.Buf32(b),L.sane=1,L.back=-1,y):u}function C(O){var L;return O&&O.state?((L=O.state).wsize=0,L.whave=0,L.wnext=0,w(O)):u}function I(O,L){var v,N;return O&&O.state?(N=O.state,L<0?(v=0,L=-L):(v=1+(L>>4),L<48&&(L&=15)),L&&(L<8||15=A.wsize?(i.arraySet(A.window,L,v-A.wsize,A.wsize,0),A.wnext=0,A.whave=A.wsize):(N<(te=A.wsize-A.wnext)&&(te=N),i.arraySet(A.window,L,v-N,te,A.wnext),(N-=te)?(i.arraySet(A.window,L,v-N,N,0),A.wnext=N,A.whave=A.wsize):(A.wnext+=te,A.wnext===A.wsize&&(A.wnext=0),A.whave>>8&255,v.check=r(v.check,M,2,0),z=T=0,v.mode=2;break}if(v.flags=0,v.head&&(v.head.done=!1),!(1&v.wrap)||(((255&T)<<8)+(T>>8))%31){O.msg="incorrect header check",v.mode=30;break}if((15&T)!=8){O.msg="unknown compression method",v.mode=30;break}if(z-=4,h=8+(15&(T>>>=4)),v.wbits===0)v.wbits=h;else if(h>v.wbits){O.msg="invalid window size",v.mode=30;break}v.dmax=1<>8&1),512&v.flags&&(M[0]=255&T,M[1]=T>>>8&255,v.check=r(v.check,M,2,0)),z=T=0,v.mode=3;case 3:for(;z<32;){if(B===0)break e;B--,T+=N[A++]<>>8&255,M[2]=T>>>16&255,M[3]=T>>>24&255,v.check=r(v.check,M,4,0)),z=T=0,v.mode=4;case 4:for(;z<16;){if(B===0)break e;B--,T+=N[A++]<>8),512&v.flags&&(M[0]=255&T,M[1]=T>>>8&255,v.check=r(v.check,M,2,0)),z=T=0,v.mode=5;case 5:if(1024&v.flags){for(;z<16;){if(B===0)break e;B--,T+=N[A++]<>>8&255,v.check=r(v.check,M,2,0)),z=T=0}else v.head&&(v.head.extra=null);v.mode=6;case 6:if(1024&v.flags&&(B<(Z=v.length)&&(Z=B),Z&&(v.head&&(h=v.head.extra_len-v.length,v.head.extra||(v.head.extra=new Array(v.head.extra_len)),i.arraySet(v.head.extra,N,A,Z,h)),512&v.flags&&(v.check=r(v.check,N,Z,A)),B-=Z,A+=Z,v.length-=Z),v.length))break e;v.length=0,v.mode=7;case 7:if(2048&v.flags){if(B===0)break e;for(Z=0;h=N[A+Z++],v.head&&h&&v.length<65536&&(v.head.name+=String.fromCharCode(h)),h&&Z>9&1,v.head.done=!0),O.adler=v.check=0,v.mode=12;break;case 10:for(;z<32;){if(B===0)break e;B--,T+=N[A++]<>>=7&z,z-=7&z,v.mode=27;break}for(;z<3;){if(B===0)break e;B--,T+=N[A++]<>>=1)){case 0:v.mode=14;break;case 1:if(U(v),v.mode=20,L!==6)break;T>>>=2,z-=2;break e;case 2:v.mode=17;break;case 3:O.msg="invalid block type",v.mode=30}T>>>=2,z-=2;break;case 14:for(T>>>=7&z,z-=7&z;z<32;){if(B===0)break e;B--,T+=N[A++]<>>16^65535)){O.msg="invalid stored block lengths",v.mode=30;break}if(v.length=65535&T,z=T=0,v.mode=15,L===6)break e;case 15:v.mode=16;case 16:if(Z=v.length){if(B>>=5,z-=5,v.ndist=1+(31&T),T>>>=5,z-=5,v.ncode=4+(15&T),T>>>=4,z-=4,286>>=3,z-=3}for(;v.have<19;)v.lens[H[v.have++]]=0;if(v.lencode=v.lendyn,v.lenbits=7,V={bits:v.lenbits},$=c(0,v.lens,0,19,v.lencode,0,v.work,V),v.lenbits=V.bits,$){O.msg="invalid code lengths set",v.mode=30;break}v.have=0,v.mode=19;case 19:for(;v.have>>16&255,ge=65535&_,!((oe=_>>>24)<=z);){if(B===0)break e;B--,T+=N[A++]<>>=oe,z-=oe,v.lens[v.have++]=ge;else{if(ge===16){for(k=oe+2;z>>=oe,z-=oe,v.have===0){O.msg="invalid bit length repeat",v.mode=30;break}h=v.lens[v.have-1],Z=3+(3&T),T>>>=2,z-=2}else if(ge===17){for(k=oe+3;z>>=oe)),T>>>=3,z-=3}else{for(k=oe+7;z>>=oe)),T>>>=7,z-=7}if(v.have+Z>v.nlen+v.ndist){O.msg="invalid bit length repeat",v.mode=30;break}for(;Z--;)v.lens[v.have++]=h}}if(v.mode===30)break;if(v.lens[256]===0){O.msg="invalid code -- missing end-of-block",v.mode=30;break}if(v.lenbits=9,V={bits:v.lenbits},$=c(f,v.lens,0,v.nlen,v.lencode,0,v.work,V),v.lenbits=V.bits,$){O.msg="invalid literal/lengths set",v.mode=30;break}if(v.distbits=6,v.distcode=v.distdyn,V={bits:v.distbits},$=c(p,v.lens,v.nlen,v.ndist,v.distcode,0,v.work,V),v.distbits=V.bits,$){O.msg="invalid distances set",v.mode=30;break}if(v.mode=20,L===6)break e;case 20:v.mode=21;case 21:if(6<=B&&258<=K){O.next_out=J,O.avail_out=K,O.next_in=A,O.avail_in=B,v.hold=T,v.bits=z,l(O,X),J=O.next_out,te=O.output,K=O.avail_out,A=O.next_in,N=O.input,B=O.avail_in,T=v.hold,z=v.bits,v.mode===12&&(v.back=-1);break}for(v.back=0;le=(_=v.lencode[T&(1<>>16&255,ge=65535&_,!((oe=_>>>24)<=z);){if(B===0)break e;B--,T+=N[A++]<>pe)])>>>16&255,ge=65535&_,!(pe+(oe=_>>>24)<=z);){if(B===0)break e;B--,T+=N[A++]<>>=pe,z-=pe,v.back+=pe}if(T>>>=oe,z-=oe,v.back+=oe,v.length=ge,le===0){v.mode=26;break}if(32&le){v.back=-1,v.mode=12;break}if(64&le){O.msg="invalid literal/length code",v.mode=30;break}v.extra=15&le,v.mode=22;case 22:if(v.extra){for(k=v.extra;z>>=v.extra,z-=v.extra,v.back+=v.extra}v.was=v.length,v.mode=23;case 23:for(;le=(_=v.distcode[T&(1<>>16&255,ge=65535&_,!((oe=_>>>24)<=z);){if(B===0)break e;B--,T+=N[A++]<>pe)])>>>16&255,ge=65535&_,!(pe+(oe=_>>>24)<=z);){if(B===0)break e;B--,T+=N[A++]<>>=pe,z-=pe,v.back+=pe}if(T>>>=oe,z-=oe,v.back+=oe,64&le){O.msg="invalid distance code",v.mode=30;break}v.offset=ge,v.extra=15&le,v.mode=24;case 24:if(v.extra){for(k=v.extra;z>>=v.extra,z-=v.extra,v.back+=v.extra}if(v.offset>v.dmax){O.msg="invalid distance too far back",v.mode=30;break}v.mode=25;case 25:if(K===0)break e;if(Z=X-K,v.offset>Z){if((Z=v.offset-Z)>v.whave&&v.sane){O.msg="invalid distance too far back",v.mode=30;break}ce=Z>v.wnext?(Z-=v.wnext,v.wsize-Z):v.wnext-Z,Z>v.length&&(Z=v.length),he=v.window}else he=te,ce=J-v.offset,Z=v.length;for(KE?(j=ce[he+b[L]],z[ee+b[L]]):(j=96,0),x=1<>J)+(w-=x)]=D<<24|j<<16|U|0,w!==0;);for(x=1<>=1;if(x!==0?(T&=x-1,T+=x):T=0,L++,--X[O]==0){if(O===N)break;O=p[y+b[L]]}if(te>>7)]}function ee(_,M){_.pending_buf[_.pending++]=255&M,_.pending_buf[_.pending++]=M>>>8&255}function X(_,M,H){_.bi_valid>m-H?(_.bi_buf|=M<<_.bi_valid&65535,ee(_,_.bi_buf),_.bi_buf=M>>m-_.bi_valid,_.bi_valid+=H-m):(_.bi_buf|=M<<_.bi_valid&65535,_.bi_valid+=H)}function Z(_,M,H){X(_,H[2*M],H[2*M+1])}function ce(_,M){for(var H=0;H|=1&_,_>>>=1,H<<=1,0<--M;);return H>>>1}function he(_,M,H){var W,F,G=new Array(b+1),Q=0;for(W=1;W<=b;W++)G[W]=Q=Q+H[W-1]<<1;for(F=0;F<=M;F++){var Y=_[2*F+1];Y!==0&&(_[2*F]=ce(G[Y]++,Y))}}function oe(_){var M;for(M=0;M>1;1<=H;H--)pe(_,G,H);for(F=ne;H=_.heap[1],_.heap[1]=_.heap[_.heap_len--],pe(_,G,1),W=_.heap[1],_.heap[--_.heap_max]=H,_.heap[--_.heap_max]=W,G[2*F]=G[2*H]+G[2*W],_.depth[F]=(_.depth[H]>=_.depth[W]?_.depth[H]:_.depth[W])+1,G[2*H+1]=G[2*W+1]=F,_.heap[1]=F++,pe(_,G,1),2<=_.heap_len;);_.heap[--_.heap_max]=_.heap[1],function(ue,Ee){var Je,Fe,Qe,ve,lt,Rt,Le=Ee.dyn_tree,dn=Ee.max_code,Nr=Ee.stat_desc.static_tree,Br=Ee.stat_desc.has_stree,$r=Ee.stat_desc.extra_bits,hn=Ee.stat_desc.extra_base,et=Ee.stat_desc.max_length,ut=0;for(ve=0;ve<=b;ve++)ue.bl_count[ve]=0;for(Le[2*ue.heap[ue.heap_max]+1]=0,Je=ue.heap_max+1;Je>=7;F>>=1)if(1&fe&&Y.dyn_ltree[2*ne]!==0)return s;if(Y.dyn_ltree[18]!==0||Y.dyn_ltree[20]!==0||Y.dyn_ltree[26]!==0)return r;for(ne=32;ne>>3,(G=_.static_len+3+7>>>3)<=F&&(F=G)):F=G=H+5,H+4<=F&&M!==-1?k(_,M,H,W):_.strategy===4||G===F?(X(_,2+(W?1:0),3),Se(_,q,O)):(X(_,4+(W?1:0),3),function(Y,ne,fe,ue){var Ee;for(X(Y,ne-257,5),X(Y,fe-1,5),X(Y,ue-4,4),Ee=0;Ee>>8&255,_.pending_buf[_.d_buf+2*_.last_lit+1]=255&M,_.pending_buf[_.l_buf+_.last_lit]=255&H,_.last_lit++,M===0?_.dyn_ltree[2*H]++:(_.matches++,M--,_.dyn_ltree[2*(v[H]+p+1)]++,_.dyn_dtree[2*z(M)]++),_.last_lit===_.lit_bufsize-1},t._tr_align=function(_){X(_,2,3),Z(_,w,q),function(M){M.bi_valid===16?(ee(M,M.bi_buf),M.bi_buf=0,M.bi_valid=0):8<=M.bi_valid&&(M.pending_buf[M.pending++]=255&M.bi_buf,M.bi_buf>>=8,M.bi_valid-=8)}(_)}},{"../utils/common":41}],53:[function(n,a,t){a.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,a,t){(function(i){(function(s,r){if(!s.setImmediate){var l,c,f,p,y=1,u={},g=!1,d=s.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(s);b=b&&b.setTimeout?b:s,l={}.toString.call(s.process)==="[object process]"?function(C){process.nextTick(function(){x(C)})}:function(){if(s.postMessage&&!s.importScripts){var C=!0,I=s.onmessage;return s.onmessage=function(){C=!1},s.postMessage("","*"),s.onmessage=I,C}}()?(p="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",w,!1):s.attachEvent("onmessage",w),function(C){s.postMessage(p+C,"*")}):s.MessageChannel?((f=new MessageChannel).port1.onmessage=function(C){x(C.data)},function(C){f.port2.postMessage(C)}):d&&"onreadystatechange"in d.createElement("script")?(c=d.documentElement,function(C){var I=d.createElement("script");I.onreadystatechange=function(){x(C),I.onreadystatechange=null,c.removeChild(I),I=null},c.appendChild(I)}):function(C){setTimeout(x,0,C)},b.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var I=new Array(arguments.length-1),P=0;P"u"?i===void 0?this:i:self)}).call(this,typeof ct<"u"?ct:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(sr);var la=sr.exports;const ua=Wr(la);function ca(o){const{multipleState:e,changeMultipleState:n,selectedKeys:a,isSelectedAll:t,batchOperationCallback:i}=o,s=async()=>{var y;const l=await((y=ye)==null?void 0:y.batchQuery(a)),c=`ComfyUI workflow ${Xn(Date.now())}`,f=new ua,p=f.folder(c);l&&l.forEach(u=>{p&&p.file(`${u.name}.json`,u.json)}),f.generateAsync({type:"blob"}).then(function(u){const g=document.createElement("a");g.href=window.URL.createObjectURL(u),g.download=`${c}.zip`,document.body.appendChild(g),g.click(),document.body.removeChild(g)})},r=a.length===0;return S.jsx(be,{spacing:2,wrap:"wrap",mb:0,children:e?S.jsxs(S.Fragment,{children:[S.jsx(ot,{isChecked:t,onChange:l=>{i("selectAll",l.target.checked)}}),S.jsx(Te,{hasArrow:!0,label:"Download Zip",placement:"bottom",children:S.jsx(xe,{isDisabled:r,"aria-label":"Batch export",size:"sm",icon:S.jsx(di,{size:21}),onClick:s})}),S.jsx(Te,{hasArrow:!0,label:"Batch deletion",children:S.jsx(Kn,{isDisabled:r,variant:"solid",promptMessage:`Are you sure you want to delete these ${a.length} checked workflows?`,tooltipText:"Delete selected",onDelete:async()=>{var l;await((l=ye)==null?void 0:l.batchDeleteFlow(a)),i("batchDelete")}})}),a.length>0&&S.jsx(ke,{fontWeight:600,children:`Selected ${a.length}`}),S.jsx(Te,{hasArrow:!0,label:"Exit multi-select",children:S.jsx(xe,{"aria-label":"Close multi-select operation",size:"sm",icon:S.jsx(en,{}),onClick:()=>{n(!1)}})})]}):S.jsx(Te,{hasArrow:!0,label:"Select multiple",placement:"bottom-start",children:S.jsx(xe,{"aria-label":"Start multi-select operation",size:"sm",variant:"outline",icon:S.jsx(Yi,{size:21}),onClick:()=>{n(!0)}})})})}function da(o,e){var d,b;const n=JSON.parse(o),a=n.nodes,t=n.links,i=LiteGraph.LLink,s={};let r=app.graph.last_node_id;for(let m=0;mn.nodes[f].pos[0]&&(p[0]=n.nodes[f].pos[0],y[0]=f),p[1]>n.nodes[f].pos[1]&&(p[1]=n.nodes[f].pos[1],y[1]=f)):(p=[n.nodes[f].pos[0],n.nodes[f].pos[1]],y=[f,f]);const u=[],g={};for(var f=0;f{P.link=l[P.link]}),(b=w.outputs)==null||b.forEach(P=>{var E;P.links=(E=P.links)==null?void 0:E.map(D=>l[D])});const C=e?[e[0]-11,e[1]-11]:app.canvas.graph_mouse;w.pos[0]+=C[0]-p[0],w.pos[1]+=C[1]-p[1];let I=LiteGraph.createNode(w.type);I||(LiteGraph.debug&&console.log("Node not found or has errors: "+w.type),I=new LGraphNode,I.last_serialization=w,I.has_errors=!0),I.id=w.id,app.graph.add(I,!0),u.push(I),g[I.id]=w}u.forEach(m=>{m.configure(g[m.id])})}const ha=(o,e)=>{const[n,a]=R.useState(o);return R.useEffect(()=>{const t=setTimeout(()=>{a(o)},e);return()=>{clearTimeout(t)}},[o,e]),n},fa={position:"absolute",marginLeft:"10px",width:"20px",height:"20px",top:"50%",color:"#A0AEC0",transform:"translateY(-50%)"};function pa(o){const{searchValue:e,onUpdateSearchValue:n}=o,a=e!=="";return S.jsxs(de,{style:{position:"relative"},mb:2,children:[S.jsx(Ji,{style:fa}),a&&S.jsx(xe,{size:"xs",position:"absolute",right:"5px",top:"50%",transform:"translateY(-50%)",cursor:"pointer",background:"none",zIndex:"100",icon:S.jsx(en,{width:15,height:15}),onClick:()=>n(""),"aria-label":"clear input button"}),S.jsx(at,{placeholder:"Search",size:"sm",paddingLeft:"35px",paddingBlock:"5px",value:e,onChange:({target:t})=>n(t.value)})]})}const bn=6;function ma({setSelectedTag:o,selectedTag:e}){const[n,a]=R.useState(!1),[t,i]=R.useState([]);return R.useEffect(()=>{var s;(s=We)==null||s.listAll().then(r=>{i(r)})},[]),S.jsxs(be,{spacing:2,wrap:"wrap",mb:0,children:[e!=null&&S.jsx(xe,{"aria-label":"Close",size:"sm",icon:S.jsx(en,{}),onClick:()=>{o(void 0)}}),t.slice(0,n?void 0:bn).map(s=>S.jsx(Ce,{variant:"solid",width:"auto",flexShrink:0,size:"sm",borderRadius:15,py:4,onClick:()=>{o(s.name)},isActive:e===s.name,children:s.name},s.name)),(t.length??0)>bn&&S.jsx(xe,{"aria-label":"Show-all-tags",size:"sm",icon:n?S.jsx(Wi,{}):S.jsx(tn,{}),onClick:()=>a(!n)})]})}function or({parentFolderID:o,onlyImportFile:e=!1}){const{onRefreshFilesList:n}=R.useContext($e),[a,t]=R.useState("file"),i=R.useRef(null),s=f=>{var p;t(f),f==="folder"?i.current.setAttribute("webkitdirectory",""):i.current.removeAttribute("webkitdirectory"),(p=i.current)==null||p.click()},r=async f=>{var p;if(f.type==="image/png"){const y=await ji(f),u=y==null?void 0:y.workflow;if(u)return{json:u,name:f.name.replace(".png","")}}else if(f.type==="application/json"||(p=f.name)!=null&&p.endsWith(".json"))return await new Promise((y,u)=>{const g=new FileReader;g.onload=d=>{var b;try{const m=(b=d.target)==null?void 0:b.result;typeof m=="string"?y({json:m,name:f.name.replace(".json","")}):u(new Error("File content is not a string"))}catch(m){u(m)}},g.onerror=u,g.readAsText(f)});return null},l=async f=>{var y,u;const p=[f];for(;p.length>0;){const g=p.shift();if(g&&!g.isFile){const d=await((y=Be)==null?void 0:y.create({name:g.name,parentFolderID:g.parentFolderID}));if(g.children&&g.children.length){const b=[];g.children.forEach(m=>{m.isFile&&m.file?b.push(m.file):(m.parentFolderID=d==null?void 0:d.id,p.push(m))}),b.length&&await((u=ye)==null?void 0:u.batchCreateFlows(b,void 0,d==null?void 0:d.id))}}}n==null||n()},c=async f=>{var y;const p=f.target.files;if(p)if(a==="folder"){const u={name:p[0].webkitRelativePath.split("/")[0],isFile:!1,children:[]};for(const g of p)if(g.name!==".DS_Store"){const d=g.webkitRelativePath.split("/");let b=u.children??[];for(let m=1;mC.name===x);if(!w){if(w={name:x,isFile:m===d.length-1,children:m===d.length-1?void 0:[]},w.isFile){const C=await r(g);C&&(w.file=C)}b.push(w)}w&&!w.isFile&&(b=w.children)}}l(u)}else{const u=[];for(const g of p){const d=await r(g);d&&u.push(d)}u.length&&(await((y=ye)==null?void 0:y.batchCreateFlows(u,void 0,o)),n&&n())}};return S.jsxs(S.Fragment,{children:[e?S.jsx(Ae,{onClick:f=>{f.stopPropagation(),s("file")},icon:S.jsx(gn,{size:19}),children:"Import workflows"}):S.jsxs(qe,{closeOnSelect:!0,children:[S.jsx(Dt,{as:Ce,leftIcon:S.jsx(gn,{size:18}),variant:"outline",iconSpacing:1,size:"sm",colorScheme:"teal",children:"Import"}),S.jsx(st,{children:hi.map((f,p)=>S.jsx(Ae,{onClick:()=>{s(f.type)},iconSpacing:2,icon:f.type==="folder"?S.jsx(qn,{size:18}):S.jsx(Gi,{size:18}),children:f.title},p))})]}),S.jsx("input",{style:{display:"none"},ref:i,type:"file",accept:".json,image/png",multiple:!0,onChange:c,onClick:f=>{f.stopPropagation()}})]})}function va({folder:o,onclose:e}){const[n,a]=R.useState(o.name),[t,i]=R.useState(""),{onRefreshFilesList:s}=R.useContext($e),r=c=>{a(c.target.value),t&&i("")},l=async()=>{var p,y;const c=n.trim();if(a(c),c===o.name)return e();(await((p=Be)==null?void 0:p.listAll().then(u=>u.map(g=>g.name)))??[]).includes(c)?i("The name is duplicated, please modify it and submit again."):(await((y=Be)==null?void 0:y.update({id:o.id,name:c})),s&&s(),e())};return S.jsxs(gt,{isOpen:!0,onClose:e,children:[S.jsx(bt,{}),S.jsxs(yt,{children:[S.jsx(xt,{children:"Edit folder name"}),S.jsx(wt,{}),S.jsx(St,{children:S.jsxs(fi,{isInvalid:!!t,children:[S.jsx(pi,{children:"Folder name"}),S.jsx(at,{value:n,onChange:r,autoFocus:!0,onKeyUp:c=>{c.code==="Enter"&&!t&&n&&l()}}),t&&S.jsx(mi,{children:t})]})}),S.jsxs(Zr,{children:[S.jsx(Ce,{colorScheme:"teal",mr:3,onClick:l,isDisabled:!n||!!t,children:"Save"}),S.jsx(Ce,{onClick:e,children:"Cancel"})]})]})]})}function ga({menuPosition:o,isopen:e,folder:n,onClose:a}){const[t,i]=R.useState(!1),{onRefreshFilesList:s}=R.useContext($e),{showDialog:r}=Gr(),l=async y=>{var u;y.stopPropagation(),await((u=Be)==null?void 0:u.create({name:"New Folder",parentFolderID:n.id})),s&&s()},c=async y=>{var u;y.stopPropagation(),await((u=ye)==null?void 0:u.createFlow({json:JSON.stringify(vi),parentFolderID:n.id})),s&&s()},f=async y=>{y.stopPropagation();const u=await gi(n.id);u>0?r(`Do you want to delete the ${u} files inside the folder too?`,[{label:"Keep and move to root directory",colorScheme:"teal",onClick:()=>{p(Ft.MOVE_TO_ROOT_FOLDER)}},{label:"Delete all files",colorScheme:"red",onClick:()=>{p(Ft.DELETE)}}]):p(Ft.DELETE)},p=async y=>{var u;await((u=Be)==null?void 0:u.deleteFolder(n.id,y)),a(),s&&s()};return S.jsxs(S.Fragment,{children:[S.jsx(de,{position:"absolute",top:o.y,left:o.x,children:S.jsx(qe,{isOpen:e,onClose:a,isLazy:!0,lazyBehavior:"keepMounted",children:S.jsxs(st,{children:[S.jsx(Ae,{icon:S.jsx(qi,{size:19}),onClick:y=>{y.preventDefault(),y.stopPropagation(),i(!0)},children:"Rename"}),S.jsx(Ae,{icon:S.jsx(Yn,{size:19}),onClick:f,children:"Delete"}),S.jsx(Ae,{onClick:l,icon:S.jsx(ir,{size:19}),children:"New folder"}),S.jsx(Ae,{onClick:c,icon:S.jsx(nn,{size:19}),children:"New file"}),S.jsx(or,{parentFolderID:n.id,onlyImportFile:!0})]})})}),t&&S.jsx(va,{folder:n,onclose:()=>i(!1)})]})}const yn=R.memo(function({folder:e}){const[n,a]=R.useState(!1),[t,i]=R.useState(e.isCollapse??!0),[s,r]=R.useState([]),[l,c]=R.useState({x:0,y:0}),[f,p]=R.useState(!1),{colorMode:y}=Qt(),{draggingFile:u,setDraggingFile:g,refreshFolderStamp:d,onRefreshFilesList:b}=R.useContext($e),m=y==="light"?{backgroundColor:"#E2E8F0"}:{backgroundColor:"#4A5568"};R.useEffect(()=>{var C;(C=ye)==null||C.listFolderContent(e.id,window.localStorage.getItem(Ht)).then(I=>{r(I)})},[e.id,d]);const x=C=>{C.preventDefault(),c({x:C.clientX,y:C.clientY}),p(!0)},w=async C=>{var I,P;if(C.preventDefault(),C.stopPropagation(),!u)return a(!1);if(Ze(u)){if(u.id===e.id)return a(!1);await((I=Be)==null?void 0:I.update({id:u.id,parentFolderID:e.id}))}else Ze(u)||await((P=ye)==null?void 0:P.updateFlow(u.id,{parentFolderID:e.id}));await(b==null?void 0:b()),a(!1)};return R.useEffect(()=>{var C;!!e.isCollapse!==t&&((C=Be)==null||C.update({id:e.id,isCollapse:t}))},[t]),S.jsxs(He,{children:[S.jsxs(be,{w:"100%",as:"button",py:1,onClick:()=>{i(!t)},onContextMenu:x,draggable:"true",onDragOver:C=>{C.preventDefault(),C.stopPropagation(),a(!0)},onDragLeave:C=>{C.preventDefault(),C.stopPropagation(),a(!1)},onDragStart:()=>g==null?void 0:g(e),onDrop:w,_hover:m,style:n||f?m:void 0,className:"droppable",children:[S.jsxs(be,{gap:1,children:[t?S.jsx(Di,{size:20}):S.jsx(tn,{size:20}),S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#EFC54D",style:{width:"1.2rem",height:"1.2rem"},children:S.jsx("path",{d:"M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"})})]}),S.jsx(ke,{children:e.name})]}),S.jsx(ga,{isopen:f,menuPosition:l,onClose:()=>p(!1),folder:e}),!t&&S.jsx(He,{ml:4,gap:0,children:S.jsx(Vr,{items:s})})]})});function xn(o,e){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(o);e&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable})),n.push.apply(n,a)}return n}function re(o){for(var e=1;eo.length)&&(e=o.length);for(var n=0,a=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(o,a)&&(n[a]=o[a])}return n}var wa=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Sa(o){var e=o.defaultInputValue,n=e===void 0?"":e,a=o.defaultMenuIsOpen,t=a===void 0?!1:a,i=o.defaultValue,s=i===void 0?null:i,r=o.inputValue,l=o.menuIsOpen,c=o.onChange,f=o.onInputChange,p=o.onMenuClose,y=o.onMenuOpen,u=o.value,g=Ue(o,wa),d=R.useState(r!==void 0?r:n),b=Ve(d,2),m=b[0],x=b[1],w=R.useState(l!==void 0?l:t),C=Ve(w,2),I=C[0],P=C[1],E=R.useState(u!==void 0?u:s),D=Ve(E,2),j=D[0],U=D[1],q=R.useCallback(function(J,B){typeof c=="function"&&c(J,B),U(J)},[c]),O=R.useCallback(function(J,B){var K;typeof f=="function"&&(K=f(J,B)),x(K!==void 0?K:J)},[f]),L=R.useCallback(function(){typeof y=="function"&&y(),P(!0)},[y]),v=R.useCallback(function(){typeof p=="function"&&p(),P(!1)},[p]),N=r!==void 0?r:m,te=l!==void 0?l:I,A=u!==void 0?u:j;return re(re({},g),{},{inputValue:N,menuIsOpen:te,onChange:q,onInputChange:O,onMenuClose:v,onMenuOpen:L,value:A})}function _a(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function wn(o,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ia(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function Ea(o,e){if(e&&(Hn(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ia(o)}function Pa(o){var e=Oa();return function(){var a=_t(o),t;if(e){var i=_t(this).constructor;t=Reflect.construct(a,arguments,i)}else t=a.apply(this,arguments);return Ea(this,t)}}function Ma(o){if(Array.isArray(o))return Wt(o)}function ja(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}function Da(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ur(o){return Ma(o)||ja(o)||lr(o)||Da()}function za(o,e){return e||(e=o.slice(0)),Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(e)}}))}const Ra=Math.min,Fa=Math.max,Ct=Math.round,ft=Math.floor,kt=o=>({x:o,y:o});function Ta(o){return{...o,top:o.y,left:o.x,right:o.x+o.width,bottom:o.y+o.height}}function cr(o){return hr(o)?(o.nodeName||"").toLowerCase():"#document"}function je(o){var e;return(o==null||(e=o.ownerDocument)==null?void 0:e.defaultView)||window}function dr(o){var e;return(e=(hr(o)?o.ownerDocument:o.document)||window.document)==null?void 0:e.documentElement}function hr(o){return o instanceof Node||o instanceof je(o).Node}function Zt(o){return o instanceof Element||o instanceof je(o).Element}function on(o){return o instanceof HTMLElement||o instanceof je(o).HTMLElement}function Sn(o){return typeof ShadowRoot>"u"?!1:o instanceof ShadowRoot||o instanceof je(o).ShadowRoot}function fr(o){const{overflow:e,overflowX:n,overflowY:a,display:t}=ln(o);return/auto|scroll|overlay|hidden|clip/.test(e+a+n)&&!["inline","contents"].includes(t)}function Aa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function La(o){return["html","body","#document"].includes(cr(o))}function ln(o){return je(o).getComputedStyle(o)}function Va(o){if(cr(o)==="html")return o;const e=o.assignedSlot||o.parentNode||Sn(o)&&o.host||dr(o);return Sn(e)?e.host:e}function pr(o){const e=Va(o);return La(e)?o.ownerDocument?o.ownerDocument.body:o.body:on(e)&&fr(e)?e:pr(e)}function Ot(o,e,n){var a;e===void 0&&(e=[]),n===void 0&&(n=!0);const t=pr(o),i=t===((a=o.ownerDocument)==null?void 0:a.body),s=je(t);return i?e.concat(s,s.visualViewport||[],fr(t)?t:[],s.frameElement&&n?Ot(s.frameElement):[]):e.concat(t,Ot(t,[],n))}function Na(o){const e=ln(o);let n=parseFloat(e.width)||0,a=parseFloat(e.height)||0;const t=on(o),i=t?o.offsetWidth:n,s=t?o.offsetHeight:a,r=Ct(n)!==i||Ct(a)!==s;return r&&(n=i,a=s),{width:n,height:a,$:r}}function un(o){return Zt(o)?o:o.contextElement}function Lt(o){const e=un(o);if(!on(e))return kt(1);const n=e.getBoundingClientRect(),{width:a,height:t,$:i}=Na(e);let s=(i?Ct(n.width):n.width)/a,r=(i?Ct(n.height):n.height)/t;return(!s||!Number.isFinite(s))&&(s=1),(!r||!Number.isFinite(r))&&(r=1),{x:s,y:r}}const Ba=kt(0);function $a(o){const e=je(o);return!Aa()||!e.visualViewport?Ba:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ua(o,e,n){return e===void 0&&(e=!1),!n||e&&n!==je(o)?!1:e}function _n(o,e,n,a){e===void 0&&(e=!1),n===void 0&&(n=!1);const t=o.getBoundingClientRect(),i=un(o);let s=kt(1);e&&(a?Zt(a)&&(s=Lt(a)):s=Lt(o));const r=Ua(i,n,a)?$a(i):kt(0);let l=(t.left+r.x)/s.x,c=(t.top+r.y)/s.y,f=t.width/s.x,p=t.height/s.y;if(i){const y=je(i),u=a&&Zt(a)?je(a):a;let g=y.frameElement;for(;g&&a&&u!==y;){const d=Lt(g),b=g.getBoundingClientRect(),m=ln(g),x=b.left+(g.clientLeft+parseFloat(m.paddingLeft))*d.x,w=b.top+(g.clientTop+parseFloat(m.paddingTop))*d.y;l*=d.x,c*=d.y,f*=d.x,p*=d.y,l+=x,c+=w,g=je(g).frameElement}}return Ta({width:f,height:p,x:l,y:c})}function Ha(o,e){let n=null,a;const t=dr(o);function i(){clearTimeout(a),n&&n.disconnect(),n=null}function s(r,l){r===void 0&&(r=!1),l===void 0&&(l=1),i();const{left:c,top:f,width:p,height:y}=o.getBoundingClientRect();if(r||e(),!p||!y)return;const u=ft(f),g=ft(t.clientWidth-(c+p)),d=ft(t.clientHeight-(f+y)),b=ft(c),x={rootMargin:-u+"px "+-g+"px "+-d+"px "+-b+"px",threshold:Fa(0,Ra(1,l))||1};let w=!0;function C(I){const P=I[0].intersectionRatio;if(P!==l){if(!w)return s();P?s(!1,P):a=setTimeout(()=>{s(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(C,{...x,root:t.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(o)}return s(!0),i}function Wa(o,e,n,a){a===void 0&&(a={});const{ancestorScroll:t=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:r=typeof IntersectionObserver=="function",animationFrame:l=!1}=a,c=un(o),f=t||i?[...c?Ot(c):[],...Ot(e)]:[];f.forEach(m=>{t&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const p=c&&r?Ha(c,n):null;let y=-1,u=null;s&&(u=new ResizeObserver(m=>{let[x]=m;x&&x.target===c&&u&&(u.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{u&&u.observe(e)})),n()}),c&&!l&&u.observe(c),u.observe(e));let g,d=l?_n(o):null;l&&b();function b(){const m=_n(o);d&&(m.x!==d.x||m.y!==d.y||m.width!==d.width||m.height!==d.height)&&n(),d=m,g=requestAnimationFrame(b)}return n(),()=>{f.forEach(m=>{t&&m.removeEventListener("scroll",n),i&&m.removeEventListener("resize",n)}),p&&p(),u&&u.disconnect(),u=null,l&&cancelAnimationFrame(g)}}var Gt=R.useLayoutEffect,Za=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],It=function(){};function Ga(o,e){return e?e[0]==="-"?o+e:o+"__"+e:o}function Ya(o,e){for(var n=arguments.length,a=new Array(n>2?n-2:0),t=2;t-1}function Ka(o){return zt(o)?window.innerHeight:o.clientHeight}function vr(o){return zt(o)?window.pageYOffset:o.scrollTop}function Et(o,e){if(zt(o)){window.scrollTo(0,e);return}o.scrollTop=e}function Xa(o){var e=getComputedStyle(o),n=e.position==="absolute",a=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var t=o;t=t.parentElement;)if(e=getComputedStyle(t),!(n&&e.position==="static")&&a.test(e.overflow+e.overflowY+e.overflowX))return t;return document.documentElement}function qa(o,e,n,a){return n*((o=o/a-1)*o*o+1)+e}function pt(o,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:It,t=vr(o),i=e-t,s=10,r=0;function l(){r+=s;var c=qa(r,t,i,n);Et(o,c),rn.bottom?Et(o,Math.min(e.offsetTop+e.clientHeight-o.offsetHeight+t,o.scrollHeight)):a.top-t1?n-1:0),t=1;t=g)return{placement:"bottom",maxHeight:e};if(j>=g&&!s)return i&&pt(l,U,O),{placement:"bottom",maxHeight:e};if(!s&&j>=a||s&&E>=a){i&&pt(l,U,O);var L=s?E-C:j-C;return{placement:"bottom",maxHeight:L}}if(t==="auto"||s){var v=e,N=s?P:D;return N>=a&&(v=Math.min(N-C-r,e)),{placement:"top",maxHeight:v}}if(t==="bottom")return i&&Et(l,U),{placement:"bottom",maxHeight:e};break;case"top":if(P>=g)return{placement:"top",maxHeight:e};if(D>=g&&!s)return i&&pt(l,q,O),{placement:"top",maxHeight:e};if(!s&&D>=a||s&&P>=a){var te=e;return(!s&&D>=a||s&&P>=a)&&(te=s?P-I:D-I),i&&pt(l,q,O),{placement:"top",maxHeight:te}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(t,'".'))}return c}function ls(o){var e={bottom:"top",top:"bottom"};return o?e[o]:"bottom"}var br=function(e){return e==="auto"?"bottom":e},us=function(e,n){var a,t=e.placement,i=e.theme,s=i.borderRadius,r=i.spacing,l=i.colors;return re((a={label:"menu"},nt(a,ls(t),"100%"),nt(a,"position","absolute"),nt(a,"width","100%"),nt(a,"zIndex",1),a),n?{}:{backgroundColor:l.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:r.menuGutter,marginTop:r.menuGutter})},yr=R.createContext(null),cs=function(e){var n=e.children,a=e.minMenuHeight,t=e.maxMenuHeight,i=e.menuPlacement,s=e.menuPosition,r=e.menuShouldScrollIntoView,l=e.theme,c=R.useContext(yr)||{},f=c.setPortalPlacement,p=R.useRef(null),y=R.useState(t),u=Ve(y,2),g=u[0],d=u[1],b=R.useState(null),m=Ve(b,2),x=m[0],w=m[1],C=l.spacing.controlHeight;return Gt(function(){var I=p.current;if(I){var P=s==="fixed",E=r&&!P,D=os({maxHeight:t,menuEl:I,minHeight:a,placement:i,shouldScroll:E,isFixedPosition:P,controlHeight:C});d(D.maxHeight),w(D.placement),f==null||f(D.placement)}},[t,i,s,r,a,f,C]),n({ref:p,placerProps:re(re({},e),{},{placement:x||br(i),maxHeight:g})})},ds=function(e){var n=e.children,a=e.innerRef,t=e.innerProps;return ie("div",ae({},me(e,"menu",{menu:!0}),{ref:a},t),n)},hs=ds,fs=function(e,n){var a=e.maxHeight,t=e.theme.spacing.baseUnit;return re({maxHeight:a,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:t,paddingTop:t})},ps=function(e){var n=e.children,a=e.innerProps,t=e.innerRef,i=e.isMulti;return ie("div",ae({},me(e,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:t},a),n)},xr=function(e,n){var a=e.theme,t=a.spacing.baseUnit,i=a.colors;return re({textAlign:"center"},n?{}:{color:i.neutral40,padding:"".concat(t*2,"px ").concat(t*3,"px")})},ms=xr,vs=xr,gs=function(e){var n=e.children,a=n===void 0?"No options":n,t=e.innerProps,i=Ue(e,as);return ie("div",ae({},me(re(re({},i),{},{children:a,innerProps:t}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),t),a)},bs=function(e){var n=e.children,a=n===void 0?"Loading...":n,t=e.innerProps,i=Ue(e,ss);return ie("div",ae({},me(re(re({},i),{},{children:a,innerProps:t}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),t),a)},ys=function(e){var n=e.rect,a=e.offset,t=e.position;return{left:n.left,position:t,top:a,width:n.width,zIndex:1}},xs=function(e){var n=e.appendTo,a=e.children,t=e.controlElement,i=e.innerProps,s=e.menuPlacement,r=e.menuPosition,l=R.useRef(null),c=R.useRef(null),f=R.useState(br(s)),p=Ve(f,2),y=p[0],u=p[1],g=R.useMemo(function(){return{setPortalPlacement:u}},[]),d=R.useState(null),b=Ve(d,2),m=b[0],x=b[1],w=R.useCallback(function(){if(t){var E=Ja(t),D=r==="fixed"?0:window.pageYOffset,j=E[y]+D;(j!==(m==null?void 0:m.offset)||E.left!==(m==null?void 0:m.rect.left)||E.width!==(m==null?void 0:m.rect.width))&&x({offset:j,rect:E})}},[t,r,y,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);Gt(function(){w()},[w]);var C=R.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),t&&l.current&&(c.current=Wa(t,l.current,w,{elementResize:"ResizeObserver"in window}))},[t,w]);Gt(function(){C()},[C]);var I=R.useCallback(function(E){l.current=E,C()},[C]);if(!n&&r!=="fixed"||!m)return null;var P=ie("div",ae({ref:I},me(re(re({},e),{},{offset:m.offset,position:r,rect:m.rect}),"menuPortal",{"menu-portal":!0}),i),a);return ie(yr.Provider,{value:g},n?Jr.createPortal(P,n):P)},ws=function(e){var n=e.isDisabled,a=e.isRtl;return{label:"container",direction:a?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},Ss=function(e){var n=e.children,a=e.innerProps,t=e.isDisabled,i=e.isRtl;return ie("div",ae({},me(e,"container",{"--is-disabled":t,"--is-rtl":i}),a),n)},_s=function(e,n){var a=e.theme.spacing,t=e.isMulti,i=e.hasValue,s=e.selectProps.controlShouldRenderValue;return re({alignItems:"center",display:t&&i&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(a.baseUnit/2,"px ").concat(a.baseUnit*2,"px")})},Cs=function(e){var n=e.children,a=e.innerProps,t=e.isMulti,i=e.hasValue;return ie("div",ae({},me(e,"valueContainer",{"value-container":!0,"value-container--is-multi":t,"value-container--has-value":i}),a),n)},ks=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Os=function(e){var n=e.children,a=e.innerProps;return ie("div",ae({},me(e,"indicatorsContainer",{indicators:!0}),a),n)},In,Is=["size"],Es=["innerProps","isRtl","size"],Ps={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},wr=function(e){var n=e.size,a=Ue(e,Is);return ie("svg",ae({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Ps},a))},cn=function(e){return ie(wr,ae({size:20},e),ie("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Sr=function(e){return ie(wr,ae({size:20},e),ie("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},_r=function(e,n){var a=e.isFocused,t=e.theme,i=t.spacing.baseUnit,s=t.colors;return re({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:a?s.neutral60:s.neutral20,padding:i*2,":hover":{color:a?s.neutral80:s.neutral40}})},Ms=_r,js=function(e){var n=e.children,a=e.innerProps;return ie("div",ae({},me(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),a),n||ie(Sr,null))},Ds=_r,zs=function(e){var n=e.children,a=e.innerProps;return ie("div",ae({},me(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),a),n||ie(cn,null))},Rs=function(e,n){var a=e.isDisabled,t=e.theme,i=t.spacing.baseUnit,s=t.colors;return re({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:a?s.neutral10:s.neutral20,marginBottom:i*2,marginTop:i*2})},Fs=function(e){var n=e.innerProps;return ie("span",ae({},n,me(e,"indicatorSeparator",{"indicator-separator":!0})))},Ts=qr(In||(In=za([` - 0%, 80%, 100% { opacity: 0; } - 40% { opacity: 1; } -`]))),As=function(e,n){var a=e.isFocused,t=e.size,i=e.theme,s=i.colors,r=i.spacing.baseUnit;return re({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:t,lineHeight:1,marginRight:t,textAlign:"center",verticalAlign:"middle"},n?{}:{color:a?s.neutral60:s.neutral20,padding:r*2})},Vt=function(e){var n=e.delay,a=e.offset;return ie("span",{css:Wn({animation:"".concat(Ts," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:a?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Ls=function(e){var n=e.innerProps,a=e.isRtl,t=e.size,i=t===void 0?4:t,s=Ue(e,Es);return ie("div",ae({},me(re(re({},s),{},{innerProps:n,isRtl:a,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ie(Vt,{delay:0,offset:a}),ie(Vt,{delay:160,offset:!0}),ie(Vt,{delay:320,offset:!a}))},Vs=function(e,n){var a=e.isDisabled,t=e.isFocused,i=e.theme,s=i.colors,r=i.borderRadius,l=i.spacing;return re({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:a?s.neutral5:s.neutral0,borderColor:a?s.neutral10:t?s.primary:s.neutral20,borderRadius:r,borderStyle:"solid",borderWidth:1,boxShadow:t?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:t?s.primary:s.neutral30}})},Ns=function(e){var n=e.children,a=e.isDisabled,t=e.isFocused,i=e.innerRef,s=e.innerProps,r=e.menuIsOpen;return ie("div",ae({ref:i},me(e,"control",{control:!0,"control--is-disabled":a,"control--is-focused":t,"control--menu-is-open":r}),s,{"aria-disabled":a||void 0}),n)},Bs=Ns,$s=["data"],Us=function(e,n){var a=e.theme.spacing;return n?{}:{paddingBottom:a.baseUnit*2,paddingTop:a.baseUnit*2}},Hs=function(e){var n=e.children,a=e.cx,t=e.getStyles,i=e.getClassNames,s=e.Heading,r=e.headingProps,l=e.innerProps,c=e.label,f=e.theme,p=e.selectProps;return ie("div",ae({},me(e,"group",{group:!0}),l),ie(s,ae({},r,{selectProps:p,theme:f,getStyles:t,getClassNames:i,cx:a}),c),ie("div",null,n))},Ws=function(e,n){var a=e.theme,t=a.colors,i=a.spacing;return re({label:"group",cursor:"default",display:"block"},n?{}:{color:t.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:i.baseUnit*3,paddingRight:i.baseUnit*3,textTransform:"uppercase"})},Zs=function(e){var n=mr(e);n.data;var a=Ue(n,$s);return ie("div",ae({},me(e,"groupHeading",{"group-heading":!0}),a))},Gs=Hs,Ys=["innerRef","isDisabled","isHidden","inputClassName"],Ks=function(e,n){var a=e.isDisabled,t=e.value,i=e.theme,s=i.spacing,r=i.colors;return re(re({visibility:a?"hidden":"visible",transform:t?"translateZ(0)":""},Xs),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:r.neutral80})},Cr={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Xs={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":re({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Cr)},qs=function(e){return re({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Cr)},Js=function(e){var n=e.cx,a=e.value,t=mr(e),i=t.innerRef,s=t.isDisabled,r=t.isHidden,l=t.inputClassName,c=Ue(t,Ys);return ie("div",ae({},me(e,"input",{"input-container":!0}),{"data-value":a||""}),ie("input",ae({className:n({input:!0},l),ref:i,style:qs(r),disabled:s},c)))},Qs=Js,eo=function(e,n){var a=e.theme,t=a.spacing,i=a.borderRadius,s=a.colors;return re({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:i/2,margin:t.baseUnit/2})},to=function(e,n){var a=e.theme,t=a.borderRadius,i=a.colors,s=e.cropWithEllipsis;return re({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:t/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},no=function(e,n){var a=e.theme,t=a.spacing,i=a.borderRadius,s=a.colors,r=e.isFocused;return re({alignItems:"center",display:"flex"},n?{}:{borderRadius:i/2,backgroundColor:r?s.dangerLight:void 0,paddingLeft:t.baseUnit,paddingRight:t.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},kr=function(e){var n=e.children,a=e.innerProps;return ie("div",a,n)},ro=kr,io=kr;function ao(o){var e=o.children,n=o.innerProps;return ie("div",ae({role:"button"},n),e||ie(cn,{size:14}))}var so=function(e){var n=e.children,a=e.components,t=e.data,i=e.innerProps,s=e.isDisabled,r=e.removeProps,l=e.selectProps,c=a.Container,f=a.Label,p=a.Remove;return ie(c,{data:t,innerProps:re(re({},me(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),i),selectProps:l},ie(f,{data:t,innerProps:re({},me(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),ie(p,{data:t,innerProps:re(re({},me(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},r),selectProps:l}))},oo=so,lo=function(e,n){var a=e.isDisabled,t=e.isFocused,i=e.isSelected,s=e.theme,r=s.spacing,l=s.colors;return re({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:i?l.primary:t?l.primary25:"transparent",color:a?l.neutral20:i?l.neutral0:"inherit",padding:"".concat(r.baseUnit*2,"px ").concat(r.baseUnit*3,"px"),":active":{backgroundColor:a?void 0:i?l.primary:l.primary50}})},uo=function(e){var n=e.children,a=e.isDisabled,t=e.isFocused,i=e.isSelected,s=e.innerRef,r=e.innerProps;return ie("div",ae({},me(e,"option",{option:!0,"option--is-disabled":a,"option--is-focused":t,"option--is-selected":i}),{ref:s,"aria-disabled":a},r),n)},co=uo,ho=function(e,n){var a=e.theme,t=a.spacing,i=a.colors;return re({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:i.neutral50,marginLeft:t.baseUnit/2,marginRight:t.baseUnit/2})},fo=function(e){var n=e.children,a=e.innerProps;return ie("div",ae({},me(e,"placeholder",{placeholder:!0}),a),n)},po=fo,mo=function(e,n){var a=e.isDisabled,t=e.theme,i=t.spacing,s=t.colors;return re({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:a?s.neutral40:s.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},vo=function(e){var n=e.children,a=e.isDisabled,t=e.innerProps;return ie("div",ae({},me(e,"singleValue",{"single-value":!0,"single-value--is-disabled":a}),t),n)},go=vo,bo={ClearIndicator:zs,Control:Bs,DropdownIndicator:js,DownChevron:Sr,CrossIcon:cn,Group:Gs,GroupHeading:Zs,IndicatorsContainer:Os,IndicatorSeparator:Fs,Input:Qs,LoadingIndicator:Ls,Menu:hs,MenuList:ps,MenuPortal:xs,LoadingMessage:bs,NoOptionsMessage:gs,MultiValue:oo,MultiValueContainer:ro,MultiValueLabel:io,MultiValueRemove:ao,Option:co,Placeholder:po,SelectContainer:Ss,SingleValue:go,ValueContainer:Cs},yo=function(e){return re(re({},bo),e.components)},En=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function xo(o,e){return!!(o===e||En(o)&&En(e))}function wo(o,e){if(o.length!==e.length)return!1;for(var n=0;n1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return s?"option ".concat(t," is disabled. Select another option."):"option ".concat(t,", selected.");default:return""}},onFocus:function(e){var n=e.context,a=e.focused,t=e.options,i=e.label,s=i===void 0?"":i,r=e.selectValue,l=e.isDisabled,c=e.isSelected,f=function(g,d){return g&&g.length?"".concat(g.indexOf(d)+1," of ").concat(g.length):""};if(n==="value"&&r)return"value ".concat(s," focused, ").concat(f(r,a),".");if(n==="menu"){var p=l?" disabled":"",y="".concat(c?"selected":"focused").concat(p);return"option ".concat(s," ").concat(y,", ").concat(f(t,a),".")}return""},onFilter:function(e){var n=e.inputValue,a=e.resultsMessage;return"".concat(a).concat(n?" for search term "+n:"",".")}},Oo=function(e){var n=e.ariaSelection,a=e.focusedOption,t=e.focusedValue,i=e.focusableOptions,s=e.isFocused,r=e.selectValue,l=e.selectProps,c=e.id,f=l.ariaLiveMessages,p=l.getOptionLabel,y=l.inputValue,u=l.isMulti,g=l.isOptionDisabled,d=l.isSearchable,b=l.menuIsOpen,m=l.options,x=l.screenReaderStatus,w=l.tabSelectsValue,C=l["aria-label"],I=l["aria-live"],P=R.useMemo(function(){return re(re({},ko),f||{})},[f]),E=R.useMemo(function(){var v="";if(n&&P.onChange){var N=n.option,te=n.options,A=n.removedValue,J=n.removedValues,B=n.value,K=function(he){return Array.isArray(he)?null:he},T=A||N||K(B),z=T?p(T):"",ee=te||J||void 0,X=ee?ee.map(p):[],Z=re({isDisabled:T&&g(T,r),label:z,labels:X},n);v=P.onChange(Z)}return v},[n,P,g,r,p]),D=R.useMemo(function(){var v="",N=a||t,te=!!(a&&r&&r.includes(a));if(N&&P.onFocus){var A={focused:N,label:p(N),isDisabled:g(N,r),isSelected:te,options:i,context:N===a?"menu":"value",selectValue:r};v=P.onFocus(A)}return v},[a,t,p,g,P,i,r]),j=R.useMemo(function(){var v="";if(b&&m.length&&P.onFilter){var N=x({count:i.length});v=P.onFilter({inputValue:y,resultsMessage:N})}return v},[i,y,b,P,m,x]),U=R.useMemo(function(){var v="";if(P.guidance){var N=t?"value":b?"menu":"input";v=P.guidance({"aria-label":C,context:N,isDisabled:a&&g(a,r),isMulti:u,isSearchable:d,tabSelectsValue:w})}return v},[C,a,t,u,g,d,b,P,r,w]),q="".concat(D," ").concat(j," ").concat(U),O=ie(R.Fragment,null,ie("span",{id:"aria-selection"},E),ie("span",{id:"aria-context"},q)),L=(n==null?void 0:n.action)==="initial-input-focus";return ie(R.Fragment,null,ie(Pn,{id:c},L&&O),ie(Pn,{"aria-live":I,"aria-atomic":"false","aria-relevant":"additions text"},s&&!L&&O))},Io=Oo,Yt=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Eo=new RegExp("["+Yt.map(function(o){return o.letters}).join("")+"]","g"),Or={};for(var Nt=0;Nt-1}},Do=["innerRef"];function zo(o){var e=o.innerRef,n=Ue(o,Do),a=is(n,"onExited","in","enter","exit","appear");return ie("input",ae({ref:e},a,{css:Wn({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Ro=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function Fo(o){var e=o.isEnabled,n=o.onBottomArrive,a=o.onBottomLeave,t=o.onTopArrive,i=o.onTopLeave,s=R.useRef(!1),r=R.useRef(!1),l=R.useRef(0),c=R.useRef(null),f=R.useCallback(function(b,m){if(c.current!==null){var x=c.current,w=x.scrollTop,C=x.scrollHeight,I=x.clientHeight,P=c.current,E=m>0,D=C-I-w,j=!1;D>m&&s.current&&(a&&a(b),s.current=!1),E&&r.current&&(i&&i(b),r.current=!1),E&&m>D?(n&&!s.current&&n(b),P.scrollTop=C,j=!0,s.current=!0):!E&&-m>w&&(t&&!r.current&&t(b),P.scrollTop=0,j=!0,r.current=!0),j&&Ro(b)}},[n,a,t,i]),p=R.useCallback(function(b){f(b,b.deltaY)},[f]),y=R.useCallback(function(b){l.current=b.changedTouches[0].clientY},[]),u=R.useCallback(function(b){var m=l.current-b.changedTouches[0].clientY;f(b,m)},[f]),g=R.useCallback(function(b){if(b){var m=ts?{passive:!1}:!1;b.addEventListener("wheel",p,m),b.addEventListener("touchstart",y,m),b.addEventListener("touchmove",u,m)}},[u,y,p]),d=R.useCallback(function(b){b&&(b.removeEventListener("wheel",p,!1),b.removeEventListener("touchstart",y,!1),b.removeEventListener("touchmove",u,!1))},[u,y,p]);return R.useEffect(function(){if(e){var b=c.current;return g(b),function(){d(b)}}},[e,g,d]),function(b){c.current=b}}var jn=["boxSizing","height","overflow","paddingRight","position"],Dn={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function zn(o){o.preventDefault()}function Rn(o){o.stopPropagation()}function Fn(){var o=this.scrollTop,e=this.scrollHeight,n=o+this.offsetHeight;o===0?this.scrollTop=1:n===e&&(this.scrollTop=o-1)}function Tn(){return"ontouchstart"in window||navigator.maxTouchPoints}var An=!!(typeof window<"u"&&window.document&&window.document.createElement),tt=0,Ge={capture:!1,passive:!1};function To(o){var e=o.isEnabled,n=o.accountForScrollbars,a=n===void 0?!0:n,t=R.useRef({}),i=R.useRef(null),s=R.useCallback(function(l){if(An){var c=document.body,f=c&&c.style;if(a&&jn.forEach(function(g){var d=f&&f[g];t.current[g]=d}),a&&tt<1){var p=parseInt(t.current.paddingRight,10)||0,y=document.body?document.body.clientWidth:0,u=window.innerWidth-y+p||0;Object.keys(Dn).forEach(function(g){var d=Dn[g];f&&(f[g]=d)}),f&&(f.paddingRight="".concat(u,"px"))}c&&Tn()&&(c.addEventListener("touchmove",zn,Ge),l&&(l.addEventListener("touchstart",Fn,Ge),l.addEventListener("touchmove",Rn,Ge))),tt+=1}},[a]),r=R.useCallback(function(l){if(An){var c=document.body,f=c&&c.style;tt=Math.max(tt-1,0),a&&tt<1&&jn.forEach(function(p){var y=t.current[p];f&&(f[p]=y)}),c&&Tn()&&(c.removeEventListener("touchmove",zn,Ge),l&&(l.removeEventListener("touchstart",Fn,Ge),l.removeEventListener("touchmove",Rn,Ge)))}},[a]);return R.useEffect(function(){if(e){var l=i.current;return s(l),function(){r(l)}}},[e,s,r]),function(l){i.current=l}}var Ao=function(e){var n=e.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},Lo={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Vo(o){var e=o.children,n=o.lockEnabled,a=o.captureEnabled,t=a===void 0?!0:a,i=o.onBottomArrive,s=o.onBottomLeave,r=o.onTopArrive,l=o.onTopLeave,c=Fo({isEnabled:t,onBottomArrive:i,onBottomLeave:s,onTopArrive:r,onTopLeave:l}),f=To({isEnabled:n}),p=function(u){c(u),f(u)};return ie(R.Fragment,null,n&&ie("div",{onClick:Ao,css:Lo}),e(p))}var No={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Bo=function(e){var n=e.name,a=e.onFocus;return ie("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:a,css:No,value:"",onChange:function(){}})},$o=Bo,Uo=function(e){return e.label},Ho=function(e){return e.label},Wo=function(e){return e.value},Zo=function(e){return!!e.isDisabled},Go={clearIndicator:Ds,container:ws,control:Vs,dropdownIndicator:Ms,group:Us,groupHeading:Ws,indicatorsContainer:ks,indicatorSeparator:Rs,input:Ks,loadingIndicator:As,loadingMessage:vs,menu:us,menuList:fs,menuPortal:ys,multiValue:eo,multiValueLabel:to,multiValueRemove:no,noOptionsMessage:ms,option:lo,placeholder:ho,singleValue:mo,valueContainer:_s},Yo={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},Ko=4,Er=4,Xo=38,qo=Er*2,Jo={baseUnit:Er,controlHeight:Xo,menuGutter:qo},Ut={borderRadius:Ko,colors:Yo,spacing:Jo},Qo={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:On(),captureMenuScroll:!On(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:jo(),formatGroupLabel:Uo,getOptionLabel:Ho,getOptionValue:Wo,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Zo,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Qa(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var n=e.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Ln(o,e,n,a){var t=Dr(o,e,n),i=zr(o,e,n),s=jr(o,e),r=Pt(o,e);return{type:"option",data:e,isDisabled:t,isSelected:i,label:s,value:r,index:a}}function Pr(o,e){return o.options.map(function(n,a){if("options"in n){var t=n.options.map(function(s,r){return Ln(o,s,e,r)}).filter(function(s){return Vn(o,s)});return t.length>0?{type:"group",data:n,options:t,index:a}:void 0}var i=Ln(o,n,e,a);return Vn(o,i)?i:void 0}).filter(ns)}function Mr(o){return o.reduce(function(e,n){return n.type==="group"?e.push.apply(e,ur(n.options.map(function(a){return a.data}))):e.push(n.data),e},[])}function el(o,e){return Mr(Pr(o,e))}function Vn(o,e){var n=o.inputValue,a=n===void 0?"":n,t=e.data,i=e.isSelected,s=e.label,r=e.value;return(!Fr(o)||!i)&&Rr(o,{label:s,value:r,data:t},a)}function tl(o,e){var n=o.focusedValue,a=o.selectValue,t=a.indexOf(n);if(t>-1){var i=e.indexOf(n);if(i>-1)return n;if(t-1?n:e[0]}var jr=function(e,n){return e.getOptionLabel(n)},Pt=function(e,n){return e.getOptionValue(n)};function Dr(o,e,n){return typeof o.isOptionDisabled=="function"?o.isOptionDisabled(e,n):!1}function zr(o,e,n){if(n.indexOf(e)>-1)return!0;if(typeof o.isOptionSelected=="function")return o.isOptionSelected(e,n);var a=Pt(o,e);return n.some(function(t){return Pt(o,t)===a})}function Rr(o,e,n){return o.filterOption?o.filterOption(e,n):!0}var Fr=function(e){var n=e.hideSelectedOptions,a=e.isMulti;return n===void 0?a:n},rl=1,Tr=function(o){ka(n,o);var e=Pa(n);function n(a){var t;if(_a(this,n),t=e.call(this,a),t.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(r){t.controlRef=r},t.focusedOptionRef=null,t.getFocusedOptionRef=function(r){t.focusedOptionRef=r},t.menuListRef=null,t.getMenuListRef=function(r){t.menuListRef=r},t.inputRef=null,t.getInputRef=function(r){t.inputRef=r},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(r,l){var c=t.props,f=c.onChange,p=c.name;l.name=p,t.ariaOnChange(r,l),f(r,l)},t.setValue=function(r,l,c){var f=t.props,p=f.closeMenuOnSelect,y=f.isMulti,u=f.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:u}),p&&(t.setState({inputIsHiddenAfterUpdate:!y}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(r,{action:l,option:c})},t.selectOption=function(r){var l=t.props,c=l.blurInputOnSelect,f=l.isMulti,p=l.name,y=t.state.selectValue,u=f&&t.isOptionSelected(r,y),g=t.isOptionDisabled(r,y);if(u){var d=t.getOptionValue(r);t.setValue(y.filter(function(b){return t.getOptionValue(b)!==d}),"deselect-option",r)}else if(!g)f?t.setValue([].concat(ur(y),[r]),"select-option",r):t.setValue(r,"select-option");else{t.ariaOnChange(r,{action:"select-option",option:r,name:p});return}c&&t.blurInput()},t.removeValue=function(r){var l=t.props.isMulti,c=t.state.selectValue,f=t.getOptionValue(r),p=c.filter(function(u){return t.getOptionValue(u)!==f}),y=vt(l,p,p[0]||null);t.onChange(y,{action:"remove-value",removedValue:r}),t.focusInput()},t.clearValue=function(){var r=t.state.selectValue;t.onChange(vt(t.props.isMulti,[],null),{action:"clear",removedValues:r})},t.popValue=function(){var r=t.props.isMulti,l=t.state.selectValue,c=l[l.length-1],f=l.slice(0,l.length-1),p=vt(r,f,f[0]||null);t.onChange(p,{action:"pop-value",removedValue:c})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var r=arguments.length,l=new Array(r),c=0;cy||p>y}},t.onTouchEnd=function(r){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(r.target)&&t.menuListRef&&!t.menuListRef.contains(r.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(r){t.userIsDragging||t.onControlMouseDown(r)},t.onClearIndicatorTouchEnd=function(r){t.userIsDragging||t.onClearIndicatorMouseDown(r)},t.onDropdownIndicatorTouchEnd=function(r){t.userIsDragging||t.onDropdownIndicatorMouseDown(r)},t.handleInputChange=function(r){var l=t.props.inputValue,c=r.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(c,{action:"input-change",prevInputValue:l}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(r){t.props.onFocus&&t.props.onFocus(r),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(r){var l=t.props.inputValue;if(t.menuListRef&&t.menuListRef.contains(document.activeElement)){t.inputRef.focus();return}t.props.onBlur&&t.props.onBlur(r),t.onInputChange("",{action:"input-blur",prevInputValue:l}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1})},t.onOptionHover=function(r){t.blockOptionHover||t.state.focusedOption===r||t.setState({focusedOption:r})},t.shouldHideSelectedOptions=function(){return Fr(t.props)},t.onValueInputFocus=function(r){r.preventDefault(),r.stopPropagation(),t.focus()},t.onKeyDown=function(r){var l=t.props,c=l.isMulti,f=l.backspaceRemovesValue,p=l.escapeClearsValue,y=l.inputValue,u=l.isClearable,g=l.isDisabled,d=l.menuIsOpen,b=l.onKeyDown,m=l.tabSelectsValue,x=l.openMenuOnFocus,w=t.state,C=w.focusedOption,I=w.focusedValue,P=w.selectValue;if(!g&&!(typeof b=="function"&&(b(r),r.defaultPrevented))){switch(t.blockOptionHover=!0,r.key){case"ArrowLeft":if(!c||y)return;t.focusValue("previous");break;case"ArrowRight":if(!c||y)return;t.focusValue("next");break;case"Delete":case"Backspace":if(y)return;if(I)t.removeValue(I);else{if(!f)return;c?t.popValue():u&&t.clearValue()}break;case"Tab":if(t.isComposing||r.shiftKey||!d||!m||!C||x&&t.isOptionSelected(C,P))return;t.selectOption(C);break;case"Enter":if(r.keyCode===229)break;if(d){if(!C||t.isComposing)return;t.selectOption(C);break}return;case"Escape":d?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:y}),t.onMenuClose()):u&&p&&t.clearValue();break;case" ":if(y)return;if(!d){t.openMenu("first");break}if(!C)return;t.selectOption(C);break;case"ArrowUp":d?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":d?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!d)return;t.focusOption("pageup");break;case"PageDown":if(!d)return;t.focusOption("pagedown");break;case"Home":if(!d)return;t.focusOption("first");break;case"End":if(!d)return;t.focusOption("last");break;default:return}r.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++rl),t.state.selectValue=Cn(a.value),a.menuIsOpen&&t.state.selectValue.length){var i=t.buildFocusableOptions(),s=i.indexOf(t.state.selectValue[0]);t.state.focusedOption=i[s]}return t}return Ca(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&kn(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(t){var i=this.props,s=i.isDisabled,r=i.menuIsOpen,l=this.state.isFocused;(l&&!s&&t.isDisabled||l&&r&&!t.menuIsOpen)&&this.focusInput(),l&&s&&!t.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!s&&t.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(kn(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(t,i){this.props.onInputChange(t,i)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(t){var i=this,s=this.state,r=s.selectValue,l=s.isFocused,c=this.buildFocusableOptions(),f=t==="first"?0:c.length-1;if(!this.props.isMulti){var p=c.indexOf(r[0]);p>-1&&(f=p)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[f]},function(){return i.onMenuOpen()})}},{key:"focusValue",value:function(t){var i=this.state,s=i.selectValue,r=i.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=s.indexOf(r);r||(l=-1);var c=s.length-1,f=-1;if(s.length){switch(t){case"previous":l===0?f=0:l===-1?f=c:f=l-1;break;case"next":l>-1&&l0&&arguments[0]!==void 0?arguments[0]:"first",i=this.props.pageSize,s=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var l=0,c=r.indexOf(s);s||(c=-1),t==="up"?l=c>0?c-1:r.length-1:t==="down"?l=(c+1)%r.length:t==="pageup"?(l=c-i,l<0&&(l=0)):t==="pagedown"?(l=c+i,l>r.length-1&&(l=r.length-1)):t==="last"&&(l=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[l],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Ut):re(re({},Ut),this.props.theme):Ut}},{key:"getCommonProps",value:function(){var t=this.clearValue,i=this.cx,s=this.getStyles,r=this.getClassNames,l=this.getValue,c=this.selectOption,f=this.setValue,p=this.props,y=p.isMulti,u=p.isRtl,g=p.options,d=this.hasValue();return{clearValue:t,cx:i,getStyles:s,getClassNames:r,getValue:l,hasValue:d,isMulti:y,isRtl:u,options:g,selectOption:c,selectProps:p,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var t=this.state.selectValue;return t.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var t=this.props,i=t.isClearable,s=t.isMulti;return i===void 0?s:i}},{key:"isOptionDisabled",value:function(t,i){return Dr(this.props,t,i)}},{key:"isOptionSelected",value:function(t,i){return zr(this.props,t,i)}},{key:"filterOption",value:function(t,i){return Rr(this.props,t,i)}},{key:"formatOptionLabel",value:function(t,i){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(t,{context:i,inputValue:s,selectValue:r})}else return this.getOptionLabel(t)}},{key:"formatGroupLabel",value:function(t){return this.props.formatGroupLabel(t)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var t=this.props,i=t.isDisabled,s=t.isSearchable,r=t.inputId,l=t.inputValue,c=t.tabIndex,f=t.form,p=t.menuIsOpen,y=t.required,u=this.getComponents(),g=u.Input,d=this.state,b=d.inputIsHidden,m=d.ariaSelection,x=this.commonProps,w=r||this.getElementId("input"),C=re(re(re({"aria-autocomplete":"list","aria-expanded":p,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":y,role:"combobox"},p&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?(m==null?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?R.createElement(g,ae({},x,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:w,innerRef:this.getInputRef,isDisabled:i,isHidden:b,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:f,type:"text",value:l},C)):R.createElement(zo,ae({id:w,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:It,onFocus:this.onInputFocus,disabled:i,tabIndex:c,inputMode:"none",form:f,value:""},C))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,i=this.getComponents(),s=i.MultiValue,r=i.MultiValueContainer,l=i.MultiValueLabel,c=i.MultiValueRemove,f=i.SingleValue,p=i.Placeholder,y=this.commonProps,u=this.props,g=u.controlShouldRenderValue,d=u.isDisabled,b=u.isMulti,m=u.inputValue,x=u.placeholder,w=this.state,C=w.selectValue,I=w.focusedValue,P=w.isFocused;if(!this.hasValue()||!g)return m?null:R.createElement(p,ae({},y,{key:"placeholder",isDisabled:d,isFocused:P,innerProps:{id:this.getElementId("placeholder")}}),x);if(b)return C.map(function(D,j){var U=D===I,q="".concat(t.getOptionLabel(D),"-").concat(t.getOptionValue(D));return R.createElement(s,ae({},y,{components:{Container:r,Label:l,Remove:c},isFocused:U,isDisabled:d,key:q,index:j,removeProps:{onClick:function(){return t.removeValue(D)},onTouchEnd:function(){return t.removeValue(D)},onMouseDown:function(L){L.preventDefault()}},data:D}),t.formatOptionLabel(D,"value"))});if(m)return null;var E=C[0];return R.createElement(f,ae({},y,{data:E,isDisabled:d}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents(),i=t.ClearIndicator,s=this.commonProps,r=this.props,l=r.isDisabled,c=r.isLoading,f=this.state.isFocused;if(!this.isClearable()||!i||l||!this.hasValue()||c)return null;var p={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return R.createElement(i,ae({},s,{innerProps:p,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents(),i=t.LoadingIndicator,s=this.commonProps,r=this.props,l=r.isDisabled,c=r.isLoading,f=this.state.isFocused;if(!i||!c)return null;var p={"aria-hidden":"true"};return R.createElement(i,ae({},s,{innerProps:p,isDisabled:l,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),i=t.DropdownIndicator,s=t.IndicatorSeparator;if(!i||!s)return null;var r=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused;return R.createElement(s,ae({},r,{isDisabled:l,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents(),i=t.DropdownIndicator;if(!i)return null;var s=this.commonProps,r=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return R.createElement(i,ae({},s,{innerProps:c,isDisabled:r,isFocused:l}))}},{key:"renderMenu",value:function(){var t=this,i=this.getComponents(),s=i.Group,r=i.GroupHeading,l=i.Menu,c=i.MenuList,f=i.MenuPortal,p=i.LoadingMessage,y=i.NoOptionsMessage,u=i.Option,g=this.commonProps,d=this.state.focusedOption,b=this.props,m=b.captureMenuScroll,x=b.inputValue,w=b.isLoading,C=b.loadingMessage,I=b.minMenuHeight,P=b.maxMenuHeight,E=b.menuIsOpen,D=b.menuPlacement,j=b.menuPosition,U=b.menuPortalTarget,q=b.menuShouldBlockScroll,O=b.menuShouldScrollIntoView,L=b.noOptionsMessage,v=b.onMenuScrollToTop,N=b.onMenuScrollToBottom;if(!E)return null;var te=function(ee,X){var Z=ee.type,ce=ee.data,he=ee.isDisabled,oe=ee.isSelected,le=ee.label,ge=ee.value,pe=d===ce,Se=he?void 0:function(){return t.onOptionHover(ce)},_e=he?void 0:function(){return t.selectOption(ce)},h="".concat(t.getElementId("option"),"-").concat(X),$={id:h,onClick:_e,onMouseMove:Se,onMouseOver:Se,tabIndex:-1};return R.createElement(u,ae({},g,{innerProps:$,data:ce,isDisabled:he,isSelected:oe,key:h,label:le,type:Z,value:ge,isFocused:pe,innerRef:pe?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(ee.data,"menu"))},A;if(this.hasOptions())A=this.getCategorizedOptions().map(function(z){if(z.type==="group"){var ee=z.data,X=z.options,Z=z.index,ce="".concat(t.getElementId("group"),"-").concat(Z),he="".concat(ce,"-heading");return R.createElement(s,ae({},g,{key:ce,data:ee,options:X,Heading:r,headingProps:{id:he,data:z.data},label:t.formatGroupLabel(z.data)}),z.options.map(function(oe){return te(oe,"".concat(Z,"-").concat(oe.index))}))}else if(z.type==="option")return te(z,"".concat(z.index))});else if(w){var J=C({inputValue:x});if(J===null)return null;A=R.createElement(p,g,J)}else{var B=L({inputValue:x});if(B===null)return null;A=R.createElement(y,g,B)}var K={minMenuHeight:I,maxMenuHeight:P,menuPlacement:D,menuPosition:j,menuShouldScrollIntoView:O},T=R.createElement(cs,ae({},g,K),function(z){var ee=z.ref,X=z.placerProps,Z=X.placement,ce=X.maxHeight;return R.createElement(l,ae({},g,K,{innerRef:ee,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove,id:t.getElementId("listbox")},isLoading:w,placement:Z}),R.createElement(Vo,{captureEnabled:m,onTopArrive:v,onBottomArrive:N,lockEnabled:q},function(he){return R.createElement(c,ae({},g,{innerRef:function(le){t.getMenuListRef(le),he(le)},isLoading:w,maxHeight:ce,focusedOption:d}),A)}))});return U||j==="fixed"?R.createElement(f,ae({},g,{appendTo:U,controlElement:this.controlRef,menuPlacement:D,menuPosition:j}),T):T}},{key:"renderFormField",value:function(){var t=this,i=this.props,s=i.delimiter,r=i.isDisabled,l=i.isMulti,c=i.name,f=i.required,p=this.state.selectValue;if(f&&!this.hasValue()&&!r)return R.createElement($o,{name:c,onFocus:this.onValueInputFocus});if(!(!c||r))if(l)if(s){var y=p.map(function(d){return t.getOptionValue(d)}).join(s);return R.createElement("input",{name:c,type:"hidden",value:y})}else{var u=p.length>0?p.map(function(d,b){return R.createElement("input",{key:"i-".concat(b),name:c,type:"hidden",value:t.getOptionValue(d)})}):R.createElement("input",{name:c,type:"hidden",value:""});return R.createElement("div",null,u)}else{var g=p[0]?this.getOptionValue(p[0]):"";return R.createElement("input",{name:c,type:"hidden",value:g})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,i=this.state,s=i.ariaSelection,r=i.focusedOption,l=i.focusedValue,c=i.isFocused,f=i.selectValue,p=this.getFocusableOptions();return R.createElement(Io,ae({},t,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:r,focusedValue:l,isFocused:c,selectValue:f,focusableOptions:p}))}},{key:"render",value:function(){var t=this.getComponents(),i=t.Control,s=t.IndicatorsContainer,r=t.SelectContainer,l=t.ValueContainer,c=this.props,f=c.className,p=c.id,y=c.isDisabled,u=c.menuIsOpen,g=this.state.isFocused,d=this.commonProps=this.getCommonProps();return R.createElement(r,ae({},d,{className:f,innerProps:{id:p,onKeyDown:this.onKeyDown},isDisabled:y,isFocused:g}),this.renderLiveRegion(),R.createElement(i,ae({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:y,isFocused:g,menuIsOpen:u}),R.createElement(l,ae({},d,{isDisabled:y}),this.renderPlaceholderOrValue(),this.renderInput()),R.createElement(s,ae({},d,{isDisabled:y}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(t,i){var s=i.prevProps,r=i.clearFocusValueOnUpdate,l=i.inputIsHiddenAfterUpdate,c=i.ariaSelection,f=i.isFocused,p=i.prevWasFocused,y=t.options,u=t.value,g=t.menuIsOpen,d=t.inputValue,b=t.isMulti,m=Cn(u),x={};if(s&&(u!==s.value||y!==s.options||g!==s.menuIsOpen||d!==s.inputValue)){var w=g?el(t,m):[],C=r?tl(i,m):null,I=nl(i,w);x={selectValue:m,focusedOption:I,focusedValue:C,clearFocusValueOnUpdate:!1}}var P=l!=null&&t!==s?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},E=c,D=f&&p;return f&&!D&&(E={value:vt(b,m,m[0]||null),options:m,action:"initial-input-focus"},D=!p),(c==null?void 0:c.action)==="initial-input-focus"&&(E=null),re(re(re({},x),P),{},{prevProps:t,ariaSelection:E,prevWasFocused:D})}}]),n}(R.Component);Tr.defaultProps=Qo;var il=R.forwardRef(function(o,e){var n=Sa(o);return R.createElement(Tr,ae({ref:e},n))}),al=il,sl=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"];function Kt(){return Kt=Object.assign?Object.assign.bind():function(o){for(var e=1;e=0)&&(n[t]=o[t]);return n}var Ar=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var n=ol(e,sl);return Kt({},n)},ll=function(e){var n=typeof e=="string";return n&&["sm","md","lg"].includes(e)},ul=function(e){return ll(e)?e:e==="xs"?"sm":e==="xl"?"lg":"md"},Re=function(e){var n=jt(),a=ul(n.components.Input.defaultProps.size),t=e??a,i=Ai(typeof t=="string"?[t]:t,{fallback:"md"})||a;return i};function Ye(){return Ye=Object.assign?Object.assign.bind():function(o){for(var e=1;e=0)&&(n[t]=o[t]);return n}var ml=function(e){var n=e.className,a=e.cx,t=e.children,i=e.innerRef,s=e.innerProps,r=e.isDisabled,l=e.isFocused,c=e.menuIsOpen,f=e.selectProps,p=f.chakraStyles,y=f.size,u=f.variant,g=f.focusBorderColor,d=f.errorBorderColor,b=f.isInvalid,m=f.isReadOnly,x=Re(y),w=Ne("Input",{size:x,variant:u,focusBorderColor:g,errorBorderColor:d}),C=w.field,I=C.height,P=C.h,E=pl(C,fl),D=I||P,j=Pe({},E,{position:"relative",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",padding:0,overflow:"hidden",height:"auto",minH:D},r?{pointerEvents:"none"}:{}),U=p!=null&&p.control?p.control(j,e):j;return se.createElement(de,Pe({ref:i,className:a({control:!0,"control--is-disabled":r,"control--is-focused":l,"control--menu-is-open":c},n),sx:U},s,{"data-focus":l?!0:void 0,"data-focus-visible":l?!0:void 0,"data-invalid":b?!0:void 0,"data-disabled":r?!0:void 0,"data-readonly":m?!0:void 0}),t)},vl=function(e){var n=e.className,a=e.cx,t=e.selectProps,i=t.chakraStyles,s=t.useBasicStyles,r=t.variant,l=Pe({opacity:1},s||r!=="outline"?{display:"none"}:{}),c=i!=null&&i.indicatorSeparator?i.indicatorSeparator(l,e):l;return se.createElement(Jn,{className:a({"indicator-separator":!0},n),sx:c,orientation:"vertical"})},gl=function(e){return se.createElement(Xe,Pe({role:"presentation",focusable:"false","aria-hidden":"true"},e),se.createElement("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}))},bl=function(e){var n=e.children,a=e.className,t=e.cx,i=e.innerProps,s=e.selectProps,r=s.chakraStyles,l=s.useBasicStyles,c=s.size,f=s.focusBorderColor,p=s.errorBorderColor,y=s.variant,u=Re(c),g=Ne("Input",{size:u,variant:y,focusBorderColor:f,errorBorderColor:p}),d={sm:"16px",md:"20px",lg:"24px"},b=d[u],m=Pe({},g.addon,{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",borderRadius:0,borderWidth:0,fontSize:b},l&&{background:"transparent",padding:0,width:6,marginRight:2,marginLeft:1,cursor:"inherit"}),x=r!=null&&r.dropdownIndicator?r.dropdownIndicator(m,e):m,w={height:"1em",width:"1em"},C=r!=null&&r.downChevron?r.downChevron(w,e):w;return se.createElement(de,Pe({},i,{className:t({indicator:!0,"dropdown-indicator":!0},a),sx:x}),n||se.createElement(gl,{sx:C}))},yl=function(e){return se.createElement(Xe,Pe({focusable:"false","aria-hidden":!0},e),se.createElement("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}))},xl=function(e){var n=e.children,a=e.className,t=e.cx,i=e.innerProps,s=e.selectProps,r=s.chakraStyles,l=s.size,c=Re(l),f=Bn("CloseButton",{size:c}),p=Pe({},f,{marginX:1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:"pointer"}),y=r!=null&&r.clearIndicator?r.clearIndicator(p,e):p,u={width:"1em",height:"1em"},g=r!=null&&r.crossIcon?r.crossIcon(u,e):u;return se.createElement(de,Pe({role:"button",className:t({indicator:!0,"clear-indicator":!0},a),sx:y,"aria-label":"Clear selected options"},i),n||se.createElement(yl,{sx:g}))},wl=function(e){var n=e.className,a=e.cx,t=e.innerProps,i=e.selectProps,s=i.chakraStyles,r=i.size,l=e.color,c=e.emptyColor,f=e.speed,p=e.thickness,y=e.spinnerSize,u=Re(r),g={sm:"xs",md:"sm",lg:"md"},d=g[u],b={marginRight:3},m=s!=null&&s.loadingIndicator?s.loadingIndicator(b,e):b;return se.createElement(Qr,Pe({className:a({indicator:!0,"loading-indicator":!0},n),sx:m},t,{size:y||d,color:l,emptyColor:c,speed:f,thickness:p}))};const Sl=ml;var _l=["innerRef","isDisabled","isHidden","inputClassName"];function it(){return it=Object.assign?Object.assign.bind():function(o){for(var e=1;e=0)&&(n[t]=o[t]);return n}var kl=function(e){var n=e.className,a=e.cx,t=e.value,i=e.selectProps,s=i.chakraStyles,r=i.isReadOnly,l=Ar(e),c=l.innerRef,f=l.isDisabled,p=l.isHidden,y=l.inputClassName,u=Cl(l,_l),g={gridArea:"1 / 2",minW:"2px",border:0,margin:0,outline:0,padding:0},d={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content",color:"inherit",marginX:"0.125rem",paddingY:"0.125rem",visibility:f?"hidden":"visible",transform:t?"translateZ(0)":"",_after:it({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre",padding:0},g)},b=s!=null&&s.inputContainer?s.inputContainer(d,e):d,m=it({background:0,opacity:p?0:1,width:"100%"},g),x=s!=null&&s.input?s.input(m,e):m;return se.createElement(de,{className:a({"input-container":!0},n),"data-value":t||"",sx:b},se.createElement(ze.input,it({className:a({input:!0},y),ref:c,sx:x,disabled:f,readOnly:r?!0:void 0},u)))};const Ol=kl;var Il=["data"];function El(o,e){if(o==null)return{};var n={},a=Object.keys(o),t,i;for(i=0;i=0)&&(n[t]=o[t]);return n}function we(){return we=Object.assign?Object.assign.bind():function(o){for(var e=1;e=0)&&(n[t]=o[t]);return n}var tu=function(e){var n,a=e.components,t=a===void 0?{}:a;e.theme;var i=e.size,s=e.colorScheme,r=s===void 0?"gray":s,l=e.isDisabled,c=e.isInvalid,f=e.isReadOnly,p=e.required,y=e.isRequired,u=e.inputId,g=e.tagVariant,d=e.selectedOptionStyle,b=d===void 0?"color":d,m=e.selectedOptionColorScheme,x=e.selectedOptionColor,w=e.variant,C=e.focusBorderColor,I=e.errorBorderColor,P=e.chakraStyles,E=P===void 0?{}:P,D=e.onFocus,j=e.onBlur,U=e.menuIsOpen,q=eu(e,Ql),O=jt(),L=O.components.Input.defaultProps.variant,v=bi({id:u,isDisabled:l,isInvalid:c,isRequired:y,isReadOnly:f,onFocus:D,onBlur:j}),N=U??(v.readOnly?!1:void 0),te=b,A=["color","check"];A.includes(b)||(te="color");var J=m||x||"blue";typeof J!="string"&&(J="blue");var B=Mt({components:Mt({},Jl,t),colorScheme:r,size:i,tagVariant:g,selectedOptionStyle:te,selectedOptionColorScheme:J,variant:w??L,chakraStyles:E,focusBorderColor:C,errorBorderColor:I,onFocus:v.onFocus,onBlur:v.onBlur,isDisabled:v.disabled,isInvalid:!!v["aria-invalid"],inputId:v.id,isReadOnly:v.readOnly,required:p??v.required,menuIsOpen:N},q,{"aria-invalid":(n=q["aria-invalid"])!=null?n:v["aria-invalid"]});return B};const nu=tu;function Jt(){return Jt=Object.assign?Object.assign.bind():function(o){for(var e=1;e({value:g,label:g})))??[],[r,l]=R.useState(s),c=async()=>{var g,d;await((g=We)==null?void 0:g.put({name:t,workflowIDs:[],updateTime:Date.now()})),await((d=We)==null?void 0:d.listAll().then(b=>a(b??[]))),i("")},f=async()=>{var d;const g=await((d=We)==null?void 0:d.listAll());a(g??[])};if(We==null)return alert("Error: TagsTable is not loaded"),null;const p=n.map(g=>({value:g.name,label:g.name})),y=37*5;return S.jsxs(yi,{isLazy:!0,onOpen:f,children:[S.jsx(xi,{children:S.jsx(xe,{"aria-label":"Delete confirm",size:"sm",variant:"ghost",icon:S.jsx(ar,{color:"#718096"})})}),S.jsxs(wi,{children:[S.jsx(Si,{}),S.jsx(_i,{}),S.jsx(tr,{children:S.jsx("b",{children:o.name})}),S.jsxs(Ci,{children:[S.jsx(iu,{isMulti:!0,name:"tags",options:p,menuIsOpen:!0,value:r,onChange:async g=>{var d;l(g),await((d=ye)==null?void 0:d.updateFlow(o.id,{tags:g.map(b=>b.value)})),await(e==null?void 0:e())},chakraStyles:{dropdownIndicator:g=>({...g,p:0,w:"30px"}),menuList:g=>({...g,shadow:"none",pt:0})},placeholder:"Select tags",closeMenuOnSelect:!1,maxMenuHeight:y}),S.jsxs(be,{gap:4,mt:Math.min(y,Math.max(n.length,3)*37),children:[S.jsx(at,{placeholder:"New tag name",size:"sm",mt:6,mb:6,variant:"flushed",value:t,onChange:g=>{i(g.target.value.trim())}}),S.jsx(Ce,{iconSpacing:1,leftIcon:S.jsx(nn,{size:16}),colorScheme:"teal",variant:"solid",size:"xs",px:5,isDisabled:t.length===0,onClick:c,children:"New Tag"})]})]})]})]})}function su({menuPosition:o,workflowID:e,onClose:n}){const{onDuplicateWorkflow:a}=R.useContext(rn);return S.jsx(S.Fragment,{children:S.jsx(de,{position:"absolute",top:o.y,left:o.x,children:S.jsx(qe,{isOpen:!0,onClose:n,children:S.jsx(st,{children:S.jsx(Ae,{onClick:()=>a&&a(e),children:"Duplicate"})})})})})}const Nn=R.memo(function({workflow:e}){const{colorMode:n}=Qt(),[a,t]=R.useState({x:0,y:0}),[i,s]=R.useState(!1),{setDraggingFile:r,isMultiSelecting:l,onMultiSelectFlow:c,onDeleteFlow:f,multiSelectedFlowsID:p}=R.useContext($e),y=p&&p.length>0&&p.includes(e.id),{curFlowID:u,loadWorkflowID:g}=R.useContext(rn),d=u===e.id,b=P=>{P.preventDefault(),t({x:P.clientX,y:P.clientY}),s(!0)},[m,x]=R.useState(!1),w=()=>{s(!1)},C=n==="light"?"gray.200":"#4A5568",I=S.jsx(de,{flexShrink:1,flexGrow:1,backgroundColor:d?"teal.200":i?C:void 0,color:d&&!l?"#333":void 0,draggable:!l,onDragStart:()=>r==null?void 0:r(e),borderRadius:6,px:1,py:1,onClick:()=>{!l&&g(e.id)},_hover:{bg:C},children:S.jsxs(be,{children:[e.coverMediaPath!=null&&S.jsx(zi,{mediaLocalPath:e.coverMediaPath,size:60,hideBrokenImage:!0}),S.jsxs(He,{textAlign:"left",gap:0,children:[S.jsx(ke,{fontWeight:"500",children:e.name??"untitled"}),S.jsxs(ke,{color:"GrayText",ml:2,fontSize:"sm",children:["Updated: ",Xn(e.updateTime)]})]})]})});return S.jsxs(be,{w:"100%",mb:1,justify:"space-between",onContextMenu:b,onMouseEnter:()=>{x(!0)},onMouseLeave:()=>{x(!1)},children:[l?S.jsx(ot,{isChecked:y,spacing:4,onChange:P=>{c&&c(e.id,P.target.checked)},children:I}):S.jsxs(S.Fragment,{children:[I,S.jsxs(rt,{width:"90px",justifyContent:"flex-end",children:[m&&S.jsx(au,{workflow:e}),S.jsx(Te,{label:"Open in new tab",children:S.jsx(xe,{"aria-label":"Open in new tab",size:"sm",variant:"ghost",onClick:()=>ki(e.id),icon:S.jsx(Oi,{color:"#718096",size:23})})}),S.jsx(Kn,{promptMessage:"Are you sure you want to delete this workflow?",onDelete:()=>{f&&f(e.id)}})]})]}),i&&S.jsx(su,{menuPosition:a,onClose:w,workflowID:e.id})]})});function Vr({items:o}){var y;const[e,n]=R.useState(!1),a=o.filter(Ze),t=o.filter(u=>!Ze(u)),i=(y=t[0])==null?void 0:y.parentFolderID,[s,r]=R.useState(!1),{onRefreshFilesList:l,draggingFile:c,refreshFolderStamp:f}=R.useContext($e),p=async u=>{var g,d;if(u.preventDefault(),u.stopPropagation(),!c)return r(!1);if(Ze(c)){if(c.id===i)return r(!1);await((g=Be)==null?void 0:g.update({id:c.id,parentFolderID:i}))}else await((d=ye)==null?void 0:d.updateFlow(c.id,{parentFolderID:i}));await(l==null?void 0:l()),r(!1)};return R.useEffect(()=>{var u;(u=Oe)==null||u.getSetting("foldersOnTop").then(g=>{n(g??!1)})},[f]),S.jsxs(S.Fragment,{children:[e&&a.map(u=>S.jsx(yn,{folder:u},u.id)),S.jsx(de,{border:s?"2px dashed #718096":"2px dashed transparent",onDragOver:u=>{u.preventDefault(),u.stopPropagation(),r(!0)},onDragLeave:u=>{u.preventDefault(),u.stopPropagation(),r(!1)},onDrop:p,className:"droppable",children:e?t.map(u=>S.jsx(Nn,{workflow:u},u.id)):o.map(u=>Ze(u)?S.jsx(yn,{folder:u},u.id):S.jsx(Nn,{workflow:u},u.id))})]})}function pu({onClose:o,onClickNewFlow:e}){const[n,a]=R.useState([]),t=R.useRef([]),i=R.useRef([]),{loadWorkflowID:s,curFlowID:r}=R.useContext(rn),[l,c]=R.useState(),[f,p]=R.useState(!1),[y,u]=R.useState([]),[g,d]=R.useState(0),[b,m]=R.useState(""),x=ha(b,400),w=R.useRef(null),[C,I]=R.useState(null),P=R.useRef(window.localStorage.getItem(Ht)??mn.RECENTLY_MODIFIED),E=async()=>{var J,B;const A=await((J=ye)==null?void 0:J.listFolderContent())??[];t.current=A,await((B=ye)==null?void 0:B.listAll().then(K=>{i.current=K})),j(),d(Date.now())},D=!!l||!!x,j=()=>{if(D){const A=i.current.filter(J=>{var T;let B=!0,K=!0;return l&&(B=!!((T=J.tags)!=null&&T.includes(l))),x&&(K=!!J.name.toLocaleLowerCase().includes(x.toLocaleLowerCase())),B&&K});a(Tt(A,P.current))}else a(Tt(t.current,P.current))},U=A=>{a(Tt(n,A)),P.current=A,window.localStorage.setItem(Ht,A),!D&&d(Date.now())};R.useEffect(()=>{j()},[x,l]);const q=R.useCallback(async A=>{var J,B,K;await((J=ye)==null?void 0:J.deleteFlow(A)),((K=(B=ye)==null?void 0:B.curWorkflow)==null?void 0:K.id)===A&&await(s==null?void 0:s(null)),await E()},[l,x]);R.useEffect(()=>{E();const A=async J=>{var B;if(w.current){const K=await((B=ye)==null?void 0:B.get(w.current));K&&K.json&&da(K.json,[J.canvasX,J.canvasY])}};return dt.canvasEl.addEventListener("drop",A),dt.canvasEl.addEventListener("click",o),()=>{dt.canvasEl.removeEventListener("drop",A),dt.canvasEl.removeEventListener("click",o)}},[]);const O=R.useCallback((A,J)=>{u(B=>{const K=[...B];return J?K.push(A):K.splice(K.indexOf(A),1),K})},[]),L=(A,J)=>{var B;switch(A){case"batchDelete":r&&((B=ye)==null||B.get(r).then(K=>{K||s==null||s(null)})),E(),p(!1),u([]);return;case"selectAll":u(J?i.current.map(K=>K.id):[]);return}},v=A=>{I(A),Ze(A)||(w.current=A.id)},N=A=>{m(A)},te=450;return S.jsx($e.Provider,{value:{onRefreshFilesList:E,draggingFile:C??void 0,setDraggingFile:v,isMultiSelecting:f,onMultiSelectFlow:O,multiSelectedFlowsID:y,onDeleteFlow:q,refreshFolderStamp:g,setRefreshFolderStamp:d},children:S.jsx(de,{style:{width:te},children:S.jsxs(Ii,{width:te,height:"100vh",pl:4,pr:5,pt:4,gap:4,position:"absolute",top:0,left:0,shadow:"xl",zIndex:Ei,children:[S.jsxs(rt,{alignItems:"center",justifyContent:"space-between",children:[S.jsxs(be,{gap:4,children:[S.jsx(be,{gap:2,children:S.jsx(ke,{fontSize:19,fontWeight:600,children:"☕️Workspace"})}),S.jsx(or,{}),S.jsx(Te,{label:"Open workspace save directory",children:S.jsx(xe,{"aria-label":"Open workspace save directory",size:"sm",icon:S.jsx(qn,{}),variant:"outline",colorScheme:"teal",onClick:()=>Pi()})}),S.jsx(Te,{label:"New workflow",children:S.jsx(xe,{"aria-label":"New workflow",size:"sm",icon:S.jsx(nn,{}),variant:"outline",colorScheme:"teal",onClick:e})})]}),S.jsx(be,{alignItems:"center",children:S.jsx(oa,{})})]}),S.jsxs(rt,{direction:"column",h:"calc(100% - 64px)",children:[S.jsx(ma,{selectedTag:l,setSelectedTag:c}),S.jsxs(be,{mb:2,mt:2,p:0,justifyContent:"space-between",children:[S.jsxs(be,{children:[i.current.length>0?S.jsx(ca,{multipleState:f,changeMultipleState:A=>{p(A),!A&&u([])},selectedKeys:y,isSelectedAll:y.length===i.current.length,batchOperationCallback:L}):S.jsx(de,{}),!f&&S.jsx(Te,{hasArrow:!0,label:"New folder",placement:"bottom-start",children:S.jsx(xe,{size:"sm",variant:"outline",icon:S.jsx(ir,{size:21}),onClick:async()=>{var A;await((A=Be)==null?void 0:A.create({name:"New Folder"})),E()},"aria-label":"new folder button"})})]}),S.jsxs(qe,{closeOnSelect:!0,children:[S.jsx(Dt,{as:Ce,variant:"ghost",size:"xs",pr:0,rightIcon:S.jsx(tn,{size:"16"}),children:S.jsxs(be,{children:[S.jsx(ke,{children:"Sort by:"}),S.jsx(ke,{display:"inline-block",children:P.current})]})}),S.jsx(st,{children:S.jsx(er,{value:P.current,type:"radio",onChange:A=>U(A),children:Object.values(mn).map((A,J)=>S.jsx(an,{value:A,children:A},J))})})]})]}),S.jsx(pa,{searchValue:b,onUpdateSearchValue:N}),S.jsx(rt,{overflowY:"auto",overflowX:"hidden",direction:"column",children:S.jsx(Vr,{items:n})})]})]})})})}export{pu as default}; diff --git a/dist/workspace_web/assets/App-JXePnJiV.css b/dist/workspace_web/assets/App-JXePnJiV.css deleted file mode 100644 index 70b9d44..0000000 --- a/dist/workspace_web/assets/App-JXePnJiV.css +++ /dev/null @@ -1 +0,0 @@ -.dragPanelIcon{display:none!important}.workspaceManagerPanel:hover .dragPanelIcon{display:block!important} diff --git a/dist/workspace_web/assets/ModelManagerTopbar--iv3sdjQ.css b/dist/workspace_web/assets/ModelManagerTopbar--iv3sdjQ.css deleted file mode 100644 index b4ab834..0000000 --- a/dist/workspace_web/assets/ModelManagerTopbar--iv3sdjQ.css +++ /dev/null @@ -1 +0,0 @@ -.drag-model-manager-top-bar-icon{visibility:hidden!important}.model-manager-top-bar:hover .drag-model-manager-top-bar-icon{visibility:visible!important} diff --git a/dist/workspace_web/chunk-JARCRF6W-71z2fzu3.js b/dist/workspace_web/chunk-JARCRF6W-71z2fzu3.js deleted file mode 100644 index 8203c52..0000000 --- a/dist/workspace_web/chunk-JARCRF6W-71z2fzu3.js +++ /dev/null @@ -1 +0,0 @@ -import{f as $,j as f,r as l,x as z,g as S,b as ye,d as Q,w as Ce,k as i,p as C,m as ce,a3 as te,i as we,o as xe,G as Ie,h as Ee}from"./input.js";import{ak as Se}from"./App-jF2-L8lr.js";var Y=$(function(o,t){const{htmlWidth:n,htmlHeight:c,alt:r,...u}=o;return f.jsx("img",{width:n,height:c,ref:t,alt:r,...u})});Y.displayName="NativeImage";function Pe(e){const{loading:o,src:t,srcSet:n,onLoad:c,onError:r,crossOrigin:u,sizes:b,ignoreFallback:y}=e,[m,v]=l.useState("pending");l.useEffect(()=>{v(t?"loading":"pending")},[t]);const d=l.useRef(),w=l.useCallback(()=>{if(!t)return;p();const s=new Image;s.src=t,u&&(s.crossOrigin=u),n&&(s.srcset=n),b&&(s.sizes=b),o&&(s.loading=o),s.onload=g=>{p(),v("loaded"),c==null||c(g)},s.onerror=g=>{p(),v("failed"),r==null||r(g)},d.current=s},[t,u,n,b,c,r,o]),p=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return z(()=>{if(!y)return m==="loading"&&w(),()=>{p()}},[m,w,y]),y?"loaded":m}var Le=(e,o)=>e!=="loaded"&&o==="beforeLoadOrError"||e==="failed"&&o==="onError";function Fe(e,o=[]){const t=Object.assign({},e);for(const n of o)n in t&&delete t[n];return t}var je=$(function(o,t){const{fallbackSrc:n,fallback:c,src:r,srcSet:u,align:b,fit:y,loading:m,ignoreFallback:v,crossOrigin:d,fallbackStrategy:w="beforeLoadOrError",referrerPolicy:p,...s}=o,g=n!==void 0||c!==void 0,F=m!=null||v||!g,A=Pe({...o,crossOrigin:d,ignoreFallback:F}),j=Le(A,w),P={ref:t,objectFit:y,objectPosition:b,...F?s:Fe(s,["onError","onLoad"])};return j?c||f.jsx(S.img,{as:Y,className:"chakra-image__placeholder",src:n,...P}):f.jsx(S.img,{as:Y,src:r,srcSet:u,crossOrigin:d,loading:m,referrerPolicy:p,className:"chakra-image",...P})});je.displayName="Image";var[rt,Re]=ye({name:"CheckboxGroupContext",strict:!1});function Ae(e){const[o,t]=l.useState(e),[n,c]=l.useState(!1);return e!==o&&(c(!0),t(e)),n}function De(e){return f.jsx(S.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:f.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function _e(e){return f.jsx(S.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:f.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function Me(e){const{isIndeterminate:o,isChecked:t,...n}=e,c=o?_e:De;return t||o?f.jsx(S.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:f.jsx(c,{...n})}):null}var Be={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Ne=()=>typeof document<"u",ue=!1,T=null,R=!1,Z=!1,ee=new Set;function ne(e,o){ee.forEach(t=>t(e,o))}var Ge=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Ke(e){return!(e.metaKey||!Ge&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function de(e){R=!0,Ke(e)&&(T="keyboard",ne("keyboard",e))}function M(e){if(T="pointer",e.type==="mousedown"||e.type==="pointerdown"){R=!0;const o=e.composedPath?e.composedPath()[0]:e.target;let t=!1;try{t=o.matches(":focus-visible")}catch{}if(t)return;ne("pointer",e)}}function Oe(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function Te(e){Oe(e)&&(R=!0,T="virtual")}function He(e){e.target===window||e.target===document||(!R&&!Z&&(T="virtual",ne("virtual",e)),R=!1,Z=!1)}function Ue(){R=!1,Z=!0}function fe(){return T!=="pointer"}function Ve(){if(!Ne()||ue)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...t){R=!0,e.apply(this,t)},document.addEventListener("keydown",de,!0),document.addEventListener("keyup",de,!0),document.addEventListener("click",Te,!0),window.addEventListener("focus",He,!0),window.addEventListener("blur",Ue,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",M,!0),document.addEventListener("pointermove",M,!0),document.addEventListener("pointerup",M,!0)):(document.addEventListener("mousedown",M,!0),document.addEventListener("mousemove",M,!0),document.addEventListener("mouseup",M,!0)),ue=!0}function We(e){Ve(),e(fe());const o=()=>e(fe());return ee.add(o),()=>{ee.delete(o)}}function ze(e,o=[]){const t=Object.assign({},e);for(const n of o)n in t&&delete t[n];return t}function $e(e={}){const o=Se(e),{isDisabled:t,isReadOnly:n,isRequired:c,isInvalid:r,id:u,onBlur:b,onFocus:y,"aria-describedby":m}=o,{defaultChecked:v,isChecked:d,isFocusable:w,onChange:p,isIndeterminate:s,name:g,value:F,tabIndex:A=void 0,"aria-label":j,"aria-labelledby":P,"aria-invalid":E,...q}=e,B=ze(q,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=Q(p),H=Q(b),G=Q(y),[D,X]=l.useState(!1),[L,U]=l.useState(!1),[K,oe]=l.useState(!1),[O,_]=l.useState(!1);l.useEffect(()=>We(X),[]);const x=l.useRef(null),[ae,me]=l.useState(!0),[he,V]=l.useState(!!v),J=d!==void 0,h=J?d:he,re=l.useCallback(a=>{if(n||t){a.preventDefault();return}J||V(h?a.target.checked:s?!0:a.target.checked),N==null||N(a)},[n,t,h,J,s,N]);z(()=>{x.current&&(x.current.indeterminate=!!s)},[s]),Ce(()=>{t&&U(!1)},[t,U]),z(()=>{const a=x.current;if(!(a!=null&&a.form))return;const k=()=>{V(!!v)};return a.form.addEventListener("reset",k),()=>{var I;return(I=a.form)==null?void 0:I.removeEventListener("reset",k)}},[]);const se=t&&!w,ie=l.useCallback(a=>{a.key===" "&&_(!0)},[_]),le=l.useCallback(a=>{a.key===" "&&_(!1)},[_]);z(()=>{if(!x.current)return;x.current.checked!==h&&V(x.current.checked)},[x.current]);const ve=l.useCallback((a={},k=null)=>{const I=W=>{L&&W.preventDefault(),_(!0)};return{...a,ref:k,"data-active":i(O),"data-hover":i(K),"data-checked":i(h),"data-focus":i(L),"data-focus-visible":i(L&&D),"data-indeterminate":i(s),"data-disabled":i(t),"data-invalid":i(r),"data-readonly":i(n),"aria-hidden":!0,onMouseDown:C(a.onMouseDown,I),onMouseUp:C(a.onMouseUp,()=>_(!1)),onMouseEnter:C(a.onMouseEnter,()=>oe(!0)),onMouseLeave:C(a.onMouseLeave,()=>oe(!1))}},[O,h,t,L,D,K,s,r,n]),ge=l.useCallback((a={},k=null)=>({...a,ref:k,"data-active":i(O),"data-hover":i(K),"data-checked":i(h),"data-focus":i(L),"data-focus-visible":i(L&&D),"data-indeterminate":i(s),"data-disabled":i(t),"data-invalid":i(r),"data-readonly":i(n)}),[O,h,t,L,D,K,s,r,n]),pe=l.useCallback((a={},k=null)=>({...B,...a,ref:ce(k,I=>{I&&me(I.tagName==="LABEL")}),onClick:C(a.onClick,()=>{var I;ae||((I=x.current)==null||I.click(),requestAnimationFrame(()=>{var W;(W=x.current)==null||W.focus({preventScroll:!0})}))}),"data-disabled":i(t),"data-checked":i(h),"data-invalid":i(r)}),[B,t,h,r,ae]),ke=l.useCallback((a={},k=null)=>({...a,ref:ce(x,k),type:"checkbox",name:g,value:F,id:u,tabIndex:A,onChange:C(a.onChange,re),onBlur:C(a.onBlur,H,()=>U(!1)),onFocus:C(a.onFocus,G,()=>U(!0)),onKeyDown:C(a.onKeyDown,ie),onKeyUp:C(a.onKeyUp,le),required:c,checked:h,disabled:se,readOnly:n,"aria-label":j,"aria-labelledby":P,"aria-invalid":E?!!E:r,"aria-describedby":m,"aria-disabled":t,style:Be}),[g,F,u,re,H,G,ie,le,c,h,se,n,j,P,E,r,m,t,A]),be=l.useCallback((a={},k=null)=>({...a,ref:k,onMouseDown:C(a.onMouseDown,qe),"data-disabled":i(t),"data-checked":i(h),"data-invalid":i(r)}),[h,t,r]);return{state:{isInvalid:r,isFocused:L,isChecked:h,isActive:O,isHovered:K,isIndeterminate:s,isDisabled:t,isReadOnly:n,isRequired:c},getRootProps:pe,getCheckboxProps:ve,getIndicatorProps:ge,getInputProps:ke,getLabelProps:be,htmlProps:B}}function qe(e){e.preventDefault(),e.stopPropagation()}var Xe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Je={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Qe=te({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ye=te({from:{opacity:0},to:{opacity:1}}),Ze=te({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),et=$(function(o,t){const n=Re(),c={...n,...o},r=we("Checkbox",c),u=xe(o),{spacing:b="0.5rem",className:y,children:m,iconColor:v,iconSize:d,icon:w=f.jsx(Me,{}),isChecked:p,isDisabled:s=n==null?void 0:n.isDisabled,onChange:g,inputProps:F,...A}=u;let j=p;n!=null&&n.value&&u.value&&(j=n.value.includes(u.value));let P=g;n!=null&&n.onChange&&u.value&&(P=Ie(n.onChange,g));const{state:E,getInputProps:q,getCheckboxProps:B,getLabelProps:N,getRootProps:H}=$e({...A,isDisabled:s,isChecked:j,onChange:P}),G=Ae(E.isChecked),D=l.useMemo(()=>({animation:G?E.isIndeterminate?`${Ye} 20ms linear, ${Ze} 200ms linear`:`${Qe} 200ms linear`:void 0,fontSize:d,color:v,...r.icon}),[v,d,G,E.isIndeterminate,r.icon]),X=l.cloneElement(w,{__css:D,isIndeterminate:E.isIndeterminate,isChecked:E.isChecked});return f.jsxs(S.label,{__css:{...Je,...r.container},className:Ee("chakra-checkbox",y),...H(),children:[f.jsx("input",{className:"chakra-checkbox__input",...q(F,t)}),f.jsx(S.span,{__css:{...Xe,...r.control},className:"chakra-checkbox__control",...B(),children:X}),m&&f.jsx(S.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:b,...r.label},children:m})]})});et.displayName="Checkbox";var tt=$(function(o,t){const{templateAreas:n,gap:c,rowGap:r,columnGap:u,column:b,row:y,autoFlow:m,autoRows:v,templateRows:d,autoColumns:w,templateColumns:p,...s}=o,g={display:"grid",gridTemplateAreas:n,gridGap:c,gridRowGap:r,gridColumnGap:u,gridAutoColumns:w,gridColumn:b,gridRow:y,gridAutoFlow:m,gridAutoRows:v,gridTemplateRows:d,gridTemplateColumns:p};return f.jsx(S.div,{ref:t,__css:g,...s})});tt.displayName="Grid";export{et as C,tt as G,je as I}; diff --git a/dist/workspace_web/chunk-NTCQBYKE-5Z1buvob.js b/dist/workspace_web/chunk-NTCQBYKE-5Z1buvob.js deleted file mode 100644 index 7361366..0000000 --- a/dist/workspace_web/chunk-NTCQBYKE-5Z1buvob.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t}from"./App-jF2-L8lr.js";import{f as o,j as s}from"./input.js";var e=o((a,r)=>s.jsx(t,{align:"center",...a,direction:"column",ref:r}));e.displayName="VStack";export{e as V}; diff --git a/dist/workspace_web/input.js b/dist/workspace_web/input.js deleted file mode 100644 index e990ca9..0000000 --- a/dist/workspace_web/input.js +++ /dev/null @@ -1,688 +0,0 @@ -function Qk(e,t){for(var r=0;rn[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const qk="modulepreload",Zk=function(e){return"/"+e},dm={},Jk=function(t,r,n){if(!r||r.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=Zk(i),i in dm)return;dm[i]=!0;const a=i.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!n)for(let c=o.length-1;c>=0;c--){const d=o[c];if(d.href===i&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${s}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":qk,a||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),a)return new Promise((c,d)=>{u.addEventListener("load",c),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i})};var is=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var H0={exports:{}},ou={},G0={exports:{}},W={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Fa=Symbol.for("react.element"),eC=Symbol.for("react.portal"),tC=Symbol.for("react.fragment"),rC=Symbol.for("react.strict_mode"),nC=Symbol.for("react.profiler"),oC=Symbol.for("react.provider"),iC=Symbol.for("react.context"),aC=Symbol.for("react.forward_ref"),sC=Symbol.for("react.suspense"),lC=Symbol.for("react.memo"),uC=Symbol.for("react.lazy"),fm=Symbol.iterator;function cC(e){return e===null||typeof e!="object"?null:(e=fm&&e[fm]||e["@@iterator"],typeof e=="function"?e:null)}var K0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y0=Object.assign,X0={};function ti(e,t,r){this.props=e,this.context=t,this.refs=X0,this.updater=r||K0}ti.prototype.isReactComponent={};ti.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ti.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Q0(){}Q0.prototype=ti.prototype;function Qf(e,t,r){this.props=e,this.context=t,this.refs=X0,this.updater=r||K0}var qf=Qf.prototype=new Q0;qf.constructor=Qf;Y0(qf,ti.prototype);qf.isPureReactComponent=!0;var hm=Array.isArray,q0=Object.prototype.hasOwnProperty,Zf={current:null},Z0={key:!0,ref:!0,__self:!0,__source:!0};function J0(e,t,r){var n,o={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)q0.call(t,n)&&!Z0.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1>>1,ne=z[B];if(0>>1;Bo(Xt,V))weo(Fe,Xt)?(z[B]=Fe,z[we]=V,B=we):(z[B]=Xt,z[Ge]=V,B=Ge);else if(weo(Fe,V))z[B]=Fe,z[we]=V,B=we;else break e}}return N}function o(z,N){var V=z.sortIndex-N.sortIndex;return V!==0?V:z.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,f=3,p=!1,g=!1,y=!1,k=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(z){for(var N=r(u);N!==null;){if(N.callback===null)n(u);else if(N.startTime<=z)n(u),N.sortIndex=N.expirationTime,t(l,N);else break;N=r(u)}}function C(z){if(y=!1,v(z),!g)if(r(l)!==null)g=!0,He(_);else{var N=r(u);N!==null&&it(C,N.startTime-z)}}function _(z,N){g=!1,y&&(y=!1,m(A),A=-1),p=!0;var V=f;try{for(v(N),d=r(l);d!==null&&(!(d.expirationTime>N)||z&&!ee());){var B=d.callback;if(typeof B=="function"){d.callback=null,f=d.priorityLevel;var ne=B(d.expirationTime<=N);N=e.unstable_now(),typeof ne=="function"?d.callback=ne:d===r(l)&&n(l),v(N)}else n(l);d=r(l)}if(d!==null)var U=!0;else{var Ge=r(u);Ge!==null&&it(C,Ge.startTime-N),U=!1}return U}finally{d=null,f=V,p=!1}}var $=!1,T=null,A=-1,M=5,I=-1;function ee(){return!(e.unstable_now()-Iz||125B?(z.sortIndex=V,t(u,z),r(l)===null&&z===r(u)&&(y?(m(A),A=-1):y=!0,it(C,V-B))):(z.sortIndex=ne,t(l,z),g||p||(g=!0,He(_))),z},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(z){var N=f;return function(){var V=f;f=N;try{return z.apply(this,arguments)}finally{f=V}}}})(ny);ry.exports=ny;var xC=ry.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var oy=S,wt=xC;function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sd=Object.prototype.hasOwnProperty,wC=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vm={},gm={};function kC(e){return Sd.call(gm,e)?!0:Sd.call(vm,e)?!1:wC.test(e)?gm[e]=!0:(vm[e]=!0,!1)}function CC(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _C(e,t,r,n){if(t===null||typeof t>"u"||CC(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ot(e,t,r,n,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var Ue={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ue[e]=new ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ue[t]=new ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ue[e]=new ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ue[e]=new ot(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ue[e]=new ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ue[e]=new ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ue[e]=new ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ue[e]=new ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ue[e]=new ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var eh=/[\-:]([a-z])/g;function th(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(eh,th);Ue[t]=new ot(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(eh,th);Ue[t]=new ot(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(eh,th);Ue[t]=new ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ue[e]=new ot(e,1,!1,e.toLowerCase(),null,!1,!1)});Ue.xlinkHref=new ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ue[e]=new ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function rh(e,t,r,n){var o=Ue.hasOwnProperty(t)?Ue[t]:null;(o!==null?o.type!==0:n||!(2s||o[a]!==i[s]){var l=` -`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{cc=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?_i(e):""}function PC(e){switch(e.tag){case 5:return _i(e.type);case 16:return _i("Lazy");case 13:return _i("Suspense");case 19:return _i("SuspenseList");case 0:case 2:case 15:return e=dc(e.type,!1),e;case 11:return e=dc(e.type.render,!1),e;case 1:return e=dc(e.type,!0),e;default:return""}}function Cd(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case io:return"Fragment";case oo:return"Portal";case xd:return"Profiler";case nh:return"StrictMode";case wd:return"Suspense";case kd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case sy:return(e.displayName||"Context")+".Consumer";case ay:return(e._context.displayName||"Context")+".Provider";case oh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ih:return t=e.displayName||null,t!==null?t:Cd(e.type)||"Memo";case Wr:t=e._payload,e=e._init;try{return Cd(e(t))}catch{}}return null}function TC(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Cd(t);case 8:return t===nh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ln(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function EC(e){var t=uy(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ls(e){e._valueTracker||(e._valueTracker=EC(e))}function cy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=uy(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function ml(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function _d(e,t){var r=t.checked;return be({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function bm(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ln(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function dy(e,t){t=t.checked,t!=null&&rh(e,"checked",t,!1)}function Pd(e,t){dy(e,t);var r=ln(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Td(e,t.type,r):t.hasOwnProperty("defaultValue")&&Td(e,t.type,ln(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Sm(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Td(e,t,r){(t!=="number"||ml(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Pi=Array.isArray;function Eo(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=us.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function oa(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Oi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},$C=["Webkit","ms","Moz","O"];Object.keys(Oi).forEach(function(e){$C.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Oi[t]=Oi[e]})});function my(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Oi.hasOwnProperty(e)&&Oi[e]?(""+t).trim():t+"px"}function vy(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=my(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var AC=be({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ad(e,t){if(t){if(AC[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Rd(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Md=null;function ah(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zd=null,$o=null,Ao=null;function km(e){if(e=La(e)){if(typeof zd!="function")throw Error(R(280));var t=e.stateNode;t&&(t=uu(t),zd(e.stateNode,e.type,t))}}function gy(e){$o?Ao?Ao.push(e):Ao=[e]:$o=e}function yy(){if($o){var e=$o,t=Ao;if(Ao=$o=null,km(e),t)for(e=0;e>>=0,e===0?32:31-(NC(e)/VC|0)|0}var cs=64,ds=4194304;function Ti(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function bl(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~o;s!==0?n=Ti(s):(i&=a,i!==0&&(n=Ti(i)))}else a=r&~o,a!==0?n=Ti(a):i!==0&&(n=Ti(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Da(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ht(t),e[t]=r}function GC(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=ji),Mm=" ",zm=!1;function Oy(e,t){switch(e){case"keyup":return S_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function By(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ao=!1;function w_(e,t){switch(e){case"compositionend":return By(t);case"keypress":return t.which!==32?null:(zm=!0,Mm);case"textInput":return e=t.data,e===Mm&&zm?null:e;default:return null}}function k_(e,t){if(ao)return e==="compositionend"||!ph&&Oy(e,t)?(e=Iy(),Ws=dh=Xr=null,ao=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Lm(r)}}function Wy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Uy(){for(var e=window,t=ml();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ml(e.document)}return t}function mh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function M_(e){var t=Uy(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Wy(r.ownerDocument.documentElement,r)){if(n!==null&&mh(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=Om(r,i);var a=Om(r,n);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,so=null,Bd=null,Vi=null,jd=!1;function Bm(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;jd||so==null||so!==ml(n)||(n=so,"selectionStart"in n&&mh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Vi&&ca(Vi,n)||(Vi=n,n=wl(Bd,"onSelect"),0co||(e.current=Gd[co],Gd[co]=null,co--)}function ae(e,t){co++,Gd[co]=e.current,e.current=t}var un={},qe=hn(un),ut=hn(!1),jn=un;function Wo(e,t){var r=e.type.contextTypes;if(!r)return un;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ct(e){return e=e.childContextTypes,e!=null}function Cl(){fe(ut),fe(qe)}function Gm(e,t,r){if(qe.current!==un)throw Error(R(168));ae(qe,t),ae(ut,r)}function Jy(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(R(108,TC(e)||"Unknown",o));return be({},r,n)}function _l(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||un,jn=qe.current,ae(qe,e),ae(ut,ut.current),!0}function Km(e,t,r){var n=e.stateNode;if(!n)throw Error(R(169));r?(e=Jy(e,t,jn),n.__reactInternalMemoizedMergedChildContext=e,fe(ut),fe(qe),ae(qe,e)):fe(ut),ae(ut,r)}var br=null,cu=!1,_c=!1;function e1(e){br===null?br=[e]:br.push(e)}function U_(e){cu=!0,e1(e)}function pn(){if(!_c&&br!==null){_c=!0;var e=0,t=te;try{var r=br;for(te=1;e>=a,o-=a,wr=1<<32-Ht(t)+o|r<A?(M=T,T=null):M=T.sibling;var I=f(m,T,v[A],C);if(I===null){T===null&&(T=M);break}e&&T&&I.alternate===null&&t(m,T),h=i(I,h,A),$===null?_=I:$.sibling=I,$=I,T=M}if(A===v.length)return r(m,T),me&&xn(m,A),_;if(T===null){for(;AA?(M=T,T=null):M=T.sibling;var ee=f(m,T,I.value,C);if(ee===null){T===null&&(T=M);break}e&&T&&ee.alternate===null&&t(m,T),h=i(ee,h,A),$===null?_=ee:$.sibling=ee,$=ee,T=M}if(I.done)return r(m,T),me&&xn(m,A),_;if(T===null){for(;!I.done;A++,I=v.next())I=d(m,I.value,C),I!==null&&(h=i(I,h,A),$===null?_=I:$.sibling=I,$=I);return me&&xn(m,A),_}for(T=n(m,T);!I.done;A++,I=v.next())I=p(T,m,A,I.value,C),I!==null&&(e&&I.alternate!==null&&T.delete(I.key===null?A:I.key),h=i(I,h,A),$===null?_=I:$.sibling=I,$=I);return e&&T.forEach(function(ze){return t(m,ze)}),me&&xn(m,A),_}function k(m,h,v,C){if(typeof v=="object"&&v!==null&&v.type===io&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ss:e:{for(var _=v.key,$=h;$!==null;){if($.key===_){if(_=v.type,_===io){if($.tag===7){r(m,$.sibling),h=o($,v.props.children),h.return=m,m=h;break e}}else if($.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Wr&&ev(_)===$.type){r(m,$.sibling),h=o($,v.props),h.ref=vi(m,$,v),h.return=m,m=h;break e}r(m,$);break}else t(m,$);$=$.sibling}v.type===io?(h=Fn(v.props.children,m.mode,C,v.key),h.return=m,m=h):(C=qs(v.type,v.key,v.props,null,m.mode,C),C.ref=vi(m,h,v),C.return=m,m=C)}return a(m);case oo:e:{for($=v.key;h!==null;){if(h.key===$)if(h.tag===4&&h.stateNode.containerInfo===v.containerInfo&&h.stateNode.implementation===v.implementation){r(m,h.sibling),h=o(h,v.children||[]),h.return=m,m=h;break e}else{r(m,h);break}else t(m,h);h=h.sibling}h=zc(v,m.mode,C),h.return=m,m=h}return a(m);case Wr:return $=v._init,k(m,h,$(v._payload),C)}if(Pi(v))return g(m,h,v,C);if(di(v))return y(m,h,v,C);ys(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,h!==null&&h.tag===6?(r(m,h.sibling),h=o(h,v),h.return=m,m=h):(r(m,h),h=Mc(v,m.mode,C),h.return=m,m=h),a(m)):r(m,h)}return k}var Ho=l1(!0),u1=l1(!1),Oa={},cr=hn(Oa),pa=hn(Oa),ma=hn(Oa);function An(e){if(e===Oa)throw Error(R(174));return e}function Ch(e,t){switch(ae(ma,t),ae(pa,e),ae(cr,Oa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$d(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=$d(t,e)}fe(cr),ae(cr,t)}function Go(){fe(cr),fe(pa),fe(ma)}function c1(e){An(ma.current);var t=An(cr.current),r=$d(t,e.type);t!==r&&(ae(pa,e),ae(cr,r))}function _h(e){pa.current===e&&(fe(cr),fe(pa))}var ve=hn(0);function Rl(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pc=[];function Ph(){for(var e=0;er?r:4,e(!0);var n=Tc.transition;Tc.transition={};try{e(!1),t()}finally{te=r,Tc.transition=n}}function P1(){return Lt().memoizedState}function Y_(e,t,r){var n=nn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},T1(e))E1(t,r);else if(r=o1(e,t,r,n),r!==null){var o=tt();Gt(r,e,n,o),$1(r,t,n)}}function X_(e,t,r){var n=nn(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(T1(e))E1(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,r);if(o.hasEagerState=!0,o.eagerState=s,Yt(s,a)){var l=t.interleaved;l===null?(o.next=o,wh(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}r=o1(e,t,o,n),r!==null&&(o=tt(),Gt(r,e,n,o),$1(r,t,n))}}function T1(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function E1(e,t){Wi=Ml=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function $1(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,lh(e,r)}}var zl={readContext:It,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useInsertionEffect:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useSyncExternalStore:Ke,useId:Ke,unstable_isNewReconciler:!1},Q_={readContext:It,useCallback:function(e,t){return er().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:rv,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ks(4194308,4,x1.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ks(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ks(4,2,e,t)},useMemo:function(e,t){var r=er();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=er();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Y_.bind(null,ye,e),[n.memoizedState,e]},useRef:function(e){var t=er();return e={current:e},t.memoizedState=e},useState:tv,useDebugValue:Rh,useDeferredValue:function(e){return er().memoizedState=e},useTransition:function(){var e=tv(!1),t=e[0];return e=K_.bind(null,e[1]),er().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ye,o=er();if(me){if(r===void 0)throw Error(R(407));r=r()}else{if(r=t(),Le===null)throw Error(R(349));Vn&30||h1(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,rv(m1.bind(null,n,i,e),[e]),n.flags|=2048,ya(9,p1.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=er(),t=Le.identifierPrefix;if(me){var r=kr,n=wr;r=(n&~(1<<32-Ht(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=va++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[ir]=t,e[ha]=n,O1(e,t,!1,!1),t.stateNode=e;e:{switch(a=Rd(r,n),r){case"dialog":ce("cancel",e),ce("close",e),o=n;break;case"iframe":case"object":case"embed":ce("load",e),o=n;break;case"video":case"audio":for(o=0;oYo&&(t.flags|=128,n=!0,gi(i,!1),t.lanes=4194304)}else{if(!n)if(e=Rl(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),gi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!me)return Ye(t),null}else 2*ke()-i.renderingStartTime>Yo&&r!==1073741824&&(t.flags|=128,n=!0,gi(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ke(),t.sibling=null,r=ve.current,ae(ve,n?r&1|2:r&1),t):(Ye(t),null);case 22:case 23:return Lh(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?gt&1073741824&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function o2(e,t){switch(gh(t),t.tag){case 1:return ct(t.type)&&Cl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Go(),fe(ut),fe(qe),Ph(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _h(t),null;case 13:if(fe(ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));Uo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fe(ve),null;case 4:return Go(),null;case 10:return xh(t.type._context),null;case 22:case 23:return Lh(),null;case 24:return null;default:return null}}var Ss=!1,Qe=!1,i2=typeof WeakSet=="function"?WeakSet:Set,D=null;function mo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Se(e,t,n)}else r.current=null}function of(e,t,r){try{r()}catch(n){Se(e,t,n)}}var dv=!1;function a2(e,t){if(Nd=Sl,e=Uy(),mh(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==r||o!==0&&d.nodeType!==3||(s=a+o),d!==i||n!==0&&d.nodeType!==3||(l=a+n),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===r&&++u===o&&(s=a),f===i&&++c===n&&(l=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Vd={focusedElem:e,selectionRange:r},Sl=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,k=g.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:Nt(t.type,y),k);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(C){Se(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return g=dv,dv=!1,g}function Ui(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&of(t,r,i)}o=o.next}while(o!==n)}}function hu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function af(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function N1(e){var t=e.alternate;t!==null&&(e.alternate=null,N1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ir],delete t[ha],delete t[Hd],delete t[V_],delete t[W_])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function V1(e){return e.tag===5||e.tag===3||e.tag===4}function fv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||V1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function sf(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=kl));else if(n!==4&&(e=e.child,e!==null))for(sf(e,t,r),e=e.sibling;e!==null;)sf(e,t,r),e=e.sibling}function lf(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(lf(e,t,r),e=e.sibling;e!==null;)lf(e,t,r),e=e.sibling}var Ne=null,Vt=!1;function Or(e,t,r){for(r=r.child;r!==null;)W1(e,t,r),r=r.sibling}function W1(e,t,r){if(ur&&typeof ur.onCommitFiberUnmount=="function")try{ur.onCommitFiberUnmount(iu,r)}catch{}switch(r.tag){case 5:Qe||mo(r,t);case 6:var n=Ne,o=Vt;Ne=null,Or(e,t,r),Ne=n,Vt=o,Ne!==null&&(Vt?(e=Ne,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ne.removeChild(r.stateNode));break;case 18:Ne!==null&&(Vt?(e=Ne,r=r.stateNode,e.nodeType===8?Cc(e.parentNode,r):e.nodeType===1&&Cc(e,r),la(e)):Cc(Ne,r.stateNode));break;case 4:n=Ne,o=Vt,Ne=r.stateNode.containerInfo,Vt=!0,Or(e,t,r),Ne=n,Vt=o;break;case 0:case 11:case 14:case 15:if(!Qe&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&of(r,t,a),o=o.next}while(o!==n)}Or(e,t,r);break;case 1:if(!Qe&&(mo(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Se(r,t,s)}Or(e,t,r);break;case 21:Or(e,t,r);break;case 22:r.mode&1?(Qe=(n=Qe)||r.memoizedState!==null,Or(e,t,r),Qe=n):Or(e,t,r);break;default:Or(e,t,r)}}function hv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new i2),t.forEach(function(n){var o=m2.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function Bt(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=a),n&=~i}if(n=o,n=ke()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*l2(n/1960))-n,10e?16:e,Qr===null)var n=!1;else{if(e=Qr,Qr=null,Il=0,Y&6)throw Error(R(331));var o=Y;for(Y|=4,D=e.current;D!==null;){var i=D,a=i.child;if(D.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lke()-Dh?zn(e,0):Fh|=r),dt(e,t)}function q1(e,t){t===0&&(e.mode&1?(t=ds,ds<<=1,!(ds&130023424)&&(ds=4194304)):t=1);var r=tt();e=zr(e,t),e!==null&&(Da(e,t,r),dt(e,r))}function p2(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),q1(e,r)}function m2(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(R(314))}n!==null&&n.delete(t),q1(e,r)}var Z1;Z1=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ut.current)lt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return lt=!1,r2(e,t,r);lt=!!(e.flags&131072)}else lt=!1,me&&t.flags&1048576&&t1(t,Tl,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ys(e,t),e=t.pendingProps;var o=Wo(t,qe.current);Mo(t,r),o=Eh(null,t,n,e,o,r);var i=$h();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ct(n)?(i=!0,_l(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,kh(t),o.updater=du,t.stateNode=o,o._reactInternals=t,qd(t,n,e,r),t=ef(null,t,n,!0,i,r)):(t.tag=0,me&&i&&vh(t),Je(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ys(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=g2(n),e=Nt(n,e),o){case 0:t=Jd(null,t,n,e,r);break e;case 1:t=lv(null,t,n,e,r);break e;case 11:t=av(null,t,n,e,r);break e;case 14:t=sv(null,t,n,Nt(n.type,e),r);break e}throw Error(R(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Nt(n,o),Jd(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Nt(n,o),lv(e,t,n,o,r);case 3:e:{if(D1(t),e===null)throw Error(R(387));n=t.pendingProps,i=t.memoizedState,o=i.element,i1(e,t),Al(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Ko(Error(R(423)),t),t=uv(e,t,n,r,o);break e}else if(n!==o){o=Ko(Error(R(424)),t),t=uv(e,t,n,r,o);break e}else for(yt=en(t.stateNode.containerInfo.firstChild),bt=t,me=!0,Wt=null,r=u1(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Uo(),n===o){t=Fr(e,t,r);break e}Je(e,t,n,r)}t=t.child}return t;case 5:return c1(t),e===null&&Yd(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,Wd(n,o)?a=null:i!==null&&Wd(n,i)&&(t.flags|=32),F1(e,t),Je(e,t,a,r),t.child;case 6:return e===null&&Yd(t),null;case 13:return I1(e,t,r);case 4:return Ch(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ho(t,null,n,r):Je(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Nt(n,o),av(e,t,n,o,r);case 7:return Je(e,t,t.pendingProps,r),t.child;case 8:return Je(e,t,t.pendingProps.children,r),t.child;case 12:return Je(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,ae(El,n._currentValue),n._currentValue=a,i!==null)if(Yt(i.value,a)){if(i.children===o.children&&!ut.current){t=Fr(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Pr(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Xd(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(R(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),Xd(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Je(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Mo(t,r),o=It(o),n=n(o),t.flags|=1,Je(e,t,n,r),t.child;case 14:return n=t.type,o=Nt(n,t.pendingProps),o=Nt(n.type,o),sv(e,t,n,o,r);case 15:return M1(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Nt(n,o),Ys(e,t),t.tag=1,ct(n)?(e=!0,_l(t)):e=!1,Mo(t,r),s1(t,n,o),qd(t,n,o,r),ef(null,t,n,!0,e,r);case 19:return L1(e,t,r);case 22:return z1(e,t,r)}throw Error(R(156,t.tag))};function J1(e,t){return _y(e,t)}function v2(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(e,t,r,n){return new v2(e,t,r,n)}function Bh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function g2(e){if(typeof e=="function")return Bh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===oh)return 11;if(e===ih)return 14}return 2}function on(e,t){var r=e.alternate;return r===null?(r=zt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function qs(e,t,r,n,o,i){var a=2;if(n=e,typeof e=="function")Bh(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case io:return Fn(r.children,o,i,t);case nh:a=8,o|=8;break;case xd:return e=zt(12,r,t,o|2),e.elementType=xd,e.lanes=i,e;case wd:return e=zt(13,r,t,o),e.elementType=wd,e.lanes=i,e;case kd:return e=zt(19,r,t,o),e.elementType=kd,e.lanes=i,e;case ly:return mu(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ay:a=10;break e;case sy:a=9;break e;case oh:a=11;break e;case ih:a=14;break e;case Wr:a=16,n=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=zt(a,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Fn(e,t,r,n){return e=zt(7,e,n,t),e.lanes=r,e}function mu(e,t,r,n){return e=zt(22,e,n,t),e.elementType=ly,e.lanes=r,e.stateNode={isHidden:!1},e}function Mc(e,t,r){return e=zt(6,e,null,t),e.lanes=r,e}function zc(e,t,r){return t=zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function y2(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hc(0),this.expirationTimes=hc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hc(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function jh(e,t,r,n,o,i,a,s,l){return e=new y2(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=zt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},kh(i),e}function b2(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nb)}catch(e){console.error(e)}}nb(),ty.exports=Ct;var Uh=ty.exports,xv=Uh;bd.createRoot=xv.createRoot,bd.hydrateRoot=xv.hydrateRoot;function C2(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ve(oi,--ft):0,Xo--,Ee===10&&(Xo=1,xu--),Ee}function St(){return Ee=ft2||xa(Ee)>3?"":" "}function L2(e,t){for(;--t&&St()&&!(Ee<48||Ee>102||Ee>57&&Ee<65||Ee>70&&Ee<97););return Ba(e,Zs()+(t<6&&dr()==32&&St()==32))}function pf(e){for(;St();)switch(Ee){case e:return ft;case 34:case 39:e!==34&&e!==39&&pf(Ee);break;case 40:e===41&&pf(e);break;case 92:St();break}return ft}function O2(e,t){for(;St()&&e+Ee!==57;)if(e+Ee===84&&dr()===47)break;return"/*"+Ba(t,ft-1)+"*"+Su(e===47?e:St())}function B2(e){for(;!xa(dr());)St();return Ba(e,ft)}function j2(e){return ub(el("",null,null,null,[""],e=lb(e),0,[0],e))}function el(e,t,r,n,o,i,a,s,l){for(var u=0,c=0,d=a,f=0,p=0,g=0,y=1,k=1,m=1,h=0,v="",C=o,_=i,$=n,T=v;k;)switch(g=h,h=St()){case 40:if(g!=108&&Ve(T,d-1)==58){hf(T+=q(Js(h),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:T+=Js(h);break;case 9:case 10:case 13:case 32:T+=I2(g);break;case 92:T+=L2(Zs()-1,7);continue;case 47:switch(dr()){case 42:case 47:ks(N2(O2(St(),Zs()),t,r),l);break;default:T+="/"}break;case 123*y:s[u++]=nr(T)*m;case 125*y:case 59:case 0:switch(h){case 0:case 125:k=0;case 59+c:m==-1&&(T=q(T,/\f/g,"")),p>0&&nr(T)-d&&ks(p>32?kv(T+";",n,r,d-1):kv(q(T," ","")+";",n,r,d-2),l);break;case 59:T+=";";default:if(ks($=wv(T,t,r,u,c,o,s,v,C=[],_=[],d),i),h===123)if(c===0)el(T,t,$,$,C,i,d,s,_);else switch(f===99&&Ve(T,3)===110?100:f){case 100:case 108:case 109:case 115:el(e,$,$,n&&ks(wv(e,$,$,0,0,o,s,v,o,C=[],d),_),o,_,d,s,n?C:_);break;default:el(T,$,$,$,[""],_,0,s,_)}}u=c=p=0,y=m=1,v=T="",d=a;break;case 58:d=1+nr(T),p=g;default:if(y<1){if(h==123)--y;else if(h==125&&y++==0&&D2()==125)continue}switch(T+=Su(h),h*y){case 38:m=c>0?1:(T+="\f",-1);break;case 44:s[u++]=(nr(T)-1)*m,m=1;break;case 64:dr()===45&&(T+=Js(St())),f=dr(),c=d=nr(v=T+=B2(Zs())),h++;break;case 45:g===45&&nr(T)==2&&(y=0)}}return i}function wv(e,t,r,n,o,i,a,s,l,u,c){for(var d=o-1,f=o===0?i:[""],p=Kh(f),g=0,y=0,k=0;g0?f[m]+" "+h:q(h,/&\f/g,f[m])))&&(l[k++]=v);return wu(e,t,r,o===0?Hh:s,l,u,c)}function N2(e,t,r){return wu(e,t,r,ob,Su(F2()),Sa(e,2,-2),0)}function kv(e,t,r,n){return wu(e,t,r,Gh,Sa(e,0,n),Sa(e,n+1,-1),n)}function Fo(e,t){for(var r="",n=Kh(e),o=0;o6)switch(Ve(e,t+1)){case 109:if(Ve(e,t+4)!==45)break;case 102:return q(e,/(.+:)(.+)-([^]+)/,"$1"+Q+"$2-$3$1"+Bl+(Ve(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~hf(e,"stretch")?db(q(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ve(e,t+1)!==115)break;case 6444:switch(Ve(e,nr(e)-3-(~hf(e,"!important")&&10))){case 107:return q(e,":",":"+Q)+e;case 101:return q(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Q+(Ve(e,14)===45?"inline-":"")+"box$3$1"+Q+"$2$3$1"+Xe+"$2box$3")+e}break;case 5936:switch(Ve(e,t+11)){case 114:return Q+e+Xe+q(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Q+e+Xe+q(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Q+e+Xe+q(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Q+e+Xe+e+e}return e}var Q2=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case Gh:t.return=db(t.value,t.length);break;case ib:return Fo([bi(t,{value:q(t.value,"@","@"+Q)})],o);case Hh:if(t.length)return z2(t.props,function(i){switch(M2(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Fo([bi(t,{props:[q(i,/:(read-\w+)/,":"+Bl+"$1")]})],o);case"::placeholder":return Fo([bi(t,{props:[q(i,/:(plac\w+)/,":"+Q+"input-$1")]}),bi(t,{props:[q(i,/:(plac\w+)/,":"+Bl+"$1")]}),bi(t,{props:[q(i,/:(plac\w+)/,Xe+"input-$1")]})],o)}return""})}},q2=[Q2],Z2=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var k=y.getAttribute("data-emotion");k.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||q2,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var k=y.getAttribute("data-emotion").split(" "),m=1;m=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var uP={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,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},cP=/[A-Z]|^ms/g,dP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,gb=function(t){return t.charCodeAt(1)===45},Pv=function(t){return t!=null&&typeof t!="boolean"},Fc=cb(function(e){return gb(e)?e:e.replace(cP,"-$&").toLowerCase()}),Tv=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(dP,function(n,o,i){return or={name:o,styles:i,next:or},o})}return uP[t]!==1&&!gb(t)&&typeof r=="number"&&r!==0?r+"px":r};function wa(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return or={name:r.name,styles:r.styles,next:or},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)or={name:n.name,styles:n.styles,next:or},n=n.next;var o=r.styles+";";return o}return fP(e,t,r)}case"function":{if(e!==void 0){var i=or,a=r(e);return or=i,wa(e,t,a)}break}}if(t==null)return r;var s=t[r];return s!==void 0?s:r}function fP(e,t,r){var n="";if(Array.isArray(r))for(var o=0;oE.jsx(ja,{styles:wb}),CP=({scope:e=""})=>E.jsx(ja,{styles:xb` - 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; - } - - ${wb} - `});function _P(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function mn(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:i,defaultValue:a}=e,s=S.createContext(a);s.displayName=t;function l(){var u;const c=S.useContext(s);if(!c&&r){const d=new Error(i??_P(n,o));throw d.name="ContextError",(u=Error.captureStackTrace)==null||u.call(Error,d,l),d}return c}return[s.Provider,l,s]}var[PP,TP]=mn({strict:!1,name:"PortalManagerContext"});function kb(e){const{children:t,zIndex:r}=e;return E.jsx(PP,{value:{zIndex:r},children:t})}kb.displayName="PortalManager";var ka=globalThis!=null&&globalThis.document?S.useLayoutEffect:S.useEffect,[Cb,EP]=mn({strict:!1,name:"PortalContext"}),tp="chakra-portal",$P=".chakra-portal",AP=e=>E.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),RP=e=>{const{appendToParentPortal:t,children:r}=e,[n,o]=S.useState(null),i=S.useRef(null),[,a]=S.useState({});S.useEffect(()=>a({}),[]);const s=EP(),l=TP();ka(()=>{if(!n)return;const c=n.ownerDocument,d=t?s??c.body:c.body;if(!d)return;i.current=c.createElement("div"),i.current.className=tp,d.appendChild(i.current),a({});const f=i.current;return()=>{d.contains(f)&&d.removeChild(f)}},[n]);const u=l!=null&&l.zIndex?E.jsx(AP,{zIndex:l==null?void 0:l.zIndex,children:r}):r;return i.current?Uh.createPortal(E.jsx(Cb,{value:i.current,children:u}),i.current):E.jsx("span",{ref:c=>{c&&o(c)}})},MP=e=>{const{children:t,containerRef:r,appendToParentPortal:n}=e,o=r.current,i=o??(typeof window<"u"?document.body:void 0),a=S.useMemo(()=>{const l=o==null?void 0:o.ownerDocument.createElement("div");return l&&(l.className=tp),l},[o]),[,s]=S.useState({});return ka(()=>s({}),[]),ka(()=>{if(!(!a||!i))return i.appendChild(a),()=>{i.removeChild(a)}},[a,i]),i&&a?Uh.createPortal(E.jsx(Cb,{value:n?a:null,children:t}),a):null};function Na(e){const t={appendToParentPortal:!0,...e},{containerRef:r,...n}=t;return r?E.jsx(MP,{containerRef:r,...n}):E.jsx(RP,{...n})}Na.className=tp;Na.selector=$P;Na.displayName="Portal";function zP(){const e=S.useContext(Qo);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}var Fu=S.createContext({});Fu.displayName="ColorModeContext";function Du(){const e=S.useContext(Fu);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}function xB(e,t){const{colorMode:r}=Du();return r==="dark"?t:e}var Cs={light:"chakra-ui-light",dark:"chakra-ui-dark"};function FP(e={}){const{preventTransition:t=!0}=e,r={setDataset:n=>{const o=t?r.preventTransition():void 0;document.documentElement.dataset.theme=n,document.documentElement.style.colorScheme=n,o==null||o()},setClassName(n){document.body.classList.add(n?Cs.dark:Cs.light),document.body.classList.remove(n?Cs.light:Cs.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(n){var o;return((o=r.query().matches)!=null?o:n==="dark")?"dark":"light"},addListener(n){const o=r.query(),i=a=>{n(a.matches?"dark":"light")};return typeof o.addListener=="function"?o.addListener(i):o.addEventListener("change",i),()=>{typeof o.removeListener=="function"?o.removeListener(i):o.removeEventListener("change",i)}},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 r}var DP="chakra-ui-color-mode";function IP(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let r;try{r=localStorage.getItem(e)||t}catch{}return r||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var LP=IP(DP),jl=()=>{};function Av(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function _b(e){const{value:t,children:r,options:{useSystemColorMode:n,initialColorMode:o,disableTransitionOnChange:i}={},colorModeManager:a=LP}=e,s=o==="dark"?"dark":"light",[l,u]=S.useState(()=>Av(a,s)),[c,d]=S.useState(()=>Av(a)),{getSystemTheme:f,setClassName:p,setDataset:g,addListener:y}=S.useMemo(()=>FP({preventTransition:i}),[i]),k=o==="system"&&!l?c:l,m=S.useCallback(C=>{const _=C==="system"?f():C;u(_),p(_==="dark"),g(_),a.set(_)},[a,f,p,g]);ka(()=>{o==="system"&&d(f())},[]),S.useEffect(()=>{const C=a.get();if(C){m(C);return}if(o==="system"){m("system");return}m(s)},[a,s,o,m]);const h=S.useCallback(()=>{m(k==="dark"?"light":"dark")},[k,m]);S.useEffect(()=>{if(n)return y(m)},[n,y,m]);const v=S.useMemo(()=>({colorMode:t??k,toggleColorMode:t?jl:h,setColorMode:t?jl:m,forced:t!==void 0}),[k,h,m,t]);return E.jsx(Fu.Provider,{value:v,children:r})}_b.displayName="ColorModeProvider";function Pb(e){const t=S.useMemo(()=>({colorMode:"dark",toggleColorMode:jl,setColorMode:jl,forced:!0}),[]);return E.jsx(Fu.Provider,{value:t,...e})}Pb.displayName="DarkMode";var OP=new Set(["dark","light","system"]);function BP(e){let t=e;return OP.has(t)||(t="light"),t}function jP(e={}){const{initialColorMode:t="light",type:r="localStorage",storageKey:n="chakra-ui-color-mode"}=e,o=BP(t),i=r==="cookie",a=`(function(){try{var a=function(o){var l="(prefers-color-scheme: dark)",v=window.matchMedia(l).matches?"dark":"light",e=o==="system"?v:o,d=document.documentElement,m=document.body,i="chakra-ui-light",n="chakra-ui-dark",s=e==="dark";return m.classList.add(s?n:i),m.classList.remove(s?i:n),d.style.colorScheme=e,d.dataset.theme=e,e},u=a,h="${o}",r="${n}",t=document.cookie.match(new RegExp("(^| )".concat(r,"=([^;]+)"))),c=t?t[2]:null;c?a(c):document.cookie="".concat(r,"=").concat(a(h),"; max-age=31536000; path=/")}catch(a){}})(); - `,s=`(function(){try{var a=function(c){var v="(prefers-color-scheme: dark)",h=window.matchMedia(v).matches?"dark":"light",r=c==="system"?h:c,o=document.documentElement,s=document.body,l="chakra-ui-light",d="chakra-ui-dark",i=r==="dark";return s.classList.add(i?d:l),s.classList.remove(i?l:d),o.style.colorScheme=r,o.dataset.theme=r,r},n=a,m="${o}",e="${n}",t=localStorage.getItem(e);t?a(t):localStorage.setItem(e,a(m))}catch(a){}})(); - `;return`!${i?a:s}`.trim()}function NP(e={}){const{nonce:t}=e;return E.jsx("script",{id:"chakra-script",nonce:t,dangerouslySetInnerHTML:{__html:jP(e)}})}function VP(){const e=Du(),t=zP();return{...e,theme:t}}function WP(e,t,r){var n,o;if(t==null)return t;const i=a=>{var s,l;return(l=(s=e.__breakpoints)==null?void 0:s.asArray)==null?void 0:l[a]};return(o=(n=i(t))!=null?n:i(r))!=null?o:r}function UP(e,t,r){var n,o;if(t==null)return t;const i=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.value};return(o=(n=i(t))!=null?n:i(r))!=null?o:r}function wB(e,t,r){const n=Array.isArray(t)?t:[t],o=Array.isArray(r)?r:[r];return i=>{const a=o.filter(Boolean),s=n.map((l,u)=>{var c,d;if(e==="breakpoints")return WP(i,l,(c=a[u])!=null?c:l);const f=`${e}.${l}`;return UP(i,f,(d=a[u])!=null?d:l)});return Array.isArray(t)?s:s[0]}}var Be=(...e)=>e.filter(Boolean).join(" ");function Kt(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function lr(e,...t){return HP(e)?e(...t):e}var HP=e=>typeof e=="function",Rv=e=>e?"":void 0,kB=e=>e?!0:void 0;function $i(...e){return function(r){e.some(n=>(n==null||n(r),r==null?void 0:r.defaultPrevented))}}function CB(...e){return function(r){e.forEach(n=>{n==null||n(r)})}}var Nl={exports:{}};Nl.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",o=800,i=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",g="[object GeneratorFunction]",y="[object Map]",k="[object Number]",m="[object Null]",h="[object Object]",v="[object Proxy]",C="[object RegExp]",_="[object Set]",$="[object String]",T="[object Undefined]",A="[object WeakMap]",M="[object ArrayBuffer]",I="[object DataView]",ee="[object Float32Array]",ze="[object Float64Array]",Pe="[object Int8Array]",oe="[object Int16Array]",ue="[object Int32Array]",He="[object Uint8Array]",it="[object Uint8ClampedArray]",z="[object Uint16Array]",N="[object Uint32Array]",V=/[\\^$.*+?()[\]{}|]/g,B=/^\[object .+?Constructor\]$/,ne=/^(?:0|[1-9]\d*)$/,U={};U[ee]=U[ze]=U[Pe]=U[oe]=U[ue]=U[He]=U[it]=U[z]=U[N]=!0,U[s]=U[l]=U[M]=U[c]=U[I]=U[d]=U[f]=U[p]=U[y]=U[k]=U[h]=U[C]=U[_]=U[$]=U[A]=!1;var Ge=typeof is=="object"&&is&&is.Object===Object&&is,Xt=typeof self=="object"&&self&&self.Object===Object&&self,we=Ge||Xt||Function("return this")(),Fe=t&&!t.nodeType&&t,mt=Fe&&!0&&e&&!e.nodeType&&e,Qt=mt&&mt.exports===Fe,Ot=Qt&&Ge.process,qt=function(){try{var b=mt&&mt.require&&mt.require("util").types;return b||Ot&&Ot.binding&&Ot.binding("util")}catch{}}(),si=qt&&qt.isTypedArray;function Qa(b,x,P){switch(P.length){case 0:return b.call(x);case 1:return b.call(x,P[0]);case 2:return b.call(x,P[0],P[1]);case 3:return b.call(x,P[0],P[1],P[2])}return b.apply(x,P)}function Ow(b,x){for(var P=-1,F=Array(b);++P-1}function ak(b,x){var P=this.__data__,F=ts(P,b);return F<0?(++this.size,P.push([b,x])):P[F][1]=x,this}vr.prototype.clear=rk,vr.prototype.delete=nk,vr.prototype.get=ok,vr.prototype.has=ik,vr.prototype.set=ak;function qn(b){var x=-1,P=b==null?0:b.length;for(this.clear();++x1?P[K-1]:void 0,he=K>2?P[2]:void 0;for(ie=b.length>3&&typeof ie=="function"?(K--,ie):void 0,he&&Dk(P[0],P[1],he)&&(ie=K<3?void 0:ie,K=1),x=Object(x);++F-1&&b%1==0&&b0){if(++x>=o)return arguments[0]}else x=0;return b.apply(void 0,arguments)}}function Wk(b){if(b!=null){try{return Za.call(b)}catch{}try{return b+""}catch{}}return""}function os(b,x){return b===x||b!==b&&x!==x}var rc=tm(function(){return arguments}())?tm:function(b){return ui(b)&&mr.call(b,"callee")&&!Gw.call(b,"callee")},nc=Array.isArray;function oc(b){return b!=null&&am(b.length)&&!ic(b)}function Uk(b){return ui(b)&&oc(b)}var im=Yw||Xk;function ic(b){if(!bn(b))return!1;var x=rs(b);return x==p||x==g||x==u||x==v}function am(b){return typeof b=="number"&&b>-1&&b%1==0&&b<=a}function bn(b){var x=typeof b;return b!=null&&(x=="object"||x=="function")}function ui(b){return b!=null&&typeof b=="object"}function Hk(b){if(!ui(b)||rs(b)!=h)return!1;var x=qp(b);if(x===null)return!0;var P=mr.call(x,"constructor")&&x.constructor;return typeof P=="function"&&P instanceof P&&Za.call(P)==Uw}var sm=si?Bw(si):xk;function Gk(b){return Ak(b,lm(b))}function lm(b){return oc(b)?gk(b,!0):wk(b)}var Kk=Rk(function(b,x,P,F){rm(b,x,P,F)});function Yk(b){return function(){return b}}function um(b){return b}function Xk(){return!1}e.exports=Kk})(Nl,Nl.exports);var GP=Nl.exports;const Ft=Xf(GP);var KP=e=>/!(important)?$/.test(e),Mv=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,YP=(e,t)=>r=>{const n=String(t),o=KP(n),i=Mv(n),a=e?`${e}.${i}`:i;let s=Kt(r.__cssMap)&&a in r.__cssMap?r.__cssMap[a].varRef:t;return s=Mv(s),o?`${s} !important`:s};function rp(e){const{scale:t,transform:r,compose:n}=e;return(i,a)=>{var s;const l=YP(t,i)(a);let u=(s=r==null?void 0:r(l,a))!=null?s:l;return n&&(u=n(u,a)),u}}var _s=(...e)=>t=>e.reduce((r,n)=>n(r),t);function Et(e,t){return r=>{const n={property:r,scale:e};return n.transform=rp({scale:e,transform:t}),n}}var XP=({rtl:e,ltr:t})=>r=>r.direction==="rtl"?e:t;function QP(e){const{property:t,scale:r,transform:n}=e;return{scale:r,property:XP(t),transform:r?rp({scale:r,compose:n}):n}}var Tb=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function qP(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...Tb].join(" ")}function ZP(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...Tb].join(" ")}var JP={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},eT={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function tT(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var rT={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},vf={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},nT=new Set(Object.values(vf)),gf=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),oT=e=>e.trim();function iT(e,t){if(e==null||gf.has(e))return e;if(!(yf(e)||gf.has(e)))return`url('${e}')`;const o=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),i=o==null?void 0:o[1],a=o==null?void 0:o[2];if(!i||!a)return e;const s=i.includes("-gradient")?i:`${i}-gradient`,[l,...u]=a.split(",").map(oT).filter(Boolean);if((u==null?void 0:u.length)===0)return e;const c=l in vf?vf[l]:l;u.unshift(c);const d=u.map(f=>{if(nT.has(f))return f;const p=f.indexOf(" "),[g,y]=p!==-1?[f.substr(0,p),f.substr(p+1)]:[f],k=yf(y)?y:y&&y.split(" "),m=`colors.${g}`,h=m in t.__cssMap?t.__cssMap[m].varRef:g;return k?[h,...Array.isArray(k)?k:[k]].join(" "):h});return`${s}(${d.join(", ")})`}var yf=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),aT=(e,t)=>iT(e,t??{});function sT(e){return/^var\(--.+\)$/.test(e)}var lT=e=>{const t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}},Jt=e=>t=>`${e}(${t})`,G={filter(e){return e!=="auto"?e:JP},backdropFilter(e){return e!=="auto"?e:eT},ring(e){return tT(G.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?qP():e==="auto-gpu"?ZP():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=lT(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const r={left:"right",right:"left"};return t.direction==="rtl"?r[e]:e},degree(e){if(sT(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:aT,blur:Jt("blur"),opacity:Jt("opacity"),brightness:Jt("brightness"),contrast:Jt("contrast"),dropShadow:Jt("drop-shadow"),grayscale:Jt("grayscale"),hueRotate:e=>Jt("hue-rotate")(G.degree(e)),invert:Jt("invert"),saturate:Jt("saturate"),sepia:Jt("sepia"),bgImage(e){return e==null||yf(e)||gf.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:r,divide:n}=(t=rT[e])!=null?t:{},o={flexDirection:e};return r&&(o[r]=1),n&&(o[n]=1),o}},w={borderWidths:Et("borderWidths"),borderStyles:Et("borderStyles"),colors:Et("colors"),borders:Et("borders"),gradients:Et("gradients",G.gradient),radii:Et("radii",G.px),space:Et("space",_s(G.vh,G.px)),spaceT:Et("space",_s(G.vh,G.px)),degreeT(e){return{property:e,transform:G.degree}},prop(e,t,r){return{property:e,scale:t,...t&&{transform:rp({scale:t,transform:r})}}},propT(e,t){return{property:e,transform:t}},sizes:Et("sizes",_s(G.vh,G.px)),sizesT:Et("sizes",_s(G.vh,G.fraction)),shadows:Et("shadows"),logical:QP,blur:Et("blur",G.blur)},tl={background:w.colors("background"),backgroundColor:w.colors("backgroundColor"),backgroundImage:w.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:G.bgClip},bgSize:w.prop("backgroundSize"),bgPosition:w.prop("backgroundPosition"),bg:w.colors("background"),bgColor:w.colors("backgroundColor"),bgPos:w.prop("backgroundPosition"),bgRepeat:w.prop("backgroundRepeat"),bgAttachment:w.prop("backgroundAttachment"),bgGradient:w.gradients("backgroundImage"),bgClip:{transform:G.bgClip}};Object.assign(tl,{bgImage:tl.backgroundImage,bgImg:tl.backgroundImage});var X={border:w.borders("border"),borderWidth:w.borderWidths("borderWidth"),borderStyle:w.borderStyles("borderStyle"),borderColor:w.colors("borderColor"),borderRadius:w.radii("borderRadius"),borderTop:w.borders("borderTop"),borderBlockStart:w.borders("borderBlockStart"),borderTopLeftRadius:w.radii("borderTopLeftRadius"),borderStartStartRadius:w.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:w.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:w.radii("borderTopRightRadius"),borderStartEndRadius:w.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:w.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:w.borders("borderRight"),borderInlineEnd:w.borders("borderInlineEnd"),borderBottom:w.borders("borderBottom"),borderBlockEnd:w.borders("borderBlockEnd"),borderBottomLeftRadius:w.radii("borderBottomLeftRadius"),borderBottomRightRadius:w.radii("borderBottomRightRadius"),borderLeft:w.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:w.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:w.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:w.borders(["borderLeft","borderRight"]),borderInline:w.borders("borderInline"),borderY:w.borders(["borderTop","borderBottom"]),borderBlock:w.borders("borderBlock"),borderTopWidth:w.borderWidths("borderTopWidth"),borderBlockStartWidth:w.borderWidths("borderBlockStartWidth"),borderTopColor:w.colors("borderTopColor"),borderBlockStartColor:w.colors("borderBlockStartColor"),borderTopStyle:w.borderStyles("borderTopStyle"),borderBlockStartStyle:w.borderStyles("borderBlockStartStyle"),borderBottomWidth:w.borderWidths("borderBottomWidth"),borderBlockEndWidth:w.borderWidths("borderBlockEndWidth"),borderBottomColor:w.colors("borderBottomColor"),borderBlockEndColor:w.colors("borderBlockEndColor"),borderBottomStyle:w.borderStyles("borderBottomStyle"),borderBlockEndStyle:w.borderStyles("borderBlockEndStyle"),borderLeftWidth:w.borderWidths("borderLeftWidth"),borderInlineStartWidth:w.borderWidths("borderInlineStartWidth"),borderLeftColor:w.colors("borderLeftColor"),borderInlineStartColor:w.colors("borderInlineStartColor"),borderLeftStyle:w.borderStyles("borderLeftStyle"),borderInlineStartStyle:w.borderStyles("borderInlineStartStyle"),borderRightWidth:w.borderWidths("borderRightWidth"),borderInlineEndWidth:w.borderWidths("borderInlineEndWidth"),borderRightColor:w.colors("borderRightColor"),borderInlineEndColor:w.colors("borderInlineEndColor"),borderRightStyle:w.borderStyles("borderRightStyle"),borderInlineEndStyle:w.borderStyles("borderInlineEndStyle"),borderTopRadius:w.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:w.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:w.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:w.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(X,{rounded:X.borderRadius,roundedTop:X.borderTopRadius,roundedTopLeft:X.borderTopLeftRadius,roundedTopRight:X.borderTopRightRadius,roundedTopStart:X.borderStartStartRadius,roundedTopEnd:X.borderStartEndRadius,roundedBottom:X.borderBottomRadius,roundedBottomLeft:X.borderBottomLeftRadius,roundedBottomRight:X.borderBottomRightRadius,roundedBottomStart:X.borderEndStartRadius,roundedBottomEnd:X.borderEndEndRadius,roundedLeft:X.borderLeftRadius,roundedRight:X.borderRightRadius,roundedStart:X.borderInlineStartRadius,roundedEnd:X.borderInlineEndRadius,borderStart:X.borderInlineStart,borderEnd:X.borderInlineEnd,borderTopStartRadius:X.borderStartStartRadius,borderTopEndRadius:X.borderStartEndRadius,borderBottomStartRadius:X.borderEndStartRadius,borderBottomEndRadius:X.borderEndEndRadius,borderStartRadius:X.borderInlineStartRadius,borderEndRadius:X.borderInlineEndRadius,borderStartWidth:X.borderInlineStartWidth,borderEndWidth:X.borderInlineEndWidth,borderStartColor:X.borderInlineStartColor,borderEndColor:X.borderInlineEndColor,borderStartStyle:X.borderInlineStartStyle,borderEndStyle:X.borderInlineEndStyle});var uT={color:w.colors("color"),textColor:w.colors("color"),fill:w.colors("fill"),stroke:w.colors("stroke")},bf={boxShadow:w.shadows("boxShadow"),mixBlendMode:!0,blendMode:w.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:w.prop("backgroundBlendMode"),opacity:!0};Object.assign(bf,{shadow:bf.boxShadow});var cT={filter:{transform:G.filter},blur:w.blur("--chakra-blur"),brightness:w.propT("--chakra-brightness",G.brightness),contrast:w.propT("--chakra-contrast",G.contrast),hueRotate:w.propT("--chakra-hue-rotate",G.hueRotate),invert:w.propT("--chakra-invert",G.invert),saturate:w.propT("--chakra-saturate",G.saturate),dropShadow:w.propT("--chakra-drop-shadow",G.dropShadow),backdropFilter:{transform:G.backdropFilter},backdropBlur:w.blur("--chakra-backdrop-blur"),backdropBrightness:w.propT("--chakra-backdrop-brightness",G.brightness),backdropContrast:w.propT("--chakra-backdrop-contrast",G.contrast),backdropHueRotate:w.propT("--chakra-backdrop-hue-rotate",G.hueRotate),backdropInvert:w.propT("--chakra-backdrop-invert",G.invert),backdropSaturate:w.propT("--chakra-backdrop-saturate",G.saturate)},Vl={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:G.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:w.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:w.space("gap"),rowGap:w.space("rowGap"),columnGap:w.space("columnGap")};Object.assign(Vl,{flexDir:Vl.flexDirection});var Eb={gridGap:w.space("gridGap"),gridColumnGap:w.space("gridColumnGap"),gridRowGap:w.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},dT={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:G.outline},outlineOffset:!0,outlineColor:w.colors("outlineColor")},At={width:w.sizesT("width"),inlineSize:w.sizesT("inlineSize"),height:w.sizes("height"),blockSize:w.sizes("blockSize"),boxSize:w.sizes(["width","height"]),minWidth:w.sizes("minWidth"),minInlineSize:w.sizes("minInlineSize"),minHeight:w.sizes("minHeight"),minBlockSize:w.sizes("minBlockSize"),maxWidth:w.sizes("maxWidth"),maxInlineSize:w.sizes("maxInlineSize"),maxHeight:w.sizes("maxHeight"),maxBlockSize:w.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var r,n,o;return{[`@media screen and (min-width: ${(o=(n=(r=t.__breakpoints)==null?void 0:r.get(e))==null?void 0:n.minW)!=null?o:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var r,n,o;return{[`@media screen and (max-width: ${(o=(n=(r=t.__breakpoints)==null?void 0:r.get(e))==null?void 0:n._minW)!=null?o:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:w.propT("float",G.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(At,{w:At.width,h:At.height,minW:At.minWidth,maxW:At.maxWidth,minH:At.minHeight,maxH:At.maxHeight,overscroll:At.overscrollBehavior,overscrollX:At.overscrollBehaviorX,overscrollY:At.overscrollBehaviorY});var fT={listStyleType:!0,listStylePosition:!0,listStylePos:w.prop("listStylePosition"),listStyleImage:!0,listStyleImg:w.prop("listStyleImage")};function hT(e,t,r,n){const o=typeof t=="string"?t.split("."):[t];for(n=0;n{const t=new WeakMap;return(n,o,i,a)=>{if(typeof n>"u")return e(n,o,i);t.has(n)||t.set(n,new Map);const s=t.get(n);if(s.has(o))return s.get(o);const l=e(n,o,i,a);return s.set(o,l),l}},mT=pT(hT),vT={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},gT={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Dc=(e,t,r)=>{const n={},o=mT(e,t,{});for(const i in o)i in r&&r[i]!=null||(n[i]=o[i]);return n},yT={srOnly:{transform(e){return e===!0?vT:e==="focusable"?gT:{}}},layerStyle:{processResult:!0,transform:(e,t,r)=>Dc(t,`layerStyles.${e}`,r)},textStyle:{processResult:!0,transform:(e,t,r)=>Dc(t,`textStyles.${e}`,r)},apply:{processResult:!0,transform:(e,t,r)=>Dc(t,e,r)}},Ki={position:!0,pos:w.prop("position"),zIndex:w.prop("zIndex","zIndices"),inset:w.spaceT("inset"),insetX:w.spaceT(["left","right"]),insetInline:w.spaceT("insetInline"),insetY:w.spaceT(["top","bottom"]),insetBlock:w.spaceT("insetBlock"),top:w.spaceT("top"),insetBlockStart:w.spaceT("insetBlockStart"),bottom:w.spaceT("bottom"),insetBlockEnd:w.spaceT("insetBlockEnd"),left:w.spaceT("left"),insetInlineStart:w.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:w.spaceT("right"),insetInlineEnd:w.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Ki,{insetStart:Ki.insetInlineStart,insetEnd:Ki.insetInlineEnd});var bT={ring:{transform:G.ring},ringColor:w.colors("--chakra-ring-color"),ringOffset:w.prop("--chakra-ring-offset-width"),ringOffsetColor:w.colors("--chakra-ring-offset-color"),ringInset:w.prop("--chakra-ring-inset")},de={margin:w.spaceT("margin"),marginTop:w.spaceT("marginTop"),marginBlockStart:w.spaceT("marginBlockStart"),marginRight:w.spaceT("marginRight"),marginInlineEnd:w.spaceT("marginInlineEnd"),marginBottom:w.spaceT("marginBottom"),marginBlockEnd:w.spaceT("marginBlockEnd"),marginLeft:w.spaceT("marginLeft"),marginInlineStart:w.spaceT("marginInlineStart"),marginX:w.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:w.spaceT("marginInline"),marginY:w.spaceT(["marginTop","marginBottom"]),marginBlock:w.spaceT("marginBlock"),padding:w.space("padding"),paddingTop:w.space("paddingTop"),paddingBlockStart:w.space("paddingBlockStart"),paddingRight:w.space("paddingRight"),paddingBottom:w.space("paddingBottom"),paddingBlockEnd:w.space("paddingBlockEnd"),paddingLeft:w.space("paddingLeft"),paddingInlineStart:w.space("paddingInlineStart"),paddingInlineEnd:w.space("paddingInlineEnd"),paddingX:w.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:w.space("paddingInline"),paddingY:w.space(["paddingTop","paddingBottom"]),paddingBlock:w.space("paddingBlock")};Object.assign(de,{m:de.margin,mt:de.marginTop,mr:de.marginRight,me:de.marginInlineEnd,marginEnd:de.marginInlineEnd,mb:de.marginBottom,ml:de.marginLeft,ms:de.marginInlineStart,marginStart:de.marginInlineStart,mx:de.marginX,my:de.marginY,p:de.padding,pt:de.paddingTop,py:de.paddingY,px:de.paddingX,pb:de.paddingBottom,pl:de.paddingLeft,ps:de.paddingInlineStart,paddingStart:de.paddingInlineStart,pr:de.paddingRight,pe:de.paddingInlineEnd,paddingEnd:de.paddingInlineEnd});var ST={textDecorationColor:w.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:w.shadows("textShadow")},xT={clipPath:!0,transform:w.propT("transform",G.transform),transformOrigin:!0,translateX:w.spaceT("--chakra-translate-x"),translateY:w.spaceT("--chakra-translate-y"),skewX:w.degreeT("--chakra-skew-x"),skewY:w.degreeT("--chakra-skew-y"),scaleX:w.prop("--chakra-scale-x"),scaleY:w.prop("--chakra-scale-y"),scale:w.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:w.degreeT("--chakra-rotate")},wT={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:w.prop("transitionDuration","transition.duration"),transitionProperty:w.prop("transitionProperty","transition.property"),transitionTimingFunction:w.prop("transitionTimingFunction","transition.easing")},kT={fontFamily:w.prop("fontFamily","fonts"),fontSize:w.prop("fontSize","fontSizes",G.px),fontWeight:w.prop("fontWeight","fontWeights"),lineHeight:w.prop("lineHeight","lineHeights"),letterSpacing:w.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},CT={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:w.spaceT("scrollMargin"),scrollMarginTop:w.spaceT("scrollMarginTop"),scrollMarginBottom:w.spaceT("scrollMarginBottom"),scrollMarginLeft:w.spaceT("scrollMarginLeft"),scrollMarginRight:w.spaceT("scrollMarginRight"),scrollMarginX:w.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:w.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:w.spaceT("scrollPadding"),scrollPaddingTop:w.spaceT("scrollPaddingTop"),scrollPaddingBottom:w.spaceT("scrollPaddingBottom"),scrollPaddingLeft:w.spaceT("scrollPaddingLeft"),scrollPaddingRight:w.spaceT("scrollPaddingRight"),scrollPaddingX:w.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:w.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function $b(e){return Kt(e)&&e.reference?e.reference:String(e)}var Iu=(e,...t)=>t.map($b).join(` ${e} `).replace(/calc/g,""),zv=(...e)=>`calc(${Iu("+",...e)})`,Fv=(...e)=>`calc(${Iu("-",...e)})`,Sf=(...e)=>`calc(${Iu("*",...e)})`,Dv=(...e)=>`calc(${Iu("/",...e)})`,Iv=e=>{const t=$b(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Sf(t,-1)},Pn=Object.assign(e=>({add:(...t)=>Pn(zv(e,...t)),subtract:(...t)=>Pn(Fv(e,...t)),multiply:(...t)=>Pn(Sf(e,...t)),divide:(...t)=>Pn(Dv(e,...t)),negate:()=>Pn(Iv(e)),toString:()=>e.toString()}),{add:zv,subtract:Fv,multiply:Sf,divide:Dv,negate:Iv});function _T(e,t="-"){return e.replace(/\s+/g,t)}function PT(e){const t=_T(e.toString());return ET(TT(t))}function TT(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function ET(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function $T(e,t=""){return[t,e].filter(Boolean).join("-")}function AT(e,t){return`var(${e}${t?`, ${t}`:""})`}function RT(e,t=""){return PT(`--${$T(e,t)}`)}function O(e,t,r){const n=RT(e,r);return{variable:n,reference:AT(n,t)}}function MT(e,t){const r={};for(const n of t){if(Array.isArray(n)){const[o,i]=n;r[o]=O(`${e}-${o}`,i);continue}r[n]=O(`${e}-${n}`)}return r}function zT(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function FT(e){const t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}}function xf(e){if(e==null)return e;const{unitless:t}=FT(e);return t||typeof e=="number"?`${e}px`:e}var Ab=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,np=e=>Object.fromEntries(Object.entries(e).sort(Ab));function Lv(e){const t=np(e);return Object.assign(Object.values(t),t)}function DT(e){const t=Object.keys(np(e));return new Set(t)}function Ov(e){var t;if(!e)return e;e=(t=xf(e))!=null?t:e;const r=-.02;return typeof e=="number"?`${e+r}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+r}`)}function Ai(e,t){const r=["@media screen"];return e&&r.push("and",`(min-width: ${xf(e)})`),t&&r.push("and",`(max-width: ${xf(t)})`),r.join(" ")}function IT(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const r=Lv(e),n=Object.entries(e).sort(Ab).map(([a,s],l,u)=>{var c;let[,d]=(c=u[l+1])!=null?c:[];return d=parseFloat(d)>0?Ov(d):void 0,{_minW:Ov(s),breakpoint:a,minW:s,maxW:d,maxWQuery:Ai(null,d),minWQuery:Ai(s),minMaxQuery:Ai(s,d)}}),o=DT(e),i=Array.from(o.values());return{keys:o,normalized:r,isResponsive(a){const s=Object.keys(a);return s.length>0&&s.every(l=>o.has(l))},asObject:np(e),asArray:Lv(e),details:n,get(a){return n.find(s=>s.breakpoint===a)},media:[null,...r.map(a=>Ai(a)).slice(1)],toArrayValue(a){if(!Kt(a))throw new Error("toArrayValue: value must be an object");const s=i.map(l=>{var u;return(u=a[l])!=null?u:null});for(;zT(s)===null;)s.pop();return s},toObjectValue(a){if(!Array.isArray(a))throw new Error("toObjectValue: value must be an array");return a.reduce((s,l,u)=>{const c=i[u];return c!=null&&l!=null&&(s[c]=l),s},{})}}}var je={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Br=e=>Rb(t=>e(t,"&"),"[role=group]","[data-group]",".group"),gr=e=>Rb(t=>e(t,"~ &"),"[data-peer]",".peer"),Rb=(e,...t)=>t.map(e).join(", "),Lu={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Br(je.hover),_peerHover:gr(je.hover),_groupFocus:Br(je.focus),_peerFocus:gr(je.focus),_groupFocusVisible:Br(je.focusVisible),_peerFocusVisible:gr(je.focusVisible),_groupActive:Br(je.active),_peerActive:gr(je.active),_groupDisabled:Br(je.disabled),_peerDisabled:gr(je.disabled),_groupInvalid:Br(je.invalid),_peerInvalid:gr(je.invalid),_groupChecked:Br(je.checked),_peerChecked:gr(je.checked),_groupFocusWithin:Br(je.focusWithin),_peerFocusWithin:gr(je.focusWithin),_peerPlaceholderShown:gr(je.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},Mb=Object.keys(Lu);function Bv(e,t){return O(String(e).replace(/\./g,"-"),void 0,t)}function LT(e,t){let r={};const n={};for(const[o,i]of Object.entries(e)){const{isSemantic:a,value:s}=i,{variable:l,reference:u}=Bv(o,t==null?void 0:t.cssVarPrefix);if(!a){if(o.startsWith("space")){const f=o.split("."),[p,...g]=f,y=`${p}.-${g.join(".")}`,k=Pn.negate(s),m=Pn.negate(u);n[y]={value:k,var:l,varRef:m}}r[l]=s,n[o]={value:s,var:l,varRef:u};continue}const c=f=>{const g=[String(o).split(".")[0],f].join(".");if(!e[g])return f;const{reference:k}=Bv(g,t==null?void 0:t.cssVarPrefix);return k},d=Kt(s)?s:{default:s};r=Ft(r,Object.entries(d).reduce((f,[p,g])=>{var y,k;if(!g)return f;const m=c(`${g}`);if(p==="default")return f[l]=m,f;const h=(k=(y=Lu)==null?void 0:y[p])!=null?k:p;return f[h]={[l]:m},f},{})),n[o]={value:u,var:l,varRef:u}}return{cssVars:r,cssMap:n}}function OT(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}function BT(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}function jT(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function jv(e,t,r={}){const{stop:n,getKey:o}=r;function i(a,s=[]){var l;if(jT(a)||Array.isArray(a)){const u={};for(const[c,d]of Object.entries(a)){const f=(l=o==null?void 0:o(c))!=null?l:c,p=[...s,f];if(n!=null&&n(a,p))return t(a,s);u[f]=i(d,p)}return u}return t(a,s)}return i(e)}var NT=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function VT(e){return BT(e,NT)}function WT(e){return e.semanticTokens}function UT(e){const{__cssMap:t,__cssVars:r,__breakpoints:n,...o}=e;return o}var HT=e=>Mb.includes(e)||e==="default";function GT({tokens:e,semanticTokens:t}){const r={};return jv(e,(n,o)=>{n!=null&&(r[o.join(".")]={isSemantic:!1,value:n})}),jv(t,(n,o)=>{n!=null&&(r[o.join(".")]={isSemantic:!0,value:n})},{stop:n=>Object.keys(n).every(HT)}),r}function KT(e){var t;const r=UT(e),n=VT(r),o=WT(r),i=GT({tokens:n,semanticTokens:o}),a=(t=r.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=LT(i,{cssVarPrefix:a});return Object.assign(r,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:IT(r.breakpoints)}),r}var op=Ft({},tl,X,uT,Vl,At,cT,bT,dT,Eb,yT,Ki,bf,de,CT,kT,ST,xT,fT,wT),YT=Object.assign({},de,At,Vl,Eb,Ki),_B=Object.keys(YT),XT=[...Object.keys(op),...Mb],QT={...op,...Lu},qT=e=>e in QT,ZT=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:r,toArrayValue:n,media:o}=t.__breakpoints,i={};for(const a in e){let s=lr(e[a],t);if(s==null)continue;if(s=Kt(s)&&r(s)?n(s):s,!Array.isArray(s)){i[a]=s;continue}const l=s.slice(0,o.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!eE(t),rE=(e,t)=>{var r,n;if(t==null)return t;const o=l=>{var u,c;return(c=(u=e.__cssMap)==null?void 0:u[l])==null?void 0:c.varRef},i=l=>{var u;return(u=o(l))!=null?u:l},[a,s]=JT(t);return t=(n=(r=o(a))!=null?r:i(s))!=null?n:i(t),t};function nE(e){const{configs:t={},pseudos:r={},theme:n}=e,o=(i,a=!1)=>{var s,l,u;const c=lr(i,n),d=ZT(c)(n);let f={};for(let p in d){const g=d[p];let y=lr(g,n);p in r&&(p=r[p]),tE(p,y)&&(y=rE(n,y));let k=t[p];if(k===!0&&(k={property:p}),Kt(y)){f[p]=(s=f[p])!=null?s:{},f[p]=Ft({},f[p],o(y,!0));continue}let m=(u=(l=k==null?void 0:k.transform)==null?void 0:l.call(k,y,n,c))!=null?u:y;m=k!=null&&k.processResult?o(m,!0):m;const h=lr(k==null?void 0:k.property,n);if(!a&&(k!=null&&k.static)){const v=lr(k.static,n);f=Ft({},f,v)}if(h&&Array.isArray(h)){for(const v of h)f[v]=m;continue}if(h){h==="&"&&Kt(m)?f=Ft({},f,m):f[h]=m;continue}if(Kt(m)){f=Ft({},f,m);continue}f[p]=m}return f};return o}var zb=e=>t=>nE({theme:t,pseudos:Lu,configs:op})(e);function le(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function oE(e,t){if(Array.isArray(e))return e;if(Kt(e))return t(e);if(e!=null)return[e]}function iE(e,t){for(let r=t+1;r{Ft(u,{[v]:f?h[v]:{[m]:h[v]}})});continue}if(!p){f?Ft(u,h):u[m]=h;continue}u[m]=h}}return u}}function sE(e){return t=>{var r;const{variant:n,size:o,theme:i}=t,a=aE(i);return Ft({},lr((r=e.baseStyle)!=null?r:{},t),a(e,"sizes",o,t),a(e,"variants",n,t))}}function PB(e,t,r){var n,o,i;return(i=(o=(n=e.__cssMap)==null?void 0:n[`${t}.${r}`])==null?void 0:o.varRef)!=null?i:r}function Ou(e){return OT(e,["styleConfig","size","variant","colorScheme"])}var lE=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function uE(e){return Kt(e)?lE.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}var cE={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"},dE={"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)"},fE={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},hE={property:cE,easing:dE,duration:fE},pE=hE,mE={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},vE=mE,gE={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},yE=gE,bE={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},SE=bE,xE={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"}},wE=xE,kE={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},CE=kE,_E={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"},PE=_E,TE={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},EE=TE,$E={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"}},Fb=$E,Db={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"},AE={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"},RE={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},ME={...Db,...AE,container:RE},Ib=ME,zE={breakpoints:SE,zIndices:vE,radii:CE,blur:EE,colors:wE,...Fb,sizes:Ib,shadows:PE,space:Db,borders:yE,transition:pE},{defineMultiStyleConfig:FE,definePartsStyle:Ri}=le(["stepper","step","title","description","indicator","separator","icon","number"]),Sr=O("stepper-indicator-size"),go=O("stepper-icon-size"),yo=O("stepper-title-font-size"),Mi=O("stepper-description-font-size"),Si=O("stepper-accent-color"),DE=Ri(({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"},[Si.variable]:`colors.${e}.500`,_dark:{[Si.variable]:`colors.${e}.200`}},title:{fontSize:yo.reference,fontWeight:"medium"},description:{fontSize:Mi.reference,color:"chakra-subtle-text"},number:{fontSize:yo.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:go.reference,height:go.reference},indicator:{flexShrink:0,borderRadius:"full",width:Sr.reference,height:Sr.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:Si.reference},"&[data-status=complete]":{bg:Si.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:Si.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${Sr.reference} - 8px)`,top:`calc(${Sr.reference} + 4px)`,insetStart:`calc(${Sr.reference} / 2 - 1px)`}}})),IE=FE({baseStyle:DE,sizes:{xs:Ri({stepper:{[Sr.variable]:"sizes.4",[go.variable]:"sizes.3",[yo.variable]:"fontSizes.xs",[Mi.variable]:"fontSizes.xs"}}),sm:Ri({stepper:{[Sr.variable]:"sizes.6",[go.variable]:"sizes.4",[yo.variable]:"fontSizes.sm",[Mi.variable]:"fontSizes.xs"}}),md:Ri({stepper:{[Sr.variable]:"sizes.8",[go.variable]:"sizes.5",[yo.variable]:"fontSizes.md",[Mi.variable]:"fontSizes.sm"}}),lg:Ri({stepper:{[Sr.variable]:"sizes.10",[go.variable]:"sizes.6",[yo.variable]:"fontSizes.lg",[Mi.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function J(e,t={}){let r=!1;function n(){if(!r){r=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function o(...c){n();for(const d of c)t[d]=l(d);return J(e,t)}function i(...c){for(const d of c)d in t||(t[d]=l(d));return J(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.className]))}function l(c){const p=`chakra-${(["container","root"].includes(c??"")?[e]:[e,c]).filter(Boolean).join("__")}`;return{className:p,selector:`.${p}`,toString:()=>c}}return{parts:o,toPart:l,extend:i,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var LE=J("accordion").parts("root","container","button","panel").extend("icon"),OE=J("alert").parts("title","description","container").extend("icon","spinner"),BE=J("avatar").parts("label","badge","container").extend("excessLabel","group"),jE=J("breadcrumb").parts("link","item","container").extend("separator");J("button").parts();var NE=J("checkbox").parts("control","icon","container").extend("label");J("progress").parts("track","filledTrack").extend("label");var VE=J("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),WE=J("editable").parts("preview","input","textarea"),UE=J("form").parts("container","requiredIndicator","helperText"),HE=J("formError").parts("text","icon"),GE=J("input").parts("addon","field","element","group"),KE=J("list").parts("container","item","icon"),YE=J("menu").parts("button","list","item").extend("groupTitle","icon","command","divider"),XE=J("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),QE=J("numberinput").parts("root","field","stepperGroup","stepper");J("pininput").parts("field");var qE=J("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),ZE=J("progress").parts("label","filledTrack","track"),JE=J("radio").parts("container","control","label"),e$=J("select").parts("field","icon"),t$=J("slider").parts("container","track","thumb","filledTrack","mark"),r$=J("stat").parts("container","label","helpText","number","icon"),n$=J("switch").parts("container","track","thumb","label"),o$=J("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),i$=J("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),a$=J("tag").parts("container","label","closeButton"),s$=J("card").parts("container","header","body","footer");J("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");function Rn(e,t,r){return Math.min(Math.max(e,r),t)}class l$ extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var zi=l$;function ip(e){if(typeof e!="string")throw new zi(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=v$.test(e)?d$(e):e;const r=f$.exec(t);if(r){const a=Array.from(r).slice(1);return[...a.slice(0,3).map(s=>parseInt(Ca(s,2),16)),parseInt(Ca(a[3]||"f",2),16)/255]}const n=h$.exec(t);if(n){const a=Array.from(n).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,16)),parseInt(a[3]||"ff",16)/255]}const o=p$.exec(t);if(o){const a=Array.from(o).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,10)),parseFloat(a[3]||"1")]}const i=m$.exec(t);if(i){const[a,s,l,u]=Array.from(i).slice(1).map(parseFloat);if(Rn(0,100,s)!==s)throw new zi(e);if(Rn(0,100,l)!==l)throw new zi(e);return[...g$(a,s,l),Number.isNaN(u)?1:u]}throw new zi(e)}function u$(e){let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return(t>>>0)%2341}const Nv=e=>parseInt(e.replace(/_/g,""),36),c$="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,t)=>{const r=Nv(t.substring(0,3)),n=Nv(t.substring(3)).toString(16);let o="";for(let i=0;i<6-n.length;i++)o+="0";return e[r]=`${o}${n}`,e},{});function d$(e){const t=e.toLowerCase().trim(),r=c$[u$(t)];if(!r)throw new zi(e);return`#${r}`}const Ca=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),f$=new RegExp(`^#${Ca("([a-f0-9])",3)}([a-f0-9])?$`,"i"),h$=new RegExp(`^#${Ca("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),p$=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Ca(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),m$=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,v$=/^[a-z]+$/i,Vv=e=>Math.round(e*255),g$=(e,t,r)=>{let n=r/100;if(t===0)return[n,n,n].map(Vv);const o=(e%360+360)%360/60,i=(1-Math.abs(2*n-1))*(t/100),a=i*(1-Math.abs(o%2-1));let s=0,l=0,u=0;o>=0&&o<1?(s=i,l=a):o>=1&&o<2?(s=a,l=i):o>=2&&o<3?(l=i,u=a):o>=3&&o<4?(l=a,u=i):o>=4&&o<5?(s=a,u=i):o>=5&&o<6&&(s=i,u=a);const c=n-i/2,d=s+c,f=l+c,p=u+c;return[d,f,p].map(Vv)};function y$(e,t,r,n){return`rgba(${Rn(0,255,e).toFixed()}, ${Rn(0,255,t).toFixed()}, ${Rn(0,255,r).toFixed()}, ${parseFloat(Rn(0,1,n).toFixed(3))})`}function b$(e,t){const[r,n,o,i]=ip(e);return y$(r,n,o,i-t)}function S$(e){const[t,r,n,o]=ip(e);let i=a=>{const s=Rn(0,255,a).toString(16);return s.length===1?`0${s}`:s};return`#${i(t)}${i(r)}${i(n)}${o<1?i(Math.round(o*255)):""}`}function x$(e,t,r,n,o){for(t=t.split?t.split("."):t,n=0;nObject.keys(e).length===0,et=(e,t,r)=>{const n=x$(e,`colors.${t}`,t);try{return S$(n),n}catch{return r??"#000000"}},k$=e=>{const[t,r,n]=ip(e);return(t*299+r*587+n*114)/1e3},C$=e=>t=>{const r=et(t,e);return k$(r)<128?"dark":"light"},_$=e=>t=>C$(e)(t)==="dark",qo=(e,t)=>r=>{const n=et(r,e);return b$(n,1-t)};function Wv(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}var P$=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function T$(e){const t=P$();return!e||w$(e)?t:e.string&&e.colors?$$(e.string,e.colors):e.string&&!e.colors?E$(e.string):e.colors&&!e.string?A$(e.colors):t}function E$(e){let t=0;if(e.length===0)return t.toString();for(let n=0;n>n*8&255;r+=`00${o.toString(16)}`.substr(-2)}return r}function $$(e,t){let r=0;if(e.length===0)return t[0];for(let n=0;nr.colorMode==="dark"?t:e}function ap(e){const{orientation:t,vertical:r,horizontal:n}=e;return t?t==="vertical"?r:n:{}}function Lb(e){return Kt(e)&&e.reference?e.reference:String(e)}var Bu=(e,...t)=>t.map(Lb).join(` ${e} `).replace(/calc/g,""),Uv=(...e)=>`calc(${Bu("+",...e)})`,Hv=(...e)=>`calc(${Bu("-",...e)})`,wf=(...e)=>`calc(${Bu("*",...e)})`,Gv=(...e)=>`calc(${Bu("/",...e)})`,Kv=e=>{const t=Lb(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:wf(t,-1)},xr=Object.assign(e=>({add:(...t)=>xr(Uv(e,...t)),subtract:(...t)=>xr(Hv(e,...t)),multiply:(...t)=>xr(wf(e,...t)),divide:(...t)=>xr(Gv(e,...t)),negate:()=>xr(Kv(e)),toString:()=>e.toString()}),{add:Uv,subtract:Hv,multiply:wf,divide:Gv,negate:Kv});function R$(e){return!Number.isInteger(parseFloat(e.toString()))}function M$(e,t="-"){return e.replace(/\s+/g,t)}function Ob(e){const t=M$(e.toString());return t.includes("\\.")?e:R$(e)?t.replace(".","\\."):e}function z$(e,t=""){return[t,Ob(e)].filter(Boolean).join("-")}function F$(e,t){return`var(${Ob(e)}${t?`, ${t}`:""})`}function D$(e,t=""){return`--${z$(e,t)}`}function Me(e,t){const r=D$(e,t==null?void 0:t.prefix);return{variable:r,reference:F$(r,I$(t==null?void 0:t.fallback))}}function I$(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:L$,definePartsStyle:rl}=le(n$.keys),Yi=Me("switch-track-width"),Dn=Me("switch-track-height"),Ic=Me("switch-track-diff"),O$=xr.subtract(Yi,Dn),kf=Me("switch-thumb-x"),xi=Me("switch-bg"),B$=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Yi.reference],height:[Dn.reference],transitionProperty:"common",transitionDuration:"fast",[xi.variable]:"colors.gray.300",_dark:{[xi.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[xi.variable]:`colors.${t}.500`,_dark:{[xi.variable]:`colors.${t}.200`}},bg:xi.reference}},j$={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Dn.reference],height:[Dn.reference],_checked:{transform:`translateX(${kf.reference})`}},N$=rl(e=>({container:{[Ic.variable]:O$,[kf.variable]:Ic.reference,_rtl:{[kf.variable]:xr(Ic).negate().toString()}},track:B$(e),thumb:j$})),V$={sm:rl({container:{[Yi.variable]:"1.375rem",[Dn.variable]:"sizes.3"}}),md:rl({container:{[Yi.variable]:"1.875rem",[Dn.variable]:"sizes.4"}}),lg:rl({container:{[Yi.variable]:"2.875rem",[Dn.variable]:"sizes.6"}})},W$=L$({baseStyle:N$,sizes:V$,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:U$,definePartsStyle:Do}=le(o$.keys),H$=Do({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"}}),Wl={"&[data-is-numeric=true]":{textAlign:"end"}},G$=Do(e=>{const{colorScheme:t}=e;return{th:{color:L("gray.600","gray.400")(e),borderBottom:"1px",borderColor:L(`${t}.100`,`${t}.700`)(e),...Wl},td:{borderBottom:"1px",borderColor:L(`${t}.100`,`${t}.700`)(e),...Wl},caption:{color:L("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),K$=Do(e=>{const{colorScheme:t}=e;return{th:{color:L("gray.600","gray.400")(e),borderBottom:"1px",borderColor:L(`${t}.100`,`${t}.700`)(e),...Wl},td:{borderBottom:"1px",borderColor:L(`${t}.100`,`${t}.700`)(e),...Wl},caption:{color:L("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:L(`${t}.100`,`${t}.700`)(e)},td:{background:L(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Y$={simple:G$,striped:K$,unstyled:{}},X$={sm:Do({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:Do({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:Do({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Q$=U$({baseStyle:H$,variants:Y$,sizes:X$,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),st=O("tabs-color"),Ut=O("tabs-bg"),Ps=O("tabs-border-color"),{defineMultiStyleConfig:q$,definePartsStyle:fr}=le(i$.keys),Z$=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},J$=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},e5=e=>{const{align:t="start",orientation:r}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:r==="vertical"?"column":"row"}},t5={p:4},r5=fr(e=>({root:Z$(e),tab:J$(e),tablist:e5(e),tabpanel:t5})),n5={sm:fr({tab:{py:1,px:4,fontSize:"sm"}}),md:fr({tab:{fontSize:"md",py:2,px:4}}),lg:fr({tab:{fontSize:"lg",py:3,px:4}})},o5=fr(e=>{const{colorScheme:t,orientation:r}=e,n=r==="vertical",o=n?"borderStart":"borderBottom",i=n?"marginStart":"marginBottom";return{tablist:{[o]:"2px solid",borderColor:"inherit"},tab:{[o]:"2px solid",borderColor:"transparent",[i]:"-2px",_selected:{[st.variable]:`colors.${t}.600`,_dark:{[st.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Ut.variable]:"colors.gray.200",_dark:{[Ut.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:st.reference,bg:Ut.reference}}}),i5=fr(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Ps.variable]:"transparent",_selected:{[st.variable]:`colors.${t}.600`,[Ps.variable]:"colors.white",_dark:{[st.variable]:`colors.${t}.300`,[Ps.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Ps.reference},color:st.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),a5=fr(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Ut.variable]:"colors.gray.50",_dark:{[Ut.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Ut.variable]:"colors.white",[st.variable]:`colors.${t}.600`,_dark:{[Ut.variable]:"colors.gray.800",[st.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:st.reference,bg:Ut.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),s5=fr(e=>{const{colorScheme:t,theme:r}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:et(r,`${t}.700`),bg:et(r,`${t}.100`)}}}}),l5=fr(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[st.variable]:"colors.gray.600",_dark:{[st.variable]:"inherit"},_selected:{[st.variable]:"colors.white",[Ut.variable]:`colors.${t}.600`,_dark:{[st.variable]:"colors.gray.800",[Ut.variable]:`colors.${t}.300`}},color:st.reference,bg:Ut.reference}}}),u5=fr({}),c5={line:o5,enclosed:i5,"enclosed-colored":a5,"soft-rounded":s5,"solid-rounded":l5,unstyled:u5},d5=q$({baseStyle:r5,sizes:n5,variants:c5,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),Ce=MT("badge",["bg","color","shadow"]),f5={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:Ce.bg.reference,color:Ce.color.reference,boxShadow:Ce.shadow.reference},h5=e=>{const{colorScheme:t,theme:r}=e,n=qo(`${t}.500`,.6)(r);return{[Ce.bg.variable]:`colors.${t}.500`,[Ce.color.variable]:"colors.white",_dark:{[Ce.bg.variable]:n,[Ce.color.variable]:"colors.whiteAlpha.800"}}},p5=e=>{const{colorScheme:t,theme:r}=e,n=qo(`${t}.200`,.16)(r);return{[Ce.bg.variable]:`colors.${t}.100`,[Ce.color.variable]:`colors.${t}.800`,_dark:{[Ce.bg.variable]:n,[Ce.color.variable]:`colors.${t}.200`}}},m5=e=>{const{colorScheme:t,theme:r}=e,n=qo(`${t}.200`,.8)(r);return{[Ce.color.variable]:`colors.${t}.500`,_dark:{[Ce.color.variable]:n},[Ce.shadow.variable]:`inset 0 0 0px 1px ${Ce.color.reference}`}},v5={solid:h5,subtle:p5,outline:m5},Xi={baseStyle:f5,variants:v5,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:g5,definePartsStyle:In}=le(a$.keys),Yv=O("tag-bg"),Xv=O("tag-color"),Lc=O("tag-shadow"),nl=O("tag-min-height"),ol=O("tag-min-width"),il=O("tag-font-size"),al=O("tag-padding-inline"),y5={fontWeight:"medium",lineHeight:1.2,outline:0,[Xv.variable]:Ce.color.reference,[Yv.variable]:Ce.bg.reference,[Lc.variable]:Ce.shadow.reference,color:Xv.reference,bg:Yv.reference,boxShadow:Lc.reference,borderRadius:"md",minH:nl.reference,minW:ol.reference,fontSize:il.reference,px:al.reference,_focusVisible:{[Lc.variable]:"shadows.outline"}},b5={lineHeight:1.2,overflow:"visible"},S5={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}},x5=In({container:y5,label:b5,closeButton:S5}),w5={sm:In({container:{[nl.variable]:"sizes.5",[ol.variable]:"sizes.5",[il.variable]:"fontSizes.xs",[al.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:In({container:{[nl.variable]:"sizes.6",[ol.variable]:"sizes.6",[il.variable]:"fontSizes.sm",[al.variable]:"space.2"}}),lg:In({container:{[nl.variable]:"sizes.8",[ol.variable]:"sizes.8",[il.variable]:"fontSizes.md",[al.variable]:"space.3"}})},k5={subtle:In(e=>{var t;return{container:(t=Xi.variants)==null?void 0:t.subtle(e)}}),solid:In(e=>{var t;return{container:(t=Xi.variants)==null?void 0:t.solid(e)}}),outline:In(e=>{var t;return{container:(t=Xi.variants)==null?void 0:t.outline(e)}})},C5=g5({variants:k5,baseStyle:x5,sizes:w5,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:Cr,defineMultiStyleConfig:_5}=le(GE.keys),bo=O("input-height"),So=O("input-font-size"),xo=O("input-padding"),wo=O("input-border-radius"),P5=Cr({addon:{height:bo.reference,fontSize:So.reference,px:xo.reference,borderRadius:wo.reference},field:{width:"100%",height:bo.reference,fontSize:So.reference,px:xo.reference,borderRadius:wo.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),jr={lg:{[So.variable]:"fontSizes.lg",[xo.variable]:"space.4",[wo.variable]:"radii.md",[bo.variable]:"sizes.12"},md:{[So.variable]:"fontSizes.md",[xo.variable]:"space.4",[wo.variable]:"radii.md",[bo.variable]:"sizes.10"},sm:{[So.variable]:"fontSizes.sm",[xo.variable]:"space.3",[wo.variable]:"radii.sm",[bo.variable]:"sizes.8"},xs:{[So.variable]:"fontSizes.xs",[xo.variable]:"space.2",[wo.variable]:"radii.sm",[bo.variable]:"sizes.6"}},T5={lg:Cr({field:jr.lg,group:jr.lg}),md:Cr({field:jr.md,group:jr.md}),sm:Cr({field:jr.sm,group:jr.sm}),xs:Cr({field:jr.xs,group:jr.xs})};function sp(e){const{focusBorderColor:t,errorBorderColor:r}=e;return{focusBorderColor:t||L("blue.500","blue.300")(e),errorBorderColor:r||L("red.500","red.300")(e)}}var E5=Cr(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=sp(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:L("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:et(t,n),boxShadow:`0 0 0 1px ${et(t,n)}`},_focusVisible:{zIndex:1,borderColor:et(t,r),boxShadow:`0 0 0 1px ${et(t,r)}`}},addon:{border:"1px solid",borderColor:L("inherit","whiteAlpha.50")(e),bg:L("gray.100","whiteAlpha.300")(e)}}}),$5=Cr(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=sp(e);return{field:{border:"2px solid",borderColor:"transparent",bg:L("gray.100","whiteAlpha.50")(e),_hover:{bg:L("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:et(t,n)},_focusVisible:{bg:"transparent",borderColor:et(t,r)}},addon:{border:"2px solid",borderColor:"transparent",bg:L("gray.100","whiteAlpha.50")(e)}}}),A5=Cr(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=sp(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:et(t,n),boxShadow:`0px 1px 0px 0px ${et(t,n)}`},_focusVisible:{borderColor:et(t,r),boxShadow:`0px 1px 0px 0px ${et(t,r)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),R5=Cr({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),M5={outline:E5,filled:$5,flushed:A5,unstyled:R5},Z=_5({baseStyle:P5,sizes:T5,variants:M5,defaultProps:{size:"md",variant:"outline"}}),Qv,z5={...(Qv=Z.baseStyle)==null?void 0:Qv.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},qv,Zv,F5={outline:e=>{var t,r;return(r=(t=Z.variants)==null?void 0:t.outline(e).field)!=null?r:{}},flushed:e=>{var t,r;return(r=(t=Z.variants)==null?void 0:t.flushed(e).field)!=null?r:{}},filled:e=>{var t,r;return(r=(t=Z.variants)==null?void 0:t.filled(e).field)!=null?r:{}},unstyled:(Zv=(qv=Z.variants)==null?void 0:qv.unstyled.field)!=null?Zv:{}},Jv,eg,tg,rg,ng,og,ig,ag,D5={xs:(eg=(Jv=Z.sizes)==null?void 0:Jv.xs.field)!=null?eg:{},sm:(rg=(tg=Z.sizes)==null?void 0:tg.sm.field)!=null?rg:{},md:(og=(ng=Z.sizes)==null?void 0:ng.md.field)!=null?og:{},lg:(ag=(ig=Z.sizes)==null?void 0:ig.lg.field)!=null?ag:{}},I5={baseStyle:z5,sizes:D5,variants:F5,defaultProps:{size:"md",variant:"outline"}},Ts=Me("tooltip-bg"),Oc=Me("tooltip-fg"),L5=Me("popper-arrow-bg"),O5={bg:Ts.reference,color:Oc.reference,[Ts.variable]:"colors.gray.700",[Oc.variable]:"colors.whiteAlpha.900",_dark:{[Ts.variable]:"colors.gray.300",[Oc.variable]:"colors.gray.900"},[L5.variable]:Ts.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},B5={baseStyle:O5},{defineMultiStyleConfig:j5,definePartsStyle:Fi}=le(ZE.keys),N5=e=>{const{colorScheme:t,theme:r,isIndeterminate:n,hasStripe:o}=e,i=L(Wv(),Wv("1rem","rgba(0,0,0,0.1)"))(e),a=L(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${et(r,a)} 50%, - transparent 100% - )`;return{...!n&&o&&i,...n?{bgImage:s}:{bgColor:a}}},V5={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},W5=e=>({bg:L("gray.100","whiteAlpha.300")(e)}),U5=e=>({transitionProperty:"common",transitionDuration:"slow",...N5(e)}),H5=Fi(e=>({label:V5,filledTrack:U5(e),track:W5(e)})),G5={xs:Fi({track:{h:"1"}}),sm:Fi({track:{h:"2"}}),md:Fi({track:{h:"3"}}),lg:Fi({track:{h:"4"}})},K5=j5({sizes:G5,baseStyle:H5,defaultProps:{size:"md",colorScheme:"blue"}}),Y5=e=>typeof e=="function";function rt(e,...t){return Y5(e)?e(...t):e}var{definePartsStyle:sl,defineMultiStyleConfig:X5}=le(NE.keys),Qi=O("checkbox-size"),Q5=e=>{const{colorScheme:t}=e;return{w:Qi.reference,h:Qi.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:L(`${t}.500`,`${t}.200`)(e),borderColor:L(`${t}.500`,`${t}.200`)(e),color:L("white","gray.900")(e),_hover:{bg:L(`${t}.600`,`${t}.300`)(e),borderColor:L(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:L("gray.200","transparent")(e),bg:L("gray.200","whiteAlpha.300")(e),color:L("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:L(`${t}.500`,`${t}.200`)(e),borderColor:L(`${t}.500`,`${t}.200`)(e),color:L("white","gray.900")(e)},_disabled:{bg:L("gray.100","whiteAlpha.100")(e),borderColor:L("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:L("red.500","red.300")(e)}}},q5={_disabled:{cursor:"not-allowed"}},Z5={userSelect:"none",_disabled:{opacity:.4}},J5={transitionProperty:"transform",transitionDuration:"normal"},eA=sl(e=>({icon:J5,container:q5,control:rt(Q5,e),label:Z5})),tA={sm:sl({control:{[Qi.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:sl({control:{[Qi.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:sl({control:{[Qi.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},Ul=X5({baseStyle:eA,sizes:tA,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:rA,definePartsStyle:ll}=le(JE.keys),nA=e=>{var t;const r=(t=rt(Ul.baseStyle,e))==null?void 0:t.control;return{...r,borderRadius:"full",_checked:{...r==null?void 0:r._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},oA=ll(e=>{var t,r,n,o;return{label:(r=(t=Ul).baseStyle)==null?void 0:r.call(t,e).label,container:(o=(n=Ul).baseStyle)==null?void 0:o.call(n,e).container,control:nA(e)}}),iA={md:ll({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:ll({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:ll({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},aA=rA({baseStyle:oA,sizes:iA,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:sA,definePartsStyle:lA}=le(e$.keys),Es=O("select-bg"),sg,uA={...(sg=Z.baseStyle)==null?void 0:sg.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Es.reference,[Es.variable]:"colors.white",_dark:{[Es.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Es.reference}},cA={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},dA=lA({field:uA,icon:cA}),$s={paddingInlineEnd:"8"},lg,ug,cg,dg,fg,hg,pg,mg,fA={lg:{...(lg=Z.sizes)==null?void 0:lg.lg,field:{...(ug=Z.sizes)==null?void 0:ug.lg.field,...$s}},md:{...(cg=Z.sizes)==null?void 0:cg.md,field:{...(dg=Z.sizes)==null?void 0:dg.md.field,...$s}},sm:{...(fg=Z.sizes)==null?void 0:fg.sm,field:{...(hg=Z.sizes)==null?void 0:hg.sm.field,...$s}},xs:{...(pg=Z.sizes)==null?void 0:pg.xs,field:{...(mg=Z.sizes)==null?void 0:mg.xs.field,...$s},icon:{insetEnd:"1"}}},hA=sA({baseStyle:dA,sizes:fA,variants:Z.variants,defaultProps:Z.defaultProps}),Bc=O("skeleton-start-color"),jc=O("skeleton-end-color"),pA={[Bc.variable]:"colors.gray.100",[jc.variable]:"colors.gray.400",_dark:{[Bc.variable]:"colors.gray.800",[jc.variable]:"colors.gray.600"},background:Bc.reference,borderColor:jc.reference,opacity:.7,borderRadius:"sm"},mA={baseStyle:pA},Nc=O("skip-link-bg"),vA={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Nc.variable]:"colors.white",_dark:{[Nc.variable]:"colors.gray.700"},bg:Nc.reference}},gA={baseStyle:vA},{defineMultiStyleConfig:yA,definePartsStyle:ju}=le(t$.keys),_a=O("slider-thumb-size"),Pa=O("slider-track-size"),Yr=O("slider-bg"),bA=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...ap({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},SA=e=>({...ap({orientation:e.orientation,horizontal:{h:Pa.reference},vertical:{w:Pa.reference}}),overflow:"hidden",borderRadius:"sm",[Yr.variable]:"colors.gray.200",_dark:{[Yr.variable]:"colors.whiteAlpha.200"},_disabled:{[Yr.variable]:"colors.gray.300",_dark:{[Yr.variable]:"colors.whiteAlpha.300"}},bg:Yr.reference}),xA=e=>{const{orientation:t}=e;return{...ap({orientation:t,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:_a.reference,h:_a.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"}}},wA=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Yr.variable]:`colors.${t}.500`,_dark:{[Yr.variable]:`colors.${t}.200`},bg:Yr.reference}},kA=ju(e=>({container:bA(e),track:SA(e),thumb:xA(e),filledTrack:wA(e)})),CA=ju({container:{[_a.variable]:"sizes.4",[Pa.variable]:"sizes.1"}}),_A=ju({container:{[_a.variable]:"sizes.3.5",[Pa.variable]:"sizes.1"}}),PA=ju({container:{[_a.variable]:"sizes.2.5",[Pa.variable]:"sizes.0.5"}}),TA={lg:CA,md:_A,sm:PA},EA=yA({baseStyle:kA,sizes:TA,defaultProps:{size:"md",colorScheme:"blue"}}),Tn=Me("spinner-size"),$A={width:[Tn.reference],height:[Tn.reference]},AA={xs:{[Tn.variable]:"sizes.3"},sm:{[Tn.variable]:"sizes.4"},md:{[Tn.variable]:"sizes.6"},lg:{[Tn.variable]:"sizes.8"},xl:{[Tn.variable]:"sizes.12"}},RA={baseStyle:$A,sizes:AA,defaultProps:{size:"md"}},{defineMultiStyleConfig:MA,definePartsStyle:Bb}=le(r$.keys),zA={fontWeight:"medium"},FA={opacity:.8,marginBottom:"2"},DA={verticalAlign:"baseline",fontWeight:"semibold"},IA={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},LA=Bb({container:{},label:zA,helpText:FA,number:DA,icon:IA}),OA={md:Bb({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},BA=MA({baseStyle:LA,sizes:OA,defaultProps:{size:"md"}}),Vc=O("kbd-bg"),jA={[Vc.variable]:"colors.gray.100",_dark:{[Vc.variable]:"colors.whiteAlpha.100"},bg:Vc.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},NA={baseStyle:jA},VA={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},WA={baseStyle:VA},{defineMultiStyleConfig:UA,definePartsStyle:HA}=le(KE.keys),GA={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},KA=HA({icon:GA}),YA=UA({baseStyle:KA}),{defineMultiStyleConfig:XA,definePartsStyle:QA}=le(YE.keys),rr=O("menu-bg"),Wc=O("menu-shadow"),qA={[rr.variable]:"#fff",[Wc.variable]:"shadows.sm",_dark:{[rr.variable]:"colors.gray.700",[Wc.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:rr.reference,boxShadow:Wc.reference},ZA={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[rr.variable]:"colors.gray.100",_dark:{[rr.variable]:"colors.whiteAlpha.100"}},_active:{[rr.variable]:"colors.gray.200",_dark:{[rr.variable]:"colors.whiteAlpha.200"}},_expanded:{[rr.variable]:"colors.gray.100",_dark:{[rr.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:rr.reference},JA={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},eR={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},tR={opacity:.6},rR={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},nR={transitionProperty:"common",transitionDuration:"normal"},oR=QA({button:nR,list:qA,item:ZA,groupTitle:JA,icon:eR,command:tR,divider:rR}),iR=XA({baseStyle:oR}),{defineMultiStyleConfig:aR,definePartsStyle:Cf}=le(XE.keys),Uc=O("modal-bg"),Hc=O("modal-shadow"),sR={bg:"blackAlpha.600",zIndex:"modal"},lR=e=>{const{isCentered:t,scrollBehavior:r}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:r==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},uR=e=>{const{isCentered:t,scrollBehavior:r}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:r==="inside"?"calc(100% - 7.5rem)":void 0,[Uc.variable]:"colors.white",[Hc.variable]:"shadows.lg",_dark:{[Uc.variable]:"colors.gray.700",[Hc.variable]:"shadows.dark-lg"},bg:Uc.reference,boxShadow:Hc.reference}},cR={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},dR={position:"absolute",top:"2",insetEnd:"3"},fR=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},hR={px:"6",py:"4"},pR=Cf(e=>({overlay:sR,dialogContainer:rt(lR,e),dialog:rt(uR,e),header:cR,closeButton:dR,body:rt(fR,e),footer:hR}));function jt(e){return Cf(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var mR={xs:jt("xs"),sm:jt("sm"),md:jt("md"),lg:jt("lg"),xl:jt("xl"),"2xl":jt("2xl"),"3xl":jt("3xl"),"4xl":jt("4xl"),"5xl":jt("5xl"),"6xl":jt("6xl"),full:jt("full")},vR=aR({baseStyle:pR,sizes:mR,defaultProps:{size:"md"}}),{defineMultiStyleConfig:gR,definePartsStyle:jb}=le(QE.keys),lp=Me("number-input-stepper-width"),Nb=Me("number-input-input-padding"),yR=xr(lp).add("0.5rem").toString(),Gc=Me("number-input-bg"),Kc=Me("number-input-color"),Yc=Me("number-input-border-color"),bR={[lp.variable]:"sizes.6",[Nb.variable]:yR},SR=e=>{var t,r;return(r=(t=rt(Z.baseStyle,e))==null?void 0:t.field)!=null?r:{}},xR={width:lp.reference},wR={borderStart:"1px solid",borderStartColor:Yc.reference,color:Kc.reference,bg:Gc.reference,[Kc.variable]:"colors.chakra-body-text",[Yc.variable]:"colors.chakra-border-color",_dark:{[Kc.variable]:"colors.whiteAlpha.800",[Yc.variable]:"colors.whiteAlpha.300"},_active:{[Gc.variable]:"colors.gray.200",_dark:{[Gc.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},kR=jb(e=>{var t;return{root:bR,field:(t=rt(SR,e))!=null?t:{},stepperGroup:xR,stepper:wR}});function As(e){var t,r,n;const o=(t=Z.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},a=(n=(r=o.field)==null?void 0:r.fontSize)!=null?n:"md",s=Fb.fontSizes[a];return jb({field:{...o.field,paddingInlineEnd:Nb.reference,verticalAlign:"top"},stepper:{fontSize:xr(s).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var CR={xs:As("xs"),sm:As("sm"),md:As("md"),lg:As("lg")},_R=gR({baseStyle:kR,sizes:CR,variants:Z.variants,defaultProps:Z.defaultProps}),vg,PR={...(vg=Z.baseStyle)==null?void 0:vg.field,textAlign:"center"},TR={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},gg,yg,ER={outline:e=>{var t,r,n;return(n=(r=rt((t=Z.variants)==null?void 0:t.outline,e))==null?void 0:r.field)!=null?n:{}},flushed:e=>{var t,r,n;return(n=(r=rt((t=Z.variants)==null?void 0:t.flushed,e))==null?void 0:r.field)!=null?n:{}},filled:e=>{var t,r,n;return(n=(r=rt((t=Z.variants)==null?void 0:t.filled,e))==null?void 0:r.field)!=null?n:{}},unstyled:(yg=(gg=Z.variants)==null?void 0:gg.unstyled.field)!=null?yg:{}},$R={baseStyle:PR,sizes:TR,variants:ER,defaultProps:Z.defaultProps},{defineMultiStyleConfig:AR,definePartsStyle:RR}=le(qE.keys),Rs=Me("popper-bg"),MR=Me("popper-arrow-bg"),bg=Me("popper-arrow-shadow-color"),zR={zIndex:10},FR={[Rs.variable]:"colors.white",bg:Rs.reference,[MR.variable]:Rs.reference,[bg.variable]:"colors.gray.200",_dark:{[Rs.variable]:"colors.gray.700",[bg.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},DR={px:3,py:2,borderBottomWidth:"1px"},IR={px:3,py:2},LR={px:3,py:2,borderTopWidth:"1px"},OR={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},BR=RR({popper:zR,content:FR,header:DR,body:IR,footer:LR,closeButton:OR}),jR=AR({baseStyle:BR}),{definePartsStyle:_f,defineMultiStyleConfig:NR}=le(VE.keys),Xc=O("drawer-bg"),Qc=O("drawer-box-shadow");function eo(e){return _f(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var VR={bg:"blackAlpha.600",zIndex:"modal"},WR={display:"flex",zIndex:"modal",justifyContent:"center"},UR=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Xc.variable]:"colors.white",[Qc.variable]:"shadows.lg",_dark:{[Xc.variable]:"colors.gray.700",[Qc.variable]:"shadows.dark-lg"},bg:Xc.reference,boxShadow:Qc.reference}},HR={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},GR={position:"absolute",top:"2",insetEnd:"3"},KR={px:"6",py:"2",flex:"1",overflow:"auto"},YR={px:"6",py:"4"},XR=_f(e=>({overlay:VR,dialogContainer:WR,dialog:rt(UR,e),header:HR,closeButton:GR,body:KR,footer:YR})),QR={xs:eo("xs"),sm:eo("md"),md:eo("lg"),lg:eo("2xl"),xl:eo("4xl"),full:eo("full")},qR=NR({baseStyle:XR,sizes:QR,defaultProps:{size:"xs"}}),{definePartsStyle:ZR,defineMultiStyleConfig:JR}=le(WE.keys),eM={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},tM={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},rM={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},nM=ZR({preview:eM,input:tM,textarea:rM}),oM=JR({baseStyle:nM}),{definePartsStyle:iM,defineMultiStyleConfig:aM}=le(UE.keys),Io=O("form-control-color"),sM={marginStart:"1",[Io.variable]:"colors.red.500",_dark:{[Io.variable]:"colors.red.300"},color:Io.reference},lM={mt:"2",[Io.variable]:"colors.gray.600",_dark:{[Io.variable]:"colors.whiteAlpha.600"},color:Io.reference,lineHeight:"normal",fontSize:"sm"},uM=iM({container:{width:"100%",position:"relative"},requiredIndicator:sM,helperText:lM}),cM=aM({baseStyle:uM}),{definePartsStyle:dM,defineMultiStyleConfig:fM}=le(HE.keys),Lo=O("form-error-color"),hM={[Lo.variable]:"colors.red.500",_dark:{[Lo.variable]:"colors.red.300"},color:Lo.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},pM={marginEnd:"0.5em",[Lo.variable]:"colors.red.500",_dark:{[Lo.variable]:"colors.red.300"},color:Lo.reference},mM=dM({text:hM,icon:pM}),vM=fM({baseStyle:mM}),gM={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},yM={baseStyle:gM},bM={fontFamily:"heading",fontWeight:"bold"},SM={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},xM={baseStyle:bM,sizes:SM,defaultProps:{size:"xl"}},{defineMultiStyleConfig:wM,definePartsStyle:kM}=le(jE.keys),qc=O("breadcrumb-link-decor"),CM={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:qc.reference,[qc.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[qc.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},_M=kM({link:CM}),PM=wM({baseStyle:_M}),TM={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"}}},Vb=e=>{const{colorScheme:t,theme:r}=e;if(t==="gray")return{color:L("gray.800","whiteAlpha.900")(e),_hover:{bg:L("gray.100","whiteAlpha.200")(e)},_active:{bg:L("gray.200","whiteAlpha.300")(e)}};const n=qo(`${t}.200`,.12)(r),o=qo(`${t}.200`,.24)(r);return{color:L(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:L(`${t}.50`,n)(e)},_active:{bg:L(`${t}.100`,o)(e)}}},EM=e=>{const{colorScheme:t}=e,r=L("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?r:"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"},...rt(Vb,e)}},$M={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},AM=e=>{var t;const{colorScheme:r}=e;if(r==="gray"){const l=L("gray.100","whiteAlpha.200")(e);return{bg:l,color:L("gray.800","whiteAlpha.900")(e),_hover:{bg:L("gray.200","whiteAlpha.300")(e),_disabled:{bg:l}},_active:{bg:L("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${r}.500`,color:o="white",hoverBg:i=`${r}.600`,activeBg:a=`${r}.700`}=(t=$M[r])!=null?t:{},s=L(n,`${r}.200`)(e);return{bg:s,color:L(o,"gray.800")(e),_hover:{bg:L(i,`${r}.300`)(e),_disabled:{bg:s}},_active:{bg:L(a,`${r}.400`)(e)}}},RM=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:L(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:L(`${t}.700`,`${t}.500`)(e)}}},MM={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},zM={ghost:Vb,outline:EM,solid:AM,link:RM,unstyled:MM},FM={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},DM={baseStyle:TM,variants:zM,sizes:FM,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Ln,defineMultiStyleConfig:IM}=le(s$.keys),Hl=O("card-bg"),Tr=O("card-padding"),Wb=O("card-shadow"),ul=O("card-radius"),Ub=O("card-border-width","0"),Hb=O("card-border-color"),LM=Ln({container:{[Hl.variable]:"colors.chakra-body-bg",backgroundColor:Hl.reference,boxShadow:Wb.reference,borderRadius:ul.reference,color:"chakra-body-text",borderWidth:Ub.reference,borderColor:Hb.reference},body:{padding:Tr.reference,flex:"1 1 0%"},header:{padding:Tr.reference},footer:{padding:Tr.reference}}),OM={sm:Ln({container:{[ul.variable]:"radii.base",[Tr.variable]:"space.3"}}),md:Ln({container:{[ul.variable]:"radii.md",[Tr.variable]:"space.5"}}),lg:Ln({container:{[ul.variable]:"radii.xl",[Tr.variable]:"space.7"}})},BM={elevated:Ln({container:{[Wb.variable]:"shadows.base",_dark:{[Hl.variable]:"colors.gray.700"}}}),outline:Ln({container:{[Ub.variable]:"1px",[Hb.variable]:"colors.chakra-border-color"}}),filled:Ln({container:{[Hl.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[Tr.variable]:0},header:{[Tr.variable]:0},footer:{[Tr.variable]:0}}},jM=IM({baseStyle:LM,variants:BM,sizes:OM,defaultProps:{variant:"elevated",size:"md"}}),qi=Me("close-button-size"),wi=Me("close-button-bg"),NM={w:[qi.reference],h:[qi.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[wi.variable]:"colors.blackAlpha.100",_dark:{[wi.variable]:"colors.whiteAlpha.100"}},_active:{[wi.variable]:"colors.blackAlpha.200",_dark:{[wi.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:wi.reference},VM={lg:{[qi.variable]:"sizes.10",fontSize:"md"},md:{[qi.variable]:"sizes.8",fontSize:"xs"},sm:{[qi.variable]:"sizes.6",fontSize:"2xs"}},WM={baseStyle:NM,sizes:VM,defaultProps:{size:"md"}},{variants:UM,defaultProps:HM}=Xi,GM={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:Ce.bg.reference,color:Ce.color.reference,boxShadow:Ce.shadow.reference},KM={baseStyle:GM,variants:UM,defaultProps:HM},YM={w:"100%",mx:"auto",maxW:"prose",px:"4"},XM={baseStyle:YM},QM={opacity:.6,borderColor:"inherit"},qM={borderStyle:"solid"},ZM={borderStyle:"dashed"},JM={solid:qM,dashed:ZM},ez={baseStyle:QM,variants:JM,defaultProps:{variant:"solid"}},{definePartsStyle:tz,defineMultiStyleConfig:rz}=le(LE.keys),nz={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},oz={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},iz={pt:"2",px:"4",pb:"5"},az={fontSize:"1.25em"},sz=tz({container:nz,button:oz,panel:iz,icon:az}),lz=rz({baseStyle:sz}),{definePartsStyle:Va,defineMultiStyleConfig:uz}=le(OE.keys),xt=O("alert-fg"),Dr=O("alert-bg"),cz=Va({container:{bg:Dr.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:xt.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:xt.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function up(e){const{theme:t,colorScheme:r}=e,n=qo(`${r}.200`,.16)(t);return{light:`colors.${r}.100`,dark:n}}var dz=Va(e=>{const{colorScheme:t}=e,r=up(e);return{container:{[xt.variable]:`colors.${t}.600`,[Dr.variable]:r.light,_dark:{[xt.variable]:`colors.${t}.200`,[Dr.variable]:r.dark}}}}),fz=Va(e=>{const{colorScheme:t}=e,r=up(e);return{container:{[xt.variable]:`colors.${t}.600`,[Dr.variable]:r.light,_dark:{[xt.variable]:`colors.${t}.200`,[Dr.variable]:r.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:xt.reference}}}),hz=Va(e=>{const{colorScheme:t}=e,r=up(e);return{container:{[xt.variable]:`colors.${t}.600`,[Dr.variable]:r.light,_dark:{[xt.variable]:`colors.${t}.200`,[Dr.variable]:r.dark},pt:"2",borderTopWidth:"4px",borderTopColor:xt.reference}}}),pz=Va(e=>{const{colorScheme:t}=e;return{container:{[xt.variable]:"colors.white",[Dr.variable]:`colors.${t}.600`,_dark:{[xt.variable]:"colors.gray.900",[Dr.variable]:`colors.${t}.200`},color:xt.reference}}}),mz={subtle:dz,"left-accent":fz,"top-accent":hz,solid:pz},vz=uz({baseStyle:cz,variants:mz,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:Gb,defineMultiStyleConfig:gz}=le(BE.keys),Oo=O("avatar-border-color"),Zi=O("avatar-bg"),Ta=O("avatar-font-size"),Zo=O("avatar-size"),yz={borderRadius:"full",border:"0.2em solid",borderColor:Oo.reference,[Oo.variable]:"white",_dark:{[Oo.variable]:"colors.gray.800"}},bz={bg:Zi.reference,fontSize:Ta.reference,width:Zo.reference,height:Zo.reference,lineHeight:"1",[Zi.variable]:"colors.gray.200",_dark:{[Zi.variable]:"colors.whiteAlpha.400"}},Sz=e=>{const{name:t,theme:r}=e,n=t?T$({string:t}):"colors.gray.400",o=_$(n)(r);let i="white";return o||(i="gray.800"),{bg:Zi.reference,fontSize:Ta.reference,color:i,borderColor:Oo.reference,verticalAlign:"top",width:Zo.reference,height:Zo.reference,"&:not([data-loaded])":{[Zi.variable]:n},[Oo.variable]:"colors.white",_dark:{[Oo.variable]:"colors.gray.800"}}},xz={fontSize:Ta.reference,lineHeight:"1"},wz=Gb(e=>({badge:rt(yz,e),excessLabel:rt(bz,e),container:rt(Sz,e),label:xz}));function Nr(e){const t=e!=="100%"?Ib[e]:void 0;return Gb({container:{[Zo.variable]:t??e,[Ta.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[Zo.variable]:t??e,[Ta.variable]:`calc(${t??e} / 2.5)`}})}var kz={"2xs":Nr(4),xs:Nr(6),sm:Nr(8),md:Nr(12),lg:Nr(16),xl:Nr(24),"2xl":Nr(32),full:Nr("100%")},Cz=gz({baseStyle:wz,sizes:kz,defaultProps:{size:"md"}}),_z={Accordion:lz,Alert:vz,Avatar:Cz,Badge:Xi,Breadcrumb:PM,Button:DM,Checkbox:Ul,CloseButton:WM,Code:KM,Container:XM,Divider:ez,Drawer:qR,Editable:oM,Form:cM,FormError:vM,FormLabel:yM,Heading:xM,Input:Z,Kbd:NA,Link:WA,List:YA,Menu:iR,Modal:vR,NumberInput:_R,PinInput:$R,Popover:jR,Progress:K5,Radio:aA,Select:hA,Skeleton:mA,SkipLink:gA,Slider:EA,Spinner:RA,Stat:BA,Switch:W$,Table:Q$,Tabs:d5,Tag:C5,Textarea:I5,Tooltip:B5,Card:jM,Stepper:IE},Pz={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"}}},Tz={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"}}},Ez="ltr",$z={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Kb={semanticTokens:Pz,direction:Ez,...zE,components:_z,styles:Tz,config:$z};function Di(e){return typeof e=="function"}function Az(...e){return t=>e.reduce((r,n)=>n(r),t)}var Rz=e=>function(...r){let n=[...r],o=r[r.length-1];return uE(o)&&n.length>1?n=n.slice(0,n.length-1):o=e,Az(...n.map(i=>a=>Di(i)?i(a):zz(a,i)))(o)},Mz=Rz(Kb);function zz(...e){return Ft({},...e,Yb)}function Yb(e,t,r,n){if((Di(e)||Di(t))&&Object.prototype.hasOwnProperty.call(n,r))return(...o)=>{const i=Di(e)?e(...o):e,a=Di(t)?t(...o):t;return Ft({},i,a,Yb)}}function Fz(e,t){const r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}function Dz(e,t,r,n){const o=typeof t=="string"?t.split("."):[t];for(n=0;n{const t=new WeakMap;return(n,o,i,a)=>{if(typeof n>"u")return e(n,o,i);t.has(n)||t.set(n,new Map);const s=t.get(n);if(s.has(o))return s.get(o);const l=e(n,o,i,a);return s.set(o,l),l}},Xb=Iz(Dz);function Qb(e,t){const r={};return Object.keys(e).forEach(n=>{const o=e[n];t(o,n,e)&&(r[n]=o)}),r}var qb=e=>Qb(e,t=>t!=null);function Lz(e){return typeof e=="function"}function Zb(e,...t){return Lz(e)?e(...t):e}function TB(...e){return function(r){e.some(n=>(n==null||n(r),r==null?void 0:r.defaultPrevented))}}var Oz=typeof Element<"u",Bz=typeof Map=="function",jz=typeof Set=="function",Nz=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function cl(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!cl(e[n],t[n]))return!1;return!0}var i;if(Bz&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;for(i=e.entries();!(n=i.next()).done;)if(!cl(n.value[1],t.get(n.value[0])))return!1;return!0}if(jz&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(Nz&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;if(Oz&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((o[n]==="_owner"||o[n]==="__v"||o[n]==="__o")&&e.$$typeof)&&!cl(e[o[n]],t[o[n]]))return!1;return!0}return e!==e&&t!==t}var Vz=function(t,r){try{return cl(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const Wz=Xf(Vz);function Jb(e,t={}){var r;const{styleConfig:n,...o}=t,{theme:i,colorMode:a}=VP(),s=e?Xb(i,`components.${e}`):void 0,l=n||s,u=Ft({theme:i,colorMode:a},(r=l==null?void 0:l.defaultProps)!=null?r:{},qb(Fz(o,["children"]))),c=S.useRef({});if(l){const f=sE(l)(u);Wz(c.current,f)||(c.current=f)}return c.current}function Nu(e,t={}){return Jb(e,t)}function eS(e,t={}){return Jb(e,t)}var Uz=new Set([...XT,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Hz=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function Gz(e){return Hz.has(e)||!Uz.has(e)}function Kz(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const r={...e};for(const n of t)if(n!=null)for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&(o in r&&delete r[o],r[o]=n[o]);return r}var Yz=/^((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|download|draggable|encType|enterKeyHint|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|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)-.*))$/,Xz=cb(function(e){return Yz.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Qz=Xz,qz=function(t){return t!=="theme"},Sg=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Qz:qz},xg=function(t,r,n){var o;if(r){var i=r.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},Zz=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return qh(r,n,o),bb(function(){return Zh(r,n,o)}),null},Jz=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,i,a;r!==void 0&&(i=r.label,a=r.target);var s=xg(t,r,n),l=s||Sg(o),u=!l("as");return function(){var c=arguments,d=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var f=c.length,p=1;pt=>{const{theme:r,css:n,__css:o,sx:i,...a}=t,s=Qb(a,(d,f)=>qT(f)),l=Zb(e,t),u=Kz({},o,l,qb(s),i),c=zb(u)(t.theme);return n?[c,n]:c};function Zc(e,t){const{baseStyle:r,...n}=t??{};n.shouldForwardProp||(n.shouldForwardProp=Gz);const o=r3({baseStyle:r}),i=t3(e,n)(o);return Ar.forwardRef(function(l,u){const{colorMode:c,forced:d}=Du();return Ar.createElement(i,{ref:u,"data-theme":d?c:void 0,...l})})}function n3(){const e=new Map;return new Proxy(Zc,{apply(t,r,n){return Zc(...n)},get(t,r){return e.has(r)||e.set(r,Zc(r)),e.get(r)}})}var _e=n3();function pt(e){return S.forwardRef(e)}function tS(e={}){const{strict:t=!0,errorMessage:r="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:n}=e,o=S.createContext(void 0);o.displayName=n;function i(){var a;const s=S.useContext(o);if(!s&&t){const l=new Error(r);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,i),l}return s}return[o.Provider,i,o]}function o3(e){const{cssVarsRoot:t,theme:r,children:n}=e,o=S.useMemo(()=>KT(r),[r]);return E.jsxs(vP,{theme:o,children:[E.jsx(i3,{root:t}),n]})}function i3({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return E.jsx(ja,{styles:r=>({[t]:r.__cssVars})})}tS({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function EB(e){return tS({name:`${e}StylesContext`,errorMessage:`useStyles: "styles" is undefined. Seems you forgot to wrap the components in "<${e} />" `})}function a3(){const{colorMode:e}=Du();return E.jsx(ja,{styles:t=>{const r=Xb(t,"styles.global"),n=Zb(r,{theme:t,colorMode:e});return n?zb(n)(t):void 0}})}var cp=S.createContext({getDocument(){return document},getWindow(){return window}});cp.displayName="EnvironmentContext";function $B({defer:e}={}){const[,t]=S.useReducer(r=>r+1,0);return ka(()=>{e&&t()},[e]),S.useContext(cp)}function rS(e){const{children:t,environment:r,disabled:n}=e,o=S.useRef(null),i=S.useMemo(()=>r||{getDocument:()=>{var s,l;return(l=(s=o.current)==null?void 0:s.ownerDocument)!=null?l:document},getWindow:()=>{var s,l;return(l=(s=o.current)==null?void 0:s.ownerDocument.defaultView)!=null?l:window}},[r]),a=!n||!r;return E.jsxs(cp.Provider,{value:i,children:[t,a&&E.jsx("span",{id:"__chakra_env",hidden:!0,ref:o})]})}rS.displayName="EnvironmentProvider";var s3=e=>{const{children:t,colorModeManager:r,portalZIndex:n,resetScope:o,resetCSS:i=!0,theme:a={},environment:s,cssVarsRoot:l,disableEnvironment:u,disableGlobalStyle:c}=e,d=E.jsx(rS,{environment:s,disabled:u,children:t});return E.jsx(o3,{theme:a,cssVarsRoot:l,children:E.jsxs(_b,{colorModeManager:r,options:a.config,children:[i?E.jsx(CP,{scope:o}):E.jsx(kP,{}),!c&&E.jsx(a3,{}),n?E.jsx(kb,{zIndex:n,children:d}):d]})})},l3=(e,t)=>e.find(r=>r.id===t);function kg(e,t){const r=nS(e,t),n=r?e[r].findIndex(o=>o.id===t):-1;return{position:r,index:n}}function nS(e,t){for(const[r,n]of Object.entries(e))if(l3(n,t))return r}function u3(e){const t=e.includes("right"),r=e.includes("left");let n="center";return t&&(n="flex-end"),r&&(n="flex-start"),{display:"flex",flexDirection:"column",alignItems:n}}function c3(e){const r=e==="top"||e==="bottom"?"0 auto":void 0,n=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,o=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,i=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:r,top:n,bottom:o,right:i,left:a}}function d3(e,t=[]){const r=S.useRef(e);return S.useEffect(()=>{r.current=e}),S.useCallback((...n)=>{var o;return(o=r.current)==null?void 0:o.call(r,...n)},t)}function f3(e,t){const r=d3(e);S.useEffect(()=>{if(t==null)return;let n=null;return n=window.setTimeout(()=>{r()},t),()=>{n&&window.clearTimeout(n)}},[t,r])}function Cg(e,t){const r=S.useRef(!1),n=S.useRef(!1);S.useEffect(()=>{if(r.current&&n.current)return e();n.current=!0},t),S.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])}const oS=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Vu=S.createContext({}),Wa=S.createContext(null),Wu=typeof document<"u",dp=Wu?S.useLayoutEffect:S.useEffect,iS=S.createContext({strict:!1}),fp=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),h3="framerAppearId",aS="data-"+fp(h3);function p3(e,t,r,n){const{visualElement:o}=S.useContext(Vu),i=S.useContext(iS),a=S.useContext(Wa),s=S.useContext(oS).reducedMotion,l=S.useRef();n=n||i.renderer,!l.current&&n&&(l.current=n(e,{visualState:t,parent:o,props:r,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;S.useInsertionEffect(()=>{u&&u.update(r,a)});const c=S.useRef(!!r[aS]);return dp(()=>{u&&(u.render(),c.current&&u.animationState&&u.animationState.animateChanges())}),S.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),c.current&&(window.HandoffAppearAnimations=!1,c.current=!1))}),u}function ko(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function m3(e,t,r){return S.useCallback(n=>{n&&e.mount&&e.mount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):ko(r)&&(r.current=n))},[t])}function Ea(e){return typeof e=="string"||Array.isArray(e)}function Uu(e){return typeof e=="object"&&typeof e.start=="function"}const hp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],pp=["initial",...hp];function Hu(e){return Uu(e.animate)||pp.some(t=>Ea(e[t]))}function sS(e){return!!(Hu(e)||e.variants)}function v3(e,t){if(Hu(e)){const{initial:r,animate:n}=e;return{initial:r===!1||Ea(r)?r:void 0,animate:Ea(n)?n:void 0}}return e.inherit!==!1?t:{}}function g3(e){const{initial:t,animate:r}=v3(e,S.useContext(Vu));return S.useMemo(()=>({initial:t,animate:r}),[_g(t),_g(r)])}function _g(e){return Array.isArray(e)?e.join(" "):e}const Pg={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},$a={};for(const e in Pg)$a[e]={isEnabled:t=>Pg[e].some(r=>!!t[r])};function y3(e){for(const t in e)$a[t]={...$a[t],...e[t]}}const mp=S.createContext({}),lS=S.createContext({}),b3=Symbol.for("motionComponentSymbol");function S3({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:o}){e&&y3(e);function i(s,l){let u;const c={...S.useContext(oS),...s,layoutId:x3(s)},{isStatic:d}=c,f=g3(s),p=n(s,d);if(!d&&Wu){f.visualElement=p3(o,p,c,t);const g=S.useContext(lS),y=S.useContext(iS).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,y,e,g))}return S.createElement(Vu.Provider,{value:f},u&&f.visualElement?S.createElement(u,{visualElement:f.visualElement,...c}):null,r(o,s,m3(p,f.visualElement,l),p,d,f.visualElement))}const a=S.forwardRef(i);return a[b3]=o,a}function x3({layoutId:e}){const t=S.useContext(mp).id;return t&&e!==void 0?t+"-"+e:e}function w3(e){function t(n,o={}){return S3(e(n,o))}if(typeof Proxy>"u")return t;const r=new Map;return new Proxy(t,{get:(n,o)=>(r.has(o)||r.set(o,t(o)),r.get(o))})}const k3=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function vp(e){return typeof e!="string"||e.includes("-")?!1:!!(k3.indexOf(e)>-1||/[A-Z]/.test(e))}const Kl={};function C3(e){Object.assign(Kl,e)}const Ua=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xn=new Set(Ua);function uS(e,{layout:t,layoutId:r}){return Xn.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Kl[e]||e==="opacity")}const ht=e=>!!(e&&e.getVelocity),_3={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},P3=Ua.length;function T3(e,{enableHardwareAcceleration:t=!0,allowTransformNone:r=!0},n,o){let i="";for(let a=0;at=>typeof t=="string"&&t.startsWith(e),dS=cS("--"),Pf=cS("var(--"),E3=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,$3=(e,t)=>t&&typeof e=="number"?t.transform(e):e,cn=(e,t,r)=>Math.min(Math.max(r,e),t),Qn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ji={...Qn,transform:e=>cn(0,1,e)},Ms={...Qn,default:1},ea=e=>Math.round(e*1e5)/1e5,Gu=/(-)?([\d]*\.?[\d])+/g,fS=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,A3=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Ha(e){return typeof e=="string"}const Ga=e=>({test:t=>Ha(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Vr=Ga("deg"),hr=Ga("%"),j=Ga("px"),R3=Ga("vh"),M3=Ga("vw"),Tg={...hr,parse:e=>hr.parse(e)/100,transform:e=>hr.transform(e*100)},Eg={...Qn,transform:Math.round},hS={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,radius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,size:j,top:j,right:j,bottom:j,left:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,rotate:Vr,rotateX:Vr,rotateY:Vr,rotateZ:Vr,scale:Ms,scaleX:Ms,scaleY:Ms,scaleZ:Ms,skew:Vr,skewX:Vr,skewY:Vr,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:Ji,originX:Tg,originY:Tg,originZ:j,zIndex:Eg,fillOpacity:Ji,strokeOpacity:Ji,numOctaves:Eg};function gp(e,t,r,n){const{style:o,vars:i,transform:a,transformOrigin:s}=e;let l=!1,u=!1,c=!0;for(const d in t){const f=t[d];if(dS(d)){i[d]=f;continue}const p=hS[d],g=$3(f,p);if(Xn.has(d)){if(l=!0,a[d]=g,!c)continue;f!==(p.default||0)&&(c=!1)}else d.startsWith("origin")?(u=!0,s[d]=g):o[d]=g}if(t.transform||(l||n?o.transform=T3(e.transform,r,c,n):o.transform&&(o.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:p=0}=s;o.transformOrigin=`${d} ${f} ${p}`}}const yp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function pS(e,t,r){for(const n in t)!ht(t[n])&&!uS(n,r)&&(e[n]=t[n])}function z3({transformTemplate:e},t,r){return S.useMemo(()=>{const n=yp();return gp(n,t,{enableHardwareAcceleration:!r},e),Object.assign({},n.vars,n.style)},[t])}function F3(e,t,r){const n=e.style||{},o={};return pS(o,n,e),Object.assign(o,z3(e,t,r)),e.transformValues?e.transformValues(o):o}function D3(e,t,r){const n={},o=F3(e,t,r);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const I3=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Yl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||I3.has(e)}let mS=e=>!Yl(e);function L3(e){e&&(mS=t=>t.startsWith("on")?!Yl(t):e(t))}try{L3(require("@emotion/is-prop-valid").default)}catch{}function O3(e,t,r){const n={};for(const o in e)o==="values"&&typeof e.values=="object"||(mS(o)||r===!0&&Yl(o)||!t&&!Yl(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}function $g(e,t,r){return typeof e=="string"?e:j.transform(t+r*e)}function B3(e,t,r){const n=$g(t,e.x,e.width),o=$g(r,e.y,e.height);return`${n} ${o}`}const j3={offset:"stroke-dashoffset",array:"stroke-dasharray"},N3={offset:"strokeDashoffset",array:"strokeDasharray"};function V3(e,t,r=1,n=0,o=!0){e.pathLength=1;const i=o?j3:N3;e[i.offset]=j.transform(-n);const a=j.transform(t),s=j.transform(r);e[i.array]=`${a} ${s}`}function bp(e,{attrX:t,attrY:r,attrScale:n,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...u},c,d,f){if(gp(e,u,c,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g,dimensions:y}=e;p.transform&&(y&&(g.transform=p.transform),delete p.transform),y&&(o!==void 0||i!==void 0||g.transform)&&(g.transformOrigin=B3(y,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),r!==void 0&&(p.y=r),n!==void 0&&(p.scale=n),a!==void 0&&V3(p,a,s,l,!1)}const vS=()=>({...yp(),attrs:{}}),Sp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function W3(e,t,r,n){const o=S.useMemo(()=>{const i=vS();return bp(i,t,{enableHardwareAcceleration:!1},Sp(n),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};pS(i,e.style,e),o.style={...i,...o.style}}return o}function U3(e=!1){return(r,n,o,{latestValues:i},a)=>{const l=(vp(r)?W3:D3)(n,i,a,r),c={...O3(n,typeof r=="string",e),...l,ref:o},{children:d}=n,f=S.useMemo(()=>ht(d)?d.get():d,[d]);return S.createElement(r,{...c,children:f})}}function gS(e,{style:t,vars:r},n,o){Object.assign(e.style,t,o&&o.getProjectionStyles(n));for(const i in r)e.style.setProperty(i,r[i])}const yS=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function bS(e,t,r,n){gS(e,t,void 0,n);for(const o in t.attrs)e.setAttribute(yS.has(o)?o:fp(o),t.attrs[o])}function xp(e,t){const{style:r}=e,n={};for(const o in r)(ht(r[o])||t.style&&ht(t.style[o])||uS(o,e))&&(n[o]=r[o]);return n}function SS(e,t){const r=xp(e,t);for(const n in e)if(ht(e[n])||ht(t[n])){const o=Ua.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[o]=e[n]}return r}function wp(e,t,r,n={},o={}){return typeof t=="function"&&(t=t(r!==void 0?r:e.custom,n,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(r!==void 0?r:e.custom,n,o)),t}function xS(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Xl=e=>Array.isArray(e),H3=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),G3=e=>Xl(e)?e[e.length-1]||0:e;function dl(e){const t=ht(e)?e.get():e;return H3(t)?t.toValue():t}function K3({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},n,o,i){const a={latestValues:Y3(n,o,i,e),renderState:t()};return r&&(a.mount=s=>r(n,s,a)),a}const wS=e=>(t,r)=>{const n=S.useContext(Vu),o=S.useContext(Wa),i=()=>K3(e,t,n,o);return r?i():xS(i)};function Y3(e,t,r,n){const o={},i=n(e,{});for(const f in i)o[f]=dl(i[f]);let{initial:a,animate:s}=e;const l=Hu(e),u=sS(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let c=r?r.initial===!1:!1;c=c||a===!1;const d=c?s:a;return d&&typeof d!="boolean"&&!Uu(d)&&(Array.isArray(d)?d:[d]).forEach(p=>{const g=wp(e,p);if(!g)return;const{transitionEnd:y,transition:k,...m}=g;for(const h in m){let v=m[h];if(Array.isArray(v)){const C=c?v.length-1:0;v=v[C]}v!==null&&(o[h]=v)}for(const h in y)o[h]=y[h]}),o}const xe=e=>e;class Ag{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const r=this.order.indexOf(t);r!==-1&&(this.order.splice(r,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function X3(e){let t=new Ag,r=new Ag,n=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(l,u=!1,c=!1)=>{const d=c&&o,f=d?t:r;return u&&a.add(l),f.add(l)&&d&&o&&(n=t.order.length),l},cancel:l=>{r.remove(l),a.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[t,r]=[r,t],r.clear(),n=t.order.length,n)for(let u=0;u(d[f]=X3(()=>r=!0),d),{}),a=d=>i[d].process(o),s=()=>{const d=performance.now();r=!1,o.delta=n?1e3/60:Math.max(Math.min(d-o.timestamp,Q3),1),o.timestamp=d,o.isProcessing=!0,zs.forEach(a),o.isProcessing=!1,r&&t&&(n=!1,e(s))},l=()=>{r=!0,n=!0,o.isProcessing||e(s)};return{schedule:zs.reduce((d,f)=>{const p=i[f];return d[f]=(g,y=!1,k=!1)=>(r||l(),p.schedule(g,y,k)),d},{}),cancel:d=>zs.forEach(f=>i[f].cancel(d)),state:o,steps:i}}const{schedule:se,cancel:Ir,state:De,steps:Jc}=q3(typeof requestAnimationFrame<"u"?requestAnimationFrame:xe,!0),Z3={useVisualState:wS({scrapeMotionValuesFromProps:SS,createRenderState:vS,onMount:(e,t,{renderState:r,latestValues:n})=>{se.read(()=>{try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),se.render(()=>{bp(r,n,{enableHardwareAcceleration:!1},Sp(t.tagName),e.transformTemplate),bS(t,r)})}})},J3={useVisualState:wS({scrapeMotionValuesFromProps:xp,createRenderState:yp})};function e4(e,{forwardMotionProps:t=!1},r,n){return{...vp(e)?Z3:J3,preloadedFeatures:r,useRender:U3(t),createVisualElement:n,Component:e}}function _r(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}const kS=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ku(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const t4=e=>t=>kS(t)&&e(t,Ku(t));function Er(e,t,r,n){return _r(e,t,t4(r),n)}const r4=(e,t)=>r=>t(e(r)),an=(...e)=>e.reduce(r4);function CS(e){let t=null;return()=>{const r=()=>{t=null};return t===null?(t=e,r):!1}}const Rg=CS("dragHorizontal"),Mg=CS("dragVertical");function _S(e){let t=!1;if(e==="y")t=Mg();else if(e==="x")t=Rg();else{const r=Rg(),n=Mg();r&&n?t=()=>{r(),n()}:(r&&r(),n&&n())}return t}function PS(){const e=_S(!0);return e?(e(),!1):!0}class vn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function zg(e,t){const r="pointer"+(t?"enter":"leave"),n="onHover"+(t?"Start":"End"),o=(i,a)=>{if(i.type==="touch"||PS())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t),s[n]&&se.update(()=>s[n](i,a))};return Er(e.current,r,o,{passive:!e.getProps()[n]})}class n4 extends vn{mount(){this.unmount=an(zg(this.node,!0),zg(this.node,!1))}unmount(){}}class o4 extends vn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=an(_r(this.node.current,"focus",()=>this.onFocus()),_r(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const TS=(e,t)=>t?e===t?!0:TS(e,t.parentElement):!1;function ed(e,t){if(!t)return;const r=new PointerEvent("pointer"+e);t(r,Ku(r))}class i4 extends vn{constructor(){super(...arguments),this.removeStartListeners=xe,this.removeEndListeners=xe,this.removeAccessibleListeners=xe,this.startPointerPress=(t,r)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),i=Er(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();se.update(()=>{TS(this.node.current,s.target)?u&&u(s,l):c&&c(s,l)})},{passive:!(n.onTap||n.onPointerUp)}),a=Er(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=an(i,a),this.startPress(t,r)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const a=s=>{s.key!=="Enter"||!this.checkPressEnd()||ed("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&se.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=_r(this.node.current,"keyup",a),ed("down",(s,l)=>{this.startPress(s,l)})},r=_r(this.node.current,"keydown",t),n=()=>{this.isPressing&&ed("cancel",(i,a)=>this.cancelPress(i,a))},o=_r(this.node.current,"blur",n);this.removeAccessibleListeners=an(r,o)}}startPress(t,r){this.isPressing=!0;const{onTapStart:n,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&se.update(()=>n(t,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!PS()}cancelPress(t,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&se.update(()=>n(t,r))}mount(){const t=this.node.getProps(),r=Er(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=_r(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=an(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Tf=new WeakMap,td=new WeakMap,a4=e=>{const t=Tf.get(e.target);t&&t(e)},s4=e=>{e.forEach(a4)};function l4({root:e,...t}){const r=e||document;td.has(r)||td.set(r,{});const n=td.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(s4,{root:e,...t})),n[o]}function u4(e,t,r){const n=l4(t);return Tf.set(e,r),n.observe(e),()=>{Tf.delete(e),n.unobserve(e)}}const c4={some:0,all:1};class d4 extends vn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:i}=t,a={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:c4[o]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return u4(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(f4(t,r))&&this.startObserver()}unmount(){}}function f4({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const h4={inView:{Feature:d4},tap:{Feature:i4},focus:{Feature:o4},hover:{Feature:n4}};function ES(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;nt[n]=r.get()),t}function m4(e){const t={};return e.values.forEach((r,n)=>t[n]=r.getVelocity()),t}function Yu(e,t,r){const n=e.getProps();return wp(n,t,r!==void 0?r:n.custom,p4(e),m4(e))}let v4=xe,kp=xe;const sn=e=>e*1e3,$r=e=>e/1e3,g4={current:!1},$S=e=>Array.isArray(e)&&typeof e[0]=="number";function AS(e){return!!(!e||typeof e=="string"&&RS[e]||$S(e)||Array.isArray(e)&&e.every(AS))}const Ii=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,RS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ii([0,.65,.55,1]),circOut:Ii([.55,0,1,.45]),backIn:Ii([.31,.01,.66,-.59]),backOut:Ii([.33,1.53,.69,.99])};function MS(e){if(e)return $S(e)?Ii(e):Array.isArray(e)?e.map(MS):RS[e]}function y4(e,t,r,{delay:n=0,duration:o,repeat:i=0,repeatType:a="loop",ease:s,times:l}={}){const u={[t]:r};l&&(u.offset=l);const c=MS(s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:n,duration:o,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}function b4(e,{repeat:t,repeatType:r="loop"}){const n=t&&r!=="loop"&&t%2===1?0:e.length-1;return e[n]}const zS=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,S4=1e-7,x4=12;function w4(e,t,r,n,o){let i,a,s=0;do a=t+(r-t)/2,i=zS(a,n,o)-e,i>0?r=a:t=a;while(Math.abs(i)>S4&&++sw4(i,0,1,e,r);return i=>i===0||i===1?i:zS(o(i),t,n)}const k4=Ka(.42,0,1,1),C4=Ka(0,0,.58,1),FS=Ka(.42,0,.58,1),_4=e=>Array.isArray(e)&&typeof e[0]!="number",DS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,IS=e=>t=>1-e(1-t),LS=e=>1-Math.sin(Math.acos(e)),Cp=IS(LS),P4=DS(Cp),OS=Ka(.33,1.53,.69,.99),_p=IS(OS),T4=DS(_p),E4=e=>(e*=2)<1?.5*_p(e):.5*(2-Math.pow(2,-10*(e-1))),$4={linear:xe,easeIn:k4,easeInOut:FS,easeOut:C4,circIn:LS,circInOut:P4,circOut:Cp,backIn:_p,backInOut:T4,backOut:OS,anticipate:E4},Fg=e=>{if(Array.isArray(e)){kp(e.length===4);const[t,r,n,o]=e;return Ka(t,r,n,o)}else if(typeof e=="string")return $4[e];return e},Pp=(e,t)=>r=>!!(Ha(r)&&A3.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),BS=(e,t,r)=>n=>{if(!Ha(n))return n;const[o,i,a,s]=n.match(Gu);return{[e]:parseFloat(o),[t]:parseFloat(i),[r]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},A4=e=>cn(0,255,e),rd={...Qn,transform:e=>Math.round(A4(e))},Mn={test:Pp("rgb","red"),parse:BS("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+rd.transform(e)+", "+rd.transform(t)+", "+rd.transform(r)+", "+ea(Ji.transform(n))+")"};function R4(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}const Ef={test:Pp("#"),parse:R4,transform:Mn.transform},Co={test:Pp("hsl","hue"),parse:BS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+hr.transform(ea(t))+", "+hr.transform(ea(r))+", "+ea(Ji.transform(n))+")"},Ze={test:e=>Mn.test(e)||Ef.test(e)||Co.test(e),parse:e=>Mn.test(e)?Mn.parse(e):Co.test(e)?Co.parse(e):Ef.parse(e),transform:e=>Ha(e)?e:e.hasOwnProperty("red")?Mn.transform(e):Co.transform(e)},ge=(e,t,r)=>-r*e+r*t+e;function nd(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function M4({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,i=0,a=0;if(!t)o=i=a=r;else{const s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=nd(l,s,e+1/3),i=nd(l,s,e),a=nd(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:n}}const od=(e,t,r)=>{const n=e*e;return Math.sqrt(Math.max(0,r*(t*t-n)+n))},z4=[Ef,Mn,Co],F4=e=>z4.find(t=>t.test(e));function Dg(e){const t=F4(e);let r=t.parse(e);return t===Co&&(r=M4(r)),r}const jS=(e,t)=>{const r=Dg(e),n=Dg(t),o={...r};return i=>(o.red=od(r.red,n.red,i),o.green=od(r.green,n.green,i),o.blue=od(r.blue,n.blue,i),o.alpha=ge(r.alpha,n.alpha,i),Mn.transform(o))};function D4(e){var t,r;return isNaN(e)&&Ha(e)&&(((t=e.match(Gu))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(fS))===null||r===void 0?void 0:r.length)||0)>0}const NS={regex:E3,countKey:"Vars",token:"${v}",parse:xe},VS={regex:fS,countKey:"Colors",token:"${c}",parse:Ze.parse},WS={regex:Gu,countKey:"Numbers",token:"${n}",parse:Qn.parse};function id(e,{regex:t,countKey:r,token:n,parse:o}){const i=e.tokenised.match(t);i&&(e["num"+r]=i.length,e.tokenised=e.tokenised.replace(t,n),e.values.push(...i.map(o)))}function Ql(e){const t=e.toString(),r={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return r.value.includes("var(--")&&id(r,NS),id(r,VS),id(r,WS),r}function US(e){return Ql(e).values}function HS(e){const{values:t,numColors:r,numVars:n,tokenised:o}=Ql(e),i=t.length;return a=>{let s=o;for(let l=0;ltypeof e=="number"?0:e;function L4(e){const t=US(e);return HS(e)(t.map(I4))}const dn={test:D4,parse:US,createTransformer:HS,getAnimatableNone:L4},GS=(e,t)=>r=>`${r>0?t:e}`;function KS(e,t){return typeof e=="number"?r=>ge(e,t,r):Ze.test(e)?jS(e,t):e.startsWith("var(")?GS(e,t):XS(e,t)}const YS=(e,t)=>{const r=[...e],n=r.length,o=e.map((i,a)=>KS(i,t[a]));return i=>{for(let a=0;a{const r={...e,...t},n={};for(const o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=KS(e[o],t[o]));return o=>{for(const i in n)r[i]=n[i](o);return r}},XS=(e,t)=>{const r=dn.createTransformer(t),n=Ql(e),o=Ql(t);return n.numVars===o.numVars&&n.numColors===o.numColors&&n.numNumbers>=o.numNumbers?an(YS(n.values,o.values),r):GS(e,t)},Aa=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},Ig=(e,t)=>r=>ge(e,t,r);function B4(e){return typeof e=="number"?Ig:typeof e=="string"?Ze.test(e)?jS:XS:Array.isArray(e)?YS:typeof e=="object"?O4:Ig}function j4(e,t,r){const n=[],o=r||B4(e[0]),i=e.length-1;for(let a=0;at[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=j4(t,n,o),s=a.length,l=u=>{let c=0;if(s>1)for(;cl(cn(e[0],e[i-1],u)):l}function N4(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=Aa(0,t,n);e.push(ge(r,1,o))}}function V4(e){const t=[0];return N4(t,e.length-1),t}function W4(e,t){return e.map(r=>r*t)}function U4(e,t){return e.map(()=>t||FS).splice(0,e.length-1)}function ql({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const o=_4(n)?n.map(Fg):Fg(n),i={done:!1,value:t[0]},a=W4(r&&r.length===t.length?r:V4(t),e),s=QS(a,t,{ease:Array.isArray(o)?o:U4(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}function qS(e,t){return t?e*(1e3/t):0}const H4=5;function ZS(e,t,r){const n=Math.max(t-H4,0);return qS(r-e(n),t-n)}const ad=.001,G4=.01,Lg=10,K4=.05,Y4=1;function X4({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let o,i;v4(e<=sn(Lg));let a=1-t;a=cn(K4,Y4,a),e=cn(G4,Lg,$r(e)),a<1?(o=u=>{const c=u*a,d=c*e,f=c-r,p=$f(u,a),g=Math.exp(-d);return ad-f/p*g},i=u=>{const d=u*a*e,f=d*r+r,p=Math.pow(a,2)*Math.pow(u,2)*e,g=Math.exp(-d),y=$f(Math.pow(u,2),a);return(-o(u)+ad>0?-1:1)*((f-p)*g)/y}):(o=u=>{const c=Math.exp(-u*e),d=(u-r)*e+1;return-ad+c*d},i=u=>{const c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});const s=5/e,l=q4(o,i,s);if(e=sn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*n;return{stiffness:u,damping:a*2*Math.sqrt(n*u),duration:e}}}const Q4=12;function q4(e,t,r){let n=r;for(let o=1;oe[r]!==void 0)}function eF(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Og(e,J4)&&Og(e,Z4)){const r=X4(e);t={...t,...r,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function JS({keyframes:e,restDelta:t,restSpeed:r,...n}){const o=e[0],i=e[e.length-1],a={done:!1,value:o},{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=eF(n),p=c?-$r(c):0,g=l/(2*Math.sqrt(s*u)),y=i-o,k=$r(Math.sqrt(s/u)),m=Math.abs(y)<5;r||(r=m?.01:2),t||(t=m?.005:.5);let h;if(g<1){const v=$f(k,g);h=C=>{const _=Math.exp(-g*k*C);return i-_*((p+g*k*y)/v*Math.sin(v*C)+y*Math.cos(v*C))}}else if(g===1)h=v=>i-Math.exp(-k*v)*(y+(p+k*y)*v);else{const v=k*Math.sqrt(g*g-1);h=C=>{const _=Math.exp(-g*k*C),$=Math.min(v*C,300);return i-_*((p+g*k*y)*Math.sinh($)+v*y*Math.cosh($))/v}}return{calculatedDuration:f&&d||null,next:v=>{const C=h(v);if(f)a.done=v>=d;else{let _=p;v!==0&&(g<1?_=ZS(h,v,C):_=0);const $=Math.abs(_)<=r,T=Math.abs(i-C)<=t;a.done=$&&T}return a.value=a.done?i:C,a}}}function Bg({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=A=>s!==void 0&&Al,g=A=>s===void 0?l:l===void 0||Math.abs(s-A)-y*Math.exp(-A/n),v=A=>m+h(A),C=A=>{const M=h(A),I=v(A);f.done=Math.abs(M)<=u,f.value=f.done?m:I};let _,$;const T=A=>{p(f.value)&&(_=A,$=JS({keyframes:[f.value,g(f.value)],velocity:ZS(v,A,f.value),damping:o,stiffness:i,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:A=>{let M=!1;return!$&&_===void 0&&(M=!0,C(A),T(A)),_!==void 0&&A>_?$.next(A-_):(!M&&C(A),f)}}}const tF=e=>{const t=({timestamp:r})=>e(r);return{start:()=>se.update(t,!0),stop:()=>Ir(t),now:()=>De.isProcessing?De.timestamp:performance.now()}},jg=2e4;function Ng(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t=jg?1/0:t}const rF={decay:Bg,inertia:Bg,tween:ql,keyframes:ql,spring:JS};function Zl({autoplay:e=!0,delay:t=0,driver:r=tF,keyframes:n,type:o="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:d,...f}){let p=1,g=!1,y,k;const m=()=>{k=new Promise(B=>{y=B})};m();let h;const v=rF[o]||ql;let C;v!==ql&&typeof n[0]!="number"&&(C=QS([0,100],n,{clamp:!1}),n=[0,100]);const _=v({...f,keyframes:n});let $;s==="mirror"&&($=v({...f,keyframes:[...n].reverse(),velocity:-(f.velocity||0)}));let T="idle",A=null,M=null,I=null;_.calculatedDuration===null&&i&&(_.calculatedDuration=Ng(_));const{calculatedDuration:ee}=_;let ze=1/0,Pe=1/0;ee!==null&&(ze=ee+a,Pe=ze*(i+1)-a);let oe=0;const ue=B=>{if(M===null)return;p>0&&(M=Math.min(M,B)),p<0&&(M=Math.min(B-Pe/p,M)),A!==null?oe=A:oe=Math.round(B-M)*p;const ne=oe-t*(p>=0?1:-1),U=p>=0?ne<0:ne>Pe;oe=Math.max(ne,0),T==="finished"&&A===null&&(oe=Pe);let Ge=oe,Xt=_;if(i){const Qt=oe/ze;let Ot=Math.floor(Qt),qt=Qt%1;!qt&&Qt>=1&&(qt=1),qt===1&&Ot--,Ot=Math.min(Ot,i+1);const si=!!(Ot%2);si&&(s==="reverse"?(qt=1-qt,a&&(qt-=a/ze)):s==="mirror"&&(Xt=$));let Qa=cn(0,1,qt);oe>Pe&&(Qa=s==="reverse"&&si?1:0),Ge=Qa*ze}const we=U?{done:!1,value:n[0]}:Xt.next(Ge);C&&(we.value=C(we.value));let{done:Fe}=we;!U&&ee!==null&&(Fe=p>=0?oe>=Pe:oe<=0);const mt=A===null&&(T==="finished"||T==="running"&&Fe);return d&&d(we.value),mt&&z(),we},He=()=>{h&&h.stop(),h=void 0},it=()=>{T="idle",He(),y(),m(),M=I=null},z=()=>{T="finished",c&&c(),He(),y()},N=()=>{if(g)return;h||(h=r(ue));const B=h.now();l&&l(),A!==null?M=B-A:(!M||T==="finished")&&(M=B),T==="finished"&&m(),I=M,A=null,T="running",h.start()};e&&N();const V={then(B,ne){return k.then(B,ne)},get time(){return $r(oe)},set time(B){B=sn(B),oe=B,A!==null||!h||p===0?A=B:M=h.now()-B/p},get duration(){const B=_.calculatedDuration===null?Ng(_):_.calculatedDuration;return $r(B)},get speed(){return p},set speed(B){B===p||!h||(p=B,V.time=$r(oe))},get state(){return T},play:N,pause:()=>{T="paused",A=oe},stop:()=>{g=!0,T!=="idle"&&(T="idle",u&&u(),it())},cancel:()=>{I!==null&&ue(I),it()},complete:()=>{T="finished"},sample:B=>(M=0,ue(B))};return V}function nF(e){let t;return()=>(t===void 0&&(t=e()),t)}const oF=nF(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),iF=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Fs=10,aF=2e4,sF=(e,t)=>t.type==="spring"||e==="backgroundColor"||!AS(t.ease);function lF(e,t,{onUpdate:r,onComplete:n,...o}){if(!(oF()&&iF.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let a=!1,s,l;const u=()=>{l=new Promise(h=>{s=h})};u();let{keyframes:c,duration:d=300,ease:f,times:p}=o;if(sF(t,o)){const h=Zl({...o,repeat:0,delay:0});let v={done:!1,value:c[0]};const C=[];let _=0;for(;!v.done&&_g.cancel(),k=()=>{se.update(y),s(),u()};return g.onfinish=()=>{e.set(b4(c,o)),n&&n(),k()},{then(h,v){return l.then(h,v)},attachTimeline(h){return g.timeline=h,g.onfinish=null,xe},get time(){return $r(g.currentTime||0)},set time(h){g.currentTime=sn(h)},get speed(){return g.playbackRate},set speed(h){g.playbackRate=h},get duration(){return $r(d)},play:()=>{a||(g.play(),Ir(y))},pause:()=>g.pause(),stop:()=>{if(a=!0,g.playState==="idle")return;const{currentTime:h}=g;if(h){const v=Zl({...o,autoplay:!1});e.setWithVelocity(v.sample(h-Fs).value,v.sample(h).value,Fs)}k()},complete:()=>g.finish(),cancel:k}}function uF({keyframes:e,delay:t,onUpdate:r,onComplete:n}){const o=()=>(r&&r(e[e.length-1]),n&&n(),{time:0,speed:1,duration:0,play:xe,pause:xe,stop:xe,then:i=>(i(),Promise.resolve()),cancel:xe,complete:xe});return t?Zl({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const cF={type:"spring",stiffness:500,damping:25,restSpeed:10},dF=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),fF={type:"keyframes",duration:.8},hF={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pF=(e,{keyframes:t})=>t.length>2?fF:Xn.has(e)?e.startsWith("scale")?dF(t[1]):cF:hF,Af=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(dn.test(t)||t==="0")&&!t.startsWith("url(")),mF=new Set(["brightness","contrast","saturate","opacity"]);function vF(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Gu)||[];if(!n)return e;const o=r.replace(n,"");let i=mF.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+o+")"}const gF=/([a-z-]*)\(.*?\)/g,Rf={...dn,getAnimatableNone:e=>{const t=e.match(gF);return t?t.map(vF).join(" "):e}},yF={...hS,color:Ze,backgroundColor:Ze,outlineColor:Ze,fill:Ze,stroke:Ze,borderColor:Ze,borderTopColor:Ze,borderRightColor:Ze,borderBottomColor:Ze,borderLeftColor:Ze,filter:Rf,WebkitFilter:Rf},Tp=e=>yF[e];function ex(e,t){let r=Tp(e);return r!==Rf&&(r=dn),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const tx=e=>/^0[^.\s]+$/.test(e);function bF(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||tx(e)}function SF(e,t,r,n){const o=Af(t,r);let i;Array.isArray(r)?i=[...r]:i=[null,r];const a=n.from!==void 0?n.from:e.get();let s;const l=[];for(let u=0;uo=>{const i=Ep(n,e)||{},a=i.delay||n.delay||0;let{elapsed:s=0}=n;s=s-sn(a);const l=SF(t,e,r,i),u=l[0],c=l[l.length-1],d=Af(e,u),f=Af(e,c);let p={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-s,onUpdate:g=>{t.set(g),i.onUpdate&&i.onUpdate(g)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(xF(i)||(p={...p,...pF(e,p)}),p.duration&&(p.duration=sn(p.duration)),p.repeatDelay&&(p.repeatDelay=sn(p.repeatDelay)),!d||!f||g4.current||i.type===!1)return uF(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const g=lF(t,e,p);if(g)return g}return Zl(p)};function Jl(e){return!!(ht(e)&&e.add)}const rx=e=>/^\-?\d*\.?\d+$/.test(e);function Ap(e,t){e.indexOf(t)===-1&&e.push(t)}function Rp(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}class Mp{constructor(){this.subscriptions=[]}add(t){return Ap(this.subscriptions,t),()=>Rp(this.subscriptions,t)}notify(t,r,n){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let i=0;i!isNaN(parseFloat(e));class kF{constructor(t,r={}){this.version="10.16.12",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,o=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:a}=De;this.lastUpdated!==a&&(this.timeDelta=i,this.lastUpdated=a,se.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>se.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=wF(this.current),this.owner=r.owner}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Mp);const n=this.events[t].add(r);return t==="change"?()=>{n(),se.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?qS(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Jo(e,t){return new kF(e,t)}const nx=e=>t=>t.test(e),CF={test:e=>e==="auto",parse:e=>e},ox=[Qn,j,hr,Vr,M3,R3,CF],ki=e=>ox.find(nx(e)),_F=[...ox,Ze,dn],PF=e=>_F.find(nx(e));function TF(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Jo(r))}function EF(e,t){const r=Yu(e,t);let{transitionEnd:n={},transition:o={},...i}=r?e.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const a in i){const s=G3(i[a]);TF(e,a,s)}}function $F(e,t,r){var n,o;const i=Object.keys(t).filter(s=>!e.hasValue(s)),a=i.length;if(a)for(let s=0;sl.remove(d))),u.push(m)}return a&&Promise.all(u).then(()=>{a&&EF(e,a)}),u}function Mf(e,t,r={}){const n=Yu(e,t,r.custom);let{transition:o=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(o=r.transitionOverride);const i=n?()=>Promise.all(ix(e,n,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=o;return zF(e,t,u+l,c,d,r)}:()=>Promise.resolve(),{when:s}=o;if(s){const[l,u]=s==="beforeChildren"?[i,a]:[a,i];return l().then(()=>u())}else return Promise.all([i(),a(r.delay)])}function zF(e,t,r=0,n=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*n,l=o===1?(u=0)=>u*n:(u=0)=>s-u*n;return Array.from(e.variantChildren).sort(FF).forEach((u,c)=>{u.notify("AnimationStart",t),a.push(Mf(u,t,{...i,delay:r+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function FF(e,t){return e.sortNodePosition(t)}function DF(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const o=t.map(i=>Mf(e,i,r));n=Promise.all(o)}else if(typeof t=="string")n=Mf(e,t,r);else{const o=typeof t=="function"?Yu(e,t,r.custom):t;n=Promise.all(ix(e,o,r))}return n.then(()=>e.notify("AnimationComplete",t))}const IF=[...hp].reverse(),LF=hp.length;function OF(e){return t=>Promise.all(t.map(({animation:r,options:n})=>DF(e,r,n)))}function BF(e){let t=OF(e);const r=NF();let n=!0;const o=(l,u)=>{const c=Yu(e,u);if(c){const{transition:d,transitionEnd:f,...p}=c;l={...l,...p,...f}}return l};function i(l){t=l(e)}function a(l,u){const c=e.getProps(),d=e.getVariantContext(!0)||{},f=[],p=new Set;let g={},y=1/0;for(let m=0;my&&_;const I=Array.isArray(C)?C:[C];let ee=I.reduce(o,{});$===!1&&(ee={});const{prevResolvedValues:ze={}}=v,Pe={...ze,...ee},oe=ue=>{M=!0,p.delete(ue),v.needsAnimating[ue]=!0};for(const ue in Pe){const He=ee[ue],it=ze[ue];g.hasOwnProperty(ue)||(He!==it?Xl(He)&&Xl(it)?!ES(He,it)||A?oe(ue):v.protectedKeys[ue]=!0:He!==void 0?oe(ue):p.add(ue):He!==void 0&&p.has(ue)?oe(ue):v.protectedKeys[ue]=!0)}v.prevProp=C,v.prevResolvedValues=ee,v.isActive&&(g={...g,...ee}),n&&e.blockInitialAnimation&&(M=!1),M&&!T&&f.push(...I.map(ue=>({animation:ue,options:{type:h,...l}})))}if(p.size){const m={};p.forEach(h=>{const v=e.getBaseTarget(h);v!==void 0&&(m[h]=v)}),f.push({animation:m})}let k=!!f.length;return n&&c.initial===!1&&!e.manuallyAnimateOnMount&&(k=!1),n=!1,k?t(f):Promise.resolve()}function s(l,u,c){var d;if(r[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(p=>{var g;return(g=p.animationState)===null||g===void 0?void 0:g.setActive(l,u)}),r[l].isActive=u;const f=a(c,l);for(const p in r)r[p].protectedKeys={};return f}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>r}}function jF(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ES(t,e):!1}function Sn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function NF(){return{animate:Sn(!0),whileInView:Sn(),whileHover:Sn(),whileTap:Sn(),whileDrag:Sn(),whileFocus:Sn(),exit:Sn()}}class VF extends vn{constructor(t){super(t),t.animationState||(t.animationState=BF(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Uu(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){}}let WF=0;class UF extends vn{constructor(){super(...arguments),this.id=WF++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r,custom:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const i=this.node.animationState.setActive("exit",!t,{custom:n??this.node.getProps().custom});r&&!t&&i.then(()=>r(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const HF={animation:{Feature:VF},exit:{Feature:UF}},Vg=(e,t)=>Math.abs(e-t);function GF(e,t){const r=Vg(e.x,t.x),n=Vg(e.y,t.y);return Math.sqrt(r**2+n**2)}class ax{constructor(t,r,{transformPagePoint:n,contextWindow:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=ld(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=GF(c.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:p}=c,{timestamp:g}=De;this.history.push({...p,timestamp:g});const{onStart:y,onMove:k}=this.handlers;d||(y&&y(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,c)},this.handlePointerMove=(c,d)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=sd(d,this.transformPagePoint),se.update(this.updatePoint,!0)},this.handlePointerUp=(c,d)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:p}=this.handlers,g=ld(c.type==="pointercancel"?this.lastMoveEventInfo:sd(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(c,g),p&&p(c,g)},!kS(t))return;this.handlers=r,this.transformPagePoint=n,this.contextWindow=o||window;const i=Ku(t),a=sd(i,this.transformPagePoint),{point:s}=a,{timestamp:l}=De;this.history=[{...s,timestamp:l}];const{onSessionStart:u}=r;u&&u(t,ld(a,this.history)),this.removeListeners=an(Er(this.contextWindow,"pointermove",this.handlePointerMove),Er(this.contextWindow,"pointerup",this.handlePointerUp),Er(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ir(this.updatePoint)}}function sd(e,t){return t?{point:t(e.point)}:e}function Wg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ld({point:e},t){return{point:e,delta:Wg(e,sx(t)),offset:Wg(e,KF(t)),velocity:YF(t,.1)}}function KF(e){return e[0]}function sx(e){return e[e.length-1]}function YF(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const o=sx(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>sn(t)));)r--;if(!n)return{x:0,y:0};const i=$r(o.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function kt(e){return e.max-e.min}function zf(e,t=0,r=.01){return Math.abs(e-t)<=r}function Ug(e,t,r,n=.5){e.origin=n,e.originPoint=ge(t.min,t.max,e.origin),e.scale=kt(r)/kt(t),(zf(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ge(r.min,r.max,e.origin)-e.originPoint,(zf(e.translate)||isNaN(e.translate))&&(e.translate=0)}function ta(e,t,r,n){Ug(e.x,t.x,r.x,n?n.originX:void 0),Ug(e.y,t.y,r.y,n?n.originY:void 0)}function Hg(e,t,r){e.min=r.min+t.min,e.max=e.min+kt(t)}function XF(e,t,r){Hg(e.x,t.x,r.x),Hg(e.y,t.y,r.y)}function Gg(e,t,r){e.min=t.min-r.min,e.max=e.min+kt(t)}function ra(e,t,r){Gg(e.x,t.x,r.x),Gg(e.y,t.y,r.y)}function QF(e,{min:t,max:r},n){return t!==void 0&&er&&(e=n?ge(r,e,n.max):Math.min(e,r)),e}function Kg(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function qF(e,{top:t,left:r,bottom:n,right:o}){return{x:Kg(e.x,r,o),y:Kg(e.y,t,n)}}function Yg(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.minn?r=Aa(t.min,t.max-n,e.min):n>o&&(r=Aa(e.min,e.max-o,t.min)),cn(0,1,r)}function eD(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const Ff=.35;function tD(e=Ff){return e===!1?e=0:e===!0&&(e=Ff),{x:Xg(e,"left","right"),y:Xg(e,"top","bottom")}}function Xg(e,t,r){return{min:Qg(e,t),max:Qg(e,r)}}function Qg(e,t){return typeof e=="number"?e:e[t]||0}const qg=()=>({translate:0,scale:1,origin:0,originPoint:0}),_o=()=>({x:qg(),y:qg()}),Zg=()=>({min:0,max:0}),Te=()=>({x:Zg(),y:Zg()});function tr(e){return[e("x"),e("y")]}function lx({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function rD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function nD(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function ud(e){return e===void 0||e===1}function Df({scale:e,scaleX:t,scaleY:r}){return!ud(e)||!ud(t)||!ud(r)}function kn(e){return Df(e)||ux(e)||e.z||e.rotate||e.rotateX||e.rotateY}function ux(e){return Jg(e.x)||Jg(e.y)}function Jg(e){return e&&e!=="0%"}function eu(e,t,r){const n=e-r,o=t*n;return r+o}function e0(e,t,r,n,o){return o!==void 0&&(e=eu(e,o,n)),eu(e,r,n)+t}function If(e,t=0,r=1,n,o){e.min=e0(e.min,t,r,n,o),e.max=e0(e.max,t,r,n,o)}function cx(e,{x:t,y:r}){If(e.x,t.translate,t.scale,t.originPoint),If(e.y,r.translate,r.scale,r.originPoint)}function oD(e,t,r,n=!1){const o=r.length;if(!o)return;t.x=t.y=1;let i,a;for(let s=0;s1.0000000000001||e<.999999999999?e:1}function Hr(e,t){e.min=e.min+t,e.max=e.max+t}function r0(e,t,[r,n,o]){const i=t[o]!==void 0?t[o]:.5,a=ge(e.min,e.max,i);If(e,t[r],t[n],a,t.scale)}const iD=["x","scaleX","originX"],aD=["y","scaleY","originY"];function Po(e,t){r0(e.x,t,iD),r0(e.y,t,aD)}function dx(e,t){return lx(nD(e.getBoundingClientRect(),t))}function sD(e,t,r){const n=dx(e,r),{scroll:o}=t;return o&&(Hr(n.x,o.offset.x),Hr(n.y,o.offset.y)),n}const fx=({current:e})=>e?e.ownerDocument.defaultView:null,lD=new WeakMap;class uD{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Te(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const o=l=>{this.stopAnimation(),r&&this.snapToCursor(Ku(l,"page").point)},i=(l,u)=>{const{drag:c,dragPropagation:d,onDragStart:f}=this.getProps();if(c&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=_S(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tr(g=>{let y=this.getAxisMotionValue(g).get()||0;if(hr.test(y)){const{projection:k}=this.visualElement;if(k&&k.layout){const m=k.layout.layoutBox[g];m&&(y=kt(m)*(parseFloat(y)/100))}}this.originPoint[g]=y}),f&&se.update(()=>f(l,u),!1,!0);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},a=(l,u)=>{const{dragPropagation:c,dragDirectionLock:d,onDirectionLock:f,onDrag:p}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:g}=u;if(d&&this.currentDirection===null){this.currentDirection=cD(g),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,g),this.updateAxis("y",u.point,g),this.visualElement.render(),p&&p(l,u)},s=(l,u)=>this.stop(l,u);this.panSession=new ax(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),contextWindow:fx(this.visualElement)})}stop(t,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&se.update(()=>i(t,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:o}=this.getProps();if(!n||!Ds(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=QF(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:r,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;r&&ko(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=qF(o.layoutBox,r):this.constraints=!1,this.elastic=tD(n),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&tr(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=eD(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!ko(t))return!1;const n=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=sD(n,o.root,this.visualElement.getTransformPagePoint());let a=ZF(o.layout.layoutBox,i);if(r){const s=r(rD(a));this.hasMutatedConstraints=!!s,s&&(a=lx(s))}return a}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=tr(c=>{if(!Ds(c,r,this.currentDirection))return;let d=l&&l[c]||{};a&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,g={type:"inertia",velocity:n?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(s)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return n.start($p(t,n,0,r))}stopAnimation(){tr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const r="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){tr(r=>{const{drag:n}=this.getProps();if(!Ds(r,n,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(r);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[r];i.set(t[r]-ge(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!ko(r)||!n||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};tr(a=>{const s=this.getAxisMotionValue(a);if(s){const l=s.get();o[a]=JF({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),tr(a=>{if(!Ds(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];s.set(ge(l,u,o[a]))})}addListeners(){if(!this.visualElement.current)return;lD.set(this.visualElement,this);const t=this.visualElement.current,r=Er(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),n=()=>{const{dragConstraints:l}=this.getProps();ko(l)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",n);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),n();const a=_r(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(tr(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{a(),r(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Ff,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Ds(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function cD(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class dD extends vn{constructor(t){super(t),this.removeGroupControls=xe,this.removeListeners=xe,this.controls=new uD(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xe}unmount(){this.removeGroupControls(),this.removeListeners()}}const n0=e=>(t,r)=>{e&&se.update(()=>e(t,r))};class fD extends vn{constructor(){super(...arguments),this.removePointerDownListener=xe}onPointerDown(t){this.session=new ax(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:fx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:n0(t),onStart:n0(r),onMove:n,onEnd:(i,a)=>{delete this.session,o&&se.update(()=>o(i,a))}}}mount(){this.removePointerDownListener=Er(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function hx(){const e=S.useContext(Wa);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:r,register:n}=e,o=S.useId();return S.useEffect(()=>n(o),[]),!t&&r?[!1,()=>r&&r(o)]:[!0]}function hD(){return pD(S.useContext(Wa))}function pD(e){return e===null?!0:e.isPresent}const fl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function o0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ci={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(j.test(e))e=parseFloat(e);else return e;const r=o0(e,t.target.x),n=o0(e,t.target.y);return`${r}% ${n}%`}},mD={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,o=dn.parse(e);if(o.length>5)return n;const i=dn.createTransformer(e),a=typeof o[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const u=ge(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=u),typeof o[3+a]=="number"&&(o[3+a]/=u),i(o)}};class vD extends Ar.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:i}=t;C3(gD),i&&(r.group&&r.group.add(i),n&&n.register&&o&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),fl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:o,isPresent:i}=this.props,a=n.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==r||r===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||se.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function px(e){const[t,r]=hx(),n=S.useContext(mp);return Ar.createElement(vD,{...e,layoutGroup:n,switchLayoutGroup:S.useContext(lS),isPresent:t,safeToRemove:r})}const gD={borderRadius:{...Ci,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ci,borderTopRightRadius:Ci,borderBottomLeftRadius:Ci,borderBottomRightRadius:Ci,boxShadow:mD},mx=["TopLeft","TopRight","BottomLeft","BottomRight"],yD=mx.length,i0=e=>typeof e=="string"?parseFloat(e):e,a0=e=>typeof e=="number"||j.test(e);function bD(e,t,r,n,o,i){o?(e.opacity=ge(0,r.opacity!==void 0?r.opacity:1,SD(n)),e.opacityExit=ge(t.opacity!==void 0?t.opacity:1,0,xD(n))):i&&(e.opacity=ge(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let a=0;ant?1:r(Aa(e,t,n))}function l0(e,t){e.min=t.min,e.max=t.max}function $t(e,t){l0(e.x,t.x),l0(e.y,t.y)}function u0(e,t,r,n,o){return e-=t,e=eu(e,1/r,n),o!==void 0&&(e=eu(e,1/o,n)),e}function wD(e,t=0,r=1,n=.5,o,i=e,a=e){if(hr.test(t)&&(t=parseFloat(t),t=ge(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=ge(i.min,i.max,n);e===i&&(s-=t),e.min=u0(e.min,t,r,s,o),e.max=u0(e.max,t,r,s,o)}function c0(e,t,[r,n,o],i,a){wD(e,t[r],t[n],t[o],t.scale,i,a)}const kD=["x","scaleX","originX"],CD=["y","scaleY","originY"];function d0(e,t,r,n){c0(e.x,t,kD,r?r.x:void 0,n?n.x:void 0),c0(e.y,t,CD,r?r.y:void 0,n?n.y:void 0)}function f0(e){return e.translate===0&&e.scale===1}function gx(e){return f0(e.x)&&f0(e.y)}function _D(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function yx(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function h0(e){return kt(e.x)/kt(e.y)}class PD{constructor(){this.members=[]}add(t){Ap(this.members,t),t.scheduleRender()}remove(t){if(Rp(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(o=>t===o);if(r===0)return!1;let n;for(let o=r;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function p0(e,t,r){let n="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(n=`translate3d(${o}px, ${i}px, 0) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{rotate:l,rotateX:u,rotateY:c}=r;l&&(n+=`rotate(${l}deg) `),u&&(n+=`rotateX(${u}deg) `),c&&(n+=`rotateY(${c}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(n+=`scale(${a}, ${s})`),n||"none"}const TD=(e,t)=>e.depth-t.depth;class ED{constructor(){this.children=[],this.isDirty=!1}add(t){Ap(this.children,t),this.isDirty=!0}remove(t){Rp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(TD),this.isDirty=!1,this.children.forEach(t)}}function $D(e,t){const r=performance.now(),n=({timestamp:o})=>{const i=o-r;i>=t&&(Ir(n),e(i-t))};return se.read(n,!0),()=>Ir(n)}function AD(e){window.MotionDebug&&window.MotionDebug.record(e)}function RD(e){return e instanceof SVGElement&&e.tagName!=="svg"}function MD(e,t,r){const n=ht(e)?e:Jo(e);return n.start($p("",n,t,r)),n.animation}const m0=["","X","Y","Z"],zD={visibility:"hidden"},v0=1e3;let FD=0;const Cn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function bx({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=FD++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Cn.totalNodes=Cn.resolvedTargetDeltas=Cn.recalculatedProjection=0,this.nodes.forEach(LD),this.nodes.forEach(VD),this.nodes.forEach(WD),this.nodes.forEach(OD),AD(Cn)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=$D(f,250),fl.hasAnimatedSinceResize&&(fl.hasAnimatedSinceResize=!1,this.nodes.forEach(y0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||YD,{onLayoutAnimationStart:k,onLayoutAnimationComplete:m}=c.getProps(),h=!this.targetLayout||!yx(this.targetLayout,g)||p,v=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||f&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,v);const C={...Ep(y,"layout"),onPlay:k,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else f||y0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ir(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(UD),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;cthis.update()))}clearAllSnapshots(){this.nodes.forEach(BD),this.sharedNodes.forEach(HD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){se.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const _=C/1e3;b0(d.x,a.x,_),b0(d.y,a.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ra(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),GD(this.relativeTarget,this.relativeTargetOrigin,f,_),v&&_D(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Te()),$t(v,this.relativeTarget)),y&&(this.animationValues=c,bD(c,u,this.latestValues,_,h,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ir(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=se.update(()=>{fl.hasAnimatedSinceResize=!0,this.currentAnimation=MD(0,v0,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(v0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:c}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Sx(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Te();const d=kt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=kt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}$t(s,l),Po(s,c),ta(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new PD),this.sharedNodes.get(a).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let c=0;c{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(g0),this.root.sharedNodes.clear()}}}function DD(e){e.updateLayout()}function ID(e){var t;const r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:o}=e.layout,{animationType:i}=e.options,a=r.source!==e.layout.source;i==="size"?tr(d=>{const f=a?r.measuredBox[d]:r.layoutBox[d],p=kt(f);f.min=n[d].min,f.max=f.min+p}):Sx(i,r.layoutBox,n)&&tr(d=>{const f=a?r.measuredBox[d]:r.layoutBox[d],p=kt(n[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const s=_o();ta(s,n,r.layoutBox);const l=_o();a?ta(l,e.applyTransform(o,!0),r.measuredBox):ta(l,n,r.layoutBox);const u=!gx(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const g=Te();ra(g,r.layoutBox,f.layoutBox);const y=Te();ra(y,n,p.layoutBox),yx(g,y)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function LD(e){Cn.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function OD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function BD(e){e.clearSnapshot()}function g0(e){e.clearMeasurements()}function jD(e){e.isLayoutDirty=!1}function ND(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function y0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function VD(e){e.resolveTargetDelta()}function WD(e){e.calcProjection()}function UD(e){e.resetRotation()}function HD(e){e.removeLeadSnapshot()}function b0(e,t,r){e.translate=ge(t.translate,0,r),e.scale=ge(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function S0(e,t,r,n){e.min=ge(t.min,r.min,n),e.max=ge(t.max,r.max,n)}function GD(e,t,r,n){S0(e.x,t.x,r.x,n),S0(e.y,t.y,r.y,n)}function KD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const YD={duration:.45,ease:[.4,0,.1,1]},x0=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),w0=x0("applewebkit/")&&!x0("chrome/")?Math.round:xe;function k0(e){e.min=w0(e.min),e.max=w0(e.max)}function XD(e){k0(e.x),k0(e.y)}function Sx(e,t,r){return e==="position"||e==="preserve-aspect"&&!zf(h0(t),h0(r),.2)}const QD=bx({attachResizeListener:(e,t)=>_r(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cd={current:void 0},xx=bx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cd.current){const e=new QD({});e.mount(window),e.setOptions({layoutScroll:!0}),cd.current=e}return cd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),qD={pan:{Feature:fD},drag:{Feature:dD,ProjectionNode:xx,MeasureLayout:px}},ZD=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function JD(e){const t=ZD.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]}function Lf(e,t,r=1){const[n,o]=JD(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const a=i.trim();return rx(a)?parseFloat(a):a}else return Pf(o)?Lf(o,t,r+1):o}function eI(e,{...t},r){const n=e.current;if(!(n instanceof Element))return{target:t,transitionEnd:r};r&&(r={...r}),e.values.forEach(o=>{const i=o.get();if(!Pf(i))return;const a=Lf(i,n);a&&o.set(a)});for(const o in t){const i=t[o];if(!Pf(i))continue;const a=Lf(i,n);a&&(t[o]=a,r||(r={}),r[o]===void 0&&(r[o]=i))}return{target:t,transitionEnd:r}}const tI=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),wx=e=>tI.has(e),rI=e=>Object.keys(e).some(wx),C0=e=>e===Qn||e===j,_0=(e,t)=>parseFloat(e.split(", ")[t]),P0=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const o=n.match(/^matrix3d\((.+)\)$/);if(o)return _0(o[1],t);{const i=n.match(/^matrix\((.+)\)$/);return i?_0(i[1],e):0}},nI=new Set(["x","y","z"]),oI=Ua.filter(e=>!nI.has(e));function iI(e){const t=[];return oI.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t.length&&e.render(),t}const ei={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:P0(4,13),y:P0(5,14)};ei.translateX=ei.x;ei.translateY=ei.y;const aI=(e,t,r)=>{const n=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:a}=i,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),r.forEach(u=>{s[u]=ei[u](n,i)}),t.render();const l=t.measureViewportBox();return r.forEach(u=>{const c=t.getValue(u);c&&c.jump(s[u]),e[u]=ei[u](l,i)}),e},sI=(e,t,r={},n={})=>{t={...t},n={...n};const o=Object.keys(t).filter(wx);let i=[],a=!1;const s=[];if(o.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let c=r[l],d=ki(c);const f=t[l];let p;if(Xl(f)){const g=f.length,y=f[0]===null?1:0;c=f[y],d=ki(c);for(let k=y;k=0?window.pageYOffset:null,u=aI(t,e,s);return i.length&&i.forEach(([c,d])=>{e.getValue(c).set(d)}),e.render(),Wu&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:n}}else return{target:t,transitionEnd:n}};function lI(e,t,r,n){return rI(t)?sI(e,t,r,n):{target:t,transitionEnd:n}}const uI=(e,t,r,n)=>{const o=eI(e,t,n);return t=o.target,n=o.transitionEnd,lI(e,t,r,n)},Of={current:null},kx={current:!1};function cI(){if(kx.current=!0,!!Wu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Of.current=e.matches;e.addListener(t),t()}else Of.current=!1}function dI(e,t,r){const{willChange:n}=t;for(const o in t){const i=t[o],a=r[o];if(ht(i))e.addValue(o,i),Jl(n)&&n.add(o);else if(ht(a))e.addValue(o,Jo(i,{owner:e})),Jl(n)&&n.remove(o);else if(a!==i)if(e.hasValue(o)){const s=e.getValue(o);!s.hasAnimated&&s.set(i)}else{const s=e.getStaticValue(o);e.addValue(o,Jo(s!==void 0?s:i,{owner:e}))}}for(const o in r)t[o]===void 0&&e.removeValue(o);return t}const T0=new WeakMap,Cx=Object.keys($a),fI=Cx.length,E0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],hI=pp.length;class pI{constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>se.render(this.render,!1,!0);const{latestValues:s,renderState:l}=i;this.latestValues=s,this.baseTarget={...s},this.initialValues=r.initial?{...s}:{},this.renderState=l,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.isControllingVariants=Hu(r),this.isVariantNode=sS(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(r,{});for(const d in c){const f=c[d];s[d]!==void 0&&ht(f)&&(f.set(s[d],!1),Jl(u)&&u.add(d))}}scrapeMotionValuesFromProps(t,r){return{}}mount(t){this.current=t,T0.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),kx.current||cI(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Of.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){T0.delete(this.current),this.projection&&this.projection.unmount(),Ir(this.notifyUpdate),Ir(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,r){const n=Xn.has(t),o=r.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&se.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...r},n,o,i){let a,s;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,layoutScroll:f,layoutRoot:p})}return s}updateFeatures(){for(const t in this.features){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Te()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}makeTargetAnimatable(t,r=!0){return this.makeTargetAnimatableFromInstance(t,this.props,r)}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;nr.variantChildren.delete(t)}addValue(t,r){r!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,r)),this.values.set(t,r),this.latestValues[t]=r.get()}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=Jo(r,{owner:this}),this.addValue(t,n)),n}readValue(t){var r;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;const{initial:n}=this.props,o=typeof n=="string"||typeof n=="object"?(r=wp(this.props,n))===null||r===void 0?void 0:r[t]:void 0;if(n&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ht(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Mp),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class _x extends pI{sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:r,...n},{transformValues:o},i){let a=RF(n,t||{},this);if(o&&(r&&(r=o(r)),n&&(n=o(n)),a&&(a=o(a))),i){$F(this,n,a);const s=uI(this,n,a,r);r=s.transitionEnd,n=s.target}return{transition:t,transitionEnd:r,...n}}}function mI(e){return window.getComputedStyle(e)}class vI extends _x{readValueFromInstance(t,r){if(Xn.has(r)){const n=Tp(r);return n&&n.default||0}else{const n=mI(t),o=(dS(r)?n.getPropertyValue(r):n[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return dx(t,r)}build(t,r,n,o){gp(t,r,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,r){return xp(t,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ht(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(t,r,n,o){gS(t,r,n,o)}}class gI extends _x{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Xn.has(r)){const n=Tp(r);return n&&n.default||0}return r=yS.has(r)?r:fp(r),t.getAttribute(r)}measureInstanceViewportBox(){return Te()}scrapeMotionValuesFromProps(t,r){return SS(t,r)}build(t,r,n,o){bp(t,r,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,r,n,o){bS(t,r,n,o)}mount(t){this.isSVGTag=Sp(t.tagName),super.mount(t)}}const yI=(e,t)=>vp(e)?new gI(t,{enableHardwareAcceleration:!1}):new vI(t,{enableHardwareAcceleration:!0}),bI={layout:{ProjectionNode:xx,MeasureLayout:px}},SI={...HF,...h4,...qD,...bI},ii=w3((e,t)=>e4(e,t,SI,yI));function Px(){const e=S.useRef(!1);return dp(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function xI(){const e=Px(),[t,r]=S.useState(0),n=S.useCallback(()=>{e.current&&r(t+1)},[t]);return[S.useCallback(()=>se.postRender(n),[n]),t]}class wI extends S.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function kI({children:e,isPresent:t}){const r=S.useId(),n=S.useRef(null),o=S.useRef({width:0,height:0,top:0,left:0});return S.useInsertionEffect(()=>{const{width:i,height:a,top:s,left:l}=o.current;if(t||!n.current||!i||!a)return;n.current.dataset.motionPopId=r;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${r}"] { - position: absolute !important; - width: ${i}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),S.createElement(wI,{isPresent:t,childRef:n,sizeRef:o},S.cloneElement(e,{ref:n}))}const dd=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:i,mode:a})=>{const s=xS(CI),l=S.useId(),u=S.useMemo(()=>({id:l,initial:t,isPresent:r,custom:o,onExitComplete:c=>{s.set(c,!0);for(const d of s.values())if(!d)return;n&&n()},register:c=>(s.set(c,!1),()=>s.delete(c))}),i?void 0:[r]);return S.useMemo(()=>{s.forEach((c,d)=>s.set(d,!1))},[r]),S.useEffect(()=>{!r&&!s.size&&n&&n()},[r]),a==="popLayout"&&(e=S.createElement(kI,{isPresent:r},e)),S.createElement(Wa.Provider,{value:u},e)};function CI(){return new Map}function _I(e){return S.useEffect(()=>()=>e(),[])}const _n=e=>e.key||"";function PI(e,t){e.forEach(r=>{const n=_n(r);t.set(n,r)})}function TI(e){const t=[];return S.Children.forEach(e,r=>{S.isValidElement(r)&&t.push(r)}),t}const Ya=({children:e,custom:t,initial:r=!0,onExitComplete:n,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:a="sync"})=>{const s=S.useContext(mp).forceRender||xI()[0],l=Px(),u=TI(e);let c=u;const d=S.useRef(new Map).current,f=S.useRef(c),p=S.useRef(new Map).current,g=S.useRef(!0);if(dp(()=>{g.current=!1,PI(u,p),f.current=c}),_I(()=>{g.current=!0,p.clear(),d.clear()}),g.current)return S.createElement(S.Fragment,null,c.map(h=>S.createElement(dd,{key:_n(h),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:a},h)));c=[...c];const y=f.current.map(_n),k=u.map(_n),m=y.length;for(let h=0;h{if(k.indexOf(v)!==-1)return;const C=p.get(v);if(!C)return;const _=y.indexOf(v);let $=h;if(!$){const T=()=>{d.delete(v);const A=Array.from(p.keys()).filter(M=>!k.includes(M));if(A.forEach(M=>p.delete(M)),f.current=u.filter(M=>{const I=_n(M);return I===v||A.includes(I)}),!d.size){if(l.current===!1)return;s(),n&&n()}};$=S.createElement(dd,{key:_n(C),isPresent:!1,onExitComplete:T,custom:t,presenceAffectsLayout:i,mode:a},C),d.set(v,$)}c.splice(_,0,$)}),c=c.map(h=>{const v=h.key;return d.has(v)?h:S.createElement(dd,{key:_n(h),isPresent:!0,presenceAffectsLayout:i,mode:a},h)}),S.createElement(S.Fragment,null,d.size?c:c.map(h=>S.cloneElement(h)))};var EI={initial:e=>{const{position:t}=e,r=["top","bottom"].includes(t)?"y":"x";let n=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(n=1),{opacity:0,[r]:n*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},Tx=S.memo(e=>{const{id:t,message:r,onCloseComplete:n,onRequestRemove:o,requestClose:i=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=EI,toastSpacing:c="0.5rem"}=e,[d,f]=S.useState(s),p=hD();Cg(()=>{p||n==null||n()},[p]),Cg(()=>{f(s)},[s]);const g=()=>f(null),y=()=>f(s),k=()=>{p&&o()};S.useEffect(()=>{p&&i&&o()},[p,i,o]),f3(k,d);const m=S.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:c,...l}),[l,c]),h=S.useMemo(()=>u3(a),[a]);return E.jsx(ii.div,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:g,onHoverEnd:y,custom:{position:a},style:h,children:E.jsx(_e.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:m,children:lr(r,{id:t,onClose:k})})})});Tx.displayName="ToastComponent";function $I(e,t){var r;const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return(r=i==null?void 0:i[t])!=null?r:n}var $0={path:E.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[E.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),E.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),E.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Xa=pt((e,t)=>{const{as:r,viewBox:n,color:o="currentColor",focusable:i=!1,children:a,className:s,__css:l,...u}=e,c=Be("chakra-icon",s),d=Nu("Icon",e),f={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...l,...d},p={ref:t,focusable:i,className:c,__css:f},g=n??$0.viewBox;if(r&&typeof r!="string")return E.jsx(_e.svg,{as:r,...p,...u});const y=a??$0.path;return E.jsx(_e.svg,{verticalAlign:"middle",viewBox:g,...p,...u,children:y})});Xa.displayName="Icon";function AI(e){return E.jsx(Xa,{viewBox:"0 0 24 24",...e,children:E.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function RI(e){return E.jsx(Xa,{viewBox:"0 0 24 24",...e,children:E.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function A0(e){return E.jsx(Xa,{viewBox:"0 0 24 24",...e,children:E.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var MI=wP({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),zp=pt((e,t)=>{const r=Nu("Spinner",e),{label:n="Loading...",thickness:o="2px",speed:i="0.45s",emptyColor:a="transparent",className:s,...l}=Ou(e),u=Be("chakra-spinner",s),c={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:o,borderBottomColor:a,borderLeftColor:a,animation:`${MI} ${i} linear infinite`,...r};return E.jsx(_e.div,{ref:t,__css:c,className:u,...l,children:n&&E.jsx(_e.span,{srOnly:!0,children:n})})});zp.displayName="Spinner";var[zI,Fp]=mn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[FI,Dp]=mn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Ex={info:{icon:RI,colorScheme:"blue"},warning:{icon:A0,colorScheme:"orange"},success:{icon:AI,colorScheme:"green"},error:{icon:A0,colorScheme:"red"},loading:{icon:zp,colorScheme:"blue"}};function DI(e){return Ex[e].colorScheme}function II(e){return Ex[e].icon}var $x=pt(function(t,r){const n=Dp(),{status:o}=Fp(),i={display:"inline",...n.description};return E.jsx(_e.div,{ref:r,"data-status":o,...t,className:Be("chakra-alert__desc",t.className),__css:i})});$x.displayName="AlertDescription";function Ax(e){const{status:t}=Fp(),r=II(t),n=Dp(),o=t==="loading"?n.spinner:n.icon;return E.jsx(_e.span,{display:"inherit","data-status":t,...e,className:Be("chakra-alert__icon",e.className),__css:o,children:e.children||E.jsx(r,{h:"100%",w:"100%"})})}Ax.displayName="AlertIcon";var Rx=pt(function(t,r){const n=Dp(),{status:o}=Fp();return E.jsx(_e.div,{ref:r,"data-status":o,...t,className:Be("chakra-alert__title",t.className),__css:n.title})});Rx.displayName="AlertTitle";var Mx=pt(function(t,r){var n;const{status:o="info",addRole:i=!0,...a}=Ou(t),s=(n=t.colorScheme)!=null?n:DI(o),l=eS("Alert",{...t,colorScheme:s}),u={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...l.container};return E.jsx(zI,{value:{status:o},children:E.jsx(FI,{value:l,children:E.jsx(_e.div,{"data-status":o,role:i?"alert":void 0,ref:r,...a,className:Be("chakra-alert",t.className),__css:u})})})});Mx.displayName="Alert";function LI(e){return E.jsx(Xa,{focusable:"false","aria-hidden":!0,...e,children:E.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var Ip=pt(function(t,r){const n=Nu("CloseButton",t),{children:o,isDisabled:i,__css:a,...s}=Ou(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return E.jsx(_e.button,{type:"button","aria-label":"Close",ref:r,disabled:i,__css:{...l,...n,...a},...s,children:o||E.jsx(LI,{width:"1em",height:"1em"})})});Ip.displayName="CloseButton";var OI={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},ar=BI(OI);function BI(e){let t=e;const r=new Set,n=o=>{t=o(t),r.forEach(i=>i())};return{getState:()=>t,subscribe:o=>(r.add(o),()=>{n(()=>e),r.delete(o)}),removeToast:(o,i)=>{n(a=>({...a,[i]:a[i].filter(s=>s.id!=o)}))},notify:(o,i)=>{const a=jI(o,i),{position:s,id:l}=a;return n(u=>{var c,d;const p=s.includes("top")?[a,...(c=u[s])!=null?c:[]]:[...(d=u[s])!=null?d:[],a];return{...u,[s]:p}}),l},update:(o,i)=>{o&&n(a=>{const s={...a},{position:l,index:u}=kg(s,o);return l&&u!==-1&&(s[l][u]={...s[l][u],...i,message:zx(i)}),s})},closeAll:({positions:o}={})=>{n(i=>(o??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=i[u].map(c=>({...c,requestClose:!0})),l),{...i}))},close:o=>{n(i=>{const a=nS(i,o);return a?{...i,[a]:i[a].map(s=>s.id==o?{...s,requestClose:!0}:s)}:i})},isActive:o=>!!kg(ar.getState(),o).position}}var R0=0;function jI(e,t={}){var r,n;R0+=1;const o=(r=t.id)!=null?r:R0,i=(n=t.position)!=null?n:"bottom";return{id:o,message:e,position:i,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>ar.removeToast(String(o),i),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var NI=e=>{const{status:t,variant:r="solid",id:n,title:o,isClosable:i,onClose:a,description:s,colorScheme:l,icon:u}=e,c=n?{root:`toast-${n}`,title:`toast-${n}-title`,description:`toast-${n}-description`}:void 0;return E.jsxs(Mx,{addRole:!1,status:t,variant:r,id:c==null?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[E.jsx(Ax,{children:u}),E.jsxs(_e.div,{flex:"1",maxWidth:"100%",children:[o&&E.jsx(Rx,{id:c==null?void 0:c.title,children:o}),s&&E.jsx($x,{id:c==null?void 0:c.description,display:"block",children:s})]}),i&&E.jsx(Ip,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1})]})};function zx(e={}){const{render:t,toastComponent:r=NI}=e;return o=>typeof t=="function"?t({...o,...e}):E.jsx(r,{...o,...e})}function RB(e,t){const r=o=>{var i;return{...t,...o,position:$I((i=o==null?void 0:o.position)!=null?i:t==null?void 0:t.position,e)}},n=o=>{const i=r(o),a=zx(i);return ar.notify(a,i)};return n.update=(o,i)=>{ar.update(o,r(i))},n.promise=(o,i)=>{const a=n({...i.loading,status:"loading",duration:null});o.then(s=>n.update(a,{status:"success",duration:5e3,...lr(i.success,s)})).catch(s=>n.update(a,{status:"error",duration:5e3,...lr(i.error,s)}))},n.closeAll=ar.closeAll,n.close=ar.close,n.isActive=ar.isActive,n}var[VI,MB]=mn({name:"ToastOptionsContext",strict:!1}),WI=e=>{const t=S.useSyncExternalStore(ar.subscribe,ar.getState,ar.getState),{motionVariants:r,component:n=Tx,portalProps:o}=e,a=Object.keys(t).map(s=>{const l=t[s];return E.jsx("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${s}`,id:`chakra-toast-manager-${s}`,style:c3(s),children:E.jsx(Ya,{initial:!1,children:l.map(u=>E.jsx(n,{motionVariants:r,...u},u.id))})},s)});return E.jsx(Na,{...o,children:a})},UI=e=>function({children:r,theme:n=e,toastOptions:o,...i}){return E.jsxs(s3,{theme:n,...i,children:[E.jsx(VI,{value:o==null?void 0:o.defaultOptions,children:r}),E.jsx(WI,{...o})]})},HI=UI(Kb);function GI(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Bf(...e){return t=>{e.forEach(r=>{GI(r,t)})}}function KI(...e){return S.useMemo(()=>Bf(...e),e)}var M0={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},On={enter:{duration:.2,ease:M0.easeOut},exit:{duration:.1,ease:M0.easeIn}},Bn={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},YI={enter:({transition:e,transitionEnd:t,delay:r}={})=>{var n;return{opacity:1,transition:(n=e==null?void 0:e.enter)!=null?n:Bn.enter(On.enter,r),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:r}={})=>{var n;return{opacity:0,transition:(n=e==null?void 0:e.exit)!=null?n:Bn.exit(On.exit,r),transitionEnd:t==null?void 0:t.exit}}},Fx={initial:"exit",animate:"enter",exit:"exit",variants:YI},XI=S.forwardRef(function(t,r){const{unmountOnExit:n,in:o,className:i,transition:a,transitionEnd:s,delay:l,...u}=t,c=o||n?"enter":"exit",d=n?o&&n:!0,f={transition:a,transitionEnd:s,delay:l};return E.jsx(Ya,{custom:f,children:d&&E.jsx(ii.div,{ref:r,className:Be("chakra-fade",i),custom:f,...Fx,animate:c,...u})})});XI.displayName="Fade";var QI={exit:({reverse:e,initialScale:t,transition:r,transitionEnd:n,delay:o})=>{var i;return{opacity:0,...e?{scale:t,transitionEnd:n==null?void 0:n.exit}:{transitionEnd:{scale:t,...n==null?void 0:n.exit}},transition:(i=r==null?void 0:r.exit)!=null?i:Bn.exit(On.exit,o)}},enter:({transitionEnd:e,transition:t,delay:r})=>{var n;return{opacity:1,scale:1,transition:(n=t==null?void 0:t.enter)!=null?n:Bn.enter(On.enter,r),transitionEnd:e==null?void 0:e.enter}}},Dx={initial:"exit",animate:"enter",exit:"exit",variants:QI},qI=S.forwardRef(function(t,r){const{unmountOnExit:n,in:o,reverse:i=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:c,...d}=t,f=n?o&&n:!0,p=o||n?"enter":"exit",g={initialScale:a,reverse:i,transition:l,transitionEnd:u,delay:c};return E.jsx(Ya,{custom:g,children:f&&E.jsx(ii.div,{ref:r,className:Be("chakra-offset-slide",s),...Dx,animate:p,custom:g,...d})})});qI.displayName="ScaleFade";var ZI={initial:({offsetX:e,offsetY:t,transition:r,transitionEnd:n,delay:o})=>{var i;return{opacity:0,x:e,y:t,transition:(i=r==null?void 0:r.exit)!=null?i:Bn.exit(On.exit,o),transitionEnd:n==null?void 0:n.exit}},enter:({transition:e,transitionEnd:t,delay:r})=>{var n;return{opacity:1,x:0,y:0,transition:(n=e==null?void 0:e.enter)!=null?n:Bn.enter(On.enter,r),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:r,transitionEnd:n,reverse:o,delay:i})=>{var a;const s={x:t,y:e};return{opacity:0,transition:(a=r==null?void 0:r.exit)!=null?a:Bn.exit(On.exit,i),...o?{...s,transitionEnd:n==null?void 0:n.exit}:{transitionEnd:{...s,...n==null?void 0:n.exit}}}}},Li={initial:"initial",animate:"enter",exit:"exit",variants:ZI},JI=S.forwardRef(function(t,r){const{unmountOnExit:n,in:o,reverse:i=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:c,delay:d,...f}=t,p=n?o&&n:!0,g=o||n?"enter":"exit",y={offsetX:s,offsetY:l,reverse:i,transition:u,transitionEnd:c,delay:d};return E.jsx(Ya,{custom:y,children:p&&E.jsx(ii.div,{ref:r,className:Be("chakra-offset-slide",a),custom:y,...Li,animate:g,...f})})});JI.displayName="SlideFade";var[zB,eL]=mn({strict:!1,name:"ButtonGroupContext"});function tL(e){const[t,r]=S.useState(!e);return{ref:S.useCallback(i=>{i&&r(i.tagName==="BUTTON")},[]),type:t?"button":void 0}}function jf(e){const{children:t,className:r,...n}=e,o=S.isValidElement(t)?S.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,i=Be("chakra-button__icon",r);return E.jsx(_e.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...n,className:i,children:o})}jf.displayName="ButtonIcon";function Nf(e){const{label:t,placement:r,spacing:n="0.5rem",children:o=E.jsx(zp,{color:"currentColor",width:"1em",height:"1em"}),className:i,__css:a,...s}=e,l=Be("chakra-button__spinner",i),u=r==="start"?"marginEnd":"marginStart",c=S.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?n:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,n]);return E.jsx(_e.div,{className:l,...s,__css:c,children:o})}Nf.displayName="ButtonSpinner";var Ix=pt((e,t)=>{const r=eL(),n=Nu("Button",{...r,...e}),{isDisabled:o=r==null?void 0:r.isDisabled,isLoading:i,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:c,iconSpacing:d="0.5rem",type:f,spinner:p,spinnerPlacement:g="start",className:y,as:k,...m}=Ou(e),h=S.useMemo(()=>{const $={...n==null?void 0:n._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...n,...!!r&&{_focus:$}}},[n,r]),{ref:v,type:C}=tL(k),_={rightIcon:u,leftIcon:l,iconSpacing:d,children:s};return E.jsxs(_e.button,{ref:KI(t,v),as:k,type:f??C,"data-active":Rv(a),"data-loading":Rv(i),__css:h,className:Be("chakra-button",y),...m,disabled:o||i,children:[i&&g==="start"&&E.jsx(Nf,{className:"chakra-button__spinner--start",label:c,placement:"start",spacing:d,children:p}),i?c||E.jsx(_e.span,{opacity:0,children:E.jsx(z0,{..._})}):E.jsx(z0,{..._}),i&&g==="end"&&E.jsx(Nf,{className:"chakra-button__spinner--end",label:c,placement:"end",spacing:d,children:p})]})});Ix.displayName="Button";function z0(e){const{leftIcon:t,rightIcon:r,children:n,iconSpacing:o}=e;return E.jsxs(E.Fragment,{children:[t&&E.jsx(jf,{marginEnd:o,children:t}),n,r&&E.jsx(jf,{marginStart:o,children:r})]})}function rL(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i=0)&&(r[o]=e[o]);return r}var Vf="data-focus-lock",Lx="data-focus-lock-disabled",nL="data-no-focus-lock",oL="data-autofocus-inside",iL="data-no-autofocus";function aL(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function sL(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function Ox(e,t){return sL(t||null,function(r){return e.forEach(function(n){return aL(n,r)})})}var fd={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},sr=function(){return sr=Object.assign||function(t){for(var r,n=1,o=arguments.length;n=0}).sort(_L)},PL=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],jp=PL.join(","),TL="".concat(jp,", [data-focus-guard]"),rw=function(e,t){return pr((e.shadowRoot||e).children).reduce(function(r,n){return r.concat(n.matches(t?TL:jp)?[n]:[],rw(n))},[])},EL=function(e,t){var r;return e instanceof HTMLIFrameElement&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?Xu([e.contentDocument.body],t):[e]},Xu=function(e,t){return e.reduce(function(r,n){var o,i=rw(n,t),a=(o=[]).concat.apply(o,i.map(function(s){return EL(s,t)}));return r.concat(a,n.parentNode?pr(n.parentNode.querySelectorAll(jp)).filter(function(s){return s===n}):[])},[])},$L=function(e){var t=e.querySelectorAll("[".concat(oL,"]"));return pr(t).map(function(r){return Xu([r])}).reduce(function(r,n){return r.concat(n)},[])},Np=function(e,t){return pr(e).filter(function(r){return Qx(t,r)}).filter(function(r){return wL(r)})},F0=function(e,t){return t===void 0&&(t=new Map),pr(e).filter(function(r){return qx(t,r)})},Uf=function(e,t,r){return tw(Np(Xu(e,r),t),!0,r)},D0=function(e,t){return tw(Np(Xu(e),t),!1)},AL=function(e,t){return Np($L(e),t)},Bo=function(e,t){return e.shadowRoot?Bo(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:pr(e.children).some(function(r){var n;if(r instanceof HTMLIFrameElement){var o=(n=r.contentDocument)===null||n===void 0?void 0:n.body;return o?Bo(o,t):!1}return Bo(r,t)})},RL=function(e){for(var t=new Set,r=e.length,n=0;n0&&t.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(n)}return e.filter(function(a,s){return!t.has(s)})},nw=function(e){return e.parentNode?nw(e.parentNode):e},Vp=function(e){var t=tu(e);return t.filter(Boolean).reduce(function(r,n){var o=n.getAttribute(Vf);return r.push.apply(r,o?RL(pr(nw(n).querySelectorAll("[".concat(Vf,'="').concat(o,'"]:not([').concat(Lx,'="disabled"])')))):[n]),r},[])},ML=function(e){try{return e()}catch{return}},Ma=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?Ma(t.shadowRoot):t instanceof HTMLIFrameElement&&ML(function(){return t.contentWindow.document})?Ma(t.contentWindow.document):t}},zL=function(e,t){return e===t},FL=function(e,t){return!!pr(e.querySelectorAll("iframe")).some(function(r){return zL(r,t)})},ow=function(e,t){return t===void 0&&(t=Ma(Kx(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:Vp(e).some(function(r){return Bo(r,t)||FL(r,t)})},DL=function(e){e===void 0&&(e=document);var t=Ma(e);return t?pr(e.querySelectorAll("[".concat(nL,"]"))).some(function(r){return Bo(r,t)}):!1},IL=function(e,t){return t.filter(ew).filter(function(r){return r.name===e.name}).filter(function(r){return r.checked})[0]||e},Wp=function(e,t){return ew(e)&&e.name?IL(e,t):e},LL=function(e){var t=new Set;return e.forEach(function(r){return t.add(Wp(r,e))}),e.filter(function(r){return t.has(r)})},I0=function(e){return e[0]&&e.length>1?Wp(e[0],e):e[0]},L0=function(e,t){return e.length>1?e.indexOf(Wp(e[t],e)):t},iw="NEW_FOCUS",OL=function(e,t,r,n){var o=e.length,i=e[0],a=e[o-1],s=Bp(r);if(!(r&&e.indexOf(r)>=0)){var l=r!==void 0?t.indexOf(r):-1,u=n?t.indexOf(n):l,c=n?e.indexOf(n):-1,d=l-u,f=t.indexOf(i),p=t.indexOf(a),g=LL(t),y=r!==void 0?g.indexOf(r):-1,k=y-(n?g.indexOf(n):l),m=L0(e,0),h=L0(e,o-1);if(l===-1||c===-1)return iw;if(!d&&c>=0)return c;if(l<=f&&s&&Math.abs(d)>1)return h;if(l>=p&&s&&Math.abs(d)>1)return m;if(d&&Math.abs(k)>1)return c;if(l<=f)return h;if(l>p)return m;if(d)return Math.abs(d)>1?c:(o+c+d)%o}},BL=function(e){return function(t){var r,n=(r=Zx(t))===null||r===void 0?void 0:r.autofocus;return t.autofocus||n!==void 0&&n!=="false"||e.indexOf(t)>=0}},jL=function(e,t,r){var n=e.map(function(i){var a=i.node;return a}),o=F0(n.filter(BL(r)));return o&&o.length?I0(o):I0(F0(t))},Hf=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&Hf(e.parentNode.host||e.parentNode,t),t},hd=function(e,t){for(var r=Hf(e),n=Hf(t),o=0;o=0)return i}return!1},aw=function(e,t,r){var n=tu(e),o=tu(t),i=n[0],a=!1;return o.filter(Boolean).forEach(function(s){a=hd(a||s,s)||a,r.filter(Boolean).forEach(function(l){var u=hd(i,l);u&&(!a||Bo(u,a)?a=u:a=hd(u,a))})}),a},NL=function(e,t){return e.reduce(function(r,n){return r.concat(AL(n,t))},[])},VL=function(e,t){var r=new Map;return t.forEach(function(n){return r.set(n.node,n)}),e.map(function(n){return r.get(n)}).filter(CL)},WL=function(e,t){var r=Ma(tu(e).length>0?document:Kx(e).ownerDocument),n=Vp(e).filter(ru),o=aw(r||e,e,n),i=new Map,a=D0(n,i),s=Uf(n,i).filter(function(p){var g=p.node;return ru(g)});if(!(!s[0]&&(s=a,!s[0]))){var l=D0([o],i).map(function(p){var g=p.node;return g}),u=VL(l,s),c=u.map(function(p){var g=p.node;return g}),d=OL(c,l,r,t);if(d===iw){var f=jL(a,c,NL(n,i));if(f)return{node:f};console.warn("focus-lock: cannot find any node to move focus into");return}return d===void 0?d:u[d]}},UL=function(e){var t=Vp(e).filter(ru),r=aw(e,e,t),n=new Map,o=Uf([r],n,!0),i=Uf(t,n).filter(function(a){var s=a.node;return ru(s)}).map(function(a){var s=a.node;return s});return o.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:i.indexOf(s)>=0,guard:Bp(s)}})},HL=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},pd=0,md=!1,sw=function(e,t,r){r===void 0&&(r={});var n=WL(e,t);if(!md&&n){if(pd>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),md=!0,setTimeout(function(){md=!1},1);return}pd++,HL(n.node,r.focusOptions),pd--}};function Up(e){setTimeout(e,1)}var GL=function(){return document&&document.activeElement===document.body},KL=function(){return GL()||DL()},jo=null,To=null,No=null,za=!1,YL=function(){return!0},XL=function(t){return(jo.whiteList||YL)(t)},QL=function(t,r){No={observerNode:t,portaledElement:r}},qL=function(t){return No&&No.portaledElement===t};function O0(e,t,r,n){var o=null,i=e;do{var a=n[i];if(a.guard)a.node.dataset.focusAutoGuard&&(o=a);else if(a.lockItem){if(i!==e)return;o=null}else break}while((i+=r)!==t);o&&(o.node.tabIndex=0)}var ZL=function(t){return t&&"current"in t?t.current:t},JL=function(t){return t?!!za:za==="meanwhile"},eO=function e(t,r,n){return r&&(r.host===t&&(!r.activeElement||n.contains(r.activeElement))||r.parentNode&&e(t,r.parentNode,n))},tO=function(t,r){return r.some(function(n){return eO(t,n,n)})},nu=function(){var t=!1;if(jo){var r=jo,n=r.observed,o=r.persistentFocus,i=r.autoFocus,a=r.shards,s=r.crossFrame,l=r.focusOptions,u=n||No&&No.portaledElement,c=document&&document.activeElement;if(u){var d=[u].concat(a.map(ZL).filter(Boolean));if((!c||XL(c))&&(o||JL(s)||!KL()||!To&&i)&&(u&&!(ow(d)||c&&tO(c,d)||qL(c))&&(document&&!To&&c&&!i?(c.blur&&c.blur(),document.body.focus()):(t=sw(d,To,{focusOptions:l}),No={})),za=!1,To=document&&document.activeElement),document){var f=document&&document.activeElement,p=UL(d),g=p.map(function(y){var k=y.node;return k}).indexOf(f);g>-1&&(p.filter(function(y){var k=y.guard,m=y.node;return k&&m.dataset.focusAutoGuard}).forEach(function(y){var k=y.node;return k.removeAttribute("tabIndex")}),O0(g,p.length,1,p),O0(g,-1,-1,p))}}}return t},lw=function(t){nu()&&t&&(t.stopPropagation(),t.preventDefault())},Hp=function(){return Up(nu)},rO=function(t){var r=t.target,n=t.currentTarget;n.contains(r)||QL(n,r)},nO=function(){return null},uw=function(){za="just",Up(function(){za="meanwhile"})},oO=function(){document.addEventListener("focusin",lw),document.addEventListener("focusout",Hp),window.addEventListener("blur",uw)},iO=function(){document.removeEventListener("focusin",lw),document.removeEventListener("focusout",Hp),window.removeEventListener("blur",uw)};function aO(e){return e.filter(function(t){var r=t.disabled;return!r})}function sO(e){var t=e.slice(-1)[0];t&&!jo&&oO();var r=jo,n=r&&t&&t.id===r.id;jo=t,r&&!n&&(r.onDeactivation(),e.filter(function(o){var i=o.id;return i===r.id}).length||r.returnFocus(!t)),t?(To=null,(!n||r.observed!==t.observed)&&t.onActivation(),nu(),Up(nu)):(iO(),To=null)}Ux.assignSyncMedium(rO);Hx.assignMedium(Hp);cL.assignMedium(function(e){return e({moveFocusInside:sw,focusInside:ow})});const lO=gL(aO,sO)(nO);var cw=S.forwardRef(function(t,r){return S.createElement(Gx,Hn({sideCar:lO,ref:r},t))}),dw=Gx.propTypes||{};dw.sideCar;rL(dw,["sideCar"]);cw.propTypes={};const B0=cw;function fw(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function hw(e){var t;if(!fw(e))return!1;const r=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof r.HTMLElement}function FB(e){var t,r;return(r=(t=pw(e))==null?void 0:t.defaultView)!=null?r:window}function pw(e){return fw(e)?e.ownerDocument:document}function DB(e){return pw(e).activeElement}var mw=e=>e.hasAttribute("tabindex"),uO=e=>mw(e)&&e.tabIndex===-1;function cO(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function vw(e){return e.parentElement&&vw(e.parentElement)?!0:e.hidden}function dO(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function gw(e){if(!hw(e)||vw(e)||cO(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const n={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in n?n[t]():dO(e)?!0:mw(e)}function IB(e){return e?hw(e)&&gw(e)&&!uO(e):!1}var fO=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],hO=fO.join(),pO=e=>e.offsetWidth>0&&e.offsetHeight>0;function mO(e){const t=Array.from(e.querySelectorAll(hO));return t.unshift(e),t.filter(r=>gw(r)&&pO(r))}var j0,vO=(j0=B0.default)!=null?j0:B0,yw=e=>{const{initialFocusRef:t,finalFocusRef:r,contentRef:n,restoreFocus:o,children:i,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,c=S.useCallback(()=>{t!=null&&t.current?t.current.focus():n!=null&&n.current&&mO(n.current).length===0&&requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus()})},[t,n]),d=S.useCallback(()=>{var p;(p=r==null?void 0:r.current)==null||p.focus()},[r]),f=o&&!r;return E.jsx(vO,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:c,onDeactivation:d,returnFocus:f,children:i})};yw.displayName="FocusLock";var gO={slideInBottom:{...Li,custom:{offsetY:16,reverse:!0}},slideInRight:{...Li,custom:{offsetX:16,reverse:!0}},slideInTop:{...Li,custom:{offsetY:-16,reverse:!0}},slideInLeft:{...Li,custom:{offsetX:-16,reverse:!0}},scale:{...Dx,custom:{initialScale:.95,reverse:!0}},none:{}},yO=_e(ii.section),bO=e=>gO[e||"none"],bw=S.forwardRef((e,t)=>{const{preset:r,motionProps:n=bO(r),...o}=e;return E.jsx(yO,{ref:t,...n,...o})});bw.displayName="ModalTransition";var SO=Object.defineProperty,xO=(e,t,r)=>t in e?SO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wO=(e,t,r)=>(xO(e,typeof t!="symbol"?t+"":t,r),r),kO=class{constructor(){wO(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return e?this.modals.get(e)===this.modals.size:!1}},Gf=new kO;function Sw(e,t){const[r,n]=S.useState(0);return S.useEffect(()=>{const o=e.current;if(o){if(t){const i=Gf.add(o);n(i)}return()=>{Gf.remove(o),n(0)}}},[t,e]),r}var CO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},to=new WeakMap,Is=new WeakMap,Ls={},vd=0,xw=function(e){return e&&(e.host||xw(e.parentNode))},_O=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=xw(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},PO=function(e,t,r,n){var o=_O(t,Array.isArray(e)?e:[e]);Ls[r]||(Ls[r]=new WeakMap);var i=Ls[r],a=[],s=new Set,l=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else{var p=f.getAttribute(n),g=p!==null&&p!=="false",y=(to.get(f)||0)+1,k=(i.get(f)||0)+1;to.set(f,y),i.set(f,k),a.push(f),y===1&&g&&Is.set(f,!0),k===1&&f.setAttribute(r,"true"),g||f.setAttribute(n,"true")}})};return c(t),s.clear(),vd++,function(){a.forEach(function(d){var f=to.get(d)-1,p=i.get(d)-1;to.set(d,f),i.set(d,p),f||(Is.has(d)||d.removeAttribute(n),Is.delete(d)),p||d.removeAttribute(r)}),vd--,vd||(to=new WeakMap,to=new WeakMap,Is=new WeakMap,Ls={})}},TO=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||CO(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),PO(n,o,r,"aria-hidden")):function(){return null}};function EO(e){const{isOpen:t,onClose:r,id:n,closeOnOverlayClick:o=!0,closeOnEsc:i=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=S.useRef(null),c=S.useRef(null),[d,f,p]=AO(n,"chakra-modal","chakra-modal--header","chakra-modal--body");$O(u,t&&a);const g=Sw(u,t),y=S.useRef(null),k=S.useCallback(M=>{y.current=M.target},[]),m=S.useCallback(M=>{M.key==="Escape"&&(M.stopPropagation(),i&&(r==null||r()),l==null||l())},[i,r,l]),[h,v]=S.useState(!1),[C,_]=S.useState(!1),$=S.useCallback((M={},I=null)=>({role:"dialog",...M,ref:Bf(I,u),id:d,tabIndex:-1,"aria-modal":!0,"aria-labelledby":h?f:void 0,"aria-describedby":C?p:void 0,onClick:$i(M.onClick,ee=>ee.stopPropagation())}),[p,C,d,f,h]),T=S.useCallback(M=>{M.stopPropagation(),y.current===M.target&&Gf.isTopModal(u.current)&&(o&&(r==null||r()),s==null||s())},[r,o,s]),A=S.useCallback((M={},I=null)=>({...M,ref:Bf(I,c),onClick:$i(M.onClick,T),onKeyDown:$i(M.onKeyDown,m),onMouseDown:$i(M.onMouseDown,k)}),[m,k,T]);return{isOpen:t,onClose:r,headerId:f,bodyId:p,setBodyMounted:_,setHeaderMounted:v,dialogRef:u,overlayRef:c,getDialogProps:$,getDialogContainerProps:A,index:g}}function $O(e,t){const r=e.current;S.useEffect(()=>{if(!(!e.current||!t))return TO(e.current)},[t,e,r])}function AO(e,...t){const r=S.useId(),n=e||r;return S.useMemo(()=>t.map(o=>`${o}-${n}`),[n,t])}var[RO,ai]=mn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[MO,Gn]=mn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),ww=e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:r,children:n,autoFocus:o,trapFocus:i,initialFocusRef:a,finalFocusRef:s,returnFocusOnClose:l,blockScrollOnMount:u,allowPinchZoom:c,preserveScrollBarGap:d,motionPreset:f,lockFocusAcrossFrames:p,onCloseComplete:g}=t,y=eS("Modal",t),m={...EO(t),autoFocus:o,trapFocus:i,initialFocusRef:a,finalFocusRef:s,returnFocusOnClose:l,blockScrollOnMount:u,allowPinchZoom:c,preserveScrollBarGap:d,motionPreset:f,lockFocusAcrossFrames:p};return E.jsx(MO,{value:m,children:E.jsx(RO,{value:y,children:E.jsx(Ya,{onExitComplete:g,children:m.isOpen&&E.jsx(Na,{...r,children:n})})})})};ww.displayName="Modal";var hl="right-scroll-bar-position",pl="width-before-scroll-bar",zO="with-scroll-bars-hidden",FO="--removed-body-scroll-bar-size",kw=Vx(),gd=function(){},Qu=S.forwardRef(function(e,t){var r=S.useRef(null),n=S.useState({onScrollCapture:gd,onWheelCapture:gd,onTouchMoveCapture:gd}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,g=e.inert,y=e.allowPinchZoom,k=e.as,m=k===void 0?"div":k,h=e.gapMode,v=Bx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,_=Ox([r,t]),$=sr(sr({},v),o);return S.createElement(S.Fragment,null,c&&S.createElement(C,{sideCar:kw,removeScrollBar:u,shards:d,noIsolation:p,inert:g,setCallbacks:i,allowPinchZoom:!!y,lockRef:r,gapMode:h}),a?S.cloneElement(S.Children.only(s),sr(sr({},$),{ref:_})):S.createElement(m,sr({},$,{className:l,ref:_}),s))});Qu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Qu.classNames={fullWidth:pl,zeroRight:hl};var N0,DO=function(){if(N0)return N0;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function IO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=DO();return t&&e.setAttribute("nonce",t),e}function LO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function OO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var BO=function(){var e=0,t=null;return{add:function(r){e==0&&(t=IO())&&(LO(t,r),OO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jO=function(){var e=BO();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Cw=function(){var e=jO(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},NO={left:0,top:0,right:0,gap:0},yd=function(e){return parseInt(e||"",10)||0},VO=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[yd(r),yd(n),yd(o)]},WO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return NO;var t=VO(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},UO=Cw(),HO=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),` - .`.concat(zO,` { - overflow: hidden `).concat(n,`; - padding-right: `).concat(s,"px ").concat(n,`; - } - body { - overflow: hidden `).concat(n,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` - padding-left: `.concat(o,`px; - padding-top: `).concat(i,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(n,`; - `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),` - } - - .`).concat(hl,` { - right: `).concat(s,"px ").concat(n,`; - } - - .`).concat(pl,` { - margin-right: `).concat(s,"px ").concat(n,`; - } - - .`).concat(hl," .").concat(hl,` { - right: 0 `).concat(n,`; - } - - .`).concat(pl," .").concat(pl,` { - margin-right: 0 `).concat(n,`; - } - - body { - `).concat(FO,": ").concat(s,`px; - } -`)},GO=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=S.useMemo(function(){return WO(o)},[o]);return S.createElement(UO,{styles:HO(i,!t,o,r?"":"!important")})},Kf=!1;if(typeof window<"u")try{var Os=Object.defineProperty({},"passive",{get:function(){return Kf=!0,!0}});window.addEventListener("test",Os,Os),window.removeEventListener("test",Os,Os)}catch{Kf=!1}var ro=Kf?{passive:!1}:!1,KO=function(e){return e.tagName==="TEXTAREA"},_w=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!KO(e)&&r[t]==="visible")},YO=function(e){return _w(e,"overflowY")},XO=function(e){return _w(e,"overflowX")},V0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Pw(e,n);if(o){var i=Tw(e,n),a=i[1],s=i[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},QO=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},qO=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Pw=function(e,t){return e==="v"?YO(t):XO(t)},Tw=function(e,t){return e==="v"?QO(t):qO(t)},ZO=function(e,t){return e==="h"&&t==="rtl"?-1:1},JO=function(e,t,r,n,o){var i=ZO(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),u=!1,c=a>0,d=0,f=0;do{var p=Tw(e,s),g=p[0],y=p[1],k=p[2],m=y-k-i*g;(g||m)&&Pw(e,s)&&(d+=m,f+=g),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(o&&Math.abs(d)<1||!o&&a>d)||!c&&(o&&Math.abs(f)<1||!o&&-a>f))&&(u=!0),u},Bs=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},W0=function(e){return[e.deltaX,e.deltaY]},U0=function(e){return e&&"current"in e?e.current:e},eB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tB=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},rB=0,no=[];function nB(e){var t=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),o=S.useState(rB++)[0],i=S.useState(Cw)[0],a=S.useRef(e);S.useEffect(function(){a.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=lL([e.lockRef.current],(e.shards||[]).map(U0),!0).filter(Boolean);return y.forEach(function(k){return k.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=S.useCallback(function(y,k){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var m=Bs(y),h=r.current,v="deltaX"in y?y.deltaX:h[0]-m[0],C="deltaY"in y?y.deltaY:h[1]-m[1],_,$=y.target,T=Math.abs(v)>Math.abs(C)?"h":"v";if("touches"in y&&T==="h"&&$.type==="range")return!1;var A=V0(T,$);if(!A)return!0;if(A?_=T:(_=T==="v"?"h":"v",A=V0(T,$)),!A)return!1;if(!n.current&&"changedTouches"in y&&(v||C)&&(n.current=_),!_)return!0;var M=n.current||_;return JO(M,k,y,M==="h"?v:C,!0)},[]),l=S.useCallback(function(y){var k=y;if(!(!no.length||no[no.length-1]!==i)){var m="deltaY"in k?W0(k):Bs(k),h=t.current.filter(function(_){return _.name===k.type&&(_.target===k.target||k.target===_.shadowParent)&&eB(_.delta,m)})[0];if(h&&h.should){k.cancelable&&k.preventDefault();return}if(!h){var v=(a.current.shards||[]).map(U0).filter(Boolean).filter(function(_){return _.contains(k.target)}),C=v.length>0?s(k,v[0]):!a.current.noIsolation;C&&k.cancelable&&k.preventDefault()}}},[]),u=S.useCallback(function(y,k,m,h){var v={name:y,delta:k,target:m,should:h,shadowParent:oB(m)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(C){return C!==v})},1)},[]),c=S.useCallback(function(y){r.current=Bs(y),n.current=void 0},[]),d=S.useCallback(function(y){u(y.type,W0(y),y.target,s(y,e.lockRef.current))},[]),f=S.useCallback(function(y){u(y.type,Bs(y),y.target,s(y,e.lockRef.current))},[]);S.useEffect(function(){return no.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ro),document.addEventListener("touchmove",l,ro),document.addEventListener("touchstart",c,ro),function(){no=no.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,ro),document.removeEventListener("touchmove",l,ro),document.removeEventListener("touchstart",c,ro)}},[]);var p=e.removeScrollBar,g=e.inert;return S.createElement(S.Fragment,null,g?S.createElement(i,{styles:tB(o)}):null,p?S.createElement(GO,{gapMode:e.gapMode}):null)}function oB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const iB=uL(kw,nB);var Ew=S.forwardRef(function(e,t){return S.createElement(Qu,sr({},e,{ref:t,sideCar:iB}))});Ew.classNames=Qu.classNames;const aB=Ew;function sB(e){const{autoFocus:t,trapFocus:r,dialogRef:n,initialFocusRef:o,blockScrollOnMount:i,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:c,isOpen:d}=Gn(),[f,p]=hx();S.useEffect(()=>{!f&&p&&setTimeout(p)},[f,p]);const g=Sw(n,d);return E.jsx(yw,{autoFocus:t,isDisabled:!r,initialFocusRef:o,finalFocusRef:s,restoreFocus:l,contentRef:n,lockFocusAcrossFrames:c,children:E.jsx(aB,{removeScrollBar:!u,allowPinchZoom:a,enabled:g===1&&i,forwardProps:!0,children:e.children})})}var $w=pt((e,t)=>{const{className:r,children:n,containerProps:o,motionProps:i,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=Gn(),u=s(a,t),c=l(o),d=Be("chakra-modal__content",r),f=ai(),p={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...f.dialog},g={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...f.dialogContainer},{motionPreset:y}=Gn();return E.jsx(sB,{children:E.jsx(_e.div,{...c,className:"chakra-modal__content-container",tabIndex:-1,__css:g,children:E.jsx(bw,{preset:y,motionProps:i,className:d,...u,__css:p,children:n})})})});$w.displayName="ModalContent";function lB(e){const{leastDestructiveRef:t,...r}=e;return E.jsx(ww,{...r,initialFocusRef:t})}var uB=pt((e,t)=>E.jsx($w,{ref:t,role:"alertdialog",...e})),Aw=pt((e,t)=>{const{className:r,...n}=e,o=Be("chakra-modal__footer",r),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...ai().footer};return E.jsx(_e.footer,{ref:t,...n,__css:a,className:o})});Aw.displayName="ModalFooter";var Rw=pt((e,t)=>{const{className:r,...n}=e,{headerId:o,setHeaderMounted:i}=Gn();S.useEffect(()=>(i(!0),()=>i(!1)),[i]);const a=Be("chakra-modal__header",r),l={flex:0,...ai().header};return E.jsx(_e.header,{ref:t,className:a,id:o,...n,__css:l})});Rw.displayName="ModalHeader";var cB=_e(ii.div),Mw=pt((e,t)=>{const{className:r,transition:n,motionProps:o,...i}=e,a=Be("chakra-modal__overlay",r),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...ai().overlay},{motionPreset:u}=Gn(),d=o||(u==="none"?{}:Fx);return E.jsx(cB,{...d,__css:l,ref:t,className:a,...i})});Mw.displayName="ModalOverlay";var zw=pt((e,t)=>{const{className:r,...n}=e,{bodyId:o,setBodyMounted:i}=Gn();S.useEffect(()=>(i(!0),()=>i(!1)),[i]);const a=Be("chakra-modal__body",r),s=ai();return E.jsx(_e.div,{ref:t,className:a,id:o,...n,__css:s.body})});zw.displayName="ModalBody";var Fw=pt((e,t)=>{const{onClick:r,className:n,...o}=e,{onClose:i}=Gn(),a=Be("chakra-modal__close-btn",n),s=ai();return E.jsx(Ip,{ref:t,__css:s.closeButton,className:a,onClick:$i(r,l=>{l.stopPropagation(),i()}),...o})});Fw.displayName="ModalCloseButton";const Dw=S.createContext(void 0),LB=()=>{const e=S.useContext(Dw);if(!e)throw new Error("useDialog must be used within a DialogProvider");return e},dB=({children:e})=>{const[t,r]=S.useState(!1),[n,o]=S.useState(""),[i,a]=S.useState([]),[s,l]=S.useState(!1),u=Ar.useRef(null),c=S.useCallback((f,p,g=!1)=>{o(f),a(p),r(!0),l(g)},[]),d=S.useCallback(()=>{r(!1)},[]);return E.jsxs(Dw.Provider,{value:{showDialog:c},children:[e,t&&E.jsx(lB,{isOpen:t,leastDestructiveRef:u,onClose:d,size:"lg",children:E.jsx(Pb,{children:E.jsx(Mw,{children:E.jsxs(uB,{className:"workspace_manager",children:[E.jsx(Rw,{fontSize:"lg",fontWeight:"bold"}),s?null:E.jsx(Fw,{}),E.jsx(zw,{whiteSpace:"pre-wrap",children:n}),E.jsx(Aw,{children:i.map((f,p)=>f&&E.jsx(Ix,{colorScheme:f.colorScheme??"gray",onClick:()=>{f.onClick(),d()},iconSpacing:1,leftIcon:f.icon,ml:3,children:f.label},p))})]})})})})]})},Iw=String.raw,fB=Iw` - :root, - :host { - --chakra-vh: 100vh; - --toast-z-index: 17000000; - } - - @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; - } - } -`,hB=({scope:e=""})=>E.jsx(ja,{styles:Iw` - ${e} { - font-family: var(--chakra-fonts-body); - color: var(--chakra-colors-chakra-body-text); - background: var(--chakra-colors-chakra-body-bg); - transition-property: background-color; - transition-duration: var(--chakra-transition-duration-normal); - line-height: var(--chakra-lineHeights-base); - } - ${e} *, ${e} ::before, ${e} ::after { - border-color: var(--chakra-colors-chakra-border-color); - } - - ${e} :where(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; - } - - ${e} :where(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; - } - - ${e} :where(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} :where(sup) { - top: -0.5em; - } - - ${e} :where(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; - } - - ${e} 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} :where(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; - } - - ${e} [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; - } - - ${fB} - `}),Lw=document.createElement("div");document.body.append(Lw);const pB=Ar.lazy(()=>Jk(()=>import("./App-jF2-L8lr.js").then(e=>e.am),__vite__mapDeps([0,1])).then(({default:e})=>({default:e}))),mB={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e7,sticky:11e6,banner:12e6,overlay:13e6,modal:14e6,popover:15e6,skipLink:16e6,toast:17e6,tooltip:18e6},vB=Mz({zIndices:mB});bd.createRoot(Lw).render(E.jsx(Ar.StrictMode,{children:E.jsxs(HI,{resetCSS:!1,disableGlobalStyle:!0,theme:vB,children:[E.jsx(hB,{scope:".workspace_manager"}),E.jsx(NP,{initialColorMode:"dark"}),E.jsx(dB,{children:E.jsx(S.Suspense,{children:E.jsx(pB,{})})})]})}));const Yf=document.body,gB={attributes:!0,attributeFilter:["class"]},yB=function(e,t){const r=document.documentElement;r.style.colorScheme==="dark"&&r.style.removeProperty("color-scheme");for(const n of e)if(n.type==="attributes"&&n.attributeName==="class")for(const o of Yf.classList)o.includes("chakra")&&Yf.classList.remove(o)},bB=new MutationObserver(yB);bB.observe(Yf,gB);export{rL as $,IB as A,Ix as B,FB as C,zP as D,lr as E,ii as F,CB as G,Ip as H,Xa as I,PB as J,Ya as K,Mw as L,ww as M,$w as N,Rw as O,Na as P,zw as Q,Fw as R,Aw as S,Pb as T,LB as U,Ar as V,$B as W,Du as X,is as Y,vL as Z,Jk as _,MB as a,mL as a0,Wf as a1,Ra as a2,wP as a3,SB as a4,Hn as a5,Uh as a6,xP as a7,zp as a8,xB as a9,wB as aa,_B as ab,lB as ac,uB as ad,mn as b,RB as c,d3 as d,EB as e,pt as f,_e as g,Be as h,eS as i,E as j,Rv as k,Nu as l,Bf as m,kB as n,Ou as o,$i as p,Xf as q,S as r,hw as s,TB as t,VP as u,Kt as v,Cg as w,ka as x,mO as y,DB as z}; -function __vite__mapDeps(indexes) { - if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["workspace_web/App-jF2-L8lr.js","workspace_web/assets/App-JXePnJiV.css"] - } - return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) -} \ No newline at end of file diff --git a/ui/src/components/CustomSelector.tsx b/ui/src/components/CustomSelector.tsx index dd531ef..74f65a9 100644 --- a/ui/src/components/CustomSelector.tsx +++ b/ui/src/components/CustomSelector.tsx @@ -1,5 +1,5 @@ -import React, { useState, useRef } from "react"; -import { Box, Button, Card, useOutsideClick } from "@chakra-ui/react"; +import React, { useState, useRef, useEffect } from "react"; +import { Box, Button, Card } from "@chakra-ui/react"; import { IconChevronDown } from "@tabler/icons-react"; export interface CustomSelectorOption { @@ -17,10 +17,21 @@ export default function CustomSelector({ options }: Props) { const [selectedOption, setSelectedOption] = useState< CustomSelectorOption | undefined >(options[0]); - useOutsideClick({ - ref: ref, - handler: () => setIsOpen(false), - }); + + useEffect(() => { + const handleClickOutside = (event: any) => { + if (ref.current && !ref.current.contains(event.target)) { + setIsOpen(false); + } + }; + + // Bind the event listener + document.addEventListener("mousedown", handleClickOutside); + return () => { + // Unbind the event listener on clean up + document.removeEventListener("mousedown", handleClickOutside); + }; + }, [ref]); const toggleDropdown = () => setIsOpen(!isOpen); @@ -42,7 +53,6 @@ export default function CustomSelector({ options }: Props) { borderWidth="1px" p="2" position="absolute" - zIndex="dropdown" > {options.map((option) => ( + diff --git a/ui/src/share/SharedTopbarButton.tsx b/ui/src/share/SharedTopbarButton.tsx index c35474a..5f5594c 100644 --- a/ui/src/share/SharedTopbarButton.tsx +++ b/ui/src/share/SharedTopbarButton.tsx @@ -1,5 +1,5 @@ import { Button } from "@chakra-ui/react"; -import { IconUsersGroup } from "@tabler/icons-react"; +import { IconCloud, IconUsersGroup } from "@tabler/icons-react"; import { useEffect, useState } from "react"; import { workflowsTable } from "../db-tables/WorkspaceDB"; @@ -10,7 +10,7 @@ export function SharedTopbarButton({}) { onClick={() => {}} aria-label={"Shared"} size={"sm"} - leftIcon={} + leftIcon={} > Public diff --git a/ui/src/topbar/Topbar.tsx b/ui/src/topbar/Topbar.tsx index 731dd03..1cf440e 100644 --- a/ui/src/topbar/Topbar.tsx +++ b/ui/src/topbar/Topbar.tsx @@ -14,6 +14,7 @@ import EditFlowName from "../components/EditFlowName"; import { WorkspaceContext } from "../WorkspaceContext"; import { PanelPosition } from "../types/dbTypes"; import "./Topbar.css"; +import { SharedTopbarButton } from "../share/SharedTopbarButton"; interface Props { positionStyle: PanelPosition; @@ -103,6 +104,7 @@ export function Topbar({ )} + {curFlowID && isDirty ? ( Date: Fri, 9 Feb 2024 02:14:40 +0800 Subject: [PATCH 2/5] share confirm flow --- ui/src/share/ShareDialog.tsx | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/ui/src/share/ShareDialog.tsx b/ui/src/share/ShareDialog.tsx index 8db8420..732a31b 100644 --- a/ui/src/share/ShareDialog.tsx +++ b/ui/src/share/ShareDialog.tsx @@ -7,7 +7,6 @@ import { ModalContent, ModalHeader, ModalOverlay, - Select, Text, } from "@chakra-ui/react"; import { Workflow } from "../types/dbTypes"; @@ -21,10 +20,7 @@ import { IconLock, IconWorld, } from "@tabler/icons-react"; -import { - userSettingsTable, - workflowVersionsTable, -} from "../db-tables/WorkspaceDB"; +import { userSettingsTable } from "../db-tables/WorkspaceDB"; interface Props { onClose: () => void; @@ -56,10 +52,14 @@ export default function ShareDialog({ onClose, workflow }: Props) { "version " + getCurDateString(), ); const onShare = async () => { - const secretKey = generateRandomKey(64); - console.log(secretKey); - const host = userSettingsTable?.getSetting("cloudHost"); - fetch(host + "/api/share_workflow", { + const secretKey = generateRandomKey(32); + let host; + if (import.meta.env.MODE === "production") { + host = userSettingsTable?.getSetting("cloudHost"); + } else { + host = "http://localhost:3000"; + } + const resp = await fetch(host + "/api/shareWorkflow", { method: "POST", headers: { "Content-Type": "application/json", @@ -67,14 +67,15 @@ export default function ShareDialog({ onClose, workflow }: Props) { body: JSON.stringify({ name: workflow.name, json: workflow.json, - secretKey: secretKey, + keyID: secretKey, versionName: versionName, }), }); - const popupUrl = `https://www.comfyspace.art/`; + console.log("share resp", resp); + const popupUrl = host + `/share_workflow_confirm/${secretKey}`; const popupWindow = window.open( popupUrl, - "ComfyspaceLogin", + "Share Workflow", "width=800,height=600", ); // const url = await workflowVersionsTable?.add({ From 97335066056e1859075882bf0ade3bed5ec637e8 Mon Sep 17 00:00:00 2001 From: Weixuan Fu Date: Wed, 14 Feb 2024 12:14:43 +0530 Subject: [PATCH 3/5] switch to postMessage() to post json payload and skip create record in TempData table --- __init__.py | 2 + service/share/cloud_service.py | 19 +++ ui/src/components/DropdownTitle.tsx | 7 +- ui/src/db-tables/TableBase.ts | 6 + ui/src/gallery/GalleryModal.tsx | 5 - ui/src/share/ShareDialog.tsx | 231 ++++++++++++++++++++++------ ui/src/types/dbTypes.ts | 8 +- 7 files changed, 216 insertions(+), 62 deletions(-) create mode 100644 service/share/cloud_service.py diff --git a/__init__.py b/__init__.py index 97dc49c..44c15ad 100644 --- a/__init__.py +++ b/__init__.py @@ -16,6 +16,8 @@ import json from .version_control import update_version_if_outdated from .service.model_manager.model_installer import download_url_with_wget from .service.model_manager.model_list import get_model_list +from .service.share.cloud_service import * + WEB_DIRECTORY = "entry" DEFAULT_USER = "guest" NODE_CLASS_MAPPINGS = {} diff --git a/service/share/cloud_service.py b/service/share/cloud_service.py new file mode 100644 index 0000000..0da76e8 --- /dev/null +++ b/service/share/cloud_service.py @@ -0,0 +1,19 @@ +import server +import asyncio +from aiohttp import web + +loop = asyncio.get_event_loop() +def send_ws(event, data): + asyncio.run_coroutine_threadsafe(server.PromptServer.instance.send(event, data) , loop) + +@server.PromptServer.instance.routes.post("/workspace/created_cloudflow_version") +async def created_cloudflow_version(request): + reqJson = await request.json() + send_ws("created_cloudflow_version", reqJson) + response = web.Response(text="Cloudflow created successfully") + # Add CORS headers specifically to this response + response.headers['Access-Control-Allow-Origin'] = 'https://www.comfyspace.art/' + response.headers['Access-Control-Allow-Methods'] = 'POST, GET' + response.headers['Access-Control-Allow-Headers'] = 'Content-Type' + return response + diff --git a/ui/src/components/DropdownTitle.tsx b/ui/src/components/DropdownTitle.tsx index 76b0d8c..cf31c23 100644 --- a/ui/src/components/DropdownTitle.tsx +++ b/ui/src/components/DropdownTitle.tsx @@ -209,12 +209,7 @@ export default function DropdownTitle() { } /> - {isShareOpen && workflowsTable?.curWorkflow && ( - setIsShareOpen(false)} - /> - )} + {isShareOpen && setIsShareOpen(false)} />} {isVersionHistoryOpen && ( setIsVersionHistoryOpen(false)} /> )} diff --git a/ui/src/db-tables/TableBase.ts b/ui/src/db-tables/TableBase.ts index 4efb06f..ee9b2e5 100644 --- a/ui/src/db-tables/TableBase.ts +++ b/ui/src/db-tables/TableBase.ts @@ -48,6 +48,12 @@ export class TableBase { await this.saveDiskDB(); return newItem; } + public async update(id: string, changes: Partial): Promise { + await indexdb[this.tableName].update(id, changes); + await this.saveDiskDB(); + return (await this.get(id)) ?? null; + } + public async listAll(): Promise { const list = await indexdb[this.tableName].toArray(); return list as any[]; diff --git a/ui/src/gallery/GalleryModal.tsx b/ui/src/gallery/GalleryModal.tsx index 3e58197..03d2a97 100644 --- a/ui/src/gallery/GalleryModal.tsx +++ b/ui/src/gallery/GalleryModal.tsx @@ -119,11 +119,6 @@ export default function GalleryModal({ onclose }: { onclose: () => void }) { - {!metaData ? ( {images.map((media) => { diff --git a/ui/src/share/ShareDialog.tsx b/ui/src/share/ShareDialog.tsx index 732a31b..9732b67 100644 --- a/ui/src/share/ShareDialog.tsx +++ b/ui/src/share/ShareDialog.tsx @@ -7,25 +7,34 @@ import { ModalContent, ModalHeader, ModalOverlay, + Stack, Text, + useToast, } from "@chakra-ui/react"; -import { Workflow } from "../types/dbTypes"; -import { useState } from "react"; +import { Workflow, WorkflowVersion } from "../types/dbTypes"; +import { useEffect, useState } from "react"; import CustomDropdown, { CustomSelectorOption, } from "../components/CustomSelector"; +import { IconLink, IconLock, IconWorld } from "@tabler/icons-react"; import { - IconExternalLink, - IconLink, - IconLock, - IconWorld, -} from "@tabler/icons-react"; -import { userSettingsTable } from "../db-tables/WorkspaceDB"; + userSettingsTable, + workflowVersionsTable, + workflowsTable, +} from "../db-tables/WorkspaceDB"; +// @ts-ignore +import { api } from "/scripts/api.js"; +// @ts-ignore +import { app } from "/scripts/app.js"; interface Props { onClose: () => void; - workflow: Workflow; } +type CreatedCloudflowVersionEvent = { + createdVer: WorkflowVersion; + localWorkflowID: string; + localVersionID: string; +}; function generateRandomKey(length: number) { // Generate a random array of bytes @@ -47,71 +56,195 @@ const privacyOptions: CustomSelectorOption[] = [ }, { label: "Public", value: "PUBLIC", icon: }, ]; -export default function ShareDialog({ onClose, workflow }: Props) { +export default function ShareDialog({ onClose }: Props) { const [versionName, setVersionName] = useState( "version " + getCurDateString(), ); - const onShare = async () => { - const secretKey = generateRandomKey(32); - let host; - if (import.meta.env.MODE === "production") { - host = userSettingsTable?.getSetting("cloudHost"); - } else { - host = "http://localhost:3000"; + const [localVersions, setLocalVersions] = useState([]); + const [loading, setLoading] = useState(false); + const [cloudHost, setCloudHost] = useState(""); + const [workflow, setWorkflow] = useState(); + const toast = useToast(); + useEffect(() => { + api.addEventListener( + "created_cloudflow_version", + async (e: { detail: CreatedCloudflowVersionEvent }) => { + const localID = e.detail.localWorkflowID; + const localVerID = e.detail.localVersionID; + const cloudVersionID = e.detail.createdVer.id; + const cloudID = e.detail.createdVer.workflowID; + // if (!localID || !localVerID || !cloudID || !cloudVersionID) { + // return; + // } + console.log("created_cloudflow_version", e.detail); + cloudID && + localID && + (await workflowsTable?.updateFlow(localID, { + cloudID: cloudID, + })); + localVerID && + cloudVersionID && + (await workflowVersionsTable?.update(localVerID, { + cloudVersionID: cloudVersionID, + })); + loadData(); + }, + ); + + loadData(); + }, []); + const getNodeDefs = () => { + const allNodes = app.graph._nodes; + console.log("allNodes", allNodes); + const nodeDefs = {}; + for (let n of allNodes) { + // Patch T2IAdapterLoader to ControlNetLoader since they are the same node now + if (n.type == "T2IAdapterLoader") n.type = "ControlNetLoader"; + if (n.type == "ConditioningAverage ") n.type = "ConditioningAverage"; //typo fix + if (n.type == "SDV_img2vid_Conditioning") + n.type = "SVD_img2vid_Conditioning"; //typo fix + + if (n.type in LiteGraph.registered_node_types) { + nodeDefs[n.type] = LiteGraph.registered_node_types[n.type]; + } } + return nodeDefs; + }; + const loadData = async () => { + const host = + import.meta.env.MODE === "production" + ? await userSettingsTable?.getSetting("cloudHost") + : "http://localhost:3000"; + host && setCloudHost(host); + const workflow = workflowsTable?.curWorkflow ?? undefined; + setWorkflow(workflow); + if (!workflow) { + alert("Failed to get workflow, please try again."); + return; + } + workflowVersionsTable?.listByWorkflowID(workflow.id).then((vers) => { + setLocalVersions(vers); + }); + }; + const copyTextToClipboard = (text: string) => { + navigator.clipboard + .writeText(text) + .then(() => { + toast({ + title: "Copied to clipboard", + status: "success", + duration: 2000, + isClosable: true, + }); + }) + .catch((err) => { + // Error handling + console.error("Failed to copy text: ", err); + }); + }; + const onShare = async () => { + setLoading(true); + const secretKey = generateRandomKey(32); + const host = + import.meta.env.MODE === "production" + ? ((await userSettingsTable?.getSetting("cloudHost")) as string) + : "http://localhost:3000"; + const nodeDefs = getNodeDefs(); + const newVer = await workflowVersionsTable?.add({ + workflowID: workflow!.id, + name: versionName, + createTime: Date.now(), + json: workflow!.json, + nodeDefs: JSON.stringify(nodeDefs), + }); + if (!newVer) { + alert("Failed to create new version, please try again."); + setLoading(false); + return; + } + const resp = await fetch(host + "/api/shareWorkflow", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ - name: workflow.name, - json: workflow.json, + id: workflow!.id, + name: workflow!.name, + json: workflow!.json, keyID: secretKey, + versionID: newVer.id, versionName: versionName, }), }); - console.log("share resp", resp); - const popupUrl = host + `/share_workflow_confirm/${secretKey}`; - const popupWindow = window.open( + + const protocol = window.location.protocol; + const baseHost = window.location.host; + const baseUrl = `${protocol}//${baseHost}`; + const popupUrl = + host + `/share_workflow_confirm/${secretKey}?redirectUrl=${baseUrl}`; + const sharePopup = window.open( popupUrl, "Share Workflow", "width=800,height=600", ); - // const url = await workflowVersionsTable?.add({ - // workflowID: workflow.id, - // name: versionName, - // createTime: Date.now(), - // privacy: "public", - // json: workflow.json, - // remoteUrl: "", - // }); - // if (url) { - // alert(url); - // } + setLoading(false); + const handleChildReady = (event: MessageEvent) => { + if (event.origin === host && event.data === "child_ready") { + console.log("Child window is ready."); + // Send data to the new window after it loads + sharePopup!.postMessage( + { + workflow: workflow, + version: newVer, + }, + host, + ); + window.removeEventListener("message", handleChildReady); + } + }; + // setTimeout(() => { + // handleChildReady({ origin: host, data: "child_ready" } as MessageEvent); + // }, 3000); + window.addEventListener("message", handleChildReady); }; + const cloudWorkflowID = workflowsTable?.curWorkflow?.cloudID; return ( - Share "{workflow.name}" - + Share "{workflow?.name}" - Version name - - { - setVersionName(e.target.value); - }} - /> - - - + + + {cloudWorkflowID && ( + + {cloudHost + + "/workflow/" + + workflowsTable?.curWorkflow?.cloudID} + + )} + + New Version + { + setVersionName(e.target.value); + }} + /> + + {localVersions.slice(0, 4).map((ver) => { + return ( + + {ver.name} + + ); + })} + - diff --git a/ui/src/types/dbTypes.ts b/ui/src/types/dbTypes.ts index 89bfc3a..e4a131e 100644 --- a/ui/src/types/dbTypes.ts +++ b/ui/src/types/dbTypes.ts @@ -14,6 +14,8 @@ export interface Workflow extends SortableItem { parentFolderID?: string; mediaIDs?: string[]; coverMediaPath?: string; + cloudID?: string; + privacy?: WorkflowPrivacy; } export interface TableBaseModel { @@ -56,8 +58,8 @@ export type WorkflowVersion = { workflowID: string; json: string; createTime: number; - privacy?: "public" | "private"; - remoteUrl?: string; + cloudVersionID?: string; + nodeDefs?: string; //for cloud workflow version }; export type UserSettings = { @@ -118,4 +120,6 @@ export enum EFlowOperationType { DELETE = "delete", } +type WorkflowPrivacy = "PUBLIC" | "PRIVATE" | "UNLISTED"; + export const WORKSPACE_INDEXDB_NAME = "comfyui_workspace_db"; From 6fa99e505502aae9ab7c708d3043f1a171c6c9ef Mon Sep 17 00:00:00 2001 From: Weixuan Fu Date: Thu, 15 Feb 2024 21:29:11 +0800 Subject: [PATCH 4/5] share cloud version success can send back data --- entry/entry.js | 10 ++ ui/src/share/ShareDialog.tsx | 176 ++++++++++++++++++++++------------- 2 files changed, 121 insertions(+), 65 deletions(-) diff --git a/entry/entry.js b/entry/entry.js index 236df8a..4e18b33 100644 --- a/entry/entry.js +++ b/entry/entry.js @@ -24,3 +24,13 @@ const observer = new MutationObserver(callback); // Start observing the target node for configured mutations observer.observe(targetNode, config); + +import { app } from "/scripts/app.js"; +const ext = { + // Unique name for the extension + name: "WorkspaceManager", + async addCustomNodeDefs(defs) { + console.log("addCustomNodeDefs", defs); + }, +}; +app.registerExtension(ext); diff --git a/ui/src/share/ShareDialog.tsx b/ui/src/share/ShareDialog.tsx index 9732b67..5739d6e 100644 --- a/ui/src/share/ShareDialog.tsx +++ b/ui/src/share/ShareDialog.tsx @@ -1,7 +1,9 @@ import { Button, + Flex, HStack, Input, + Link, Modal, ModalBody, ModalContent, @@ -12,11 +14,18 @@ import { useToast, } from "@chakra-ui/react"; import { Workflow, WorkflowVersion } from "../types/dbTypes"; -import { useEffect, useState } from "react"; +import { useEffect, useRef, useState } from "react"; import CustomDropdown, { CustomSelectorOption, } from "../components/CustomSelector"; -import { IconLink, IconLock, IconWorld } from "@tabler/icons-react"; +import { + IconCloud, + IconCopy, + IconExternalLink, + IconLink, + IconLock, + IconWorld, +} from "@tabler/icons-react"; import { userSettingsTable, workflowVersionsTable, @@ -63,49 +72,59 @@ export default function ShareDialog({ onClose }: Props) { const [localVersions, setLocalVersions] = useState([]); const [loading, setLoading] = useState(false); const [cloudHost, setCloudHost] = useState(""); + const cloudHostRef = useRef(""); const [workflow, setWorkflow] = useState(); const toast = useToast(); - useEffect(() => { - api.addEventListener( - "created_cloudflow_version", - async (e: { detail: CreatedCloudflowVersionEvent }) => { - const localID = e.detail.localWorkflowID; - const localVerID = e.detail.localVersionID; - const cloudVersionID = e.detail.createdVer.id; - const cloudID = e.detail.createdVer.workflowID; - // if (!localID || !localVerID || !cloudID || !cloudVersionID) { - // return; - // } - console.log("created_cloudflow_version", e.detail); - cloudID && - localID && - (await workflowsTable?.updateFlow(localID, { - cloudID: cloudID, - })); - localVerID && - cloudVersionID && - (await workflowVersionsTable?.update(localVerID, { - cloudVersionID: cloudVersionID, - })); - loadData(); - }, - ); + const handleShareWorkflowSuccess = async (event: MessageEvent) => { + const detail = event.data; + console.log("event", event); + console.log("cloooudhost", cloudHost); + if ( + event.origin !== cloudHostRef.current || + detail.type !== "share_workflow_success" + ) { + console.log("event.origin !== cloudHost", event.origin !== cloudHost); + return; + } + console.log("share_workflow_success", detail); + const localID = detail.localWorkflowID; + const localVerID = detail.localVersionID; + const cloudVersionID = detail.version.id; + const cloudID = detail.version.workflowID; + // if (!localID || !localVerID || !cloudID || !cloudVersionID) { + // return; + // } + console.log("localVerID", localVerID, "cloudVersionID", cloudVersionID); + console.log("localID", localID, "cloudID", cloudID); + + cloudID && + localID && + (await workflowsTable?.updateFlow(localID, { + cloudID: cloudID, + })); + localVerID && + cloudVersionID && + (await workflowVersionsTable?.update(localVerID, { + cloudVersionID: cloudVersionID, + })); loadData(); + }; + useEffect(() => { + loadData(); + window.addEventListener("message", handleShareWorkflowSuccess); + return () => { + window.removeEventListener("message", handleShareWorkflowSuccess); + }; }, []); const getNodeDefs = () => { const allNodes = app.graph._nodes; - console.log("allNodes", allNodes); const nodeDefs = {}; for (let n of allNodes) { - // Patch T2IAdapterLoader to ControlNetLoader since they are the same node now - if (n.type == "T2IAdapterLoader") n.type = "ControlNetLoader"; - if (n.type == "ConditioningAverage ") n.type = "ConditioningAverage"; //typo fix - if (n.type == "SDV_img2vid_Conditioning") - n.type = "SVD_img2vid_Conditioning"; //typo fix - + // @ts-ignore if (n.type in LiteGraph.registered_node_types) { - nodeDefs[n.type] = LiteGraph.registered_node_types[n.type]; + // @ts-ignore + nodeDefs[n.type] = LiteGraph.registered_node_types[n.type].nodeData; } } return nodeDefs; @@ -115,7 +134,10 @@ export default function ShareDialog({ onClose }: Props) { import.meta.env.MODE === "production" ? await userSettingsTable?.getSetting("cloudHost") : "http://localhost:3000"; - host && setCloudHost(host); + if (host) { + setCloudHost(host); + cloudHostRef.current = host; + } const workflow = workflowsTable?.curWorkflow ?? undefined; setWorkflow(workflow); if (!workflow) { @@ -155,29 +177,12 @@ export default function ShareDialog({ onClose }: Props) { name: versionName, createTime: Date.now(), json: workflow!.json, - nodeDefs: JSON.stringify(nodeDefs), }); if (!newVer) { alert("Failed to create new version, please try again."); setLoading(false); return; } - - const resp = await fetch(host + "/api/shareWorkflow", { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - id: workflow!.id, - name: workflow!.name, - json: workflow!.json, - keyID: secretKey, - versionID: newVer.id, - versionName: versionName, - }), - }); - const protocol = window.location.protocol; const baseHost = window.location.host; const baseUrl = `${protocol}//${baseHost}`; @@ -191,23 +196,26 @@ export default function ShareDialog({ onClose }: Props) { setLoading(false); const handleChildReady = (event: MessageEvent) => { if (event.origin === host && event.data === "child_ready") { - console.log("Child window is ready."); + console.log("Child window is ready.inputdata", { + workflow: workflow, + version: newVer, + nodeDefs: nodeDefs, + }); // Send data to the new window after it loads sharePopup!.postMessage( { workflow: workflow, version: newVer, + nodeDefs: nodeDefs, }, host, ); window.removeEventListener("message", handleChildReady); } }; - // setTimeout(() => { - // handleChildReady({ origin: host, data: "child_ready" } as MessageEvent); - // }, 3000); window.addEventListener("message", handleChildReady); }; + const cloudWorkflowID = workflowsTable?.curWorkflow?.cloudID; return ( @@ -217,12 +225,35 @@ export default function ShareDialog({ onClose }: Props) { + {cloudWorkflowID && ( - - {cloudHost + - "/workflow/" + - workflowsTable?.curWorkflow?.cloudID} - + + + {cloudHost + "/workflow/" + cloudWorkflowID}{" "} + + + + + )} New Version @@ -236,9 +267,24 @@ export default function ShareDialog({ onClose }: Props) { {localVersions.slice(0, 4).map((ver) => { return ( - - {ver.name} - + + + {ver.name} id:{ver.id} + + {ver.cloudVersionID && ( + + )} + ); })} From bd6f1811ef136a03a864e8d88a8187da05893346 Mon Sep 17 00:00:00 2001 From: Weixuan Fu Date: Thu, 15 Feb 2024 23:29:08 +0800 Subject: [PATCH 5/5] create different versions in same workflow --- __init__.py | 1 - entry/entry.js | 10 ----- service/share/cloud_service.py | 19 --------- ui/src/components/CustomSelector.tsx | 3 -- ui/src/share/ShareDialog.tsx | 58 ++++++++++++---------------- ui/src/share/SharedTopbarButton.tsx | 9 +++-- ui/src/types/dbTypes.ts | 3 +- 7 files changed, 33 insertions(+), 70 deletions(-) delete mode 100644 service/share/cloud_service.py diff --git a/__init__.py b/__init__.py index 44c15ad..a1ffb74 100644 --- a/__init__.py +++ b/__init__.py @@ -16,7 +16,6 @@ import json from .version_control import update_version_if_outdated from .service.model_manager.model_installer import download_url_with_wget from .service.model_manager.model_list import get_model_list -from .service.share.cloud_service import * WEB_DIRECTORY = "entry" DEFAULT_USER = "guest" diff --git a/entry/entry.js b/entry/entry.js index 4e18b33..236df8a 100644 --- a/entry/entry.js +++ b/entry/entry.js @@ -24,13 +24,3 @@ const observer = new MutationObserver(callback); // Start observing the target node for configured mutations observer.observe(targetNode, config); - -import { app } from "/scripts/app.js"; -const ext = { - // Unique name for the extension - name: "WorkspaceManager", - async addCustomNodeDefs(defs) { - console.log("addCustomNodeDefs", defs); - }, -}; -app.registerExtension(ext); diff --git a/service/share/cloud_service.py b/service/share/cloud_service.py deleted file mode 100644 index 0da76e8..0000000 --- a/service/share/cloud_service.py +++ /dev/null @@ -1,19 +0,0 @@ -import server -import asyncio -from aiohttp import web - -loop = asyncio.get_event_loop() -def send_ws(event, data): - asyncio.run_coroutine_threadsafe(server.PromptServer.instance.send(event, data) , loop) - -@server.PromptServer.instance.routes.post("/workspace/created_cloudflow_version") -async def created_cloudflow_version(request): - reqJson = await request.json() - send_ws("created_cloudflow_version", reqJson) - response = web.Response(text="Cloudflow created successfully") - # Add CORS headers specifically to this response - response.headers['Access-Control-Allow-Origin'] = 'https://www.comfyspace.art/' - response.headers['Access-Control-Allow-Methods'] = 'POST, GET' - response.headers['Access-Control-Allow-Headers'] = 'Content-Type' - return response - diff --git a/ui/src/components/CustomSelector.tsx b/ui/src/components/CustomSelector.tsx index 74f65a9..1261c2c 100644 --- a/ui/src/components/CustomSelector.tsx +++ b/ui/src/components/CustomSelector.tsx @@ -24,11 +24,8 @@ export default function CustomSelector({ options }: Props) { setIsOpen(false); } }; - - // Bind the event listener document.addEventListener("mousedown", handleClickOutside); return () => { - // Unbind the event listener on clean up document.removeEventListener("mousedown", handleClickOutside); }; }, [ref]); diff --git a/ui/src/share/ShareDialog.tsx b/ui/src/share/ShareDialog.tsx index 5739d6e..ac61e6c 100644 --- a/ui/src/share/ShareDialog.tsx +++ b/ui/src/share/ShareDialog.tsx @@ -77,8 +77,6 @@ export default function ShareDialog({ onClose }: Props) { const toast = useToast(); const handleShareWorkflowSuccess = async (event: MessageEvent) => { const detail = event.data; - console.log("event", event); - console.log("cloooudhost", cloudHost); if ( event.origin !== cloudHostRef.current || detail.type !== "share_workflow_success" @@ -92,21 +90,17 @@ export default function ShareDialog({ onClose }: Props) { const localVerID = detail.localVersionID; const cloudVersionID = detail.version.id; const cloudID = detail.version.workflowID; - // if (!localID || !localVerID || !cloudID || !cloudVersionID) { - // return; - // } - console.log("localVerID", localVerID, "cloudVersionID", cloudVersionID); - console.log("localID", localID, "cloudID", cloudID); cloudID && localID && (await workflowsTable?.updateFlow(localID, { cloudID: cloudID, + cloudURL: cloudHost + "/workflow/" + cloudID, })); localVerID && cloudVersionID && (await workflowVersionsTable?.update(localVerID, { - cloudVersionID: cloudVersionID, + cloudID: cloudVersionID, })); loadData(); }; @@ -140,11 +134,7 @@ export default function ShareDialog({ onClose }: Props) { } const workflow = workflowsTable?.curWorkflow ?? undefined; setWorkflow(workflow); - if (!workflow) { - alert("Failed to get workflow, please try again."); - return; - } - workflowVersionsTable?.listByWorkflowID(workflow.id).then((vers) => { + workflowVersionsTable?.listByWorkflowID(workflow!.id).then((vers) => { setLocalVersions(vers); }); }; @@ -160,7 +150,6 @@ export default function ShareDialog({ onClose }: Props) { }); }) .catch((err) => { - // Error handling console.error("Failed to copy text: ", err); }); }; @@ -191,20 +180,21 @@ export default function ShareDialog({ onClose }: Props) { const sharePopup = window.open( popupUrl, "Share Workflow", - "width=800,height=600", + "width=800,height=800", ); setLoading(false); const handleChildReady = (event: MessageEvent) => { if (event.origin === host && event.data === "child_ready") { + const curWorkflow = workflowsTable?.curWorkflow; console.log("Child window is ready.inputdata", { - workflow: workflow, + workflow: curWorkflow, version: newVer, nodeDefs: nodeDefs, }); // Send data to the new window after it loads sharePopup!.postMessage( { - workflow: workflow, + workflow: curWorkflow, version: newVer, nodeDefs: nodeDefs, }, @@ -256,7 +246,7 @@ export default function ShareDialog({ onClose }: Props) { )} - New Version + New Version {localVersions.slice(0, 4).map((ver) => { return ( - - - {ver.name} id:{ver.id} - - {ver.cloudVersionID && ( - + + )} ); diff --git a/ui/src/share/SharedTopbarButton.tsx b/ui/src/share/SharedTopbarButton.tsx index 5f5594c..c915401 100644 --- a/ui/src/share/SharedTopbarButton.tsx +++ b/ui/src/share/SharedTopbarButton.tsx @@ -1,13 +1,16 @@ import { Button } from "@chakra-ui/react"; -import { IconCloud, IconUsersGroup } from "@tabler/icons-react"; -import { useEffect, useState } from "react"; +import { IconCloud } from "@tabler/icons-react"; import { workflowsTable } from "../db-tables/WorkspaceDB"; export function SharedTopbarButton({}) { + const isCloudflow = workflowsTable?.curWorkflow?.cloudID; + if (!isCloudflow) return null; return ( <>