diff --git a/assets/index-BkTppYXU.js b/assets/index-BapyPwu3.js similarity index 97% rename from assets/index-BkTppYXU.js rename to assets/index-BapyPwu3.js index f7355d5..45ddd75 100644 --- a/assets/index-BkTppYXU.js +++ b/assets/index-BapyPwu3.js @@ -339,7 +339,7 @@ Error generating stack: `+et.message+` transparent 0%, ${getColor(o,ot)} 50%, transparent 100% - )`;return{...!a&&rt&&et,...a?{bgImage:at}:{bgColor:ot}}},baseStyleLabel$3={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},baseStyleTrack$1=i=>({bg:mode("gray.100","whiteAlpha.300")(i)}),baseStyleFilledTrack$1=i=>({transitionProperty:"common",transitionDuration:"slow",...filledStyle(i)}),baseStyle$w=definePartsStyle$j(i=>({label:baseStyleLabel$3,filledTrack:baseStyleFilledTrack$1(i),track:baseStyleTrack$1(i)})),sizes$f={xs:definePartsStyle$j({track:{h:"1"}}),sm:definePartsStyle$j({track:{h:"2"}}),md:definePartsStyle$j({track:{h:"3"}}),lg:definePartsStyle$j({track:{h:"4"}})},progressTheme=defineMultiStyleConfig$j({sizes:sizes$f,baseStyle:baseStyle$w,defaultProps:{size:"md",colorScheme:"blue"}}),isFunction$3=i=>typeof i=="function";function runIfFn$1(i,...s){return isFunction$3(i)?i(...s):i}var{definePartsStyle:definePartsStyle$i,defineMultiStyleConfig:defineMultiStyleConfig$i}=createMultiStyleConfigHelpers(checkboxAnatomy.keys),$size$3=cssVar$1("checkbox-size"),baseStyleControl$1=i=>{const{colorScheme:s}=i;return{w:$size$3.reference,h:$size$3.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:mode(`${s}.500`,`${s}.200`)(i),borderColor:mode(`${s}.500`,`${s}.200`)(i),color:mode("white","gray.900")(i),_hover:{bg:mode(`${s}.600`,`${s}.300`)(i),borderColor:mode(`${s}.600`,`${s}.300`)(i)},_disabled:{borderColor:mode("gray.200","transparent")(i),bg:mode("gray.200","whiteAlpha.300")(i),color:mode("gray.500","whiteAlpha.500")(i)}},_indeterminate:{bg:mode(`${s}.500`,`${s}.200`)(i),borderColor:mode(`${s}.500`,`${s}.200`)(i),color:mode("white","gray.900")(i)},_disabled:{bg:mode("gray.100","whiteAlpha.100")(i),borderColor:mode("gray.100","transparent")(i)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:mode("red.500","red.300")(i)}}},baseStyleContainer$3={_disabled:{cursor:"not-allowed"}},baseStyleLabel$2={userSelect:"none",_disabled:{opacity:.4}},baseStyleIcon$6={transitionProperty:"transform",transitionDuration:"normal"},baseStyle$v=definePartsStyle$i(i=>({icon:baseStyleIcon$6,container:baseStyleContainer$3,control:runIfFn$1(baseStyleControl$1,i),label:baseStyleLabel$2})),sizes$e={sm:definePartsStyle$i({control:{[$size$3.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:definePartsStyle$i({control:{[$size$3.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:definePartsStyle$i({control:{[$size$3.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},checkboxTheme=defineMultiStyleConfig$i({baseStyle:baseStyle$v,sizes:sizes$e,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:defineMultiStyleConfig$h,definePartsStyle:definePartsStyle$h}=createMultiStyleConfigHelpers(radioAnatomy.keys),baseStyleControl=i=>{var s;const o=(s=runIfFn$1(checkboxTheme.baseStyle,i))==null?void 0:s.control;return{...o,borderRadius:"full",_checked:{...o==null?void 0:o._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},baseStyle$u=definePartsStyle$h(i=>{var s,o,a,rt;return{label:(o=(s=checkboxTheme).baseStyle)==null?void 0:o.call(s,i).label,container:(rt=(a=checkboxTheme).baseStyle)==null?void 0:rt.call(a,i).container,control:baseStyleControl(i)}}),sizes$d={md:definePartsStyle$h({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:definePartsStyle$h({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:definePartsStyle$h({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},radioTheme=defineMultiStyleConfig$h({baseStyle:baseStyle$u,sizes:sizes$d,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:defineMultiStyleConfig$g,definePartsStyle:definePartsStyle$g}=createMultiStyleConfigHelpers(selectAnatomy.keys),$bg$b=cssVar$1("select-bg"),_a$3,baseStyleField$1={...(_a$3=inputTheme.baseStyle)==null?void 0:_a$3.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:$bg$b.reference,[$bg$b.variable]:"colors.white",_dark:{[$bg$b.variable]:"colors.gray.700"},"> option, > optgroup":{bg:$bg$b.reference}},baseStyleIcon$5={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},baseStyle$t=definePartsStyle$g({field:baseStyleField$1,icon:baseStyleIcon$5}),iconSpacing={paddingInlineEnd:"8"},_a2$1,_b$1,_c,_d,_e,_f,_g,_h,sizes$c={lg:{...(_a2$1=inputTheme.sizes)==null?void 0:_a2$1.lg,field:{...(_b$1=inputTheme.sizes)==null?void 0:_b$1.lg.field,...iconSpacing}},md:{...(_c=inputTheme.sizes)==null?void 0:_c.md,field:{...(_d=inputTheme.sizes)==null?void 0:_d.md.field,...iconSpacing}},sm:{...(_e=inputTheme.sizes)==null?void 0:_e.sm,field:{...(_f=inputTheme.sizes)==null?void 0:_f.sm.field,...iconSpacing}},xs:{...(_g=inputTheme.sizes)==null?void 0:_g.xs,field:{...(_h=inputTheme.sizes)==null?void 0:_h.xs.field,...iconSpacing},icon:{insetEnd:"1"}}},selectTheme=defineMultiStyleConfig$g({baseStyle:baseStyle$t,sizes:sizes$c,variants:inputTheme.variants,defaultProps:inputTheme.defaultProps}),$startColor=cssVar$1("skeleton-start-color"),$endColor=cssVar$1("skeleton-end-color"),baseStyle$s={[$startColor.variable]:"colors.gray.100",[$endColor.variable]:"colors.gray.400",_dark:{[$startColor.variable]:"colors.gray.800",[$endColor.variable]:"colors.gray.600"},background:$startColor.reference,borderColor:$endColor.reference,opacity:.7,borderRadius:"sm"},skeletonTheme={baseStyle:baseStyle$s},$bg$a=cssVar$1("skip-link-bg"),baseStyle$r={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[$bg$a.variable]:"colors.white",_dark:{[$bg$a.variable]:"colors.gray.700"},bg:$bg$a.reference}},skipLinkTheme={baseStyle:baseStyle$r},{defineMultiStyleConfig:defineMultiStyleConfig$f,definePartsStyle:definePartsStyle$f}=createMultiStyleConfigHelpers(sliderAnatomy.keys),$thumbSize=cssVar$1("slider-thumb-size"),$trackSize=cssVar$1("slider-track-size"),$bg$9=cssVar$1("slider-bg"),baseStyleContainer$2=i=>{const{orientation:s}=i;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...orient({orientation:s,vertical:{h:"100%"},horizontal:{w:"100%"}})}},baseStyleTrack=i=>({...orient({orientation:i.orientation,horizontal:{h:$trackSize.reference},vertical:{w:$trackSize.reference}}),overflow:"hidden",borderRadius:"sm",[$bg$9.variable]:"colors.gray.200",_dark:{[$bg$9.variable]:"colors.whiteAlpha.200"},_disabled:{[$bg$9.variable]:"colors.gray.300",_dark:{[$bg$9.variable]:"colors.whiteAlpha.300"}},bg:$bg$9.reference}),baseStyleThumb=i=>{const{orientation:s}=i;return{...orient({orientation:s,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:$thumbSize.reference,h:$thumbSize.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"}}},baseStyleFilledTrack=i=>{const{colorScheme:s}=i;return{width:"inherit",height:"inherit",[$bg$9.variable]:`colors.${s}.500`,_dark:{[$bg$9.variable]:`colors.${s}.200`},bg:$bg$9.reference}},baseStyle$q=definePartsStyle$f(i=>({container:baseStyleContainer$2(i),track:baseStyleTrack(i),thumb:baseStyleThumb(i),filledTrack:baseStyleFilledTrack(i)})),sizeLg=definePartsStyle$f({container:{[$thumbSize.variable]:"sizes.4",[$trackSize.variable]:"sizes.1"}}),sizeMd=definePartsStyle$f({container:{[$thumbSize.variable]:"sizes.3.5",[$trackSize.variable]:"sizes.1"}}),sizeSm=definePartsStyle$f({container:{[$thumbSize.variable]:"sizes.2.5",[$trackSize.variable]:"sizes.0.5"}}),sizes$b={lg:sizeLg,md:sizeMd,sm:sizeSm},sliderTheme=defineMultiStyleConfig$f({baseStyle:baseStyle$q,sizes:sizes$b,defaultProps:{size:"md",colorScheme:"blue"}}),$size$2=cssVar("spinner-size"),baseStyle$p={width:[$size$2.reference],height:[$size$2.reference]},sizes$a={xs:{[$size$2.variable]:"sizes.3"},sm:{[$size$2.variable]:"sizes.4"},md:{[$size$2.variable]:"sizes.6"},lg:{[$size$2.variable]:"sizes.8"},xl:{[$size$2.variable]:"sizes.12"}},spinnerTheme={baseStyle:baseStyle$p,sizes:sizes$a,defaultProps:{size:"md"}},{defineMultiStyleConfig:defineMultiStyleConfig$e,definePartsStyle:definePartsStyle$e}=createMultiStyleConfigHelpers(statAnatomy.keys),baseStyleLabel$1={fontWeight:"medium"},baseStyleHelpText={opacity:.8,marginBottom:"2"},baseStyleNumber={verticalAlign:"baseline",fontWeight:"semibold"},baseStyleIcon$4={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},baseStyle$o=definePartsStyle$e({container:{},label:baseStyleLabel$1,helpText:baseStyleHelpText,number:baseStyleNumber,icon:baseStyleIcon$4}),sizes$9={md:definePartsStyle$e({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},statTheme=defineMultiStyleConfig$e({baseStyle:baseStyle$o,sizes:sizes$9,defaultProps:{size:"md"}}),$bg$8=cssVar$1("kbd-bg"),baseStyle$n={[$bg$8.variable]:"colors.gray.100",_dark:{[$bg$8.variable]:"colors.whiteAlpha.100"},bg:$bg$8.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},kbdTheme={baseStyle:baseStyle$n},baseStyle$m={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},linkTheme={baseStyle:baseStyle$m},{defineMultiStyleConfig:defineMultiStyleConfig$d,definePartsStyle:definePartsStyle$d}=createMultiStyleConfigHelpers(listAnatomy.keys),baseStyleIcon$3={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},baseStyle$l=definePartsStyle$d({icon:baseStyleIcon$3}),listTheme=defineMultiStyleConfig$d({baseStyle:baseStyle$l}),{defineMultiStyleConfig:defineMultiStyleConfig$c,definePartsStyle:definePartsStyle$c}=createMultiStyleConfigHelpers(menuAnatomy.keys),$bg$7=cssVar$1("menu-bg"),$shadow$2=cssVar$1("menu-shadow"),baseStyleList={[$bg$7.variable]:"#fff",[$shadow$2.variable]:"shadows.sm",_dark:{[$bg$7.variable]:"colors.gray.700",[$shadow$2.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:$bg$7.reference,boxShadow:$shadow$2.reference},baseStyleItem={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[$bg$7.variable]:"colors.gray.100",_dark:{[$bg$7.variable]:"colors.whiteAlpha.100"}},_active:{[$bg$7.variable]:"colors.gray.200",_dark:{[$bg$7.variable]:"colors.whiteAlpha.200"}},_expanded:{[$bg$7.variable]:"colors.gray.100",_dark:{[$bg$7.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:$bg$7.reference},baseStyleGroupTitle={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},baseStyleIcon$2={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},baseStyleCommand={opacity:.6},baseStyleDivider={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},baseStyleButton$1={transitionProperty:"common",transitionDuration:"normal"},baseStyle$k=definePartsStyle$c({button:baseStyleButton$1,list:baseStyleList,item:baseStyleItem,groupTitle:baseStyleGroupTitle,icon:baseStyleIcon$2,command:baseStyleCommand,divider:baseStyleDivider}),menuTheme=defineMultiStyleConfig$c({baseStyle:baseStyle$k}),{defineMultiStyleConfig:defineMultiStyleConfig$b,definePartsStyle:definePartsStyle$b}=createMultiStyleConfigHelpers(modalAnatomy.keys),$bg$6=cssVar$1("modal-bg"),$shadow$1=cssVar$1("modal-shadow"),baseStyleOverlay$1={bg:"blackAlpha.600",zIndex:"modal"},baseStyleDialogContainer$1=i=>{const{isCentered:s,scrollBehavior:o}=i;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:s?"center":"flex-start",overflow:o==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},baseStyleDialog$1=i=>{const{isCentered:s,scrollBehavior:o}=i;return{borderRadius:"md",color:"inherit",my:s?"auto":"16",mx:s?"auto":void 0,zIndex:"modal",maxH:o==="inside"?"calc(100% - 7.5rem)":void 0,[$bg$6.variable]:"colors.white",[$shadow$1.variable]:"shadows.lg",_dark:{[$bg$6.variable]:"colors.gray.700",[$shadow$1.variable]:"shadows.dark-lg"},bg:$bg$6.reference,boxShadow:$shadow$1.reference}},baseStyleHeader$2={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},baseStyleCloseButton$2={position:"absolute",top:"2",insetEnd:"3"},baseStyleBody$2=i=>{const{scrollBehavior:s}=i;return{px:"6",py:"2",flex:"1",overflow:s==="inside"?"auto":void 0}},baseStyleFooter$2={px:"6",py:"4"},baseStyle$j=definePartsStyle$b(i=>({overlay:baseStyleOverlay$1,dialogContainer:runIfFn$1(baseStyleDialogContainer$1,i),dialog:runIfFn$1(baseStyleDialog$1,i),header:baseStyleHeader$2,closeButton:baseStyleCloseButton$2,body:runIfFn$1(baseStyleBody$2,i),footer:baseStyleFooter$2}));function getSize$3(i){return definePartsStyle$b(i==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:i}})}var sizes$8={xs:getSize$3("xs"),sm:getSize$3("sm"),md:getSize$3("md"),lg:getSize$3("lg"),xl:getSize$3("xl"),"2xl":getSize$3("2xl"),"3xl":getSize$3("3xl"),"4xl":getSize$3("4xl"),"5xl":getSize$3("5xl"),"6xl":getSize$3("6xl"),full:getSize$3("full")},modalTheme=defineMultiStyleConfig$b({baseStyle:baseStyle$j,sizes:sizes$8,defaultProps:{size:"md"}}),{defineMultiStyleConfig:defineMultiStyleConfig$a,definePartsStyle:definePartsStyle$a}=createMultiStyleConfigHelpers(numberInputAnatomy.keys),$stepperWidth=cssVar("number-input-stepper-width"),$inputPadding=cssVar("number-input-input-padding"),inputPaddingValue=calc($stepperWidth).add("0.5rem").toString(),$bg$5=cssVar("number-input-bg"),$fg$3=cssVar("number-input-color"),$border$2=cssVar("number-input-border-color"),baseStyleRoot={[$stepperWidth.variable]:"sizes.6",[$inputPadding.variable]:inputPaddingValue},baseStyleField=i=>{var s,o;return(o=(s=runIfFn$1(inputTheme.baseStyle,i))==null?void 0:s.field)!=null?o:{}},baseStyleStepperGroup={width:$stepperWidth.reference},baseStyleStepper={borderStart:"1px solid",borderStartColor:$border$2.reference,color:$fg$3.reference,bg:$bg$5.reference,[$fg$3.variable]:"colors.chakra-body-text",[$border$2.variable]:"colors.chakra-border-color",_dark:{[$fg$3.variable]:"colors.whiteAlpha.800",[$border$2.variable]:"colors.whiteAlpha.300"},_active:{[$bg$5.variable]:"colors.gray.200",_dark:{[$bg$5.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},baseStyle$i=definePartsStyle$a(i=>{var s;return{root:baseStyleRoot,field:(s=runIfFn$1(baseStyleField,i))!=null?s:{},stepperGroup:baseStyleStepperGroup,stepper:baseStyleStepper}});function getSize$2(i){var s,o,a;const rt=(s=inputTheme.sizes)==null?void 0:s[i],et={lg:"md",md:"md",sm:"sm",xs:"sm"},ot=(a=(o=rt.field)==null?void 0:o.fontSize)!=null?a:"md",at=typography_default.fontSizes[ot];return definePartsStyle$a({field:{...rt.field,paddingInlineEnd:$inputPadding.reference,verticalAlign:"top"},stepper:{fontSize:calc(at).multiply(.75).toString(),_first:{borderTopEndRadius:et[i]},_last:{borderBottomEndRadius:et[i],mt:"-1px",borderTopWidth:1}}})}var sizes$7={xs:getSize$2("xs"),sm:getSize$2("sm"),md:getSize$2("md"),lg:getSize$2("lg")},numberInputTheme=defineMultiStyleConfig$a({baseStyle:baseStyle$i,sizes:sizes$7,variants:inputTheme.variants,defaultProps:inputTheme.defaultProps}),_a$2,baseStyle$h={...(_a$2=inputTheme.baseStyle)==null?void 0:_a$2.field,textAlign:"center"},sizes$6={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"}},_a2,_b,variants$8={outline:i=>{var s,o,a;return(a=(o=runIfFn$1((s=inputTheme.variants)==null?void 0:s.outline,i))==null?void 0:o.field)!=null?a:{}},flushed:i=>{var s,o,a;return(a=(o=runIfFn$1((s=inputTheme.variants)==null?void 0:s.flushed,i))==null?void 0:o.field)!=null?a:{}},filled:i=>{var s,o,a;return(a=(o=runIfFn$1((s=inputTheme.variants)==null?void 0:s.filled,i))==null?void 0:o.field)!=null?a:{}},unstyled:(_b=(_a2=inputTheme.variants)==null?void 0:_a2.unstyled.field)!=null?_b:{}},pinInputTheme={baseStyle:baseStyle$h,sizes:sizes$6,variants:variants$8,defaultProps:inputTheme.defaultProps},{defineMultiStyleConfig:defineMultiStyleConfig$9,definePartsStyle:definePartsStyle$9}=createMultiStyleConfigHelpers(popoverAnatomy.keys),$popperBg=cssVar("popper-bg"),$arrowBg=cssVar("popper-arrow-bg"),$arrowShadowColor=cssVar("popper-arrow-shadow-color"),baseStylePopper={zIndex:10},baseStyleContent={[$popperBg.variable]:"colors.white",bg:$popperBg.reference,[$arrowBg.variable]:$popperBg.reference,[$arrowShadowColor.variable]:"colors.gray.200",_dark:{[$popperBg.variable]:"colors.gray.700",[$arrowShadowColor.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},baseStyleHeader$1={px:3,py:2,borderBottomWidth:"1px"},baseStyleBody$1={px:3,py:2},baseStyleFooter$1={px:3,py:2,borderTopWidth:"1px"},baseStyleCloseButton$1={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},baseStyle$g=definePartsStyle$9({popper:baseStylePopper,content:baseStyleContent,header:baseStyleHeader$1,body:baseStyleBody$1,footer:baseStyleFooter$1,closeButton:baseStyleCloseButton$1}),popoverTheme=defineMultiStyleConfig$9({baseStyle:baseStyle$g}),{definePartsStyle:definePartsStyle$8,defineMultiStyleConfig:defineMultiStyleConfig$8}=createMultiStyleConfigHelpers(drawerAnatomy.keys),$bg$4=cssVar$1("drawer-bg"),$bs=cssVar$1("drawer-box-shadow");function getSize$1(i){return definePartsStyle$8(i==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:i}})}var baseStyleOverlay={bg:"blackAlpha.600",zIndex:"modal"},baseStyleDialogContainer={display:"flex",zIndex:"modal",justifyContent:"center"},baseStyleDialog=i=>{const{isFullHeight:s}=i;return{...s&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[$bg$4.variable]:"colors.white",[$bs.variable]:"shadows.lg",_dark:{[$bg$4.variable]:"colors.gray.700",[$bs.variable]:"shadows.dark-lg"},bg:$bg$4.reference,boxShadow:$bs.reference}},baseStyleHeader={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},baseStyleCloseButton={position:"absolute",top:"2",insetEnd:"3"},baseStyleBody={px:"6",py:"2",flex:"1",overflow:"auto"},baseStyleFooter={px:"6",py:"4"},baseStyle$f=definePartsStyle$8(i=>({overlay:baseStyleOverlay,dialogContainer:baseStyleDialogContainer,dialog:runIfFn$1(baseStyleDialog,i),header:baseStyleHeader,closeButton:baseStyleCloseButton,body:baseStyleBody,footer:baseStyleFooter})),sizes$5={xs:getSize$1("xs"),sm:getSize$1("md"),md:getSize$1("lg"),lg:getSize$1("2xl"),xl:getSize$1("4xl"),full:getSize$1("full")},drawerTheme=defineMultiStyleConfig$8({baseStyle:baseStyle$f,sizes:sizes$5,defaultProps:{size:"xs"}}),{definePartsStyle:definePartsStyle$7,defineMultiStyleConfig:defineMultiStyleConfig$7}=createMultiStyleConfigHelpers(editableAnatomy.keys),baseStylePreview={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},baseStyleInput={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},baseStyleTextarea={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},baseStyle$e=definePartsStyle$7({preview:baseStylePreview,input:baseStyleInput,textarea:baseStyleTextarea}),editableTheme=defineMultiStyleConfig$7({baseStyle:baseStyle$e}),{definePartsStyle:definePartsStyle$6,defineMultiStyleConfig:defineMultiStyleConfig$6}=createMultiStyleConfigHelpers(formAnatomy.keys),$fg$2=cssVar$1("form-control-color"),baseStyleRequiredIndicator={marginStart:"1",[$fg$2.variable]:"colors.red.500",_dark:{[$fg$2.variable]:"colors.red.300"},color:$fg$2.reference},baseStyleHelperText={mt:"2",[$fg$2.variable]:"colors.gray.600",_dark:{[$fg$2.variable]:"colors.whiteAlpha.600"},color:$fg$2.reference,lineHeight:"normal",fontSize:"sm"},baseStyle$d=definePartsStyle$6({container:{width:"100%",position:"relative"},requiredIndicator:baseStyleRequiredIndicator,helperText:baseStyleHelperText}),formTheme=defineMultiStyleConfig$6({baseStyle:baseStyle$d}),{definePartsStyle:definePartsStyle$5,defineMultiStyleConfig:defineMultiStyleConfig$5}=createMultiStyleConfigHelpers(formErrorAnatomy.keys),$fg$1=cssVar$1("form-error-color"),baseStyleText={[$fg$1.variable]:"colors.red.500",_dark:{[$fg$1.variable]:"colors.red.300"},color:$fg$1.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},baseStyleIcon$1={marginEnd:"0.5em",[$fg$1.variable]:"colors.red.500",_dark:{[$fg$1.variable]:"colors.red.300"},color:$fg$1.reference},baseStyle$c=definePartsStyle$5({text:baseStyleText,icon:baseStyleIcon$1}),formErrorTheme=defineMultiStyleConfig$5({baseStyle:baseStyle$c}),baseStyle$b={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},formLabelTheme={baseStyle:baseStyle$b},baseStyle$a={fontFamily:"heading",fontWeight:"bold"},sizes$4={"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}},headingTheme={baseStyle:baseStyle$a,sizes:sizes$4,defaultProps:{size:"xl"}},{defineMultiStyleConfig:defineMultiStyleConfig$4,definePartsStyle:definePartsStyle$4}=createMultiStyleConfigHelpers(breadcrumbAnatomy.keys),$decor=cssVar$1("breadcrumb-link-decor"),baseStyleLink={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:$decor.reference,[$decor.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[$decor.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},baseStyle$9=definePartsStyle$4({link:baseStyleLink}),breadcrumbTheme=defineMultiStyleConfig$4({baseStyle:baseStyle$9}),baseStyle$8={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"}}},variantGhost=i=>{const{colorScheme:s,theme:o}=i;if(s==="gray")return{color:mode("gray.800","whiteAlpha.900")(i),_hover:{bg:mode("gray.100","whiteAlpha.200")(i)},_active:{bg:mode("gray.200","whiteAlpha.300")(i)}};const a=transparentize(`${s}.200`,.12)(o),rt=transparentize(`${s}.200`,.24)(o);return{color:mode(`${s}.600`,`${s}.200`)(i),bg:"transparent",_hover:{bg:mode(`${s}.50`,a)(i)},_active:{bg:mode(`${s}.100`,rt)(i)}}},variantOutline=i=>{const{colorScheme:s}=i,o=mode("gray.200","whiteAlpha.300")(i);return{border:"1px solid",borderColor:s==="gray"?o:"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"},...runIfFn$1(variantGhost,i)}},accessibleColorMap={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},variantSolid$2=i=>{var s;const{colorScheme:o}=i;if(o==="gray"){const nt=mode("gray.100","whiteAlpha.200")(i);return{bg:nt,color:mode("gray.800","whiteAlpha.900")(i),_hover:{bg:mode("gray.200","whiteAlpha.300")(i),_disabled:{bg:nt}},_active:{bg:mode("gray.300","whiteAlpha.400")(i)}}}const{bg:a=`${o}.500`,color:rt="white",hoverBg:et=`${o}.600`,activeBg:ot=`${o}.700`}=(s=accessibleColorMap[o])!=null?s:{},at=mode(a,`${o}.200`)(i);return{bg:at,color:mode(rt,"gray.800")(i),_hover:{bg:mode(et,`${o}.300`)(i),_disabled:{bg:at}},_active:{bg:mode(ot,`${o}.400`)(i)}}},variantLink=i=>{const{colorScheme:s}=i;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:mode(`${s}.500`,`${s}.200`)(i),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:mode(`${s}.700`,`${s}.500`)(i)}}},variantUnstyled={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},variants$7={ghost:variantGhost,outline:variantOutline,solid:variantSolid$2,link:variantLink,unstyled:variantUnstyled},sizes$3={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"}},buttonTheme={baseStyle:baseStyle$8,variants:variants$7,sizes:sizes$3,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:definePartsStyle$3,defineMultiStyleConfig:defineMultiStyleConfig$3}=createMultiStyleConfigHelpers(cardAnatomy.keys),$bg$3=cssVar$1("card-bg"),$padding=cssVar$1("card-padding"),$shadow=cssVar$1("card-shadow"),$radius=cssVar$1("card-radius"),$border$1=cssVar$1("card-border-width","0"),$borderColor=cssVar$1("card-border-color"),baseStyle$7=definePartsStyle$3({container:{[$bg$3.variable]:"colors.chakra-body-bg",backgroundColor:$bg$3.reference,boxShadow:$shadow.reference,borderRadius:$radius.reference,color:"chakra-body-text",borderWidth:$border$1.reference,borderColor:$borderColor.reference},body:{padding:$padding.reference,flex:"1 1 0%"},header:{padding:$padding.reference},footer:{padding:$padding.reference}}),sizes$2={sm:definePartsStyle$3({container:{[$radius.variable]:"radii.base",[$padding.variable]:"space.3"}}),md:definePartsStyle$3({container:{[$radius.variable]:"radii.md",[$padding.variable]:"space.5"}}),lg:definePartsStyle$3({container:{[$radius.variable]:"radii.xl",[$padding.variable]:"space.7"}})},variants$6={elevated:definePartsStyle$3({container:{[$shadow.variable]:"shadows.base",_dark:{[$bg$3.variable]:"colors.gray.700"}}}),outline:definePartsStyle$3({container:{[$border$1.variable]:"1px",[$borderColor.variable]:"colors.chakra-border-color"}}),filled:definePartsStyle$3({container:{[$bg$3.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[$padding.variable]:0},header:{[$padding.variable]:0},footer:{[$padding.variable]:0}}},cardTheme=defineMultiStyleConfig$3({baseStyle:baseStyle$7,variants:variants$6,sizes:sizes$2,defaultProps:{variant:"elevated",size:"md"}}),$size$1=cssVar("close-button-size"),$bg$2=cssVar("close-button-bg"),baseStyle$6={w:[$size$1.reference],h:[$size$1.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[$bg$2.variable]:"colors.blackAlpha.100",_dark:{[$bg$2.variable]:"colors.whiteAlpha.100"}},_active:{[$bg$2.variable]:"colors.blackAlpha.200",_dark:{[$bg$2.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:$bg$2.reference},sizes$1={lg:{[$size$1.variable]:"sizes.10",fontSize:"md"},md:{[$size$1.variable]:"sizes.8",fontSize:"xs"},sm:{[$size$1.variable]:"sizes.6",fontSize:"2xs"}},closeButtonTheme={baseStyle:baseStyle$6,sizes:sizes$1,defaultProps:{size:"md"}},{variants:variants$5,defaultProps}=badgeTheme,baseStyle$5={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:vars.bg.reference,color:vars.color.reference,boxShadow:vars.shadow.reference},codeTheme={baseStyle:baseStyle$5,variants:variants$5,defaultProps},baseStyle$4={w:"100%",mx:"auto",maxW:"prose",px:"4"},containerTheme={baseStyle:baseStyle$4},baseStyle$3={opacity:.6,borderColor:"inherit"},variantSolid$1={borderStyle:"solid"},variantDashed={borderStyle:"dashed"},variants$4={solid:variantSolid$1,dashed:variantDashed},dividerTheme={baseStyle:baseStyle$3,variants:variants$4,defaultProps:{variant:"solid"}},{definePartsStyle:definePartsStyle$2,defineMultiStyleConfig:defineMultiStyleConfig$2}=createMultiStyleConfigHelpers(accordionAnatomy.keys),baseStyleContainer$1={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},baseStyleButton={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},baseStylePanel={pt:"2",px:"4",pb:"5"},baseStyleIcon={fontSize:"1.25em"},baseStyle$2=definePartsStyle$2({container:baseStyleContainer$1,button:baseStyleButton,panel:baseStylePanel,icon:baseStyleIcon}),accordionTheme=defineMultiStyleConfig$2({baseStyle:baseStyle$2}),{definePartsStyle:definePartsStyle$1,defineMultiStyleConfig:defineMultiStyleConfig$1}=createMultiStyleConfigHelpers(alertAnatomy.keys),$fg=cssVar$1("alert-fg"),$bg$1=cssVar$1("alert-bg"),baseStyle$1=definePartsStyle$1({container:{bg:$bg$1.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:$fg.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:$fg.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function getBg(i){const{theme:s,colorScheme:o}=i,a=transparentize(`${o}.200`,.16)(s);return{light:`colors.${o}.100`,dark:a}}var variantSubtle=definePartsStyle$1(i=>{const{colorScheme:s}=i,o=getBg(i);return{container:{[$fg.variable]:`colors.${s}.600`,[$bg$1.variable]:o.light,_dark:{[$fg.variable]:`colors.${s}.200`,[$bg$1.variable]:o.dark}}}}),variantLeftAccent=definePartsStyle$1(i=>{const{colorScheme:s}=i,o=getBg(i);return{container:{[$fg.variable]:`colors.${s}.600`,[$bg$1.variable]:o.light,_dark:{[$fg.variable]:`colors.${s}.200`,[$bg$1.variable]:o.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:$fg.reference}}}),variantTopAccent=definePartsStyle$1(i=>{const{colorScheme:s}=i,o=getBg(i);return{container:{[$fg.variable]:`colors.${s}.600`,[$bg$1.variable]:o.light,_dark:{[$fg.variable]:`colors.${s}.200`,[$bg$1.variable]:o.dark},pt:"2",borderTopWidth:"4px",borderTopColor:$fg.reference}}}),variantSolid=definePartsStyle$1(i=>{const{colorScheme:s}=i;return{container:{[$fg.variable]:"colors.white",[$bg$1.variable]:`colors.${s}.600`,_dark:{[$fg.variable]:"colors.gray.900",[$bg$1.variable]:`colors.${s}.200`},color:$fg.reference}}}),variants$3={subtle:variantSubtle,"left-accent":variantLeftAccent,"top-accent":variantTopAccent,solid:variantSolid},alertTheme=defineMultiStyleConfig$1({baseStyle:baseStyle$1,variants:variants$3,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle,defineMultiStyleConfig}=createMultiStyleConfigHelpers(avatarAnatomy.keys),$border=cssVar$1("avatar-border-color"),$bg=cssVar$1("avatar-bg"),$fs=cssVar$1("avatar-font-size"),$size=cssVar$1("avatar-size"),baseStyleBadge={borderRadius:"full",border:"0.2em solid",borderColor:$border.reference,[$border.variable]:"white",_dark:{[$border.variable]:"colors.gray.800"}},baseStyleExcessLabel={bg:$bg.reference,fontSize:$fs.reference,width:$size.reference,height:$size.reference,lineHeight:"1",[$bg.variable]:"colors.gray.200",_dark:{[$bg.variable]:"colors.whiteAlpha.400"}},baseStyleContainer=i=>{const{name:s,theme:o}=i,a=s?randomColor({string:s}):"colors.gray.400",rt=isDark(a)(o);let et="white";return rt||(et="gray.800"),{bg:$bg.reference,fontSize:$fs.reference,color:et,borderColor:$border.reference,verticalAlign:"top",width:$size.reference,height:$size.reference,"&:not([data-loaded])":{[$bg.variable]:a},[$border.variable]:"colors.white",_dark:{[$border.variable]:"colors.gray.800"}}},baseStyleLabel={fontSize:$fs.reference,lineHeight:"1"},baseStyle=definePartsStyle(i=>({badge:runIfFn$1(baseStyleBadge,i),excessLabel:runIfFn$1(baseStyleExcessLabel,i),container:runIfFn$1(baseStyleContainer,i),label:baseStyleLabel}));function getSize(i){const s=i!=="100%"?sizes_default[i]:void 0;return definePartsStyle({container:{[$size.variable]:s??i,[$fs.variable]:`calc(${s??i} / 2.5)`},excessLabel:{[$size.variable]:s??i,[$fs.variable]:`calc(${s??i} / 2.5)`}})}var sizes={"2xs":getSize(4),xs:getSize(6),sm:getSize(8),md:getSize(12),lg:getSize(16),xl:getSize(24),"2xl":getSize(32),full:getSize("100%")},avatarTheme=defineMultiStyleConfig({baseStyle,sizes,defaultProps:{size:"md"}}),components={Accordion:accordionTheme,Alert:alertTheme,Avatar:avatarTheme,Badge:badgeTheme,Breadcrumb:breadcrumbTheme,Button:buttonTheme,Checkbox:checkboxTheme,CloseButton:closeButtonTheme,Code:codeTheme,Container:containerTheme,Divider:dividerTheme,Drawer:drawerTheme,Editable:editableTheme,Form:formTheme,FormError:formErrorTheme,FormLabel:formLabelTheme,Heading:headingTheme,Input:inputTheme,Kbd:kbdTheme,Link:linkTheme,List:listTheme,Menu:menuTheme,Modal:modalTheme,NumberInput:numberInputTheme,PinInput:pinInputTheme,Popover:popoverTheme,Progress:progressTheme,Radio:radioTheme,Select:selectTheme,Skeleton:skeletonTheme,SkipLink:skipLinkTheme,Slider:sliderTheme,Spinner:spinnerTheme,Stat:statTheme,Switch:switchTheme,Table:tableTheme,Tabs:tabsTheme,Tag:tagTheme,Textarea:textareaTheme,Tooltip:tooltipTheme,Card:cardTheme,Stepper:stepperTheme},semanticTokens={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"}}},styles={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"}}},direction="ltr",config$1={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},theme$1={semanticTokens,direction,...foundations,components,styles,config:config$1};function isFunction$2(i){return typeof i=="function"}function pipe$1(...i){return s=>i.reduce((o,a)=>a(o),s)}var createExtendTheme=i=>function(...o){let a=[...o],rt=o[o.length-1];return isChakraTheme(rt)&&a.length>1?a=a.slice(0,a.length-1):rt=i,pipe$1(...a.map(et=>ot=>isFunction$2(et)?et(ot):mergeThemeOverride(ot,et)))(rt)},extendTheme=createExtendTheme(theme$1);function mergeThemeOverride(...i){return mergeWith({},...i,mergeThemeCustomizer)}function mergeThemeCustomizer(i,s,o,a){if((isFunction$2(i)||isFunction$2(s))&&Object.prototype.hasOwnProperty.call(a,o))return(...rt)=>{const et=isFunction$2(i)?i(...rt):i,ot=isFunction$2(s)?s(...rt):s;return mergeWith({},et,ot,mergeThemeCustomizer)}}function canUseDOM$1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var isBrowser$1=canUseDOM$1();function omit$1(i,s){const o={};return Object.keys(i).forEach(a=>{s.includes(a)||(o[a]=i[a])}),o}function get$2(i,s,o,a){const rt=typeof s=="string"?s.split("."):[s];for(a=0;a{const s=new WeakMap;return(a,rt,et,ot)=>{if(typeof a>"u")return i(a,rt,et);s.has(a)||s.set(a,new Map);const at=s.get(a);if(at.has(rt))return at.get(rt);const nt=i(a,rt,et,ot);return at.set(rt,nt),nt}},memoizedGet=memoize$1(get$2);function objectFilter(i,s){const o={};return Object.keys(i).forEach(a=>{const rt=i[a];s(rt,a,i)&&(o[a]=rt)}),o}var filterUndefined=i=>objectFilter(i,s=>s!=null);function isFunction$1(i){return typeof i=="function"}function runIfFn(i,...s){return isFunction$1(i)?i(...s):i}function callAllHandlers(...i){return function(o){i.some(a=>(a==null||a(o),o==null?void 0:o.defaultPrevented))}}var hasElementType=typeof Element<"u",hasMap=typeof Map=="function",hasSet=typeof Set=="function",hasArrayBuffer=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function equal$1(i,s){if(i===s)return!0;if(i&&s&&typeof i=="object"&&typeof s=="object"){if(i.constructor!==s.constructor)return!1;var o,a,rt;if(Array.isArray(i)){if(o=i.length,o!=s.length)return!1;for(a=o;a--!==0;)if(!equal$1(i[a],s[a]))return!1;return!0}var et;if(hasMap&&i instanceof Map&&s instanceof Map){if(i.size!==s.size)return!1;for(et=i.entries();!(a=et.next()).done;)if(!s.has(a.value[0]))return!1;for(et=i.entries();!(a=et.next()).done;)if(!equal$1(a.value[1],s.get(a.value[0])))return!1;return!0}if(hasSet&&i instanceof Set&&s instanceof Set){if(i.size!==s.size)return!1;for(et=i.entries();!(a=et.next()).done;)if(!s.has(a.value[0]))return!1;return!0}if(hasArrayBuffer&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(s)){if(o=i.length,o!=s.length)return!1;for(a=o;a--!==0;)if(i[a]!==s[a])return!1;return!0}if(i.constructor===RegExp)return i.source===s.source&&i.flags===s.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof s.valueOf=="function")return i.valueOf()===s.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof s.toString=="function")return i.toString()===s.toString();if(rt=Object.keys(i),o=rt.length,o!==Object.keys(s).length)return!1;for(a=o;a--!==0;)if(!Object.prototype.hasOwnProperty.call(s,rt[a]))return!1;if(hasElementType&&i instanceof Element)return!1;for(a=o;a--!==0;)if(!((rt[a]==="_owner"||rt[a]==="__v"||rt[a]==="__o")&&i.$$typeof)&&!equal$1(i[rt[a]],s[rt[a]]))return!1;return!0}return i!==i&&s!==s}var reactFastCompare=function(s,o){try{return equal$1(s,o)}catch(a){if((a.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw a}};const isEqual$2=getDefaultExportFromCjs(reactFastCompare);function useStyleConfigImpl(i,s={}){var o;const{styleConfig:a,...rt}=s,{theme:et,colorMode:ot}=useChakra(),at=i?memoizedGet(et,`components.${i}`):void 0,nt=a||at,it=mergeWith({theme:et,colorMode:ot},(o=nt==null?void 0:nt.defaultProps)!=null?o:{},filterUndefined(omit$1(rt,["children"]))),j=reactExports.useRef({});if(nt){const $=resolveStyleConfig(nt)(it);isEqual$2(j.current,$)||(j.current=$)}return j.current}function useStyleConfig(i,s={}){return useStyleConfigImpl(i,s)}function useMultiStyleConfig(i,s={}){return useStyleConfigImpl(i,s)}var allPropNames=new Set([...propNames,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),validHTMLProps=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function shouldForwardProp(i){return validHTMLProps.has(i)||!allPropNames.has(i)}function assignAfter(i,...s){if(i==null)throw new TypeError("Cannot convert undefined or null to object");const o={...i};for(const a of s)if(a!=null)for(const rt in a)Object.prototype.hasOwnProperty.call(a,rt)&&(rt in o&&delete o[rt],o[rt]=a[rt]);return o}function compact(i){const s=Object.assign({},i);for(let o in s)s[o]===void 0&&delete s[o];return s}var reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|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)-.*))$/,isPropValid=memoize$3(function(i){return reactPropsRegex.test(i)||i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)<91}),testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function(s){return s!=="theme"},getDefaultShouldForwardProp=function(s){return typeof s=="string"&&s.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function(s,o,a){var rt;if(o){var et=o.shouldForwardProp;rt=s.__emotion_forwardProp&&et?function(ot){return s.__emotion_forwardProp(ot)&&et(ot)}:et}return typeof rt!="function"&&a&&(rt=s.__emotion_forwardProp),rt},Insertion=function(s){var o=s.cache,a=s.serialized,rt=s.isStringTag;return registerStyles(o,a,rt),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(o,a,rt)}),null},createStyled=function i(s,o){var a=s.__emotion_real===s,rt=a&&s.__emotion_base||s,et,ot;o!==void 0&&(et=o.label,ot=o.target);var at=composeShouldForwardProps(s,o,a),nt=at||getDefaultShouldForwardProp(rt),it=!nt("as");return function(){var j=arguments,_=a&&s.__emotion_styles!==void 0?s.__emotion_styles.slice(0):[];if(et!==void 0&&_.push("label:"+et+";"),j[0]==null||j[0].raw===void 0)_.push.apply(_,j);else{_.push(j[0][0]);for(var $=j.length,tt=1;tt<$;tt++)_.push(j[tt],j[0][tt])}var st=withEmotionCache(function(lt,ct,ht){var ut=it&<.as||rt,pt="",mt=[],vt=lt;if(lt.theme==null){vt={};for(var dt in lt)vt[dt]=lt[dt];vt.theme=reactExports.useContext(ThemeContext)}typeof lt.className=="string"?pt=getRegisteredStyles(ct.registered,mt,lt.className):lt.className!=null&&(pt=lt.className+" ");var St=serializeStyles(_.concat(mt),ct.registered,vt);pt+=ct.key+"-"+St.name,ot!==void 0&&(pt+=" "+ot);var yt=it&&at===void 0?getDefaultShouldForwardProp(ut):nt,gt={};for(var Et in lt)it&&Et==="as"||yt(Et)&&(gt[Et]=lt[Et]);return gt.className=pt,ht&&(gt.ref=ht),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:ct,serialized:St,isStringTag:typeof ut=="string"}),reactExports.createElement(ut,gt))});return st.displayName=et!==void 0?et:"Styled("+(typeof rt=="string"?rt:rt.displayName||rt.name||"Component")+")",st.defaultProps=s.defaultProps,st.__emotion_real=st,st.__emotion_base=rt,st.__emotion_styles=_,st.__emotion_forwardProp=at,Object.defineProperty(st,"toString",{value:function(){return"."+ot}}),st.withComponent=function(lt,ct){return i(lt,_extends$1({},o,ct,{shouldForwardProp:composeShouldForwardProps(st,ct,!0)})).apply(void 0,_)},st}},tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],newStyled=createStyled.bind();tags.forEach(function(i){newStyled[i]=newStyled(i)});var _a$1,emotion_styled=(_a$1=newStyled.default)!=null?_a$1:newStyled,toCSSObject=({baseStyle:i})=>s=>{const{theme:o,css:a,__css:rt,sx:et,...ot}=s,at=objectFilter(ot,(_,$)=>isStyleProp($)),nt=runIfFn(i,s),it=assignAfter({},rt,nt,filterUndefined(at),et),j=css(it)(s.theme);return a?[j,a]:j};function styled(i,s){const{baseStyle:o,...a}=s??{};a.shouldForwardProp||(a.shouldForwardProp=shouldForwardProp);const rt=toCSSObject({baseStyle:o}),et=emotion_styled(i,a)(rt);return React$4.forwardRef(function(nt,it){const{colorMode:j,forced:_}=useColorMode();return React$4.createElement(et,{ref:it,"data-theme":_?j:void 0,...nt})})}function factory(){const i=new Map;return new Proxy(styled,{apply(s,o,a){return styled(...a)},get(s,o){return i.has(o)||i.set(o,styled(o)),i.get(o)}})}var chakra=factory();function forwardRef(i){return reactExports.forwardRef(i)}function createContext$1(i={}){const{strict:s=!0,errorMessage:o="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:a}=i,rt=reactExports.createContext(void 0);rt.displayName=a;function et(){var ot;const at=reactExports.useContext(rt);if(!at&&s){const nt=new Error(o);throw nt.name="ContextError",(ot=Error.captureStackTrace)==null||ot.call(Error,nt,et),nt}return at}return[rt.Provider,et,rt]}function ThemeProvider(i){const{cssVarsRoot:s,theme:o,children:a}=i,rt=reactExports.useMemo(()=>toCSSVar(o),[o]);return jsxRuntimeExports.jsxs(ThemeProvider$1,{theme:rt,children:[jsxRuntimeExports.jsx(CSSVars,{root:s}),a]})}function CSSVars({root:i=":host, :root"}){const s=[i,"[data-theme]"].join(",");return jsxRuntimeExports.jsx(Global,{styles:o=>({[s]:o.__cssVars})})}createContext$1({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function createStylesContext(i){return createContext$1({name:`${i}StylesContext`,errorMessage:`useStyles: "styles" is undefined. Seems you forgot to wrap the components in "<${i} />" `})}function GlobalStyle(){const{colorMode:i}=useColorMode();return jsxRuntimeExports.jsx(Global,{styles:s=>{const o=memoizedGet(s,"styles.global"),a=runIfFn(o,{theme:s,colorMode:i});return a?css(a)(s):void 0}})}var EnvironmentContext=reactExports.createContext({getDocument(){return document},getWindow(){return window}});EnvironmentContext.displayName="EnvironmentContext";function EnvironmentProvider(i){const{children:s,environment:o,disabled:a}=i,rt=reactExports.useRef(null),et=reactExports.useMemo(()=>o||{getDocument:()=>{var at,nt;return(nt=(at=rt.current)==null?void 0:at.ownerDocument)!=null?nt:document},getWindow:()=>{var at,nt;return(nt=(at=rt.current)==null?void 0:at.ownerDocument.defaultView)!=null?nt:window}},[o]),ot=!a||!o;return jsxRuntimeExports.jsxs(EnvironmentContext.Provider,{value:et,children:[s,ot&&jsxRuntimeExports.jsx("span",{id:"__chakra_env",hidden:!0,ref:rt})]})}EnvironmentProvider.displayName="EnvironmentProvider";var ChakraProvider$1=i=>{const{children:s,colorModeManager:o,portalZIndex:a,resetScope:rt,resetCSS:et=!0,theme:ot={},environment:at,cssVarsRoot:nt,disableEnvironment:it,disableGlobalStyle:j}=i,_=jsxRuntimeExports.jsx(EnvironmentProvider,{environment:at,disabled:it,children:s});return jsxRuntimeExports.jsx(ThemeProvider,{theme:ot,cssVarsRoot:nt,children:jsxRuntimeExports.jsxs(ColorModeProvider,{colorModeManager:o,options:ot.config,children:[et?jsxRuntimeExports.jsx(CSSReset,{scope:rt}):jsxRuntimeExports.jsx(CSSPolyfill,{}),!j&&jsxRuntimeExports.jsx(GlobalStyle,{}),a?jsxRuntimeExports.jsx(PortalManager,{zIndex:a,children:_}):_]})})},findById=(i,s)=>i.find(o=>o.id===s);function findToast(i,s){const o=getToastPosition(i,s),a=o?i[o].findIndex(rt=>rt.id===s):-1;return{position:o,index:a}}function getToastPosition(i,s){for(const[o,a]of Object.entries(i))if(findById(a,s))return o}function getToastStyle(i){const s=i.includes("right"),o=i.includes("left");let a="center";return s&&(a="flex-end"),o&&(a="flex-start"),{display:"flex",flexDirection:"column",alignItems:a}}function getToastListStyle(i){const o=i==="top"||i==="bottom"?"0 auto":void 0,a=i.includes("top")?"env(safe-area-inset-top, 0px)":void 0,rt=i.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,et=i.includes("left")?void 0:"env(safe-area-inset-right, 0px)",ot=i.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:o,top:a,bottom:rt,right:et,left:ot}}function useCallbackRef$2(i,s=[]){const o=reactExports.useRef(i);return reactExports.useEffect(()=>{o.current=i}),reactExports.useCallback((...a)=>{var rt;return(rt=o.current)==null?void 0:rt.call(o,...a)},s)}function useTimeout(i,s){const o=useCallbackRef$2(i);reactExports.useEffect(()=>{if(s==null)return;let a=null;return a=window.setTimeout(()=>{o()},s),()=>{a&&window.clearTimeout(a)}},[s,o])}function useUpdateEffect(i,s){const o=reactExports.useRef(!1),a=reactExports.useRef(!1);reactExports.useEffect(()=>{if(o.current&&a.current)return i();a.current=!0},s),reactExports.useEffect(()=>(o.current=!0,()=>{o.current=!1}),[])}const MotionConfigContext=reactExports.createContext({transformPagePoint:i=>i,isStatic:!1,reducedMotion:"never"}),MotionContext=reactExports.createContext({}),PresenceContext=reactExports.createContext(null),isBrowser=typeof document<"u",useIsomorphicLayoutEffect$1=isBrowser?reactExports.useLayoutEffect:reactExports.useEffect,LazyContext=reactExports.createContext({strict:!1}),camelToDash=i=>i.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId),MotionGlobalConfig={skipAnimations:!1,useManualTiming:!1};function createRenderStep(i){let s=new Set,o=new Set,a=!1,rt=!1;const et=new WeakSet;let ot={delta:0,timestamp:0,isProcessing:!1};function at(it){et.has(it)&&(nt.schedule(it),i()),it(ot)}const nt={schedule:(it,j=!1,_=!1)=>{const tt=_&&a?s:o;return j&&et.add(it),tt.has(it)||tt.add(it),it},cancel:it=>{o.delete(it),et.delete(it)},process:it=>{if(ot=it,a){rt=!0;return}a=!0,[s,o]=[o,s],o.clear(),s.forEach(at),a=!1,rt&&(rt=!1,nt.process(it))}};return nt}const stepsOrder=["read","resolveKeyframes","update","preRender","render","postRender"],maxElapsed=40;function createRenderBatcher(i,s){let o=!1,a=!0;const rt={delta:0,timestamp:0,isProcessing:!1},et=()=>o=!0,ot=stepsOrder.reduce((ht,ut)=>(ht[ut]=createRenderStep(et),ht),{}),{read:at,resolveKeyframes:nt,update:it,preRender:j,render:_,postRender:$}=ot,tt=()=>{const ht=performance.now();o=!1,rt.delta=a?1e3/60:Math.max(Math.min(ht-rt.timestamp,maxElapsed),1),rt.timestamp=ht,rt.isProcessing=!0,at.process(rt),nt.process(rt),it.process(rt),j.process(rt),_.process(rt),$.process(rt),rt.isProcessing=!1,o&&s&&(a=!1,i(tt))},st=()=>{o=!0,a=!0,rt.isProcessing||i(tt)};return{schedule:stepsOrder.reduce((ht,ut)=>{const pt=ot[ut];return ht[ut]=(mt,vt=!1,dt=!1)=>(o||st(),pt.schedule(mt,vt,dt)),ht},{}),cancel:ht=>{for(let ut=0;ut{j&&j.update(o,at)});const $=reactExports.useRef(!!(o[optimizedAppearDataAttribute]&&!window.HandoffComplete));return useIsomorphicLayoutEffect$1(()=>{j&&(j.updateFeatures(),microtask.render(j.render),$.current&&j.animationState&&j.animationState.animateChanges())}),reactExports.useEffect(()=>{j&&(!$.current&&j.animationState&&j.animationState.animateChanges(),$.current&&($.current=!1,scheduleHandoffComplete||(scheduleHandoffComplete=!0,queueMicrotask(completeHandoff))))}),j}function completeHandoff(){window.HandoffComplete=!0}function createProjectionNode$1(i,s,o,a){const{layoutId:rt,layout:et,drag:ot,dragConstraints:at,layoutScroll:nt,layoutRoot:it}=s;i.projection=new o(i.latestValues,s["data-framer-portal-id"]?void 0:getClosestProjectingNode(i.parent)),i.projection.setOptions({layoutId:rt,layout:et,alwaysMeasureLayout:!!ot||at&&isRefObject(at),visualElement:i,scheduleRender:()=>i.scheduleRender(),animationType:typeof et=="string"?et:"both",initialPromotionConfig:a,layoutScroll:nt,layoutRoot:it})}function getClosestProjectingNode(i){if(i)return i.options.allowProjection!==!1?i.projection:getClosestProjectingNode(i.parent)}function useMotionRef(i,s,o){return reactExports.useCallback(a=>{a&&i.mount&&i.mount(a),s&&(a?s.mount(a):s.unmount()),o&&(typeof o=="function"?o(a):isRefObject(o)&&(o.current=a))},[s])}function isVariantLabel(i){return typeof i=="string"||Array.isArray(i)}function isAnimationControls(i){return i!==null&&typeof i=="object"&&typeof i.start=="function"}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder];function isControllingVariants(i){return isAnimationControls(i.animate)||variantProps.some(s=>isVariantLabel(i[s]))}function isVariantNode(i){return!!(isControllingVariants(i)||i.variants)}function getCurrentTreeVariants(i,s){if(isControllingVariants(i)){const{initial:o,animate:a}=i;return{initial:o===!1||isVariantLabel(o)?o:void 0,animate:isVariantLabel(a)?a:void 0}}return i.inherit!==!1?s:{}}function useCreateMotionContext(i){const{initial:s,animate:o}=getCurrentTreeVariants(i,reactExports.useContext(MotionContext));return reactExports.useMemo(()=>({initial:s,animate:o}),[variantLabelsAsDependency(s),variantLabelsAsDependency(o)])}function variantLabelsAsDependency(i){return Array.isArray(i)?i.join(" "):i}const featureProps={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"]},featureDefinitions={};for(const i in featureProps)featureDefinitions[i]={isEnabled:s=>featureProps[i].some(o=>!!s[o])};function loadFeatures(i){for(const s in i)featureDefinitions[s]={...featureDefinitions[s],...i[s]}}const LayoutGroupContext=reactExports.createContext({}),motionComponentSymbol=Symbol.for("motionComponentSymbol"),noop$1=i=>i;let invariant=noop$1;function createMotionComponent({preloadedFeatures:i,createVisualElement:s,useRender:o,useVisualState:a,Component:rt}){i&&loadFeatures(i);function et(at,nt){let it;const j={...reactExports.useContext(MotionConfigContext),...at,layoutId:useLayoutId(at)},{isStatic:_}=j,$=useCreateMotionContext(at),tt=a(at,_);if(!_&&isBrowser){useStrictMode();const st=getProjectionFunctionality(j);it=st.MeasureLayout,$.visualElement=useVisualElement(rt,tt,j,s,st.ProjectionNode)}return jsxRuntimeExports.jsxs(MotionContext.Provider,{value:$,children:[it&&$.visualElement?jsxRuntimeExports.jsx(it,{visualElement:$.visualElement,...j}):null,o(rt,at,useMotionRef(tt,$.visualElement,nt),tt,_,$.visualElement)]})}const ot=reactExports.forwardRef(et);return ot[motionComponentSymbol]=rt,ot}function useLayoutId({layoutId:i}){const s=reactExports.useContext(LayoutGroupContext).id;return s&&i!==void 0?s+"-"+i:i}function useStrictMode(i,s){reactExports.useContext(LazyContext).strict}function getProjectionFunctionality(i){const{drag:s,layout:o}=featureDefinitions;if(!s&&!o)return{};const a={...s,...o};return{MeasureLayout:s!=null&&s.isEnabled(i)||o!=null&&o.isEnabled(i)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}function createMotionProxy(i){function s(a,rt={}){return createMotionComponent(i(a,rt))}if(typeof Proxy>"u")return s;const o=new Map;return new Proxy(s,{get:(a,rt)=>(o.has(rt)||o.set(rt,s(rt)),o.get(rt))})}const lowercaseSVGElements=["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 isSVGComponent(i){return typeof i!="string"||i.includes("-")?!1:!!(lowercaseSVGElements.indexOf(i)>-1||/[A-Z]/u.test(i))}const scaleCorrectors={};function addScaleCorrector(i){Object.assign(scaleCorrectors,i)}const transformPropOrder=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],transformProps=new Set(transformPropOrder);function isForcedMotionValue(i,{layout:s,layoutId:o}){return transformProps.has(i)||i.startsWith("origin")||(s||o!==void 0)&&(!!scaleCorrectors[i]||i==="opacity")}const isMotionValue=i=>!!(i&&i.getVelocity),translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(i,s,o){let a="";for(let rt=0;rts=>typeof s=="string"&&s.startsWith(i),isCSSVariableName=checkStringStartsWith("--"),startsAsVariableToken=checkStringStartsWith("var(--"),isCSSVariableToken=i=>startsAsVariableToken(i)?singleCssVariableRegex.test(i.split("/*")[0].trim()):!1,singleCssVariableRegex=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,getValueAsType=(i,s)=>s&&typeof i=="number"?s.transform(i):i,clamp=(i,s,o)=>o>s?s:otypeof i=="number",parse:parseFloat,transform:i=>i},alpha={...number,transform:i=>clamp(0,1,i)},scale={...number,default:1},sanitize=i=>Math.round(i*1e5)/1e5,floatRegex=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,colorRegex=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,singleColorRegex=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function isString$1(i){return typeof i=="string"}function isNullish(i){return i==null}const createUnitType=i=>({test:s=>isString$1(s)&&s.endsWith(i)&&s.split(" ").length===1,parse:parseFloat,transform:s=>`${s}${i}`}),degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),vh=createUnitType("vh"),vw=createUnitType("vw"),progressPercentage={...percent,parse:i=>percent.parse(i)/100,transform:i=>percent.transform(i*100)},int={...number,transform:Math.round},numberValueTypes={borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,size:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px,zIndex:int,backgroundPositionX:px,backgroundPositionY:px,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int};function buildHTMLStyles(i,s,o){const{style:a,vars:rt,transform:et,transformOrigin:ot}=i;let at=!1,nt=!1,it=!0;for(const j in s){const _=s[j];if(isCSSVariableName(j)){rt[j]=_;continue}const $=numberValueTypes[j],tt=getValueAsType(_,$);if(transformProps.has(j)){if(at=!0,et[j]=tt,!it)continue;_!==($.default||0)&&(it=!1)}else j.startsWith("origin")?(nt=!0,ot[j]=tt):a[j]=tt}if(s.transform||(at||o?a.transform=buildTransform(i.transform,it,o):a.transform&&(a.transform="none")),nt){const{originX:j="50%",originY:_="50%",originZ:$=0}=ot;a.transformOrigin=`${j} ${_} ${$}`}}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function copyRawValuesOnly(i,s,o){for(const a in s)!isMotionValue(s[a])&&!isForcedMotionValue(a,o)&&(i[a]=s[a])}function useInitialMotionValues({transformTemplate:i},s){return reactExports.useMemo(()=>{const o=createHtmlRenderState();return buildHTMLStyles(o,s,i),Object.assign({},o.vars,o.style)},[s])}function useStyle(i,s){const o=i.style||{},a={};return copyRawValuesOnly(a,o,i),Object.assign(a,useInitialMotionValues(i,s)),a}function useHTMLProps(i,s){const o={},a=useStyle(i,s);return i.drag&&i.dragListener!==!1&&(o.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=i.drag===!0?"none":`pan-${i.drag==="x"?"y":"x"}`),i.tabIndex===void 0&&(i.onTap||i.onTapStart||i.whileTap)&&(o.tabIndex=0),o.style=a,o}const validMotionProps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function isValidMotionProp(i){return i.startsWith("while")||i.startsWith("drag")&&i!=="draggable"||i.startsWith("layout")||i.startsWith("onTap")||i.startsWith("onPan")||i.startsWith("onLayout")||validMotionProps.has(i)}let shouldForward=i=>!isValidMotionProp(i);function loadExternalIsValidProp(i){i&&(shouldForward=s=>s.startsWith("on")?!isValidMotionProp(s):i(s))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch{}function filterProps(i,s,o){const a={};for(const rt in i)rt==="values"&&typeof i.values=="object"||(shouldForward(rt)||o===!0&&isValidMotionProp(rt)||!s&&!isValidMotionProp(rt)||i.draggable&&rt.startsWith("onDrag"))&&(a[rt]=i[rt]);return a}function calcOrigin$1(i,s,o){return typeof i=="string"?i:px.transform(s+o*i)}function calcSVGTransformOrigin(i,s,o){const a=calcOrigin$1(s,i.x,i.width),rt=calcOrigin$1(o,i.y,i.height);return`${a} ${rt}`}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(i,s,o=1,a=0,rt=!0){i.pathLength=1;const et=rt?dashKeys:camelKeys;i[et.offset]=px.transform(-a);const ot=px.transform(s),at=px.transform(o);i[et.array]=`${ot} ${at}`}function buildSVGAttrs(i,{attrX:s,attrY:o,attrScale:a,originX:rt,originY:et,pathLength:ot,pathSpacing:at=1,pathOffset:nt=0,...it},j,_){if(buildHTMLStyles(i,it,_),j){i.style.viewBox&&(i.attrs.viewBox=i.style.viewBox);return}i.attrs=i.style,i.style={};const{attrs:$,style:tt,dimensions:st}=i;$.transform&&(st&&(tt.transform=$.transform),delete $.transform),st&&(rt!==void 0||et!==void 0||tt.transform)&&(tt.transformOrigin=calcSVGTransformOrigin(st,rt!==void 0?rt:.5,et!==void 0?et:.5)),s!==void 0&&($.x=s),o!==void 0&&($.y=o),a!==void 0&&($.scale=a),ot!==void 0&&buildSVGPath($,ot,at,nt,!1)}const createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=i=>typeof i=="string"&&i.toLowerCase()==="svg";function useSVGProps(i,s,o,a){const rt=reactExports.useMemo(()=>{const et=createSvgRenderState();return buildSVGAttrs(et,s,isSVGTag(a),i.transformTemplate),{...et.attrs,style:{...et.style}}},[s]);if(i.style){const et={};copyRawValuesOnly(et,i.style,i),rt.style={...et,...rt.style}}return rt}function createUseRender(i=!1){return(o,a,rt,{latestValues:et},ot)=>{const nt=(isSVGComponent(o)?useSVGProps:useHTMLProps)(a,et,ot,o),it=filterProps(a,typeof o=="string",i),j=o!==reactExports.Fragment?{...it,...nt,ref:rt}:{},{children:_}=a,$=reactExports.useMemo(()=>isMotionValue(_)?_.get():_,[_]);return reactExports.createElement(o,{...j,children:$})}}function renderHTML(i,{style:s,vars:o},a,rt){Object.assign(i.style,s,rt&&rt.getProjectionStyles(a));for(const et in o)i.style.setProperty(et,o[et])}const camelCaseAttributes=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 renderSVG(i,s,o,a){renderHTML(i,s,void 0,a);for(const rt in s.attrs)i.setAttribute(camelCaseAttributes.has(rt)?rt:camelToDash(rt),s.attrs[rt])}function scrapeMotionValuesFromProps$1(i,s,o){var a;const{style:rt}=i,et={};for(const ot in rt)(isMotionValue(rt[ot])||s.style&&isMotionValue(s.style[ot])||isForcedMotionValue(ot,i)||((a=o==null?void 0:o.getValue(ot))===null||a===void 0?void 0:a.liveStyle)!==void 0)&&(et[ot]=rt[ot]);return o&&rt&&typeof rt.willChange=="string"&&(o.applyWillChange=!1),et}function scrapeMotionValuesFromProps(i,s,o){const a=scrapeMotionValuesFromProps$1(i,s,o);for(const rt in i)if(isMotionValue(i[rt])||isMotionValue(s[rt])){const et=transformPropOrder.indexOf(rt)!==-1?"attr"+rt.charAt(0).toUpperCase()+rt.substring(1):rt;a[et]=i[rt]}return a}function getValueState(i){const s=[{},{}];return i==null||i.values.forEach((o,a)=>{s[0][a]=o.get(),s[1][a]=o.getVelocity()}),s}function resolveVariantFromProps(i,s,o,a){if(typeof s=="function"){const[rt,et]=getValueState(a);s=s(o!==void 0?o:i.custom,rt,et)}if(typeof s=="string"&&(s=i.variants&&i.variants[s]),typeof s=="function"){const[rt,et]=getValueState(a);s=s(o!==void 0?o:i.custom,rt,et)}return s}function useConstant(i){const s=reactExports.useRef(null);return s.current===null&&(s.current=i()),s.current}const isKeyframesTarget=i=>Array.isArray(i),isCustomValue=i=>!!(i&&typeof i=="object"&&i.mix&&i.toValue),resolveFinalValueInKeyframes=i=>isKeyframesTarget(i)?i[i.length-1]||0:i;function resolveMotionValue(i){const s=isMotionValue(i)?i.get():i;return isCustomValue(s)?s.toValue():s}const acceleratedValues=new Set(["opacity","clipPath","filter","transform"]);function getWillChangeName(i){if(transformProps.has(i))return"transform";if(acceleratedValues.has(i))return camelToDash(i)}function addUniqueItem(i,s){i.indexOf(s)===-1&&i.push(s)}function removeItem(i,s){const o=i.indexOf(s);o>-1&&i.splice(o,1)}function makeState({applyWillChange:i=!1,scrapeMotionValuesFromProps:s,createRenderState:o,onMount:a},rt,et,ot,at){const nt={latestValues:makeLatestValues(rt,et,ot,at?!1:i,s),renderState:o()};return a&&(nt.mount=it=>a(rt,it,nt)),nt}const makeUseVisualState=i=>(s,o)=>{const a=reactExports.useContext(MotionContext),rt=reactExports.useContext(PresenceContext),et=()=>makeState(i,s,a,rt,o);return o?et():useConstant(et)};function addWillChange(i,s){const o=getWillChangeName(s);o&&addUniqueItem(i,o)}function forEachDefinition(i,s,o){const a=Array.isArray(s)?s:[s];for(let rt=0;rt{for(const ut in ct){let pt=ct[ut];if(Array.isArray(pt)){const mt=st?pt.length-1:0;pt=pt[mt]}pt!==null&&(ot[ut]=pt)}for(const ut in ht)ot[ut]=ht[ut]}),nt&&(_&&j!==!1&&!isAnimationControls(_)&&forEachDefinition(i,_,ct=>{for(const ht in ct)addWillChange(at,ht)}),at.length&&(ot.willChange=at.join(","))),ot}const{schedule:frame,cancel:cancelFrame,state:frameData,steps}=createRenderBatcher(typeof requestAnimationFrame<"u"?requestAnimationFrame:noop$1,!0),svgMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState,onMount:(i,s,{renderState:o,latestValues:a})=>{frame.read(()=>{try{o.dimensions=typeof s.getBBox=="function"?s.getBBox():s.getBoundingClientRect()}catch{o.dimensions={x:0,y:0,width:0,height:0}}}),frame.render(()=>{buildSVGAttrs(o,a,isSVGTag(s.tagName),i.transformTemplate),renderSVG(s,o)})}})},htmlMotionConfig={useVisualState:makeUseVisualState({applyWillChange:!0,scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState})};function createDomMotionConfig(i,{forwardMotionProps:s=!1},o,a){return{...isSVGComponent(i)?svgMotionConfig:htmlMotionConfig,preloadedFeatures:o,useRender:createUseRender(s),createVisualElement:a,Component:i}}function addDomEvent(i,s,o,a={passive:!0}){return i.addEventListener(s,o,a),()=>i.removeEventListener(s,o)}const isPrimaryPointer=i=>i.pointerType==="mouse"?typeof i.button!="number"||i.button<=0:i.isPrimary!==!1;function extractEventInfo(i,s="page"){return{point:{x:i[`${s}X`],y:i[`${s}Y`]}}}const addPointerInfo=i=>s=>isPrimaryPointer(s)&&i(s,extractEventInfo(s));function addPointerEvent(i,s,o,a){return addDomEvent(i,s,addPointerInfo(o),a)}const combineFunctions=(i,s)=>o=>s(i(o)),pipe=(...i)=>i.reduce(combineFunctions);function createLock(i){let s=null;return()=>{const o=()=>{s=null};return s===null?(s=i,o):!1}}const globalHorizontalLock=createLock("dragHorizontal"),globalVerticalLock=createLock("dragVertical");function getGlobalLock(i){let s=!1;if(i==="y")s=globalVerticalLock();else if(i==="x")s=globalHorizontalLock();else{const o=globalHorizontalLock(),a=globalVerticalLock();o&&a?s=()=>{o(),a()}:(o&&o(),a&&a())}return s}function isDragActive(){const i=getGlobalLock(!0);return i?(i(),!1):!0}class Feature{constructor(s){this.isMounted=!1,this.node=s}update(){}}function addHoverEvent(i,s){const o=s?"pointerenter":"pointerleave",a=s?"onHoverStart":"onHoverEnd",rt=(et,ot)=>{if(et.pointerType==="touch"||isDragActive())return;const at=i.getProps();i.animationState&&at.whileHover&&i.animationState.setActive("whileHover",s);const nt=at[a];nt&&frame.postRender(()=>nt(et,ot))};return addPointerEvent(i.current,o,rt,{passive:!i.getProps()[a]})}class HoverGesture extends Feature{mount(){this.unmount=pipe(addHoverEvent(this.node,!0),addHoverEvent(this.node,!1))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let s=!1;try{s=this.node.current.matches(":focus-visible")}catch{s=!0}!s||!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=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const isNodeOrChild=(i,s)=>s?i===s?!0:isNodeOrChild(i,s.parentElement):!1;function fireSyntheticPointerEvent(i,s){if(!s)return;const o=new PointerEvent("pointer"+i);s(o,extractEventInfo(o))}class PressGesture extends Feature{constructor(){super(...arguments),this.removeStartListeners=noop$1,this.removeEndListeners=noop$1,this.removeAccessibleListeners=noop$1,this.startPointerPress=(s,o)=>{if(this.isPressing)return;this.removeEndListeners();const a=this.node.getProps(),et=addPointerEvent(window,"pointerup",(at,nt)=>{if(!this.checkPressEnd())return;const{onTap:it,onTapCancel:j,globalTapTarget:_}=this.node.getProps(),$=!_&&!isNodeOrChild(this.node.current,at.target)?j:it;$&&frame.update(()=>$(at,nt))},{passive:!(a.onTap||a.onPointerUp)}),ot=addPointerEvent(window,"pointercancel",(at,nt)=>this.cancelPress(at,nt),{passive:!(a.onTapCancel||a.onPointerCancel)});this.removeEndListeners=pipe(et,ot),this.startPress(s,o)},this.startAccessiblePress=()=>{const s=et=>{if(et.key!=="Enter"||this.isPressing)return;const ot=at=>{at.key!=="Enter"||!this.checkPressEnd()||fireSyntheticPointerEvent("up",(nt,it)=>{const{onTap:j}=this.node.getProps();j&&frame.postRender(()=>j(nt,it))})};this.removeEndListeners(),this.removeEndListeners=addDomEvent(this.node.current,"keyup",ot),fireSyntheticPointerEvent("down",(at,nt)=>{this.startPress(at,nt)})},o=addDomEvent(this.node.current,"keydown",s),a=()=>{this.isPressing&&fireSyntheticPointerEvent("cancel",(et,ot)=>this.cancelPress(et,ot))},rt=addDomEvent(this.node.current,"blur",a);this.removeAccessibleListeners=pipe(o,rt)}}startPress(s,o){this.isPressing=!0;const{onTapStart:a,whileTap:rt}=this.node.getProps();rt&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),a&&frame.postRender(()=>a(s,o))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!isDragActive()}cancelPress(s,o){if(!this.checkPressEnd())return;const{onTapCancel:a}=this.node.getProps();a&&frame.postRender(()=>a(s,o))}mount(){const s=this.node.getProps(),o=addPointerEvent(s.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(s.onTapStart||s.onPointerStart)}),a=addDomEvent(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pipe(o,a)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=i=>{const s=observerCallbacks.get(i.target);s&&s(i)},fireAllObserverCallbacks=i=>{i.forEach(fireObserverCallback)};function initIntersectionObserver({root:i,...s}){const o=i||document;observers.has(o)||observers.set(o,{});const a=observers.get(o),rt=JSON.stringify(s);return a[rt]||(a[rt]=new IntersectionObserver(fireAllObserverCallbacks,{root:i,...s})),a[rt]}function observeIntersection(i,s,o){const a=initIntersectionObserver(s);return observerCallbacks.set(i,o),a.observe(i),()=>{observerCallbacks.delete(i),a.unobserve(i)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:s={}}=this.node.getProps(),{root:o,margin:a,amount:rt="some",once:et}=s,ot={root:o?o.current:void 0,rootMargin:a,threshold:typeof rt=="number"?rt:thresholdNames[rt]},at=nt=>{const{isIntersecting:it}=nt;if(this.isInView===it||(this.isInView=it,et&&!it&&this.hasEnteredView))return;it&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",it);const{onViewportEnter:j,onViewportLeave:_}=this.node.getProps(),$=it?j:_;$&&$(nt)};return observeIntersection(this.node.current,ot,at)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:s,prevProps:o}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(s,o))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:i={}},{viewport:s={}}={}){return o=>i[o]!==s[o]}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}};function shallowCompare(i,s){if(!Array.isArray(s))return!1;const o=s.length;if(o!==i.length)return!1;for(let a=0;ai*1e3,millisecondsToSeconds=i=>i/1e3,underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=i=>({type:"spring",stiffness:550,damping:i===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(i,{keyframes:s})=>s.length>2?keyframesTransition:transformProps.has(i)?i.startsWith("scale")?criticallyDampedSpring(s[1]):underDampedSpring:ease;function isTransitionDefined({when:i,delay:s,delayChildren:o,staggerChildren:a,staggerDirection:rt,repeat:et,repeatType:ot,repeatDelay:at,from:nt,elapsed:it,...j}){return!!Object.keys(j).length}function getValueTransition(i,s){return i[s]||i.default||i}const isNotNull=i=>i!==null;function getFinalKeyframe(i,{repeat:s,repeatType:o="loop"},a){const rt=i.filter(isNotNull),et=s&&o!=="loop"&&s%2===1?0:rt.length-1;return!et||a===void 0?rt[et]:a}let now;function clearTime(){now=void 0}const time={now:()=>(now===void 0&&time.set(frameData.isProcessing||MotionGlobalConfig.useManualTiming?frameData.timestamp:performance.now()),now),set:i=>{now=i,queueMicrotask(clearTime)}},isZeroValueString=i=>/^0[^.\s]+$/u.test(i);function isNone(i){return typeof i=="number"?i===0:i!==null?i==="none"||i==="0"||isZeroValueString(i):!0}const isNumericalString=i=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i),splitCSSVariableRegex=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function parseCSSVariable(i){const s=splitCSSVariableRegex.exec(i);if(!s)return[,];const[,o,a,rt]=s;return[`--${o??a}`,rt]}function getVariableValue(i,s,o=1){const[a,rt]=parseCSSVariable(i);if(!a)return;const et=window.getComputedStyle(s).getPropertyValue(a);if(et){const ot=et.trim();return isNumericalString(ot)?parseFloat(ot):ot}return isCSSVariableToken(rt)?getVariableValue(rt,s,o+1):rt}const positionalKeys=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),isNumOrPxType=i=>i===number||i===px,getPosFromMatrix=(i,s)=>parseFloat(i.split(", ")[s]),getTranslateFromMatrix=(i,s)=>(o,{transform:a})=>{if(a==="none"||!a)return 0;const rt=a.match(/^matrix3d\((.+)\)$/u);if(rt)return getPosFromMatrix(rt[1],s);{const et=a.match(/^matrix\((.+)\)$/u);return et?getPosFromMatrix(et[1],i):0}},transformKeys=new Set(["x","y","z"]),nonTranslationalTransformKeys=transformPropOrder.filter(i=>!transformKeys.has(i));function removeNonTranslationalTransform(i){const s=[];return nonTranslationalTransformKeys.forEach(o=>{const a=i.getValue(o);a!==void 0&&(s.push([o,a.get()]),a.set(o.startsWith("scale")?1:0))}),s}const positionalValues={width:({x:i},{paddingLeft:s="0",paddingRight:o="0"})=>i.max-i.min-parseFloat(s)-parseFloat(o),height:({y:i},{paddingTop:s="0",paddingBottom:o="0"})=>i.max-i.min-parseFloat(s)-parseFloat(o),top:(i,{top:s})=>parseFloat(s),left:(i,{left:s})=>parseFloat(s),bottom:({y:i},{top:s})=>parseFloat(s)+(i.max-i.min),right:({x:i},{left:s})=>parseFloat(s)+(i.max-i.min),x:getTranslateFromMatrix(4,13),y:getTranslateFromMatrix(5,14)};positionalValues.translateX=positionalValues.x;positionalValues.translateY=positionalValues.y;const testValueType=i=>s=>s.test(i),auto={test:i=>i==="auto",parse:i=>i},dimensionValueTypes=[number,px,percent,degrees,vw,vh,auto],findDimensionValueType=i=>dimensionValueTypes.find(testValueType(i)),toResolve=new Set;let isScheduled=!1,anyNeedsMeasurement=!1;function measureAllKeyframes(){if(anyNeedsMeasurement){const i=Array.from(toResolve).filter(a=>a.needsMeasurement),s=new Set(i.map(a=>a.element)),o=new Map;s.forEach(a=>{const rt=removeNonTranslationalTransform(a);rt.length&&(o.set(a,rt),a.render())}),i.forEach(a=>a.measureInitialState()),s.forEach(a=>{a.render();const rt=o.get(a);rt&&rt.forEach(([et,ot])=>{var at;(at=a.getValue(et))===null||at===void 0||at.set(ot)})}),i.forEach(a=>a.measureEndState()),i.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}anyNeedsMeasurement=!1,isScheduled=!1,toResolve.forEach(i=>i.complete()),toResolve.clear()}function readAllKeyframes(){toResolve.forEach(i=>{i.readKeyframes(),i.needsMeasurement&&(anyNeedsMeasurement=!0)})}function flushKeyframeResolvers(){readAllKeyframes(),measureAllKeyframes()}class KeyframeResolver{constructor(s,o,a,rt,et,ot=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...s],this.onComplete=o,this.name=a,this.motionValue=rt,this.element=et,this.isAsync=ot}scheduleResolve(){this.isScheduled=!0,this.isAsync?(toResolve.add(this),isScheduled||(isScheduled=!0,frame.read(readAllKeyframes),frame.resolveKeyframes(measureAllKeyframes))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:s,name:o,element:a,motionValue:rt}=this;for(let et=0;eto=>!!(isString$1(o)&&singleColorRegex.test(o)&&o.startsWith(i)||s&&!isNullish(o)&&Object.prototype.hasOwnProperty.call(o,s)),splitColor=(i,s,o)=>a=>{if(!isString$1(a))return a;const[rt,et,ot,at]=a.match(floatRegex);return{[i]:parseFloat(rt),[s]:parseFloat(et),[o]:parseFloat(ot),alpha:at!==void 0?parseFloat(at):1}},clampRgbUnit=i=>clamp(0,255,i),rgbUnit={...number,transform:i=>Math.round(clampRgbUnit(i))},rgba={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:i,green:s,blue:o,alpha:a=1})=>"rgba("+rgbUnit.transform(i)+", "+rgbUnit.transform(s)+", "+rgbUnit.transform(o)+", "+sanitize(alpha.transform(a))+")"};function parseHex(i){let s="",o="",a="",rt="";return i.length>5?(s=i.substring(1,3),o=i.substring(3,5),a=i.substring(5,7),rt=i.substring(7,9)):(s=i.substring(1,2),o=i.substring(2,3),a=i.substring(3,4),rt=i.substring(4,5),s+=s,o+=o,a+=a,rt+=rt),{red:parseInt(s,16),green:parseInt(o,16),blue:parseInt(a,16),alpha:rt?parseInt(rt,16)/255:1}}const hex={test:isColorString("#"),parse:parseHex,transform:rgba.transform},hsla={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:i,saturation:s,lightness:o,alpha:a=1})=>"hsla("+Math.round(i)+", "+percent.transform(sanitize(s))+", "+percent.transform(sanitize(o))+", "+sanitize(alpha.transform(a))+")"},color={test:i=>rgba.test(i)||hex.test(i)||hsla.test(i),parse:i=>rgba.test(i)?rgba.parse(i):hsla.test(i)?hsla.parse(i):hex.parse(i),transform:i=>isString$1(i)?i:i.hasOwnProperty("red")?rgba.transform(i):hsla.transform(i)};function test(i){var s,o;return isNaN(i)&&isString$1(i)&&(((s=i.match(floatRegex))===null||s===void 0?void 0:s.length)||0)+(((o=i.match(colorRegex))===null||o===void 0?void 0:o.length)||0)>0}const NUMBER_TOKEN="number",COLOR_TOKEN="color",VAR_TOKEN="var",VAR_FUNCTION_TOKEN="var(",SPLIT_TOKEN="${}",complexRegex=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function analyseComplexValue(i){const s=i.toString(),o=[],a={color:[],number:[],var:[]},rt=[];let et=0;const at=s.replace(complexRegex,nt=>(color.test(nt)?(a.color.push(et),rt.push(COLOR_TOKEN),o.push(color.parse(nt))):nt.startsWith(VAR_FUNCTION_TOKEN)?(a.var.push(et),rt.push(VAR_TOKEN),o.push(nt)):(a.number.push(et),rt.push(NUMBER_TOKEN),o.push(parseFloat(nt))),++et,SPLIT_TOKEN)).split(SPLIT_TOKEN);return{values:o,split:at,indexes:a,types:rt}}function parseComplexValue(i){return analyseComplexValue(i).values}function createTransformer(i){const{split:s,types:o}=analyseComplexValue(i),a=s.length;return rt=>{let et="";for(let ot=0;ottypeof i=="number"?0:i;function getAnimatableNone$1(i){const s=parseComplexValue(i);return createTransformer(i)(s.map(convertNumbersToZero))}const complex={test,parse:parseComplexValue,createTransformer,getAnimatableNone:getAnimatableNone$1},maxDefaults=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(i){const[s,o]=i.slice(0,-1).split("(");if(s==="drop-shadow")return i;const[a]=o.match(floatRegex)||[];if(!a)return i;const rt=o.replace(a,"");let et=maxDefaults.has(s)?1:0;return a!==o&&(et*=100),s+"("+et+rt+")"}const functionRegex=/\b([a-z-]*)\(.*?\)/gu,filter$1={...complex,getAnimatableNone:i=>{const s=i.match(functionRegex);return s?s.map(applyDefaultFilter).join(" "):i}},defaultValueTypes={...numberValueTypes,color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,filter:filter$1,WebkitFilter:filter$1},getDefaultValueType=i=>defaultValueTypes[i];function getAnimatableNone(i,s){let o=getDefaultValueType(i);return o!==filter$1&&(o=complex),o.getAnimatableNone?o.getAnimatableNone(s):void 0}const invalidTemplates=new Set(["auto","none","0"]);function makeNoneKeyframesAnimatable(i,s,o){let a=0,rt;for(;a{o.getValue(nt).set(it)}),this.resolveNoneKeyframes()}}function memo(i){let s;return()=>(s===void 0&&(s=i()),s)}const isAnimatable=(i,s)=>s==="zIndex"?!1:!!(typeof i=="number"||Array.isArray(i)||typeof i=="string"&&(complex.test(i)||i==="0")&&!i.startsWith("url("));function hasKeyframesChanged(i){const s=i[0];if(i.length===1)return!0;for(let o=0;o{this.resolveFinishedPromise=s})}}function velocityPerSecond(i,s){return s?i*(1e3/s):0}const velocitySampleDuration=5;function calcGeneratorVelocity(i,s,o){const a=Math.max(s-velocitySampleDuration,0);return velocityPerSecond(o-i(a),s-a)}const safeMin=.001,minDuration=.01,maxDuration$1=10,minDamping=.05,maxDamping=1;function findSpring({duration:i=800,bounce:s=.25,velocity:o=0,mass:a=1}){let rt,et,ot=1-s;ot=clamp(minDamping,maxDamping,ot),i=clamp(minDuration,maxDuration$1,millisecondsToSeconds(i)),ot<1?(rt=it=>{const j=it*ot,_=j*i,$=j-o,tt=calcAngularFreq(it,ot),st=Math.exp(-_);return safeMin-$/tt*st},et=it=>{const _=it*ot*i,$=_*o+o,tt=Math.pow(ot,2)*Math.pow(it,2)*i,st=Math.exp(-_),lt=calcAngularFreq(Math.pow(it,2),ot);return(-rt(it)+safeMin>0?-1:1)*(($-tt)*st)/lt}):(rt=it=>{const j=Math.exp(-it*i),_=(it-o)*i+1;return-safeMin+j*_},et=it=>{const j=Math.exp(-it*i),_=(o-it)*(i*i);return j*_});const at=5/i,nt=approximateRoot(rt,et,at);if(i=secondsToMilliseconds(i),isNaN(nt))return{stiffness:100,damping:10,duration:i};{const it=Math.pow(nt,2)*a;return{stiffness:it,damping:ot*2*Math.sqrt(a*it),duration:i}}}const rootIterations=12;function approximateRoot(i,s,o){let a=o;for(let rt=1;rti[o]!==void 0)}function getSpringOptions(i){let s={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...i};if(!isSpringType(i,physicsKeys)&&isSpringType(i,durationKeys)){const o=findSpring(i);s={...s,...o,mass:1},s.isResolvedFromDuration=!0}return s}function spring({keyframes:i,restDelta:s,restSpeed:o,...a}){const rt=i[0],et=i[i.length-1],ot={done:!1,value:rt},{stiffness:at,damping:nt,mass:it,duration:j,velocity:_,isResolvedFromDuration:$}=getSpringOptions({...a,velocity:-millisecondsToSeconds(a.velocity||0)}),tt=_||0,st=nt/(2*Math.sqrt(at*it)),lt=et-rt,ct=millisecondsToSeconds(Math.sqrt(at/it)),ht=Math.abs(lt)<5;o||(o=ht?.01:2),s||(s=ht?.005:.5);let ut;if(st<1){const pt=calcAngularFreq(ct,st);ut=mt=>{const vt=Math.exp(-st*ct*mt);return et-vt*((tt+st*ct*lt)/pt*Math.sin(pt*mt)+lt*Math.cos(pt*mt))}}else if(st===1)ut=pt=>et-Math.exp(-ct*pt)*(lt+(tt+ct*lt)*pt);else{const pt=ct*Math.sqrt(st*st-1);ut=mt=>{const vt=Math.exp(-st*ct*mt),dt=Math.min(pt*mt,300);return et-vt*((tt+st*ct*lt)*Math.sinh(dt)+pt*lt*Math.cosh(dt))/pt}}return{calculatedDuration:$&&j||null,next:pt=>{const mt=ut(pt);if($)ot.done=pt>=j;else{let vt=tt;pt!==0&&(st<1?vt=calcGeneratorVelocity(ut,pt,mt):vt=0);const dt=Math.abs(vt)<=o,St=Math.abs(et-mt)<=s;ot.done=dt&&St}return ot.value=ot.done?et:mt,ot}}}function inertia({keyframes:i,velocity:s=0,power:o=.8,timeConstant:a=325,bounceDamping:rt=10,bounceStiffness:et=500,modifyTarget:ot,min:at,max:nt,restDelta:it=.5,restSpeed:j}){const _=i[0],$={done:!1,value:_},tt=yt=>at!==void 0&&ytnt,st=yt=>at===void 0?nt:nt===void 0||Math.abs(at-yt)-lt*Math.exp(-yt/a),pt=yt=>ht+ut(yt),mt=yt=>{const gt=ut(yt),Et=pt(yt);$.done=Math.abs(gt)<=it,$.value=$.done?ht:Et};let vt,dt;const St=yt=>{tt($.value)&&(vt=yt,dt=spring({keyframes:[$.value,st($.value)],velocity:calcGeneratorVelocity(pt,yt,$.value),damping:rt,stiffness:et,restDelta:it,restSpeed:j}))};return St(0),{calculatedDuration:null,next:yt=>{let gt=!1;return!dt&&vt===void 0&&(gt=!0,mt(yt),St(yt)),vt!==void 0&&yt>=vt?dt.next(yt-vt):(!gt&&mt(yt),$)}}}const calcBezier=(i,s,o)=>(((1-3*o+3*s)*i+(3*o-6*s))*i+3*s)*i,subdivisionPrecision=1e-7,subdivisionMaxIterations=12;function binarySubdivide(i,s,o,a,rt){let et,ot,at=0;do ot=s+(o-s)/2,et=calcBezier(ot,a,rt)-i,et>0?o=ot:s=ot;while(Math.abs(et)>subdivisionPrecision&&++atbinarySubdivide(et,0,1,i,o);return et=>et===0||et===1?et:calcBezier(rt(et),s,a)}const easeIn=cubicBezier(.42,0,1,1),easeOut=cubicBezier(0,0,.58,1),easeInOut=cubicBezier(.42,0,.58,1),isEasingArray=i=>Array.isArray(i)&&typeof i[0]!="number",mirrorEasing=i=>s=>s<=.5?i(2*s)/2:(2-i(2*(1-s)))/2,reverseEasing=i=>s=>1-i(1-s),circIn=i=>1-Math.sin(Math.acos(i)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circIn),backOut=cubicBezier(.33,1.53,.69,.99),backIn=reverseEasing(backOut),backInOut=mirrorEasing(backIn),anticipate=i=>(i*=2)<1?.5*backIn(i):.5*(2-Math.pow(2,-10*(i-1))),easingLookup={linear:noop$1,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate},easingDefinitionToFunction=i=>{if(Array.isArray(i)){invariant(i.length===4);const[s,o,a,rt]=i;return cubicBezier(s,o,a,rt)}else if(typeof i=="string")return invariant(easingLookup[i]!==void 0),easingLookup[i];return i},progress=(i,s,o)=>{const a=s-i;return a===0?1:(o-i)/a},mixNumber$1=(i,s,o)=>i+(s-i)*o;function hueToRgb(i,s,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?i+(s-i)*6*o:o<1/2?s:o<2/3?i+(s-i)*(2/3-o)*6:i}function hslaToRgba({hue:i,saturation:s,lightness:o,alpha:a}){i/=360,s/=100,o/=100;let rt=0,et=0,ot=0;if(!s)rt=et=ot=o;else{const at=o<.5?o*(1+s):o+s-o*s,nt=2*o-at;rt=hueToRgb(nt,at,i+1/3),et=hueToRgb(nt,at,i),ot=hueToRgb(nt,at,i-1/3)}return{red:Math.round(rt*255),green:Math.round(et*255),blue:Math.round(ot*255),alpha:a}}function mixImmediate(i,s){return o=>o>0?s:i}const mixLinearColor=(i,s,o)=>{const a=i*i,rt=o*(s*s-a)+a;return rt<0?0:Math.sqrt(rt)},colorTypes=[hex,rgba,hsla],getColorType=i=>colorTypes.find(s=>s.test(i));function asRGBA(i){const s=getColorType(i);if(!s)return!1;let o=s.parse(i);return s===hsla&&(o=hslaToRgba(o)),o}const mixColor=(i,s)=>{const o=asRGBA(i),a=asRGBA(s);if(!o||!a)return mixImmediate(i,s);const rt={...o};return et=>(rt.red=mixLinearColor(o.red,a.red,et),rt.green=mixLinearColor(o.green,a.green,et),rt.blue=mixLinearColor(o.blue,a.blue,et),rt.alpha=mixNumber$1(o.alpha,a.alpha,et),rgba.transform(rt))},invisibleValues=new Set(["none","hidden"]);function mixVisibility(i,s){return invisibleValues.has(i)?o=>o<=0?i:s:o=>o>=1?s:i}function mixNumber(i,s){return o=>mixNumber$1(i,s,o)}function getMixer(i){return typeof i=="number"?mixNumber:typeof i=="string"?isCSSVariableToken(i)?mixImmediate:color.test(i)?mixColor:mixComplex:Array.isArray(i)?mixArray:typeof i=="object"?color.test(i)?mixColor:mixObject:mixImmediate}function mixArray(i,s){const o=[...i],a=o.length,rt=i.map((et,ot)=>getMixer(et)(et,s[ot]));return et=>{for(let ot=0;ot{for(const et in a)o[et]=a[et](rt);return o}}function matchOrder(i,s){var o;const a=[],rt={color:0,var:0,number:0};for(let et=0;et{const o=complex.createTransformer(s),a=analyseComplexValue(i),rt=analyseComplexValue(s);return a.indexes.var.length===rt.indexes.var.length&&a.indexes.color.length===rt.indexes.color.length&&a.indexes.number.length>=rt.indexes.number.length?invisibleValues.has(i)&&!rt.values.length||invisibleValues.has(s)&&!a.values.length?mixVisibility(i,s):pipe(mixArray(matchOrder(a,rt),rt.values),o):mixImmediate(i,s)};function mix(i,s,o){return typeof i=="number"&&typeof s=="number"&&typeof o=="number"?mixNumber$1(i,s,o):getMixer(i)(i,s)}function createMixers(i,s,o){const a=[],rt=o||mix,et=i.length-1;for(let ot=0;ots[0];if(et===2&&i[0]===i[1])return()=>s[1];i[0]>i[et-1]&&(i=[...i].reverse(),s=[...s].reverse());const ot=createMixers(s,a,rt),at=ot.length,nt=it=>{let j=0;if(at>1)for(;jnt(clamp(i[0],i[et-1],it)):nt}function fillOffset(i,s){const o=i[i.length-1];for(let a=1;a<=s;a++){const rt=progress(0,s,a);i.push(mixNumber$1(o,1,rt))}}function defaultOffset(i){const s=[0];return fillOffset(s,i.length-1),s}function convertOffsetToTimes(i,s){return i.map(o=>o*s)}function defaultEasing(i,s){return i.map(()=>s||easeInOut).splice(0,i.length-1)}function keyframes({duration:i=300,keyframes:s,times:o,ease:a="easeInOut"}){const rt=isEasingArray(a)?a.map(easingDefinitionToFunction):easingDefinitionToFunction(a),et={done:!1,value:s[0]},ot=convertOffsetToTimes(o&&o.length===s.length?o:defaultOffset(s),i),at=interpolate(ot,s,{ease:Array.isArray(rt)?rt:defaultEasing(s,rt)});return{calculatedDuration:i,next:nt=>(et.value=at(nt),et.done=nt>=i,et)}}const maxGeneratorDuration=2e4;function calcGeneratorDuration(i){let s=0;const o=50;let a=i.next(s);for(;!a.done&&s=maxGeneratorDuration?1/0:s}const frameloopDriver=i=>{const s=({timestamp:o})=>i(o);return{start:()=>frame.update(s,!0),stop:()=>cancelFrame(s),now:()=>frameData.isProcessing?frameData.timestamp:time.now()}},generators={decay:inertia,inertia,tween:keyframes,keyframes,spring},percentToProgress=i=>i/100;class MainThreadAnimation extends BaseAnimation{constructor({KeyframeResolver:s=KeyframeResolver,...o}){super(o),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:at}=this.options;at&&at()};const{name:a,motionValue:rt,keyframes:et}=this.options,ot=(at,nt)=>this.onKeyframesResolved(at,nt);a&&rt&&rt.owner?this.resolver=rt.owner.resolveKeyframes(et,ot,a,rt):this.resolver=new s(et,ot,a,rt),this.resolver.scheduleResolve()}initPlayback(s){const{type:o="keyframes",repeat:a=0,repeatDelay:rt=0,repeatType:et,velocity:ot=0}=this.options,at=generators[o]||keyframes;let nt,it;at!==keyframes&&typeof s[0]!="number"&&(nt=pipe(percentToProgress,mix(s[0],s[1])),s=[0,100]);const j=at({...this.options,keyframes:s});et==="mirror"&&(it=at({...this.options,keyframes:[...s].reverse(),velocity:-ot})),j.calculatedDuration===null&&(j.calculatedDuration=calcGeneratorDuration(j));const{calculatedDuration:_}=j,$=_+rt,tt=$*(a+1)-rt;return{generator:j,mirroredGenerator:it,mapPercentToKeyframes:nt,calculatedDuration:_,resolvedDuration:$,totalDuration:tt}}onPostResolved(){const{autoplay:s=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!s?this.pause():this.state=this.pendingPlayState}tick(s,o=!1){const{resolved:a}=this;if(!a){const{keyframes:yt}=this.options;return{done:!0,value:yt[yt.length-1]}}const{finalKeyframe:rt,generator:et,mirroredGenerator:ot,mapPercentToKeyframes:at,keyframes:nt,calculatedDuration:it,totalDuration:j,resolvedDuration:_}=a;if(this.startTime===null)return et.next(0);const{delay:$,repeat:tt,repeatType:st,repeatDelay:lt,onUpdate:ct}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,s):this.speed<0&&(this.startTime=Math.min(s-j/this.speed,this.startTime)),o?this.currentTime=s:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(s-this.startTime)*this.speed;const ht=this.currentTime-$*(this.speed>=0?1:-1),ut=this.speed>=0?ht<0:ht>j;this.currentTime=Math.max(ht,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=j);let pt=this.currentTime,mt=et;if(tt){const yt=Math.min(this.currentTime,j)/_;let gt=Math.floor(yt),Et=yt%1;!Et&&yt>=1&&(Et=1),Et===1&>--,gt=Math.min(gt,tt+1),!!(gt%2)&&(st==="reverse"?(Et=1-Et,lt&&(Et-=lt/_)):st==="mirror"&&(mt=ot)),pt=clamp(0,1,Et)*_}const vt=ut?{done:!1,value:nt[0]}:mt.next(pt);at&&(vt.value=at(vt.value));let{done:dt}=vt;!ut&&it!==null&&(dt=this.speed>=0?this.currentTime>=j:this.currentTime<=0);const St=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&dt);return St&&rt!==void 0&&(vt.value=getFinalKeyframe(nt,this.options,rt)),ct&&ct(vt.value),St&&this.finish(),vt}get duration(){const{resolved:s}=this;return s?millisecondsToSeconds(s.calculatedDuration):0}get time(){return millisecondsToSeconds(this.currentTime)}set time(s){s=secondsToMilliseconds(s),this.currentTime=s,this.holdTime!==null||this.speed===0?this.holdTime=s:this.driver&&(this.startTime=this.driver.now()-s/this.speed)}get speed(){return this.playbackSpeed}set speed(s){const o=this.playbackSpeed!==s;this.playbackSpeed=s,o&&(this.time=millisecondsToSeconds(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:s=frameloopDriver,onPlay:o}=this.options;this.driver||(this.driver=s(rt=>this.tick(rt))),o&&o();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=a),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var s;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(s=this.currentTime)!==null&&s!==void 0?s:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:s}=this.options;s&&s()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(s){return this.startTime=0,this.tick(s,!0)}}const isBezierDefinition=i=>Array.isArray(i)&&typeof i[0]=="number";function isWaapiSupportedEasing(i){return!!(!i||typeof i=="string"&&i in supportedWaapiEasing||isBezierDefinition(i)||Array.isArray(i)&&i.every(isWaapiSupportedEasing))}const cubicBezierAsString=([i,s,o,a])=>`cubic-bezier(${i}, ${s}, ${o}, ${a})`,supportedWaapiEasing={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function mapEasingToNativeEasingWithDefault(i){return mapEasingToNativeEasing(i)||supportedWaapiEasing.easeOut}function mapEasingToNativeEasing(i){if(i)return isBezierDefinition(i)?cubicBezierAsString(i):Array.isArray(i)?i.map(mapEasingToNativeEasingWithDefault):supportedWaapiEasing[i]}function animateStyle(i,s,o,{delay:a=0,duration:rt=300,repeat:et=0,repeatType:ot="loop",ease:at,times:nt}={}){const it={[s]:o};nt&&(it.offset=nt);const j=mapEasingToNativeEasing(at);return Array.isArray(j)&&(it.easing=j),i.animate(it,{delay:a,duration:rt,easing:Array.isArray(j)?"linear":j,fill:"both",iterations:et+1,direction:ot==="reverse"?"alternate":"normal"})}const supportsWaapi=memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sampleDelta=10,maxDuration=2e4;function requiresPregeneratedKeyframes(i){return i.type==="spring"||!isWaapiSupportedEasing(i.ease)}function pregenerateKeyframes(i,s){const o=new MainThreadAnimation({...s,keyframes:i,repeat:0,delay:0,isGenerator:!0});let a={done:!1,value:i[0]};const rt=[];let et=0;for(;!a.done&&etthis.onKeyframesResolved(et,ot),o,a),this.resolver.scheduleResolve()}initPlayback(s,o){var a;let{duration:rt=300,times:et,ease:ot,type:at,motionValue:nt,name:it}=this.options;if(!(!((a=nt.owner)===null||a===void 0)&&a.current))return!1;if(requiresPregeneratedKeyframes(this.options)){const{onComplete:_,onUpdate:$,motionValue:tt,...st}=this.options,lt=pregenerateKeyframes(s,st);s=lt.keyframes,s.length===1&&(s[1]=s[0]),rt=lt.duration,et=lt.times,ot=lt.ease,at="keyframes"}const j=animateStyle(nt.owner.current,it,s,{...this.options,duration:rt,times:et,ease:ot});return j.startTime=time.now(),this.pendingTimeline?(j.timeline=this.pendingTimeline,this.pendingTimeline=void 0):j.onfinish=()=>{const{onComplete:_}=this.options;nt.set(getFinalKeyframe(s,this.options,o)),_&&_(),this.cancel(),this.resolveFinishedPromise()},{animation:j,duration:rt,times:et,type:at,ease:ot,keyframes:s}}get duration(){const{resolved:s}=this;if(!s)return 0;const{duration:o}=s;return millisecondsToSeconds(o)}get time(){const{resolved:s}=this;if(!s)return 0;const{animation:o}=s;return millisecondsToSeconds(o.currentTime||0)}set time(s){const{resolved:o}=this;if(!o)return;const{animation:a}=o;a.currentTime=secondsToMilliseconds(s)}get speed(){const{resolved:s}=this;if(!s)return 1;const{animation:o}=s;return o.playbackRate}set speed(s){const{resolved:o}=this;if(!o)return;const{animation:a}=o;a.playbackRate=s}get state(){const{resolved:s}=this;if(!s)return"idle";const{animation:o}=s;return o.playState}attachTimeline(s){if(!this._resolved)this.pendingTimeline=s;else{const{resolved:o}=this;if(!o)return noop$1;const{animation:a}=o;a.timeline=s,a.onfinish=null}return noop$1}play(){if(this.isStopped)return;const{resolved:s}=this;if(!s)return;const{animation:o}=s;o.playState==="finished"&&this.updateFinishedPromise(),o.play()}pause(){const{resolved:s}=this;if(!s)return;const{animation:o}=s;o.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:s}=this;if(!s)return;const{animation:o,keyframes:a,duration:rt,type:et,ease:ot,times:at}=s;if(o.playState==="idle"||o.playState==="finished")return;if(this.time){const{motionValue:it,onUpdate:j,onComplete:_,...$}=this.options,tt=new MainThreadAnimation({...$,keyframes:a,duration:rt,type:et,ease:ot,times:at,isGenerator:!0}),st=secondsToMilliseconds(this.time);it.setWithVelocity(tt.sample(st-sampleDelta).value,tt.sample(st).value,sampleDelta)}const{onStop:nt}=this.options;nt&&nt(),this.cancel()}complete(){const{resolved:s}=this;s&&s.animation.finish()}cancel(){const{resolved:s}=this;s&&s.animation.cancel()}static supports(s){const{motionValue:o,name:a,repeatDelay:rt,repeatType:et,damping:ot,type:at}=s;return supportsWaapi()&&a&&acceleratedValues.has(a)&&o&&o.owner&&o.owner.current instanceof HTMLElement&&!o.owner.getProps().onUpdate&&!rt&&et!=="mirror"&&ot!==0&&at!=="inertia"}}function observeTimeline(i,s){let o;const a=()=>{const{currentTime:rt}=s,ot=(rt===null?0:rt.value)/100;o!==ot&&i(ot),o=ot};return frame.update(a,!0),()=>cancelFrame(a)}const supportsScrollTimeline=memo(()=>window.ScrollTimeline!==void 0);class GroupPlaybackControls{constructor(s){this.stop=()=>this.runAll("stop"),this.animations=s.filter(Boolean)}then(s,o){return Promise.all(this.animations).then(s).catch(o)}getAll(s){return this.animations[0][s]}setAll(s,o){for(let a=0;a{if(supportsScrollTimeline()&&a.attachTimeline)a.attachTimeline(s);else return a.pause(),observeTimeline(rt=>{a.time=a.duration*rt},s)});return()=>{o.forEach((a,rt)=>{a&&a(),this.animations[rt].stop()})}}get time(){return this.getAll("time")}set time(s){this.setAll("time",s)}get speed(){return this.getAll("speed")}set speed(s){this.setAll("speed",s)}get duration(){let s=0;for(let o=0;oo[s]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const animateMotionValue=(i,s,o,a={},rt,et,ot)=>at=>{const nt=getValueTransition(a,i)||{},it=nt.delay||a.delay||0;let{elapsed:j=0}=a;j=j-secondsToMilliseconds(it);let _={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:s.getVelocity(),...nt,delay:-j,onUpdate:tt=>{s.set(tt),nt.onUpdate&&nt.onUpdate(tt)},onComplete:()=>{at(),nt.onComplete&&nt.onComplete(),ot&&ot()},onStop:ot,name:i,motionValue:s,element:et?void 0:rt};isTransitionDefined(nt)||(_={..._,...getDefaultTransition(i,_)}),_.duration&&(_.duration=secondsToMilliseconds(_.duration)),_.repeatDelay&&(_.repeatDelay=secondsToMilliseconds(_.repeatDelay)),_.from!==void 0&&(_.keyframes[0]=_.from);let $=!1;if((_.type===!1||_.duration===0&&!_.repeatDelay)&&(_.duration=0,_.delay===0&&($=!0)),$&&!et&&s.get()!==void 0){const tt=getFinalKeyframe(_.keyframes,nt);if(tt!==void 0)return frame.update(()=>{_.onUpdate(tt),_.onComplete()}),new GroupPlaybackControls([])}return!et&&AcceleratedAnimation.supports(_)?new AcceleratedAnimation(_):new MainThreadAnimation(_)};class SubscriptionManager{constructor(){this.subscriptions=[]}add(s){return addUniqueItem(this.subscriptions,s),()=>removeItem(this.subscriptions,s)}notify(s,o,a){const rt=this.subscriptions.length;if(rt)if(rt===1)this.subscriptions[0](s,o,a);else for(let et=0;et!isNaN(parseFloat(i));class MotionValue{constructor(s,o={}){this.version="11.3.6",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(a,rt=!0)=>{const et=time.now();this.updatedAt!==et&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),rt&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(s),this.owner=o.owner}setCurrent(s){this.current=s,this.updatedAt=time.now(),this.canTrackVelocity===null&&s!==void 0&&(this.canTrackVelocity=isFloat(this.current))}setPrevFrameValue(s=this.current){this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt}onChange(s){return this.on("change",s)}on(s,o){this.events[s]||(this.events[s]=new SubscriptionManager);const a=this.events[s].add(o);return s==="change"?()=>{a(),frame.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(const s in this.events)this.events[s].clear()}attach(s,o){this.passiveEffect=s,this.stopPassiveEffect=o}set(s,o=!0){!o||!this.passiveEffect?this.updateAndNotify(s,o):this.passiveEffect(s,this.updateAndNotify)}setWithVelocity(s,o,a){this.set(o),this.prev=void 0,this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt-a}jump(s,o=!0){this.updateAndNotify(s),this.prev=s,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const s=time.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||s-this.updatedAt>MAX_VELOCITY_DELTA)return 0;const o=Math.min(this.updatedAt-this.prevUpdatedAt,MAX_VELOCITY_DELTA);return velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(s){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=s(o),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 motionValue(i,s){return new MotionValue(i,s)}function setMotionValue(i,s,o){i.hasValue(s)?i.getValue(s).set(o):i.addValue(s,motionValue(o))}function setTarget(i,s){const o=resolveVariant(i,s);let{transitionEnd:a={},transition:rt={},...et}=o||{};et={...et,...a};for(const ot in et){const at=resolveFinalValueInKeyframes(et[ot]);setMotionValue(i,ot,at)}}function getOptimisedAppearId(i){return i.getProps()[optimizedAppearDataAttribute]}class WillChangeMotionValue extends MotionValue{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(s){const o=getWillChangeName(s);if(!o)return;const a=this.counts.get(o)||0;this.counts.set(o,a+1),a===0&&(this.output.push(o),this.update());let rt=!1;return()=>{if(rt)return;rt=!0;const et=this.counts.get(o)-1;this.counts.set(o,et),et===0&&(removeItem(this.output,o),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function isWillChangeMotionValue(i){return!!(isMotionValue(i)&&i.add)}function addValueToWillChange(i,s){var o;if(!i.applyWillChange)return;let a=i.getValue("willChange");if(!a&&!(!((o=i.props.style)===null||o===void 0)&&o.willChange)&&(a=new WillChangeMotionValue("auto"),i.addValue("willChange",a)),isWillChangeMotionValue(a))return a.add(s)}function shouldBlockAnimation({protectedKeys:i,needsAnimating:s},o){const a=i.hasOwnProperty(o)&&s[o]!==!0;return s[o]=!1,a}function animateTarget(i,s,{delay:o=0,transitionOverride:a,type:rt}={}){var et;let{transition:ot=i.getDefaultTransition(),transitionEnd:at,...nt}=s;a&&(ot=a);const it=[],j=rt&&i.animationState&&i.animationState.getState()[rt];for(const _ in nt){const $=i.getValue(_,(et=i.latestValues[_])!==null&&et!==void 0?et:null),tt=nt[_];if(tt===void 0||j&&shouldBlockAnimation(j,_))continue;const st={delay:o,elapsed:0,...getValueTransition(ot||{},_)};let lt=!1;if(window.HandoffAppearAnimations){const ht=getOptimisedAppearId(i);if(ht){const ut=window.HandoffAppearAnimations(ht,_,$,frame);ut!==null&&(st.elapsed=ut,lt=!0)}}$.start(animateMotionValue(_,$,tt,i.shouldReduceMotion&&transformProps.has(_)?{type:!1}:st,i,lt,addValueToWillChange(i,_)));const ct=$.animation;ct&&it.push(ct)}return at&&Promise.all(it).then(()=>{frame.update(()=>{at&&setTarget(i,at)})}),it}function animateVariant(i,s,o={}){var a;const rt=resolveVariant(i,s,o.type==="exit"?(a=i.presenceContext)===null||a===void 0?void 0:a.custom:void 0);let{transition:et=i.getDefaultTransition()||{}}=rt||{};o.transitionOverride&&(et=o.transitionOverride);const ot=rt?()=>Promise.all(animateTarget(i,rt,o)):()=>Promise.resolve(),at=i.variantChildren&&i.variantChildren.size?(it=0)=>{const{delayChildren:j=0,staggerChildren:_,staggerDirection:$}=et;return animateChildren(i,s,j+it,_,$,o)}:()=>Promise.resolve(),{when:nt}=et;if(nt){const[it,j]=nt==="beforeChildren"?[ot,at]:[at,ot];return it().then(()=>j())}else return Promise.all([ot(),at(o.delay)])}function animateChildren(i,s,o=0,a=0,rt=1,et){const ot=[],at=(i.variantChildren.size-1)*a,nt=rt===1?(it=0)=>it*a:(it=0)=>at-it*a;return Array.from(i.variantChildren).sort(sortByTreeOrder).forEach((it,j)=>{it.notify("AnimationStart",s),ot.push(animateVariant(it,s,{...et,delay:o+nt(j)}).then(()=>it.notify("AnimationComplete",s)))}),Promise.all(ot)}function sortByTreeOrder(i,s){return i.sortNodePosition(s)}function animateVisualElement(i,s,o={}){i.notify("AnimationStart",s);let a;if(Array.isArray(s)){const rt=s.map(et=>animateVariant(i,et,o));a=Promise.all(rt)}else if(typeof s=="string")a=animateVariant(i,s,o);else{const rt=typeof s=="function"?resolveVariant(i,s,o.custom):s;a=Promise.all(animateTarget(i,rt,o))}return a.then(()=>{frame.postRender(()=>{i.notify("AnimationComplete",s)})})}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(i){return s=>Promise.all(s.map(({animation:o,options:a})=>animateVisualElement(i,o,a)))}function createAnimationState(i){let s=animateList(i),o=createState(),a=!0;const rt=nt=>(it,j)=>{var _;const $=resolveVariant(i,j,nt==="exit"?(_=i.presenceContext)===null||_===void 0?void 0:_.custom:void 0);if($){const{transition:tt,transitionEnd:st,...lt}=$;it={...it,...lt,...st}}return it};function et(nt){s=nt(i)}function ot(nt){const it=i.getProps(),j=i.getVariantContext(!0)||{},_=[],$=new Set;let tt={},st=1/0;for(let ct=0;ctst&&mt,gt=!1;const Et=Array.isArray(pt)?pt:[pt];let _t=Et.reduce(rt(ht),{});vt===!1&&(_t={});const{prevResolvedValues:kt={}}=ut,Ct={...kt,..._t},Tt=At=>{yt=!0,$.has(At)&&(gt=!0,$.delete(At)),ut.needsAnimating[At]=!0;const It=i.getValue(At);It&&(It.liveStyle=!1)};for(const At in Ct){const It=_t[At],Ot=kt[At];if(tt.hasOwnProperty(At))continue;let Mt=!1;isKeyframesTarget(It)&&isKeyframesTarget(Ot)?Mt=!shallowCompare(It,Ot):Mt=It!==Ot,Mt?It!=null?Tt(At):$.add(At):It!==void 0&&$.has(At)?Tt(At):ut.protectedKeys[At]=!0}ut.prevProp=pt,ut.prevResolvedValues=_t,ut.isActive&&(tt={...tt,..._t}),a&&i.blockInitialAnimation&&(yt=!1),yt&&(!dt||gt)&&_.push(...Et.map(At=>({animation:At,options:{type:ht}})))}if($.size){const ct={};$.forEach(ht=>{const ut=i.getBaseTarget(ht),pt=i.getValue(ht);pt&&(pt.liveStyle=!0),ct[ht]=ut??null}),_.push({animation:ct})}let lt=!!_.length;return a&&(it.initial===!1||it.initial===it.animate)&&!i.manuallyAnimateOnMount&&(lt=!1),a=!1,lt?s(_):Promise.resolve()}function at(nt,it){var j;if(o[nt].isActive===it)return Promise.resolve();(j=i.variantChildren)===null||j===void 0||j.forEach($=>{var tt;return(tt=$.animationState)===null||tt===void 0?void 0:tt.setActive(nt,it)}),o[nt].isActive=it;const _=ot(nt);for(const $ in o)o[$].protectedKeys={};return _}return{animateChanges:ot,setActive:at,setAnimateFunction:et,getState:()=>o,reset:()=>{o=createState(),a=!0}}}function checkVariantsDidChange(i,s){return typeof s=="string"?s!==i:Array.isArray(s)?!shallowCompare(s,i):!1}function createTypeState(i=!1){return{isActive:i,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class AnimationFeature extends Feature{constructor(s){super(s),s.animationState||(s.animationState=createAnimationState(s))}updateAnimationControlsSubscription(){const{animate:s}=this.node.getProps();isAnimationControls(s)&&(this.unmountControls=s.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:s}=this.node.getProps(),{animate:o}=this.node.prevProps||{};s!==o&&this.updateAnimationControlsSubscription()}unmount(){var s;this.node.animationState.reset(),(s=this.unmountControls)===null||s===void 0||s.call(this)}}let id$1=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id$1++}update(){if(!this.node.presenceContext)return;const{isPresent:s,onExitComplete:o}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||s===a)return;const rt=this.node.animationState.setActive("exit",!s);o&&!s&&rt.then(()=>o(this.id))}mount(){const{register:s}=this.node.presenceContext||{};s&&(this.unmount=s(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}},distance=(i,s)=>Math.abs(i-s);function distance2D(i,s){const o=distance(i.x,s.x),a=distance(i.y,s.y);return Math.sqrt(o**2+a**2)}class PanSession{constructor(s,o,{transformPagePoint:a,contextWindow:rt,dragSnapToOrigin:et=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=getPanInfo(this.lastMoveEventInfo,this.history),$=this.startEvent!==null,tt=distance2D(_.offset,{x:0,y:0})>=3;if(!$&&!tt)return;const{point:st}=_,{timestamp:lt}=frameData;this.history.push({...st,timestamp:lt});const{onStart:ct,onMove:ht}=this.handlers;$||(ct&&ct(this.lastMoveEvent,_),this.startEvent=this.lastMoveEvent),ht&&ht(this.lastMoveEvent,_)},this.handlePointerMove=(_,$)=>{this.lastMoveEvent=_,this.lastMoveEventInfo=transformPoint($,this.transformPagePoint),frame.update(this.updatePoint,!0)},this.handlePointerUp=(_,$)=>{this.end();const{onEnd:tt,onSessionEnd:st,resumeAnimation:lt}=this.handlers;if(this.dragSnapToOrigin&<&<(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const ct=getPanInfo(_.type==="pointercancel"?this.lastMoveEventInfo:transformPoint($,this.transformPagePoint),this.history);this.startEvent&&tt&&tt(_,ct),st&&st(_,ct)},!isPrimaryPointer(s))return;this.dragSnapToOrigin=et,this.handlers=o,this.transformPagePoint=a,this.contextWindow=rt||window;const ot=extractEventInfo(s),at=transformPoint(ot,this.transformPagePoint),{point:nt}=at,{timestamp:it}=frameData;this.history=[{...nt,timestamp:it}];const{onSessionStart:j}=o;j&&j(s,getPanInfo(at,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(s){this.handlers=s}end(){this.removeListeners&&this.removeListeners(),cancelFrame(this.updatePoint)}}function transformPoint(i,s){return s?{point:s(i.point)}:i}function subtractPoint(i,s){return{x:i.x-s.x,y:i.y-s.y}}function getPanInfo({point:i},s){return{point:i,delta:subtractPoint(i,lastDevicePoint(s)),offset:subtractPoint(i,startDevicePoint(s)),velocity:getVelocity(s,.1)}}function startDevicePoint(i){return i[0]}function lastDevicePoint(i){return i[i.length-1]}function getVelocity(i,s){if(i.length<2)return{x:0,y:0};let o=i.length-1,a=null;const rt=lastDevicePoint(i);for(;o>=0&&(a=i[o],!(rt.timestamp-a.timestamp>secondsToMilliseconds(s)));)o--;if(!a)return{x:0,y:0};const et=millisecondsToSeconds(rt.timestamp-a.timestamp);if(et===0)return{x:0,y:0};const ot={x:(rt.x-a.x)/et,y:(rt.y-a.y)/et};return ot.x===1/0&&(ot.x=0),ot.y===1/0&&(ot.y=0),ot}const SCALE_PRECISION=1e-4,SCALE_MIN=1-SCALE_PRECISION,SCALE_MAX=1+SCALE_PRECISION,TRANSLATE_PRECISION=.01,TRANSLATE_MIN=0-TRANSLATE_PRECISION,TRANSLATE_MAX=0+TRANSLATE_PRECISION;function calcLength(i){return i.max-i.min}function isNear(i,s,o){return Math.abs(i-s)<=o}function calcAxisDelta(i,s,o,a=.5){i.origin=a,i.originPoint=mixNumber$1(s.min,s.max,i.origin),i.scale=calcLength(o)/calcLength(s),i.translate=mixNumber$1(o.min,o.max,i.origin)-i.originPoint,(i.scale>=SCALE_MIN&&i.scale<=SCALE_MAX||isNaN(i.scale))&&(i.scale=1),(i.translate>=TRANSLATE_MIN&&i.translate<=TRANSLATE_MAX||isNaN(i.translate))&&(i.translate=0)}function calcBoxDelta(i,s,o,a){calcAxisDelta(i.x,s.x,o.x,a?a.originX:void 0),calcAxisDelta(i.y,s.y,o.y,a?a.originY:void 0)}function calcRelativeAxis(i,s,o){i.min=o.min+s.min,i.max=i.min+calcLength(s)}function calcRelativeBox(i,s,o){calcRelativeAxis(i.x,s.x,o.x),calcRelativeAxis(i.y,s.y,o.y)}function calcRelativeAxisPosition(i,s,o){i.min=s.min-o.min,i.max=i.min+calcLength(s)}function calcRelativePosition(i,s,o){calcRelativeAxisPosition(i.x,s.x,o.x),calcRelativeAxisPosition(i.y,s.y,o.y)}function applyConstraints(i,{min:s,max:o},a){return s!==void 0&&io&&(i=a?mixNumber$1(o,i,a.max):Math.min(i,o)),i}function calcRelativeAxisConstraints(i,s,o){return{min:s!==void 0?i.min+s:void 0,max:o!==void 0?i.max+o-(i.max-i.min):void 0}}function calcRelativeConstraints(i,{top:s,left:o,bottom:a,right:rt}){return{x:calcRelativeAxisConstraints(i.x,o,rt),y:calcRelativeAxisConstraints(i.y,s,a)}}function calcViewportAxisConstraints(i,s){let o=s.min-i.min,a=s.max-i.max;return s.max-s.mina?o=progress(s.min,s.max-a,i.min):a>rt&&(o=progress(i.min,i.max-rt,s.min)),clamp(0,1,o)}function rebaseAxisConstraints(i,s){const o={};return s.min!==void 0&&(o.min=s.min-i.min),s.max!==void 0&&(o.max=s.max-i.min),o}const defaultElastic=.35;function resolveDragElastic(i=defaultElastic){return i===!1?i=0:i===!0&&(i=defaultElastic),{x:resolveAxisElastic(i,"left","right"),y:resolveAxisElastic(i,"top","bottom")}}function resolveAxisElastic(i,s,o){return{min:resolvePointElastic(i,s),max:resolvePointElastic(i,o)}}function resolvePointElastic(i,s){return typeof i=="number"?i:i[s]||0}const createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()});function eachAxis(i){return[i("x"),i("y")]}function convertBoundingBoxToBox({top:i,left:s,right:o,bottom:a}){return{x:{min:s,max:o},y:{min:i,max:a}}}function convertBoxToBoundingBox({x:i,y:s}){return{top:s.min,right:i.max,bottom:s.max,left:i.min}}function transformBoxPoints(i,s){if(!s)return i;const o=s({x:i.left,y:i.top}),a=s({x:i.right,y:i.bottom});return{top:o.y,left:o.x,bottom:a.y,right:a.x}}function isIdentityScale(i){return i===void 0||i===1}function hasScale({scale:i,scaleX:s,scaleY:o}){return!isIdentityScale(i)||!isIdentityScale(s)||!isIdentityScale(o)}function hasTransform(i){return hasScale(i)||has2DTranslate(i)||i.z||i.rotate||i.rotateX||i.rotateY||i.skewX||i.skewY}function has2DTranslate(i){return is2DTranslate(i.x)||is2DTranslate(i.y)}function is2DTranslate(i){return i&&i!=="0%"}function scalePoint(i,s,o){const a=i-o,rt=s*a;return o+rt}function applyPointDelta(i,s,o,a,rt){return rt!==void 0&&(i=scalePoint(i,rt,a)),scalePoint(i,o,a)+s}function applyAxisDelta(i,s=0,o=1,a,rt){i.min=applyPointDelta(i.min,s,o,a,rt),i.max=applyPointDelta(i.max,s,o,a,rt)}function applyBoxDelta(i,{x:s,y:o}){applyAxisDelta(i.x,s.translate,s.scale,s.originPoint),applyAxisDelta(i.y,o.translate,o.scale,o.originPoint)}function applyTreeDeltas(i,s,o,a=!1){const rt=o.length;if(!rt)return;s.x=s.y=1;let et,ot;for(let at=0;at1.0000000000001||i<.999999999999?i:1}function translateAxis(i,s){i.min=i.min+s,i.max=i.max+s}function transformAxis(i,s,o,a,rt=.5){const et=mixNumber$1(i.min,i.max,rt);applyAxisDelta(i,s,o,et,a)}function transformBox(i,s){transformAxis(i.x,s.x,s.scaleX,s.scale,s.originX),transformAxis(i.y,s.y,s.scaleY,s.scale,s.originY)}function measureViewportBox(i,s){return convertBoundingBoxToBox(transformBoxPoints(i.getBoundingClientRect(),s))}function measurePageBox(i,s,o){const a=measureViewportBox(i,o),{scroll:rt}=s;return rt&&(translateAxis(a.x,rt.offset.x),translateAxis(a.y,rt.offset.y)),a}const getContextWindow=({current:i})=>i?i.ownerDocument.defaultView:null,elementDragControls=new WeakMap;class VisualElementDragControls{constructor(s){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.visualElement=s}start(s,{snapToCursor:o=!1}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const rt=j=>{const{dragSnapToOrigin:_}=this.getProps();_?this.pauseAnimation():this.stopAnimation(),o&&this.snapToCursor(extractEventInfo(j,"page").point)},et=(j,_)=>{var $;const{drag:tt,dragPropagation:st,onDragStart:lt}=this.getProps();if(tt&&!st&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=getGlobalLock(tt),!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),eachAxis(ht=>{let ut=this.getAxisMotionValue(ht).get()||0;if(percent.test(ut)){const{projection:pt}=this.visualElement;if(pt&&pt.layout){const mt=pt.layout.layoutBox[ht];mt&&(ut=calcLength(mt)*(parseFloat(ut)/100))}}this.originPoint[ht]=ut}),lt&&frame.postRender(()=>lt(j,_)),($=this.removeWillChange)===null||$===void 0||$.call(this),this.removeWillChange=addValueToWillChange(this.visualElement,"transform");const{animationState:ct}=this.visualElement;ct&&ct.setActive("whileDrag",!0)},ot=(j,_)=>{const{dragPropagation:$,dragDirectionLock:tt,onDirectionLock:st,onDrag:lt}=this.getProps();if(!$&&!this.openGlobalLock)return;const{offset:ct}=_;if(tt&&this.currentDirection===null){this.currentDirection=getCurrentDirection(ct),this.currentDirection!==null&&st&&st(this.currentDirection);return}this.updateAxis("x",_.point,ct),this.updateAxis("y",_.point,ct),this.visualElement.render(),lt&<(j,_)},at=(j,_)=>this.stop(j,_),nt=()=>eachAxis(j=>{var _;return this.getAnimationState(j)==="paused"&&((_=this.getAxisMotionValue(j).animation)===null||_===void 0?void 0:_.play())}),{dragSnapToOrigin:it}=this.getProps();this.panSession=new PanSession(s,{onSessionStart:rt,onStart:et,onMove:ot,onSessionEnd:at,resumeAnimation:nt},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:it,contextWindow:getContextWindow(this.visualElement)})}stop(s,o){var a;(a=this.removeWillChange)===null||a===void 0||a.call(this);const rt=this.isDragging;if(this.cancel(),!rt)return;const{velocity:et}=o;this.startAnimation(et);const{onDragEnd:ot}=this.getProps();ot&&frame.postRender(()=>ot(s,o))}cancel(){this.isDragging=!1;const{projection:s,animationState:o}=this.visualElement;s&&(s.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:a}=this.getProps();!a&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),o&&o.setActive("whileDrag",!1)}updateAxis(s,o,a){const{drag:rt}=this.getProps();if(!a||!shouldDrag(s,rt,this.currentDirection))return;const et=this.getAxisMotionValue(s);let ot=this.originPoint[s]+a[s];this.constraints&&this.constraints[s]&&(ot=applyConstraints(ot,this.constraints[s],this.elastic[s])),et.set(ot)}resolveConstraints(){var s;const{dragConstraints:o,dragElastic:a}=this.getProps(),rt=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)===null||s===void 0?void 0:s.layout,et=this.constraints;o&&isRefObject(o)?this.constraints||(this.constraints=this.resolveRefConstraints()):o&&rt?this.constraints=calcRelativeConstraints(rt.layoutBox,o):this.constraints=!1,this.elastic=resolveDragElastic(a),et!==this.constraints&&rt&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(ot=>{this.constraints!==!1&&this.getAxisMotionValue(ot)&&(this.constraints[ot]=rebaseAxisConstraints(rt.layoutBox[ot],this.constraints[ot]))})}resolveRefConstraints(){const{dragConstraints:s,onMeasureDragConstraints:o}=this.getProps();if(!s||!isRefObject(s))return!1;const a=s.current,{projection:rt}=this.visualElement;if(!rt||!rt.layout)return!1;const et=measurePageBox(a,rt.root,this.visualElement.getTransformPagePoint());let ot=calcViewportConstraints(rt.layout.layoutBox,et);if(o){const at=o(convertBoxToBoundingBox(ot));this.hasMutatedConstraints=!!at,at&&(ot=convertBoundingBoxToBox(at))}return ot}startAnimation(s){const{drag:o,dragMomentum:a,dragElastic:rt,dragTransition:et,dragSnapToOrigin:ot,onDragTransitionEnd:at}=this.getProps(),nt=this.constraints||{},it=eachAxis(j=>{if(!shouldDrag(j,o,this.currentDirection))return;let _=nt&&nt[j]||{};ot&&(_={min:0,max:0});const $=rt?200:1e6,tt=rt?40:1e7,st={type:"inertia",velocity:a?s[j]:0,bounceStiffness:$,bounceDamping:tt,timeConstant:750,restDelta:1,restSpeed:10,...et,..._};return this.startAxisValueAnimation(j,st)});return Promise.all(it).then(at)}startAxisValueAnimation(s,o){const a=this.getAxisMotionValue(s);return a.start(animateMotionValue(s,a,0,o,this.visualElement,!1,addValueToWillChange(this.visualElement,s)))}stopAnimation(){eachAxis(s=>this.getAxisMotionValue(s).stop())}pauseAnimation(){eachAxis(s=>{var o;return(o=this.getAxisMotionValue(s).animation)===null||o===void 0?void 0:o.pause()})}getAnimationState(s){var o;return(o=this.getAxisMotionValue(s).animation)===null||o===void 0?void 0:o.state}getAxisMotionValue(s){const o=`_drag${s.toUpperCase()}`,a=this.visualElement.getProps(),rt=a[o];return rt||this.visualElement.getValue(s,(a.initial?a.initial[s]:void 0)||0)}snapToCursor(s){eachAxis(o=>{const{drag:a}=this.getProps();if(!shouldDrag(o,a,this.currentDirection))return;const{projection:rt}=this.visualElement,et=this.getAxisMotionValue(o);if(rt&&rt.layout){const{min:ot,max:at}=rt.layout.layoutBox[o];et.set(s[o]-mixNumber$1(ot,at,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:s,dragConstraints:o}=this.getProps(),{projection:a}=this.visualElement;if(!isRefObject(o)||!a||!this.constraints)return;this.stopAnimation();const rt={x:0,y:0};eachAxis(ot=>{const at=this.getAxisMotionValue(ot);if(at&&this.constraints!==!1){const nt=at.get();rt[ot]=calcOrigin({min:nt,max:nt},this.constraints[ot])}});const{transformTemplate:et}=this.visualElement.getProps();this.visualElement.current.style.transform=et?et({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.resolveConstraints(),eachAxis(ot=>{if(!shouldDrag(ot,s,null))return;const at=this.getAxisMotionValue(ot),{min:nt,max:it}=this.constraints[ot];at.set(mixNumber$1(nt,it,rt[ot]))})}addListeners(){if(!this.visualElement.current)return;elementDragControls.set(this.visualElement,this);const s=this.visualElement.current,o=addPointerEvent(s,"pointerdown",nt=>{const{drag:it,dragListener:j=!0}=this.getProps();it&&j&&this.start(nt)}),a=()=>{const{dragConstraints:nt}=this.getProps();isRefObject(nt)&&nt.current&&(this.constraints=this.resolveRefConstraints())},{projection:rt}=this.visualElement,et=rt.addEventListener("measure",a);rt&&!rt.layout&&(rt.root&&rt.root.updateScroll(),rt.updateLayout()),frame.read(a);const ot=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),at=rt.addEventListener("didUpdate",({delta:nt,hasLayoutChanged:it})=>{this.isDragging&&it&&(eachAxis(j=>{const _=this.getAxisMotionValue(j);_&&(this.originPoint[j]+=nt[j].translate,_.set(_.get()+nt[j].translate))}),this.visualElement.render())});return()=>{ot(),o(),et(),at&&at()}}getProps(){const s=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:a=!1,dragPropagation:rt=!1,dragConstraints:et=!1,dragElastic:ot=defaultElastic,dragMomentum:at=!0}=s;return{...s,drag:o,dragDirectionLock:a,dragPropagation:rt,dragConstraints:et,dragElastic:ot,dragMomentum:at}}}function shouldDrag(i,s,o){return(s===!0||s===i)&&(o===null||o===i)}function getCurrentDirection(i,s=10){let o=null;return Math.abs(i.y)>s?o="y":Math.abs(i.x)>s&&(o="x"),o}class DragGesture extends Feature{constructor(s){super(s),this.removeGroupControls=noop$1,this.removeListeners=noop$1,this.controls=new VisualElementDragControls(s)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||noop$1}unmount(){this.removeGroupControls(),this.removeListeners()}}const asyncHandler=i=>(s,o)=>{i&&frame.postRender(()=>i(s,o))};class PanGesture extends Feature{constructor(){super(...arguments),this.removePointerDownListener=noop$1}onPointerDown(s){this.session=new PanSession(s,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:s,onPanStart:o,onPan:a,onPanEnd:rt}=this.node.getProps();return{onSessionStart:asyncHandler(s),onStart:asyncHandler(o),onMove:a,onEnd:(et,ot)=>{delete this.session,rt&&frame.postRender(()=>rt(et,ot))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,"pointerdown",s=>this.onPointerDown(s))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function usePresence(){const i=reactExports.useContext(PresenceContext);if(i===null)return[!0,null];const{isPresent:s,onExitComplete:o,register:a}=i,rt=reactExports.useId();return reactExports.useEffect(()=>a(rt),[]),!s&&o?[!1,()=>o&&o(rt)]:[!0]}function useIsPresent(){return isPresent(reactExports.useContext(PresenceContext))}function isPresent(i){return i===null?!0:i.isPresent}const globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(i,s){return s.max===s.min?0:i/(s.max-s.min)*100}const correctBorderRadius={correct:(i,s)=>{if(!s.target)return i;if(typeof i=="string")if(px.test(i))i=parseFloat(i);else return i;const o=pixelsToPercent(i,s.target.x),a=pixelsToPercent(i,s.target.y);return`${o}% ${a}%`}},correctBoxShadow={correct:(i,{treeScale:s,projectionDelta:o})=>{const a=i,rt=complex.parse(i);if(rt.length>5)return a;const et=complex.createTransformer(i),ot=typeof rt[0]!="number"?1:0,at=o.x.scale*s.x,nt=o.y.scale*s.y;rt[0+ot]/=at,rt[1+ot]/=nt;const it=mixNumber$1(at,nt,.5);return typeof rt[2+ot]=="number"&&(rt[2+ot]/=it),typeof rt[3+ot]=="number"&&(rt[3+ot]/=it),et(rt)}};class MeasureLayoutWithContext extends reactExports.Component{componentDidMount(){const{visualElement:s,layoutGroup:o,switchLayoutGroup:a,layoutId:rt}=this.props,{projection:et}=s;addScaleCorrector(defaultScaleCorrectors),et&&(o.group&&o.group.add(et),a&&a.register&&rt&&a.register(et),et.root.didUpdate(),et.addEventListener("animationComplete",()=>{this.safeToRemove()}),et.setOptions({...et.options,onExitComplete:()=>this.safeToRemove()})),globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(s){const{layoutDependency:o,visualElement:a,drag:rt,isPresent:et}=this.props,ot=a.projection;return ot&&(ot.isPresent=et,rt||s.layoutDependency!==o||o===void 0?ot.willUpdate():this.safeToRemove(),s.isPresent!==et&&(et?ot.promote():ot.relegate()||frame.postRender(()=>{const at=ot.getStack();(!at||!at.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:s}=this.props.visualElement;s&&(s.root.didUpdate(),microtask.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:s,layoutGroup:o,switchLayoutGroup:a}=this.props,{projection:rt}=s;rt&&(rt.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(rt),a&&a.deregister&&a.deregister(rt))}safeToRemove(){const{safeToRemove:s}=this.props;s&&s()}render(){return null}}function MeasureLayout(i){const[s,o]=usePresence(),a=reactExports.useContext(LayoutGroupContext);return jsxRuntimeExports.jsx(MeasureLayoutWithContext,{...i,layoutGroup:a,switchLayoutGroup:reactExports.useContext(SwitchLayoutGroupContext),isPresent:s,safeToRemove:o})}const defaultScaleCorrectors={borderRadius:{...correctBorderRadius,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:correctBorderRadius,borderTopRightRadius:correctBorderRadius,borderBottomLeftRadius:correctBorderRadius,borderBottomRightRadius:correctBorderRadius,boxShadow:correctBoxShadow},borders=["TopLeft","TopRight","BottomLeft","BottomRight"],numBorders=borders.length,asNumber=i=>typeof i=="string"?parseFloat(i):i,isPx=i=>typeof i=="number"||px.test(i);function mixValues(i,s,o,a,rt,et){rt?(i.opacity=mixNumber$1(0,o.opacity!==void 0?o.opacity:1,easeCrossfadeIn(a)),i.opacityExit=mixNumber$1(s.opacity!==void 0?s.opacity:1,0,easeCrossfadeOut(a))):et&&(i.opacity=mixNumber$1(s.opacity!==void 0?s.opacity:1,o.opacity!==void 0?o.opacity:1,a));for(let ot=0;otas?1:o(progress(i,s,a))}function copyAxisInto(i,s){i.min=s.min,i.max=s.max}function copyBoxInto(i,s){copyAxisInto(i.x,s.x),copyAxisInto(i.y,s.y)}function removePointDelta(i,s,o,a,rt){return i-=s,i=scalePoint(i,1/o,a),rt!==void 0&&(i=scalePoint(i,1/rt,a)),i}function removeAxisDelta(i,s=0,o=1,a=.5,rt,et=i,ot=i){if(percent.test(s)&&(s=parseFloat(s),s=mixNumber$1(ot.min,ot.max,s/100)-ot.min),typeof s!="number")return;let at=mixNumber$1(et.min,et.max,a);i===et&&(at-=s),i.min=removePointDelta(i.min,s,o,at,rt),i.max=removePointDelta(i.max,s,o,at,rt)}function removeAxisTransforms(i,s,[o,a,rt],et,ot){removeAxisDelta(i,s[o],s[a],s[rt],s.scale,et,ot)}const xKeys=["x","scaleX","originX"],yKeys=["y","scaleY","originY"];function removeBoxTransforms(i,s,o,a){removeAxisTransforms(i.x,s,xKeys,o?o.x:void 0,a?a.x:void 0),removeAxisTransforms(i.y,s,yKeys,o?o.y:void 0,a?a.y:void 0)}function isAxisDeltaZero(i){return i.translate===0&&i.scale===1}function isDeltaZero(i){return isAxisDeltaZero(i.x)&&isAxisDeltaZero(i.y)}function boxEquals(i,s){return i.x.min===s.x.min&&i.x.max===s.x.max&&i.y.min===s.y.min&&i.y.max===s.y.max}function boxEqualsRounded(i,s){return Math.round(i.x.min)===Math.round(s.x.min)&&Math.round(i.x.max)===Math.round(s.x.max)&&Math.round(i.y.min)===Math.round(s.y.min)&&Math.round(i.y.max)===Math.round(s.y.max)}function aspectRatio(i){return calcLength(i.x)/calcLength(i.y)}class NodeStack{constructor(){this.members=[]}add(s){addUniqueItem(this.members,s),s.scheduleRender()}remove(s){if(removeItem(this.members,s),s===this.prevLead&&(this.prevLead=void 0),s===this.lead){const o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(s){const o=this.members.findIndex(rt=>s===rt);if(o===0)return!1;let a;for(let rt=o;rt>=0;rt--){const et=this.members[rt];if(et.isPresent!==!1){a=et;break}}return a?(this.promote(a),!0):!1}promote(s,o){const a=this.lead;if(s!==a&&(this.prevLead=a,this.lead=s,s.show(),a)){a.instance&&a.scheduleRender(),s.scheduleRender(),s.resumeFrom=a,o&&(s.resumeFrom.preserveOpacity=!0),a.snapshot&&(s.snapshot=a.snapshot,s.snapshot.latestValues=a.animationValues||a.latestValues),s.root&&s.root.isUpdating&&(s.isLayoutDirty=!0);const{crossfade:rt}=s.options;rt===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(s=>{const{options:o,resumingFrom:a}=s;o.onExitComplete&&o.onExitComplete(),a&&a.options.onExitComplete&&a.options.onExitComplete()})}scheduleRender(){this.members.forEach(s=>{s.instance&&s.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function buildProjectionTransform(i,s,o){let a="";const rt=i.x.translate/s.x,et=i.y.translate/s.y,ot=(o==null?void 0:o.z)||0;if((rt||et||ot)&&(a=`translate3d(${rt}px, ${et}px, ${ot}px) `),(s.x!==1||s.y!==1)&&(a+=`scale(${1/s.x}, ${1/s.y}) `),o){const{transformPerspective:it,rotate:j,rotateX:_,rotateY:$,skewX:tt,skewY:st}=o;it&&(a=`perspective(${it}px) ${a}`),j&&(a+=`rotate(${j}deg) `),_&&(a+=`rotateX(${_}deg) `),$&&(a+=`rotateY(${$}deg) `),tt&&(a+=`skewX(${tt}deg) `),st&&(a+=`skewY(${st}deg) `)}const at=i.x.scale*s.x,nt=i.y.scale*s.y;return(at!==1||nt!==1)&&(a+=`scale(${at}, ${nt})`),a||"none"}const compareByDepth=(i,s)=>i.depth-s.depth;class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(s){addUniqueItem(this.children,s),this.isDirty=!0}remove(s){removeItem(this.children,s),this.isDirty=!0}forEach(s){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(s)}}function delay(i,s){const o=time.now(),a=({timestamp:rt})=>{const et=rt-o;et>=s&&(cancelFrame(a),i(et-s))};return frame.read(a,!0),()=>cancelFrame(a)}function record(i){window.MotionDebug&&window.MotionDebug.record(i)}function isSVGElement(i){return i instanceof SVGElement&&i.tagName!=="svg"}function animateSingleValue(i,s,o){const a=isMotionValue(i)?i:motionValue(i);return a.start(animateMotionValue("",a,s,o)),a.animation}const transformAxes=["","X","Y","Z"],hiddenVisibility={visibility:"hidden"},animationTarget=1e3;let id=0;const projectionFrameData={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function resetDistortingTransform(i,s,o,a){const{latestValues:rt}=s;rt[i]&&(o[i]=rt[i],s.setStaticValue(i,0),a&&(a[i]=0))}function isOptimisedAppearTree(i){if(i.hasCheckedOptimisedAppear=!0,i.root===i)return!1;const{visualElement:s}=i.options;return s?getOptimisedAppearId(s)?!0:i.parent&&!i.parent.hasCheckedOptimisedAppear?isOptimisedAppearTree(i.parent):!1:!1}function createProjectionNode({attachResizeListener:i,defaultParent:s,measureScroll:o,checkIsScrollRoot:a,resetTransform:rt}){return class{constructor(ot={},at=s==null?void 0:s()){this.id=id++,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.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,projectionFrameData.totalNodes=projectionFrameData.resolvedTargetDeltas=projectionFrameData.recalculatedProjection=0,this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes),record(projectionFrameData)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=ot,this.root=at?at.root||at:this,this.path=at?[...at.path,at]:[],this.parent=at,this.depth=at?at.depth+1:0;for(let nt=0;ntthis.root.updateBlockedByResize=!1;i(ot,()=>{this.root.updateBlockedByResize=!0,_&&_(),_=delay($,250),globalProjectionState.hasAnimatedSinceResize&&(globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation))})}nt&&this.root.registerSharedNode(nt,this),this.options.animate!==!1&&j&&(nt||it)&&this.addEventListener("didUpdate",({delta:_,hasLayoutChanged:$,hasRelativeTargetChanged:tt,layout:st})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const lt=this.options.transition||j.getDefaultTransition()||defaultLayoutTransition,{onLayoutAnimationStart:ct,onLayoutAnimationComplete:ht}=j.getProps(),ut=!this.targetLayout||!boxEqualsRounded(this.targetLayout,st)||tt,pt=!$&&tt;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||pt||$&&(ut||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(_,pt);const mt={...getValueTransition(lt,"layout"),onPlay:ct,onComplete:ht};(j.shouldReduceMotion||this.options.layoutRoot)&&(mt.delay=0,mt.type=!1),this.startAnimation(mt)}else $||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=st})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const ot=this.getStack();ot&&ot.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,cancelFrame(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(resetSkewAndRotation),this.animationId++)}getTransformTemplate(){const{visualElement:ot}=this.options;return ot&&ot.getProps().transformTemplate}willUpdate(ot=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&isOptimisedAppearTree(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let j=0;j{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 nt=0;nt{const vt=mt/1e3;mixAxisDelta(_.x,ot.x,vt),mixAxisDelta(_.y,ot.y,vt),this.setTargetDelta(_),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(calcRelativePosition($,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mixBox(this.relativeTarget,this.relativeTargetOrigin,$,vt),pt&&boxEquals(this.relativeTarget,pt)&&(this.isProjectionDirty=!1),pt||(pt=createBox()),copyBoxInto(pt,this.relativeTarget)),lt&&(this.animationValues=j,mixValues(j,it,this.latestValues,vt,ut,ht)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=vt},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(ot){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=frame.update(()=>{globalProjectionState.hasAnimatedSinceResize=!0,this.currentAnimation=animateSingleValue(0,animationTarget,{...ot,onUpdate:at=>{this.mixTargetDelta(at),ot.onUpdate&&ot.onUpdate(at)},onComplete:()=>{ot.onComplete&&ot.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 ot=this.getStack();ot&&ot.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(animationTarget),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const ot=this.getLead();let{targetWithTransforms:at,target:nt,layout:it,latestValues:j}=ot;if(!(!at||!nt||!it)){if(this!==ot&&this.layout&&it&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,it.layoutBox)){nt=this.target||createBox();const _=calcLength(this.layout.layoutBox.x);nt.x.min=ot.target.x.min,nt.x.max=nt.x.min+_;const $=calcLength(this.layout.layoutBox.y);nt.y.min=ot.target.y.min,nt.y.max=nt.y.min+$}copyBoxInto(at,nt),transformBox(at,j),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,at,j)}}registerSharedNode(ot,at){this.sharedNodes.has(ot)||this.sharedNodes.set(ot,new NodeStack),this.sharedNodes.get(ot).add(at);const it=at.options.initialPromotionConfig;at.promote({transition:it?it.transition:void 0,preserveFollowOpacity:it&&it.shouldPreserveFollowOpacity?it.shouldPreserveFollowOpacity(at):void 0})}isLead(){const ot=this.getStack();return ot?ot.lead===this:!0}getLead(){var ot;const{layoutId:at}=this.options;return at?((ot=this.getStack())===null||ot===void 0?void 0:ot.lead)||this:this}getPrevLead(){var ot;const{layoutId:at}=this.options;return at?(ot=this.getStack())===null||ot===void 0?void 0:ot.prevLead:void 0}getStack(){const{layoutId:ot}=this.options;if(ot)return this.root.sharedNodes.get(ot)}promote({needsReset:ot,transition:at,preserveFollowOpacity:nt}={}){const it=this.getStack();it&&it.promote(this,nt),ot&&(this.projectionDelta=void 0,this.needsReset=!0),at&&this.setOptions({transition:at})}relegate(){const ot=this.getStack();return ot?ot.relegate(this):!1}resetSkewAndRotation(){const{visualElement:ot}=this.options;if(!ot)return;let at=!1;const{latestValues:nt}=ot;if((nt.z||nt.rotate||nt.rotateX||nt.rotateY||nt.rotateZ||nt.skewX||nt.skewY)&&(at=!0),!at)return;const it={};nt.z&&resetDistortingTransform("z",ot,it,this.animationValues);for(let j=0;j{var at;return(at=ot.currentAnimation)===null||at===void 0?void 0:at.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(i){i.updateLayout()}function notifyLayoutUpdate(i){var s;const o=((s=i.resumeFrom)===null||s===void 0?void 0:s.snapshot)||i.snapshot;if(i.isLead()&&i.layout&&o&&i.hasListeners("didUpdate")){const{layoutBox:a,measuredBox:rt}=i.layout,{animationType:et}=i.options,ot=o.source!==i.layout.source;et==="size"?eachAxis(_=>{const $=ot?o.measuredBox[_]:o.layoutBox[_],tt=calcLength($);$.min=a[_].min,$.max=$.min+tt}):shouldAnimatePositionOnly(et,o.layoutBox,a)&&eachAxis(_=>{const $=ot?o.measuredBox[_]:o.layoutBox[_],tt=calcLength(a[_]);$.max=$.min+tt,i.relativeTarget&&!i.currentAnimation&&(i.isProjectionDirty=!0,i.relativeTarget[_].max=i.relativeTarget[_].min+tt)});const at=createDelta();calcBoxDelta(at,a,o.layoutBox);const nt=createDelta();ot?calcBoxDelta(nt,i.applyTransform(rt,!0),o.measuredBox):calcBoxDelta(nt,a,o.layoutBox);const it=!isDeltaZero(at);let j=!1;if(!i.resumeFrom){const _=i.getClosestProjectingParent();if(_&&!_.resumeFrom){const{snapshot:$,layout:tt}=_;if($&&tt){const st=createBox();calcRelativePosition(st,o.layoutBox,$.layoutBox);const lt=createBox();calcRelativePosition(lt,a,tt.layoutBox),boxEqualsRounded(st,lt)||(j=!0),_.options.layoutRoot&&(i.relativeTarget=lt,i.relativeTargetOrigin=st,i.relativeParent=_)}}}i.notifyListeners("didUpdate",{layout:a,snapshot:o,delta:nt,layoutDelta:at,hasLayoutChanged:it,hasRelativeTargetChanged:j})}else if(i.isLead()){const{onExitComplete:a}=i.options;a&&a()}i.options.transition=void 0}function propagateDirtyNodes(i){projectionFrameData.totalNodes++,i.parent&&(i.isProjecting()||(i.isProjectionDirty=i.parent.isProjectionDirty),i.isSharedProjectionDirty||(i.isSharedProjectionDirty=!!(i.isProjectionDirty||i.parent.isProjectionDirty||i.parent.isSharedProjectionDirty)),i.isTransformDirty||(i.isTransformDirty=i.parent.isTransformDirty))}function cleanDirtyNodes(i){i.isProjectionDirty=i.isSharedProjectionDirty=i.isTransformDirty=!1}function clearSnapshot(i){i.clearSnapshot()}function clearMeasurements(i){i.clearMeasurements()}function clearIsLayoutDirty(i){i.isLayoutDirty=!1}function resetTransformStyle(i){const{visualElement:s}=i.options;s&&s.getProps().onBeforeLayoutMeasure&&s.notify("BeforeLayoutMeasure"),i.resetTransform()}function finishAnimation(i){i.finishAnimation(),i.targetDelta=i.relativeTarget=i.target=void 0,i.isProjectionDirty=!0}function resolveTargetDelta(i){i.resolveTargetDelta()}function calcProjection(i){i.calcProjection()}function resetSkewAndRotation(i){i.resetSkewAndRotation()}function removeLeadSnapshots(i){i.removeLeadSnapshot()}function mixAxisDelta(i,s,o){i.translate=mixNumber$1(s.translate,0,o),i.scale=mixNumber$1(s.scale,1,o),i.origin=s.origin,i.originPoint=s.originPoint}function mixAxis(i,s,o,a){i.min=mixNumber$1(s.min,o.min,a),i.max=mixNumber$1(s.max,o.max,a)}function mixBox(i,s,o,a){mixAxis(i.x,s.x,o.x,a),mixAxis(i.y,s.y,o.y,a)}function hasOpacityCrossfade(i){return i.animationValues&&i.animationValues.opacityExit!==void 0}const defaultLayoutTransition={duration:.45,ease:[.4,0,.1,1]},userAgentContains=i=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(i),roundPoint=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:noop$1;function roundAxis(i){i.min=roundPoint(i.min),i.max=roundPoint(i.max)}function roundBox(i){roundAxis(i.x),roundAxis(i.y)}function shouldAnimatePositionOnly(i,s,o){return i==="position"||i==="preserve-aspect"&&!isNear(aspectRatio(s),aspectRatio(o),.2)}const DocumentProjectionNode=createProjectionNode({attachResizeListener:(i,s)=>addDomEvent(i,"resize",s),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rootProjectionNode={current:void 0},HTMLProjectionNode=createProjectionNode({measureScroll:i=>({x:i.scrollLeft,y:i.scrollTop}),defaultParent:()=>{if(!rootProjectionNode.current){const i=new DocumentProjectionNode({});i.mount(window),i.setOptions({layoutScroll:!0}),rootProjectionNode.current=i}return rootProjectionNode.current},resetTransform:(i,s)=>{i.style.transform=s!==void 0?s:"none"},checkIsScrollRoot:i=>window.getComputedStyle(i).position==="fixed"}),drag={pan:{Feature:PanGesture},drag:{Feature:DragGesture,ProjectionNode:HTMLProjectionNode,MeasureLayout}},prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser)if(window.matchMedia){const i=window.matchMedia("(prefers-reduced-motion)"),s=()=>prefersReducedMotion.current=i.matches;i.addListener(s),s()}else prefersReducedMotion.current=!1}function updateMotionValuesFromProps(i,s,o){for(const a in s){const rt=s[a],et=o[a];if(isMotionValue(rt))i.addValue(a,rt);else if(isMotionValue(et))i.addValue(a,motionValue(rt,{owner:i}));else if(et!==rt)if(i.hasValue(a)){const ot=i.getValue(a);ot.liveStyle===!0?ot.jump(rt):ot.hasAnimated||ot.set(rt)}else{const ot=i.getStaticValue(a);i.addValue(a,motionValue(ot!==void 0?ot:rt,{owner:i}))}}for(const a in o)s[a]===void 0&&i.removeValue(a);return s}const visualElementStore=new WeakMap,valueTypes=[...dimensionValueTypes,color,complex],findValueType=i=>valueTypes.find(testValueType(i)),propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],numVariantProps=variantProps.length;class VisualElement{scrapeMotionValuesFromProps(s,o,a){return{}}constructor({parent:s,props:o,presenceContext:a,reducedMotionConfig:rt,blockInitialAnimation:et,visualState:ot},at={}){this.applyWillChange=!1,this.resolveKeyframes=($,tt,st,lt)=>new this.KeyframeResolver($,tt,st,lt,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=KeyframeResolver,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=()=>frame.render(this.render,!1,!0);const{latestValues:nt,renderState:it}=ot;this.latestValues=nt,this.baseTarget={...nt},this.initialValues=o.initial?{...nt}:{},this.renderState=it,this.parent=s,this.props=o,this.presenceContext=a,this.depth=s?s.depth+1:0,this.reducedMotionConfig=rt,this.options=at,this.blockInitialAnimation=!!et,this.isControllingVariants=isControllingVariants(o),this.isVariantNode=isVariantNode(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(s&&s.current);const{willChange:j,..._}=this.scrapeMotionValuesFromProps(o,{},this);for(const $ in _){const tt=_[$];nt[$]!==void 0&&isMotionValue(tt)&&tt.set(nt[$],!1)}}mount(s){this.current=s,visualElementStore.set(s,this),this.projection&&!this.projection.instance&&this.projection.mount(s),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,a)=>this.bindToMotionValue(a,o)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){visualElementStore.delete(this.current),this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(s=>s()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const o=this.features[s];o&&(o.unmount(),o.isMounted=!1)}this.current=null}bindToMotionValue(s,o){const a=transformProps.has(s),rt=o.on("change",ot=>{this.latestValues[s]=ot,this.props.onUpdate&&frame.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0)}),et=o.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(s,()=>{rt(),et(),o.owner&&o.stop()})}sortNodePosition(s){return!this.current||!this.sortInstanceNodePosition||this.type!==s.type?0:this.sortInstanceNodePosition(this.current,s.current)}updateFeatures(){let s="animation";for(s in featureDefinitions){const o=featureDefinitions[s];if(!o)continue;const{isEnabled:a,Feature:rt}=o;if(!this.features[s]&&rt&&a(this.props)&&(this.features[s]=new rt(this)),this.features[s]){const et=this.features[s];et.isMounted?et.update():(et.mount(),et.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(s){return this.latestValues[s]}setStaticValue(s,o){this.latestValues[s]=o}update(s,o){(s.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=s,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let a=0;ao.variantChildren.delete(s)}addValue(s,o){const a=this.values.get(s);o!==a&&(a&&this.removeValue(s),this.bindToMotionValue(s,o),this.values.set(s,o),this.latestValues[s]=o.get())}removeValue(s){this.values.delete(s);const o=this.valueSubscriptions.get(s);o&&(o(),this.valueSubscriptions.delete(s)),delete this.latestValues[s],this.removeValueFromRenderState(s,this.renderState)}hasValue(s){return this.values.has(s)}getValue(s,o){if(this.props.values&&this.props.values[s])return this.props.values[s];let a=this.values.get(s);return a===void 0&&o!==void 0&&(a=motionValue(o===null?void 0:o,{owner:this}),this.addValue(s,a)),a}readValue(s,o){var a;let rt=this.latestValues[s]!==void 0||!this.current?this.latestValues[s]:(a=this.getBaseTargetFromProps(this.props,s))!==null&&a!==void 0?a:this.readValueFromInstance(this.current,s,this.options);return rt!=null&&(typeof rt=="string"&&(isNumericalString(rt)||isZeroValueString(rt))?rt=parseFloat(rt):!findValueType(rt)&&complex.test(o)&&(rt=getAnimatableNone(s,o)),this.setBaseTarget(s,isMotionValue(rt)?rt.get():rt)),isMotionValue(rt)?rt.get():rt}setBaseTarget(s,o){this.baseTarget[s]=o}getBaseTarget(s){var o;const{initial:a}=this.props;let rt;if(typeof a=="string"||typeof a=="object"){const ot=resolveVariantFromProps(this.props,a,(o=this.presenceContext)===null||o===void 0?void 0:o.custom);ot&&(rt=ot[s])}if(a&&rt!==void 0)return rt;const et=this.getBaseTargetFromProps(this.props,s);return et!==void 0&&!isMotionValue(et)?et:this.initialValues[s]!==void 0&&rt===void 0?void 0:this.baseTarget[s]}on(s,o){return this.events[s]||(this.events[s]=new SubscriptionManager),this.events[s].add(o)}notify(s,...o){this.events[s]&&this.events[s].notify(...o)}}class DOMVisualElement extends VisualElement{constructor(){super(...arguments),this.KeyframeResolver=DOMKeyframesResolver}sortInstanceNodePosition(s,o){return s.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(s,o){return s.style?s.style[o]:void 0}removeValueFromRenderState(s,{vars:o,style:a}){delete o[s],delete a[s]}}function getComputedStyle(i){return window.getComputedStyle(i)}class HTMLVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0}readValueFromInstance(s,o){if(transformProps.has(o)){const a=getDefaultValueType(o);return a&&a.default||0}else{const a=getComputedStyle(s),rt=(isCSSVariableName(o)?a.getPropertyValue(o):a[o])||0;return typeof rt=="string"?rt.trim():rt}}measureInstanceViewportBox(s,{transformPagePoint:o}){return measureViewportBox(s,o)}build(s,o,a){buildHTMLStyles(s,o,a.transformTemplate)}scrapeMotionValuesFromProps(s,o,a){return scrapeMotionValuesFromProps$1(s,o,a)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:s}=this.props;isMotionValue(s)&&(this.childSubscription=s.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}renderInstance(s,o,a,rt){renderHTML(s,o,a,rt)}}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(s,o){return s[o]}readValueFromInstance(s,o){if(transformProps.has(o)){const a=getDefaultValueType(o);return a&&a.default||0}return o=camelCaseAttributes.has(o)?o:camelToDash(o),s.getAttribute(o)}measureInstanceViewportBox(){return createBox()}scrapeMotionValuesFromProps(s,o,a){return scrapeMotionValuesFromProps(s,o,a)}build(s,o,a){buildSVGAttrs(s,o,this.isSVGTag,a.transformTemplate)}renderInstance(s,o,a,rt){renderSVG(s,o,a,rt)}mount(s){this.isSVGTag=isSVGTag(s.tagName),super.mount(s)}}const createDomVisualElement=(i,s)=>isSVGComponent(i)?new SVGVisualElement(s):new HTMLVisualElement(s,{allowProjection:i!==reactExports.Fragment}),layout={layout:{ProjectionNode:HTMLProjectionNode,MeasureLayout}},preloadedFeatures={...animations,...gestureAnimations,...drag,...layout},motion=createMotionProxy((i,s)=>createDomMotionConfig(i,s,preloadedFeatures,createDomVisualElement));function useIsMounted(){const i=reactExports.useRef(!1);return useIsomorphicLayoutEffect$1(()=>(i.current=!0,()=>{i.current=!1}),[]),i}function useForceUpdate(){const i=useIsMounted(),[s,o]=reactExports.useState(0),a=reactExports.useCallback(()=>{i.current&&o(s+1)},[s]);return[reactExports.useCallback(()=>frame.postRender(a),[a]),s]}class PopChildMeasure extends reactExports.Component{getSnapshotBeforeUpdate(s){const o=this.props.childRef.current;if(o&&s.isPresent&&!this.props.isPresent){const a=this.props.sizeRef.current;a.height=o.offsetHeight||0,a.width=o.offsetWidth||0,a.top=o.offsetTop,a.left=o.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function PopChild({children:i,isPresent:s}){const o=reactExports.useId(),a=reactExports.useRef(null),rt=reactExports.useRef({width:0,height:0,top:0,left:0}),{nonce:et}=reactExports.useContext(MotionConfigContext);return reactExports.useInsertionEffect(()=>{const{width:ot,height:at,top:nt,left:it}=rt.current;if(s||!a.current||!ot||!at)return;a.current.dataset.motionPopId=o;const j=document.createElement("style");return et&&(j.nonce=et),document.head.appendChild(j),j.sheet&&j.sheet.insertRule(` + )`;return{...!a&&rt&&et,...a?{bgImage:at}:{bgColor:ot}}},baseStyleLabel$3={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},baseStyleTrack$1=i=>({bg:mode("gray.100","whiteAlpha.300")(i)}),baseStyleFilledTrack$1=i=>({transitionProperty:"common",transitionDuration:"slow",...filledStyle(i)}),baseStyle$w=definePartsStyle$j(i=>({label:baseStyleLabel$3,filledTrack:baseStyleFilledTrack$1(i),track:baseStyleTrack$1(i)})),sizes$f={xs:definePartsStyle$j({track:{h:"1"}}),sm:definePartsStyle$j({track:{h:"2"}}),md:definePartsStyle$j({track:{h:"3"}}),lg:definePartsStyle$j({track:{h:"4"}})},progressTheme=defineMultiStyleConfig$j({sizes:sizes$f,baseStyle:baseStyle$w,defaultProps:{size:"md",colorScheme:"blue"}}),isFunction$3=i=>typeof i=="function";function runIfFn$1(i,...s){return isFunction$3(i)?i(...s):i}var{definePartsStyle:definePartsStyle$i,defineMultiStyleConfig:defineMultiStyleConfig$i}=createMultiStyleConfigHelpers(checkboxAnatomy.keys),$size$3=cssVar$1("checkbox-size"),baseStyleControl$1=i=>{const{colorScheme:s}=i;return{w:$size$3.reference,h:$size$3.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:mode(`${s}.500`,`${s}.200`)(i),borderColor:mode(`${s}.500`,`${s}.200`)(i),color:mode("white","gray.900")(i),_hover:{bg:mode(`${s}.600`,`${s}.300`)(i),borderColor:mode(`${s}.600`,`${s}.300`)(i)},_disabled:{borderColor:mode("gray.200","transparent")(i),bg:mode("gray.200","whiteAlpha.300")(i),color:mode("gray.500","whiteAlpha.500")(i)}},_indeterminate:{bg:mode(`${s}.500`,`${s}.200`)(i),borderColor:mode(`${s}.500`,`${s}.200`)(i),color:mode("white","gray.900")(i)},_disabled:{bg:mode("gray.100","whiteAlpha.100")(i),borderColor:mode("gray.100","transparent")(i)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:mode("red.500","red.300")(i)}}},baseStyleContainer$3={_disabled:{cursor:"not-allowed"}},baseStyleLabel$2={userSelect:"none",_disabled:{opacity:.4}},baseStyleIcon$6={transitionProperty:"transform",transitionDuration:"normal"},baseStyle$v=definePartsStyle$i(i=>({icon:baseStyleIcon$6,container:baseStyleContainer$3,control:runIfFn$1(baseStyleControl$1,i),label:baseStyleLabel$2})),sizes$e={sm:definePartsStyle$i({control:{[$size$3.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:definePartsStyle$i({control:{[$size$3.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:definePartsStyle$i({control:{[$size$3.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},checkboxTheme=defineMultiStyleConfig$i({baseStyle:baseStyle$v,sizes:sizes$e,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:defineMultiStyleConfig$h,definePartsStyle:definePartsStyle$h}=createMultiStyleConfigHelpers(radioAnatomy.keys),baseStyleControl=i=>{var s;const o=(s=runIfFn$1(checkboxTheme.baseStyle,i))==null?void 0:s.control;return{...o,borderRadius:"full",_checked:{...o==null?void 0:o._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},baseStyle$u=definePartsStyle$h(i=>{var s,o,a,rt;return{label:(o=(s=checkboxTheme).baseStyle)==null?void 0:o.call(s,i).label,container:(rt=(a=checkboxTheme).baseStyle)==null?void 0:rt.call(a,i).container,control:baseStyleControl(i)}}),sizes$d={md:definePartsStyle$h({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:definePartsStyle$h({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:definePartsStyle$h({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},radioTheme=defineMultiStyleConfig$h({baseStyle:baseStyle$u,sizes:sizes$d,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:defineMultiStyleConfig$g,definePartsStyle:definePartsStyle$g}=createMultiStyleConfigHelpers(selectAnatomy.keys),$bg$b=cssVar$1("select-bg"),_a$3,baseStyleField$1={...(_a$3=inputTheme.baseStyle)==null?void 0:_a$3.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:$bg$b.reference,[$bg$b.variable]:"colors.white",_dark:{[$bg$b.variable]:"colors.gray.700"},"> option, > optgroup":{bg:$bg$b.reference}},baseStyleIcon$5={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},baseStyle$t=definePartsStyle$g({field:baseStyleField$1,icon:baseStyleIcon$5}),iconSpacing={paddingInlineEnd:"8"},_a2$1,_b$1,_c,_d,_e,_f,_g,_h,sizes$c={lg:{...(_a2$1=inputTheme.sizes)==null?void 0:_a2$1.lg,field:{...(_b$1=inputTheme.sizes)==null?void 0:_b$1.lg.field,...iconSpacing}},md:{...(_c=inputTheme.sizes)==null?void 0:_c.md,field:{...(_d=inputTheme.sizes)==null?void 0:_d.md.field,...iconSpacing}},sm:{...(_e=inputTheme.sizes)==null?void 0:_e.sm,field:{...(_f=inputTheme.sizes)==null?void 0:_f.sm.field,...iconSpacing}},xs:{...(_g=inputTheme.sizes)==null?void 0:_g.xs,field:{...(_h=inputTheme.sizes)==null?void 0:_h.xs.field,...iconSpacing},icon:{insetEnd:"1"}}},selectTheme=defineMultiStyleConfig$g({baseStyle:baseStyle$t,sizes:sizes$c,variants:inputTheme.variants,defaultProps:inputTheme.defaultProps}),$startColor=cssVar$1("skeleton-start-color"),$endColor=cssVar$1("skeleton-end-color"),baseStyle$s={[$startColor.variable]:"colors.gray.100",[$endColor.variable]:"colors.gray.400",_dark:{[$startColor.variable]:"colors.gray.800",[$endColor.variable]:"colors.gray.600"},background:$startColor.reference,borderColor:$endColor.reference,opacity:.7,borderRadius:"sm"},skeletonTheme={baseStyle:baseStyle$s},$bg$a=cssVar$1("skip-link-bg"),baseStyle$r={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[$bg$a.variable]:"colors.white",_dark:{[$bg$a.variable]:"colors.gray.700"},bg:$bg$a.reference}},skipLinkTheme={baseStyle:baseStyle$r},{defineMultiStyleConfig:defineMultiStyleConfig$f,definePartsStyle:definePartsStyle$f}=createMultiStyleConfigHelpers(sliderAnatomy.keys),$thumbSize=cssVar$1("slider-thumb-size"),$trackSize=cssVar$1("slider-track-size"),$bg$9=cssVar$1("slider-bg"),baseStyleContainer$2=i=>{const{orientation:s}=i;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...orient({orientation:s,vertical:{h:"100%"},horizontal:{w:"100%"}})}},baseStyleTrack=i=>({...orient({orientation:i.orientation,horizontal:{h:$trackSize.reference},vertical:{w:$trackSize.reference}}),overflow:"hidden",borderRadius:"sm",[$bg$9.variable]:"colors.gray.200",_dark:{[$bg$9.variable]:"colors.whiteAlpha.200"},_disabled:{[$bg$9.variable]:"colors.gray.300",_dark:{[$bg$9.variable]:"colors.whiteAlpha.300"}},bg:$bg$9.reference}),baseStyleThumb=i=>{const{orientation:s}=i;return{...orient({orientation:s,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:$thumbSize.reference,h:$thumbSize.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"}}},baseStyleFilledTrack=i=>{const{colorScheme:s}=i;return{width:"inherit",height:"inherit",[$bg$9.variable]:`colors.${s}.500`,_dark:{[$bg$9.variable]:`colors.${s}.200`},bg:$bg$9.reference}},baseStyle$q=definePartsStyle$f(i=>({container:baseStyleContainer$2(i),track:baseStyleTrack(i),thumb:baseStyleThumb(i),filledTrack:baseStyleFilledTrack(i)})),sizeLg=definePartsStyle$f({container:{[$thumbSize.variable]:"sizes.4",[$trackSize.variable]:"sizes.1"}}),sizeMd=definePartsStyle$f({container:{[$thumbSize.variable]:"sizes.3.5",[$trackSize.variable]:"sizes.1"}}),sizeSm=definePartsStyle$f({container:{[$thumbSize.variable]:"sizes.2.5",[$trackSize.variable]:"sizes.0.5"}}),sizes$b={lg:sizeLg,md:sizeMd,sm:sizeSm},sliderTheme=defineMultiStyleConfig$f({baseStyle:baseStyle$q,sizes:sizes$b,defaultProps:{size:"md",colorScheme:"blue"}}),$size$2=cssVar("spinner-size"),baseStyle$p={width:[$size$2.reference],height:[$size$2.reference]},sizes$a={xs:{[$size$2.variable]:"sizes.3"},sm:{[$size$2.variable]:"sizes.4"},md:{[$size$2.variable]:"sizes.6"},lg:{[$size$2.variable]:"sizes.8"},xl:{[$size$2.variable]:"sizes.12"}},spinnerTheme={baseStyle:baseStyle$p,sizes:sizes$a,defaultProps:{size:"md"}},{defineMultiStyleConfig:defineMultiStyleConfig$e,definePartsStyle:definePartsStyle$e}=createMultiStyleConfigHelpers(statAnatomy.keys),baseStyleLabel$1={fontWeight:"medium"},baseStyleHelpText={opacity:.8,marginBottom:"2"},baseStyleNumber={verticalAlign:"baseline",fontWeight:"semibold"},baseStyleIcon$4={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},baseStyle$o=definePartsStyle$e({container:{},label:baseStyleLabel$1,helpText:baseStyleHelpText,number:baseStyleNumber,icon:baseStyleIcon$4}),sizes$9={md:definePartsStyle$e({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},statTheme=defineMultiStyleConfig$e({baseStyle:baseStyle$o,sizes:sizes$9,defaultProps:{size:"md"}}),$bg$8=cssVar$1("kbd-bg"),baseStyle$n={[$bg$8.variable]:"colors.gray.100",_dark:{[$bg$8.variable]:"colors.whiteAlpha.100"},bg:$bg$8.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},kbdTheme={baseStyle:baseStyle$n},baseStyle$m={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},linkTheme={baseStyle:baseStyle$m},{defineMultiStyleConfig:defineMultiStyleConfig$d,definePartsStyle:definePartsStyle$d}=createMultiStyleConfigHelpers(listAnatomy.keys),baseStyleIcon$3={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},baseStyle$l=definePartsStyle$d({icon:baseStyleIcon$3}),listTheme=defineMultiStyleConfig$d({baseStyle:baseStyle$l}),{defineMultiStyleConfig:defineMultiStyleConfig$c,definePartsStyle:definePartsStyle$c}=createMultiStyleConfigHelpers(menuAnatomy.keys),$bg$7=cssVar$1("menu-bg"),$shadow$2=cssVar$1("menu-shadow"),baseStyleList={[$bg$7.variable]:"#fff",[$shadow$2.variable]:"shadows.sm",_dark:{[$bg$7.variable]:"colors.gray.700",[$shadow$2.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:$bg$7.reference,boxShadow:$shadow$2.reference},baseStyleItem={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[$bg$7.variable]:"colors.gray.100",_dark:{[$bg$7.variable]:"colors.whiteAlpha.100"}},_active:{[$bg$7.variable]:"colors.gray.200",_dark:{[$bg$7.variable]:"colors.whiteAlpha.200"}},_expanded:{[$bg$7.variable]:"colors.gray.100",_dark:{[$bg$7.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:$bg$7.reference},baseStyleGroupTitle={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},baseStyleIcon$2={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},baseStyleCommand={opacity:.6},baseStyleDivider={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},baseStyleButton$1={transitionProperty:"common",transitionDuration:"normal"},baseStyle$k=definePartsStyle$c({button:baseStyleButton$1,list:baseStyleList,item:baseStyleItem,groupTitle:baseStyleGroupTitle,icon:baseStyleIcon$2,command:baseStyleCommand,divider:baseStyleDivider}),menuTheme=defineMultiStyleConfig$c({baseStyle:baseStyle$k}),{defineMultiStyleConfig:defineMultiStyleConfig$b,definePartsStyle:definePartsStyle$b}=createMultiStyleConfigHelpers(modalAnatomy.keys),$bg$6=cssVar$1("modal-bg"),$shadow$1=cssVar$1("modal-shadow"),baseStyleOverlay$1={bg:"blackAlpha.600",zIndex:"modal"},baseStyleDialogContainer$1=i=>{const{isCentered:s,scrollBehavior:o}=i;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:s?"center":"flex-start",overflow:o==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},baseStyleDialog$1=i=>{const{isCentered:s,scrollBehavior:o}=i;return{borderRadius:"md",color:"inherit",my:s?"auto":"16",mx:s?"auto":void 0,zIndex:"modal",maxH:o==="inside"?"calc(100% - 7.5rem)":void 0,[$bg$6.variable]:"colors.white",[$shadow$1.variable]:"shadows.lg",_dark:{[$bg$6.variable]:"colors.gray.700",[$shadow$1.variable]:"shadows.dark-lg"},bg:$bg$6.reference,boxShadow:$shadow$1.reference}},baseStyleHeader$2={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},baseStyleCloseButton$2={position:"absolute",top:"2",insetEnd:"3"},baseStyleBody$2=i=>{const{scrollBehavior:s}=i;return{px:"6",py:"2",flex:"1",overflow:s==="inside"?"auto":void 0}},baseStyleFooter$2={px:"6",py:"4"},baseStyle$j=definePartsStyle$b(i=>({overlay:baseStyleOverlay$1,dialogContainer:runIfFn$1(baseStyleDialogContainer$1,i),dialog:runIfFn$1(baseStyleDialog$1,i),header:baseStyleHeader$2,closeButton:baseStyleCloseButton$2,body:runIfFn$1(baseStyleBody$2,i),footer:baseStyleFooter$2}));function getSize$3(i){return definePartsStyle$b(i==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:i}})}var sizes$8={xs:getSize$3("xs"),sm:getSize$3("sm"),md:getSize$3("md"),lg:getSize$3("lg"),xl:getSize$3("xl"),"2xl":getSize$3("2xl"),"3xl":getSize$3("3xl"),"4xl":getSize$3("4xl"),"5xl":getSize$3("5xl"),"6xl":getSize$3("6xl"),full:getSize$3("full")},modalTheme=defineMultiStyleConfig$b({baseStyle:baseStyle$j,sizes:sizes$8,defaultProps:{size:"md"}}),{defineMultiStyleConfig:defineMultiStyleConfig$a,definePartsStyle:definePartsStyle$a}=createMultiStyleConfigHelpers(numberInputAnatomy.keys),$stepperWidth=cssVar("number-input-stepper-width"),$inputPadding=cssVar("number-input-input-padding"),inputPaddingValue=calc($stepperWidth).add("0.5rem").toString(),$bg$5=cssVar("number-input-bg"),$fg$3=cssVar("number-input-color"),$border$2=cssVar("number-input-border-color"),baseStyleRoot={[$stepperWidth.variable]:"sizes.6",[$inputPadding.variable]:inputPaddingValue},baseStyleField=i=>{var s,o;return(o=(s=runIfFn$1(inputTheme.baseStyle,i))==null?void 0:s.field)!=null?o:{}},baseStyleStepperGroup={width:$stepperWidth.reference},baseStyleStepper={borderStart:"1px solid",borderStartColor:$border$2.reference,color:$fg$3.reference,bg:$bg$5.reference,[$fg$3.variable]:"colors.chakra-body-text",[$border$2.variable]:"colors.chakra-border-color",_dark:{[$fg$3.variable]:"colors.whiteAlpha.800",[$border$2.variable]:"colors.whiteAlpha.300"},_active:{[$bg$5.variable]:"colors.gray.200",_dark:{[$bg$5.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},baseStyle$i=definePartsStyle$a(i=>{var s;return{root:baseStyleRoot,field:(s=runIfFn$1(baseStyleField,i))!=null?s:{},stepperGroup:baseStyleStepperGroup,stepper:baseStyleStepper}});function getSize$2(i){var s,o,a;const rt=(s=inputTheme.sizes)==null?void 0:s[i],et={lg:"md",md:"md",sm:"sm",xs:"sm"},ot=(a=(o=rt.field)==null?void 0:o.fontSize)!=null?a:"md",at=typography_default.fontSizes[ot];return definePartsStyle$a({field:{...rt.field,paddingInlineEnd:$inputPadding.reference,verticalAlign:"top"},stepper:{fontSize:calc(at).multiply(.75).toString(),_first:{borderTopEndRadius:et[i]},_last:{borderBottomEndRadius:et[i],mt:"-1px",borderTopWidth:1}}})}var sizes$7={xs:getSize$2("xs"),sm:getSize$2("sm"),md:getSize$2("md"),lg:getSize$2("lg")},numberInputTheme=defineMultiStyleConfig$a({baseStyle:baseStyle$i,sizes:sizes$7,variants:inputTheme.variants,defaultProps:inputTheme.defaultProps}),_a$2,baseStyle$h={...(_a$2=inputTheme.baseStyle)==null?void 0:_a$2.field,textAlign:"center"},sizes$6={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"}},_a2,_b,variants$8={outline:i=>{var s,o,a;return(a=(o=runIfFn$1((s=inputTheme.variants)==null?void 0:s.outline,i))==null?void 0:o.field)!=null?a:{}},flushed:i=>{var s,o,a;return(a=(o=runIfFn$1((s=inputTheme.variants)==null?void 0:s.flushed,i))==null?void 0:o.field)!=null?a:{}},filled:i=>{var s,o,a;return(a=(o=runIfFn$1((s=inputTheme.variants)==null?void 0:s.filled,i))==null?void 0:o.field)!=null?a:{}},unstyled:(_b=(_a2=inputTheme.variants)==null?void 0:_a2.unstyled.field)!=null?_b:{}},pinInputTheme={baseStyle:baseStyle$h,sizes:sizes$6,variants:variants$8,defaultProps:inputTheme.defaultProps},{defineMultiStyleConfig:defineMultiStyleConfig$9,definePartsStyle:definePartsStyle$9}=createMultiStyleConfigHelpers(popoverAnatomy.keys),$popperBg=cssVar("popper-bg"),$arrowBg=cssVar("popper-arrow-bg"),$arrowShadowColor=cssVar("popper-arrow-shadow-color"),baseStylePopper={zIndex:10},baseStyleContent={[$popperBg.variable]:"colors.white",bg:$popperBg.reference,[$arrowBg.variable]:$popperBg.reference,[$arrowShadowColor.variable]:"colors.gray.200",_dark:{[$popperBg.variable]:"colors.gray.700",[$arrowShadowColor.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},baseStyleHeader$1={px:3,py:2,borderBottomWidth:"1px"},baseStyleBody$1={px:3,py:2},baseStyleFooter$1={px:3,py:2,borderTopWidth:"1px"},baseStyleCloseButton$1={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},baseStyle$g=definePartsStyle$9({popper:baseStylePopper,content:baseStyleContent,header:baseStyleHeader$1,body:baseStyleBody$1,footer:baseStyleFooter$1,closeButton:baseStyleCloseButton$1}),popoverTheme=defineMultiStyleConfig$9({baseStyle:baseStyle$g}),{definePartsStyle:definePartsStyle$8,defineMultiStyleConfig:defineMultiStyleConfig$8}=createMultiStyleConfigHelpers(drawerAnatomy.keys),$bg$4=cssVar$1("drawer-bg"),$bs=cssVar$1("drawer-box-shadow");function getSize$1(i){return definePartsStyle$8(i==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:i}})}var baseStyleOverlay={bg:"blackAlpha.600",zIndex:"modal"},baseStyleDialogContainer={display:"flex",zIndex:"modal",justifyContent:"center"},baseStyleDialog=i=>{const{isFullHeight:s}=i;return{...s&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[$bg$4.variable]:"colors.white",[$bs.variable]:"shadows.lg",_dark:{[$bg$4.variable]:"colors.gray.700",[$bs.variable]:"shadows.dark-lg"},bg:$bg$4.reference,boxShadow:$bs.reference}},baseStyleHeader={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},baseStyleCloseButton={position:"absolute",top:"2",insetEnd:"3"},baseStyleBody={px:"6",py:"2",flex:"1",overflow:"auto"},baseStyleFooter={px:"6",py:"4"},baseStyle$f=definePartsStyle$8(i=>({overlay:baseStyleOverlay,dialogContainer:baseStyleDialogContainer,dialog:runIfFn$1(baseStyleDialog,i),header:baseStyleHeader,closeButton:baseStyleCloseButton,body:baseStyleBody,footer:baseStyleFooter})),sizes$5={xs:getSize$1("xs"),sm:getSize$1("md"),md:getSize$1("lg"),lg:getSize$1("2xl"),xl:getSize$1("4xl"),full:getSize$1("full")},drawerTheme=defineMultiStyleConfig$8({baseStyle:baseStyle$f,sizes:sizes$5,defaultProps:{size:"xs"}}),{definePartsStyle:definePartsStyle$7,defineMultiStyleConfig:defineMultiStyleConfig$7}=createMultiStyleConfigHelpers(editableAnatomy.keys),baseStylePreview={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},baseStyleInput={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},baseStyleTextarea={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},baseStyle$e=definePartsStyle$7({preview:baseStylePreview,input:baseStyleInput,textarea:baseStyleTextarea}),editableTheme=defineMultiStyleConfig$7({baseStyle:baseStyle$e}),{definePartsStyle:definePartsStyle$6,defineMultiStyleConfig:defineMultiStyleConfig$6}=createMultiStyleConfigHelpers(formAnatomy.keys),$fg$2=cssVar$1("form-control-color"),baseStyleRequiredIndicator={marginStart:"1",[$fg$2.variable]:"colors.red.500",_dark:{[$fg$2.variable]:"colors.red.300"},color:$fg$2.reference},baseStyleHelperText={mt:"2",[$fg$2.variable]:"colors.gray.600",_dark:{[$fg$2.variable]:"colors.whiteAlpha.600"},color:$fg$2.reference,lineHeight:"normal",fontSize:"sm"},baseStyle$d=definePartsStyle$6({container:{width:"100%",position:"relative"},requiredIndicator:baseStyleRequiredIndicator,helperText:baseStyleHelperText}),formTheme=defineMultiStyleConfig$6({baseStyle:baseStyle$d}),{definePartsStyle:definePartsStyle$5,defineMultiStyleConfig:defineMultiStyleConfig$5}=createMultiStyleConfigHelpers(formErrorAnatomy.keys),$fg$1=cssVar$1("form-error-color"),baseStyleText={[$fg$1.variable]:"colors.red.500",_dark:{[$fg$1.variable]:"colors.red.300"},color:$fg$1.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},baseStyleIcon$1={marginEnd:"0.5em",[$fg$1.variable]:"colors.red.500",_dark:{[$fg$1.variable]:"colors.red.300"},color:$fg$1.reference},baseStyle$c=definePartsStyle$5({text:baseStyleText,icon:baseStyleIcon$1}),formErrorTheme=defineMultiStyleConfig$5({baseStyle:baseStyle$c}),baseStyle$b={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},formLabelTheme={baseStyle:baseStyle$b},baseStyle$a={fontFamily:"heading",fontWeight:"bold"},sizes$4={"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}},headingTheme={baseStyle:baseStyle$a,sizes:sizes$4,defaultProps:{size:"xl"}},{defineMultiStyleConfig:defineMultiStyleConfig$4,definePartsStyle:definePartsStyle$4}=createMultiStyleConfigHelpers(breadcrumbAnatomy.keys),$decor=cssVar$1("breadcrumb-link-decor"),baseStyleLink={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:$decor.reference,[$decor.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[$decor.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},baseStyle$9=definePartsStyle$4({link:baseStyleLink}),breadcrumbTheme=defineMultiStyleConfig$4({baseStyle:baseStyle$9}),baseStyle$8={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"}}},variantGhost=i=>{const{colorScheme:s,theme:o}=i;if(s==="gray")return{color:mode("gray.800","whiteAlpha.900")(i),_hover:{bg:mode("gray.100","whiteAlpha.200")(i)},_active:{bg:mode("gray.200","whiteAlpha.300")(i)}};const a=transparentize(`${s}.200`,.12)(o),rt=transparentize(`${s}.200`,.24)(o);return{color:mode(`${s}.600`,`${s}.200`)(i),bg:"transparent",_hover:{bg:mode(`${s}.50`,a)(i)},_active:{bg:mode(`${s}.100`,rt)(i)}}},variantOutline=i=>{const{colorScheme:s}=i,o=mode("gray.200","whiteAlpha.300")(i);return{border:"1px solid",borderColor:s==="gray"?o:"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"},...runIfFn$1(variantGhost,i)}},accessibleColorMap={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},variantSolid$2=i=>{var s;const{colorScheme:o}=i;if(o==="gray"){const nt=mode("gray.100","whiteAlpha.200")(i);return{bg:nt,color:mode("gray.800","whiteAlpha.900")(i),_hover:{bg:mode("gray.200","whiteAlpha.300")(i),_disabled:{bg:nt}},_active:{bg:mode("gray.300","whiteAlpha.400")(i)}}}const{bg:a=`${o}.500`,color:rt="white",hoverBg:et=`${o}.600`,activeBg:ot=`${o}.700`}=(s=accessibleColorMap[o])!=null?s:{},at=mode(a,`${o}.200`)(i);return{bg:at,color:mode(rt,"gray.800")(i),_hover:{bg:mode(et,`${o}.300`)(i),_disabled:{bg:at}},_active:{bg:mode(ot,`${o}.400`)(i)}}},variantLink=i=>{const{colorScheme:s}=i;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:mode(`${s}.500`,`${s}.200`)(i),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:mode(`${s}.700`,`${s}.500`)(i)}}},variantUnstyled={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},variants$7={ghost:variantGhost,outline:variantOutline,solid:variantSolid$2,link:variantLink,unstyled:variantUnstyled},sizes$3={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"}},buttonTheme={baseStyle:baseStyle$8,variants:variants$7,sizes:sizes$3,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:definePartsStyle$3,defineMultiStyleConfig:defineMultiStyleConfig$3}=createMultiStyleConfigHelpers(cardAnatomy.keys),$bg$3=cssVar$1("card-bg"),$padding=cssVar$1("card-padding"),$shadow=cssVar$1("card-shadow"),$radius=cssVar$1("card-radius"),$border$1=cssVar$1("card-border-width","0"),$borderColor=cssVar$1("card-border-color"),baseStyle$7=definePartsStyle$3({container:{[$bg$3.variable]:"colors.chakra-body-bg",backgroundColor:$bg$3.reference,boxShadow:$shadow.reference,borderRadius:$radius.reference,color:"chakra-body-text",borderWidth:$border$1.reference,borderColor:$borderColor.reference},body:{padding:$padding.reference,flex:"1 1 0%"},header:{padding:$padding.reference},footer:{padding:$padding.reference}}),sizes$2={sm:definePartsStyle$3({container:{[$radius.variable]:"radii.base",[$padding.variable]:"space.3"}}),md:definePartsStyle$3({container:{[$radius.variable]:"radii.md",[$padding.variable]:"space.5"}}),lg:definePartsStyle$3({container:{[$radius.variable]:"radii.xl",[$padding.variable]:"space.7"}})},variants$6={elevated:definePartsStyle$3({container:{[$shadow.variable]:"shadows.base",_dark:{[$bg$3.variable]:"colors.gray.700"}}}),outline:definePartsStyle$3({container:{[$border$1.variable]:"1px",[$borderColor.variable]:"colors.chakra-border-color"}}),filled:definePartsStyle$3({container:{[$bg$3.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[$padding.variable]:0},header:{[$padding.variable]:0},footer:{[$padding.variable]:0}}},cardTheme=defineMultiStyleConfig$3({baseStyle:baseStyle$7,variants:variants$6,sizes:sizes$2,defaultProps:{variant:"elevated",size:"md"}}),$size$1=cssVar("close-button-size"),$bg$2=cssVar("close-button-bg"),baseStyle$6={w:[$size$1.reference],h:[$size$1.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[$bg$2.variable]:"colors.blackAlpha.100",_dark:{[$bg$2.variable]:"colors.whiteAlpha.100"}},_active:{[$bg$2.variable]:"colors.blackAlpha.200",_dark:{[$bg$2.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:$bg$2.reference},sizes$1={lg:{[$size$1.variable]:"sizes.10",fontSize:"md"},md:{[$size$1.variable]:"sizes.8",fontSize:"xs"},sm:{[$size$1.variable]:"sizes.6",fontSize:"2xs"}},closeButtonTheme={baseStyle:baseStyle$6,sizes:sizes$1,defaultProps:{size:"md"}},{variants:variants$5,defaultProps}=badgeTheme,baseStyle$5={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:vars.bg.reference,color:vars.color.reference,boxShadow:vars.shadow.reference},codeTheme={baseStyle:baseStyle$5,variants:variants$5,defaultProps},baseStyle$4={w:"100%",mx:"auto",maxW:"prose",px:"4"},containerTheme={baseStyle:baseStyle$4},baseStyle$3={opacity:.6,borderColor:"inherit"},variantSolid$1={borderStyle:"solid"},variantDashed={borderStyle:"dashed"},variants$4={solid:variantSolid$1,dashed:variantDashed},dividerTheme={baseStyle:baseStyle$3,variants:variants$4,defaultProps:{variant:"solid"}},{definePartsStyle:definePartsStyle$2,defineMultiStyleConfig:defineMultiStyleConfig$2}=createMultiStyleConfigHelpers(accordionAnatomy.keys),baseStyleContainer$1={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},baseStyleButton={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},baseStylePanel={pt:"2",px:"4",pb:"5"},baseStyleIcon={fontSize:"1.25em"},baseStyle$2=definePartsStyle$2({container:baseStyleContainer$1,button:baseStyleButton,panel:baseStylePanel,icon:baseStyleIcon}),accordionTheme=defineMultiStyleConfig$2({baseStyle:baseStyle$2}),{definePartsStyle:definePartsStyle$1,defineMultiStyleConfig:defineMultiStyleConfig$1}=createMultiStyleConfigHelpers(alertAnatomy.keys),$fg=cssVar$1("alert-fg"),$bg$1=cssVar$1("alert-bg"),baseStyle$1=definePartsStyle$1({container:{bg:$bg$1.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:$fg.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:$fg.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function getBg(i){const{theme:s,colorScheme:o}=i,a=transparentize(`${o}.200`,.16)(s);return{light:`colors.${o}.100`,dark:a}}var variantSubtle=definePartsStyle$1(i=>{const{colorScheme:s}=i,o=getBg(i);return{container:{[$fg.variable]:`colors.${s}.600`,[$bg$1.variable]:o.light,_dark:{[$fg.variable]:`colors.${s}.200`,[$bg$1.variable]:o.dark}}}}),variantLeftAccent=definePartsStyle$1(i=>{const{colorScheme:s}=i,o=getBg(i);return{container:{[$fg.variable]:`colors.${s}.600`,[$bg$1.variable]:o.light,_dark:{[$fg.variable]:`colors.${s}.200`,[$bg$1.variable]:o.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:$fg.reference}}}),variantTopAccent=definePartsStyle$1(i=>{const{colorScheme:s}=i,o=getBg(i);return{container:{[$fg.variable]:`colors.${s}.600`,[$bg$1.variable]:o.light,_dark:{[$fg.variable]:`colors.${s}.200`,[$bg$1.variable]:o.dark},pt:"2",borderTopWidth:"4px",borderTopColor:$fg.reference}}}),variantSolid=definePartsStyle$1(i=>{const{colorScheme:s}=i;return{container:{[$fg.variable]:"colors.white",[$bg$1.variable]:`colors.${s}.600`,_dark:{[$fg.variable]:"colors.gray.900",[$bg$1.variable]:`colors.${s}.200`},color:$fg.reference}}}),variants$3={subtle:variantSubtle,"left-accent":variantLeftAccent,"top-accent":variantTopAccent,solid:variantSolid},alertTheme=defineMultiStyleConfig$1({baseStyle:baseStyle$1,variants:variants$3,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle,defineMultiStyleConfig}=createMultiStyleConfigHelpers(avatarAnatomy.keys),$border=cssVar$1("avatar-border-color"),$bg=cssVar$1("avatar-bg"),$fs=cssVar$1("avatar-font-size"),$size=cssVar$1("avatar-size"),baseStyleBadge={borderRadius:"full",border:"0.2em solid",borderColor:$border.reference,[$border.variable]:"white",_dark:{[$border.variable]:"colors.gray.800"}},baseStyleExcessLabel={bg:$bg.reference,fontSize:$fs.reference,width:$size.reference,height:$size.reference,lineHeight:"1",[$bg.variable]:"colors.gray.200",_dark:{[$bg.variable]:"colors.whiteAlpha.400"}},baseStyleContainer=i=>{const{name:s,theme:o}=i,a=s?randomColor({string:s}):"colors.gray.400",rt=isDark(a)(o);let et="white";return rt||(et="gray.800"),{bg:$bg.reference,fontSize:$fs.reference,color:et,borderColor:$border.reference,verticalAlign:"top",width:$size.reference,height:$size.reference,"&:not([data-loaded])":{[$bg.variable]:a},[$border.variable]:"colors.white",_dark:{[$border.variable]:"colors.gray.800"}}},baseStyleLabel={fontSize:$fs.reference,lineHeight:"1"},baseStyle=definePartsStyle(i=>({badge:runIfFn$1(baseStyleBadge,i),excessLabel:runIfFn$1(baseStyleExcessLabel,i),container:runIfFn$1(baseStyleContainer,i),label:baseStyleLabel}));function getSize(i){const s=i!=="100%"?sizes_default[i]:void 0;return definePartsStyle({container:{[$size.variable]:s??i,[$fs.variable]:`calc(${s??i} / 2.5)`},excessLabel:{[$size.variable]:s??i,[$fs.variable]:`calc(${s??i} / 2.5)`}})}var sizes={"2xs":getSize(4),xs:getSize(6),sm:getSize(8),md:getSize(12),lg:getSize(16),xl:getSize(24),"2xl":getSize(32),full:getSize("100%")},avatarTheme=defineMultiStyleConfig({baseStyle,sizes,defaultProps:{size:"md"}}),components={Accordion:accordionTheme,Alert:alertTheme,Avatar:avatarTheme,Badge:badgeTheme,Breadcrumb:breadcrumbTheme,Button:buttonTheme,Checkbox:checkboxTheme,CloseButton:closeButtonTheme,Code:codeTheme,Container:containerTheme,Divider:dividerTheme,Drawer:drawerTheme,Editable:editableTheme,Form:formTheme,FormError:formErrorTheme,FormLabel:formLabelTheme,Heading:headingTheme,Input:inputTheme,Kbd:kbdTheme,Link:linkTheme,List:listTheme,Menu:menuTheme,Modal:modalTheme,NumberInput:numberInputTheme,PinInput:pinInputTheme,Popover:popoverTheme,Progress:progressTheme,Radio:radioTheme,Select:selectTheme,Skeleton:skeletonTheme,SkipLink:skipLinkTheme,Slider:sliderTheme,Spinner:spinnerTheme,Stat:statTheme,Switch:switchTheme,Table:tableTheme,Tabs:tabsTheme,Tag:tagTheme,Textarea:textareaTheme,Tooltip:tooltipTheme,Card:cardTheme,Stepper:stepperTheme},semanticTokens={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"}}},styles={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"}}},direction="ltr",config$1={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},theme$1={semanticTokens,direction,...foundations,components,styles,config:config$1};function isFunction$2(i){return typeof i=="function"}function pipe$1(...i){return s=>i.reduce((o,a)=>a(o),s)}var createExtendTheme=i=>function(...o){let a=[...o],rt=o[o.length-1];return isChakraTheme(rt)&&a.length>1?a=a.slice(0,a.length-1):rt=i,pipe$1(...a.map(et=>ot=>isFunction$2(et)?et(ot):mergeThemeOverride(ot,et)))(rt)},extendTheme=createExtendTheme(theme$1);function mergeThemeOverride(...i){return mergeWith({},...i,mergeThemeCustomizer)}function mergeThemeCustomizer(i,s,o,a){if((isFunction$2(i)||isFunction$2(s))&&Object.prototype.hasOwnProperty.call(a,o))return(...rt)=>{const et=isFunction$2(i)?i(...rt):i,ot=isFunction$2(s)?s(...rt):s;return mergeWith({},et,ot,mergeThemeCustomizer)}}function canUseDOM$1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var isBrowser$1=canUseDOM$1();function omit$1(i,s){const o={};return Object.keys(i).forEach(a=>{s.includes(a)||(o[a]=i[a])}),o}function get$2(i,s,o,a){const rt=typeof s=="string"?s.split("."):[s];for(a=0;a{const s=new WeakMap;return(a,rt,et,ot)=>{if(typeof a>"u")return i(a,rt,et);s.has(a)||s.set(a,new Map);const at=s.get(a);if(at.has(rt))return at.get(rt);const nt=i(a,rt,et,ot);return at.set(rt,nt),nt}},memoizedGet=memoize$1(get$2);function objectFilter(i,s){const o={};return Object.keys(i).forEach(a=>{const rt=i[a];s(rt,a,i)&&(o[a]=rt)}),o}var filterUndefined=i=>objectFilter(i,s=>s!=null);function isFunction$1(i){return typeof i=="function"}function runIfFn(i,...s){return isFunction$1(i)?i(...s):i}function callAllHandlers(...i){return function(o){i.some(a=>(a==null||a(o),o==null?void 0:o.defaultPrevented))}}var hasElementType=typeof Element<"u",hasMap=typeof Map=="function",hasSet=typeof Set=="function",hasArrayBuffer=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function equal$1(i,s){if(i===s)return!0;if(i&&s&&typeof i=="object"&&typeof s=="object"){if(i.constructor!==s.constructor)return!1;var o,a,rt;if(Array.isArray(i)){if(o=i.length,o!=s.length)return!1;for(a=o;a--!==0;)if(!equal$1(i[a],s[a]))return!1;return!0}var et;if(hasMap&&i instanceof Map&&s instanceof Map){if(i.size!==s.size)return!1;for(et=i.entries();!(a=et.next()).done;)if(!s.has(a.value[0]))return!1;for(et=i.entries();!(a=et.next()).done;)if(!equal$1(a.value[1],s.get(a.value[0])))return!1;return!0}if(hasSet&&i instanceof Set&&s instanceof Set){if(i.size!==s.size)return!1;for(et=i.entries();!(a=et.next()).done;)if(!s.has(a.value[0]))return!1;return!0}if(hasArrayBuffer&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(s)){if(o=i.length,o!=s.length)return!1;for(a=o;a--!==0;)if(i[a]!==s[a])return!1;return!0}if(i.constructor===RegExp)return i.source===s.source&&i.flags===s.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof s.valueOf=="function")return i.valueOf()===s.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof s.toString=="function")return i.toString()===s.toString();if(rt=Object.keys(i),o=rt.length,o!==Object.keys(s).length)return!1;for(a=o;a--!==0;)if(!Object.prototype.hasOwnProperty.call(s,rt[a]))return!1;if(hasElementType&&i instanceof Element)return!1;for(a=o;a--!==0;)if(!((rt[a]==="_owner"||rt[a]==="__v"||rt[a]==="__o")&&i.$$typeof)&&!equal$1(i[rt[a]],s[rt[a]]))return!1;return!0}return i!==i&&s!==s}var reactFastCompare=function(s,o){try{return equal$1(s,o)}catch(a){if((a.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw a}};const isEqual$2=getDefaultExportFromCjs(reactFastCompare);function useStyleConfigImpl(i,s={}){var o;const{styleConfig:a,...rt}=s,{theme:et,colorMode:ot}=useChakra(),at=i?memoizedGet(et,`components.${i}`):void 0,nt=a||at,it=mergeWith({theme:et,colorMode:ot},(o=nt==null?void 0:nt.defaultProps)!=null?o:{},filterUndefined(omit$1(rt,["children"]))),j=reactExports.useRef({});if(nt){const $=resolveStyleConfig(nt)(it);isEqual$2(j.current,$)||(j.current=$)}return j.current}function useStyleConfig(i,s={}){return useStyleConfigImpl(i,s)}function useMultiStyleConfig(i,s={}){return useStyleConfigImpl(i,s)}var allPropNames=new Set([...propNames,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),validHTMLProps=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function shouldForwardProp(i){return validHTMLProps.has(i)||!allPropNames.has(i)}function assignAfter(i,...s){if(i==null)throw new TypeError("Cannot convert undefined or null to object");const o={...i};for(const a of s)if(a!=null)for(const rt in a)Object.prototype.hasOwnProperty.call(a,rt)&&(rt in o&&delete o[rt],o[rt]=a[rt]);return o}function compact(i){const s=Object.assign({},i);for(let o in s)s[o]===void 0&&delete s[o];return s}var reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|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)-.*))$/,isPropValid=memoize$3(function(i){return reactPropsRegex.test(i)||i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)<91}),testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function(s){return s!=="theme"},getDefaultShouldForwardProp=function(s){return typeof s=="string"&&s.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function(s,o,a){var rt;if(o){var et=o.shouldForwardProp;rt=s.__emotion_forwardProp&&et?function(ot){return s.__emotion_forwardProp(ot)&&et(ot)}:et}return typeof rt!="function"&&a&&(rt=s.__emotion_forwardProp),rt},Insertion=function(s){var o=s.cache,a=s.serialized,rt=s.isStringTag;return registerStyles(o,a,rt),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(o,a,rt)}),null},createStyled=function i(s,o){var a=s.__emotion_real===s,rt=a&&s.__emotion_base||s,et,ot;o!==void 0&&(et=o.label,ot=o.target);var at=composeShouldForwardProps(s,o,a),nt=at||getDefaultShouldForwardProp(rt),it=!nt("as");return function(){var j=arguments,_=a&&s.__emotion_styles!==void 0?s.__emotion_styles.slice(0):[];if(et!==void 0&&_.push("label:"+et+";"),j[0]==null||j[0].raw===void 0)_.push.apply(_,j);else{_.push(j[0][0]);for(var $=j.length,tt=1;tt<$;tt++)_.push(j[tt],j[0][tt])}var st=withEmotionCache(function(lt,ct,ht){var ut=it&<.as||rt,pt="",mt=[],vt=lt;if(lt.theme==null){vt={};for(var dt in lt)vt[dt]=lt[dt];vt.theme=reactExports.useContext(ThemeContext)}typeof lt.className=="string"?pt=getRegisteredStyles(ct.registered,mt,lt.className):lt.className!=null&&(pt=lt.className+" ");var St=serializeStyles(_.concat(mt),ct.registered,vt);pt+=ct.key+"-"+St.name,ot!==void 0&&(pt+=" "+ot);var yt=it&&at===void 0?getDefaultShouldForwardProp(ut):nt,gt={};for(var Et in lt)it&&Et==="as"||yt(Et)&&(gt[Et]=lt[Et]);return gt.className=pt,ht&&(gt.ref=ht),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:ct,serialized:St,isStringTag:typeof ut=="string"}),reactExports.createElement(ut,gt))});return st.displayName=et!==void 0?et:"Styled("+(typeof rt=="string"?rt:rt.displayName||rt.name||"Component")+")",st.defaultProps=s.defaultProps,st.__emotion_real=st,st.__emotion_base=rt,st.__emotion_styles=_,st.__emotion_forwardProp=at,Object.defineProperty(st,"toString",{value:function(){return"."+ot}}),st.withComponent=function(lt,ct){return i(lt,_extends$1({},o,ct,{shouldForwardProp:composeShouldForwardProps(st,ct,!0)})).apply(void 0,_)},st}},tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],newStyled=createStyled.bind();tags.forEach(function(i){newStyled[i]=newStyled(i)});var _a$1,emotion_styled=(_a$1=newStyled.default)!=null?_a$1:newStyled,toCSSObject=({baseStyle:i})=>s=>{const{theme:o,css:a,__css:rt,sx:et,...ot}=s,at=objectFilter(ot,(_,$)=>isStyleProp($)),nt=runIfFn(i,s),it=assignAfter({},rt,nt,filterUndefined(at),et),j=css(it)(s.theme);return a?[j,a]:j};function styled(i,s){const{baseStyle:o,...a}=s??{};a.shouldForwardProp||(a.shouldForwardProp=shouldForwardProp);const rt=toCSSObject({baseStyle:o}),et=emotion_styled(i,a)(rt);return React$4.forwardRef(function(nt,it){const{colorMode:j,forced:_}=useColorMode();return React$4.createElement(et,{ref:it,"data-theme":_?j:void 0,...nt})})}function factory(){const i=new Map;return new Proxy(styled,{apply(s,o,a){return styled(...a)},get(s,o){return i.has(o)||i.set(o,styled(o)),i.get(o)}})}var chakra=factory();function forwardRef(i){return reactExports.forwardRef(i)}function createContext$1(i={}){const{strict:s=!0,errorMessage:o="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:a}=i,rt=reactExports.createContext(void 0);rt.displayName=a;function et(){var ot;const at=reactExports.useContext(rt);if(!at&&s){const nt=new Error(o);throw nt.name="ContextError",(ot=Error.captureStackTrace)==null||ot.call(Error,nt,et),nt}return at}return[rt.Provider,et,rt]}function ThemeProvider(i){const{cssVarsRoot:s,theme:o,children:a}=i,rt=reactExports.useMemo(()=>toCSSVar(o),[o]);return jsxRuntimeExports.jsxs(ThemeProvider$1,{theme:rt,children:[jsxRuntimeExports.jsx(CSSVars,{root:s}),a]})}function CSSVars({root:i=":host, :root"}){const s=[i,"[data-theme]"].join(",");return jsxRuntimeExports.jsx(Global,{styles:o=>({[s]:o.__cssVars})})}createContext$1({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function createStylesContext(i){return createContext$1({name:`${i}StylesContext`,errorMessage:`useStyles: "styles" is undefined. Seems you forgot to wrap the components in "<${i} />" `})}function GlobalStyle(){const{colorMode:i}=useColorMode();return jsxRuntimeExports.jsx(Global,{styles:s=>{const o=memoizedGet(s,"styles.global"),a=runIfFn(o,{theme:s,colorMode:i});return a?css(a)(s):void 0}})}var EnvironmentContext=reactExports.createContext({getDocument(){return document},getWindow(){return window}});EnvironmentContext.displayName="EnvironmentContext";function EnvironmentProvider(i){const{children:s,environment:o,disabled:a}=i,rt=reactExports.useRef(null),et=reactExports.useMemo(()=>o||{getDocument:()=>{var at,nt;return(nt=(at=rt.current)==null?void 0:at.ownerDocument)!=null?nt:document},getWindow:()=>{var at,nt;return(nt=(at=rt.current)==null?void 0:at.ownerDocument.defaultView)!=null?nt:window}},[o]),ot=!a||!o;return jsxRuntimeExports.jsxs(EnvironmentContext.Provider,{value:et,children:[s,ot&&jsxRuntimeExports.jsx("span",{id:"__chakra_env",hidden:!0,ref:rt})]})}EnvironmentProvider.displayName="EnvironmentProvider";var ChakraProvider$1=i=>{const{children:s,colorModeManager:o,portalZIndex:a,resetScope:rt,resetCSS:et=!0,theme:ot={},environment:at,cssVarsRoot:nt,disableEnvironment:it,disableGlobalStyle:j}=i,_=jsxRuntimeExports.jsx(EnvironmentProvider,{environment:at,disabled:it,children:s});return jsxRuntimeExports.jsx(ThemeProvider,{theme:ot,cssVarsRoot:nt,children:jsxRuntimeExports.jsxs(ColorModeProvider,{colorModeManager:o,options:ot.config,children:[et?jsxRuntimeExports.jsx(CSSReset,{scope:rt}):jsxRuntimeExports.jsx(CSSPolyfill,{}),!j&&jsxRuntimeExports.jsx(GlobalStyle,{}),a?jsxRuntimeExports.jsx(PortalManager,{zIndex:a,children:_}):_]})})},findById=(i,s)=>i.find(o=>o.id===s);function findToast(i,s){const o=getToastPosition(i,s),a=o?i[o].findIndex(rt=>rt.id===s):-1;return{position:o,index:a}}function getToastPosition(i,s){for(const[o,a]of Object.entries(i))if(findById(a,s))return o}function getToastStyle(i){const s=i.includes("right"),o=i.includes("left");let a="center";return s&&(a="flex-end"),o&&(a="flex-start"),{display:"flex",flexDirection:"column",alignItems:a}}function getToastListStyle(i){const o=i==="top"||i==="bottom"?"0 auto":void 0,a=i.includes("top")?"env(safe-area-inset-top, 0px)":void 0,rt=i.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,et=i.includes("left")?void 0:"env(safe-area-inset-right, 0px)",ot=i.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:o,top:a,bottom:rt,right:et,left:ot}}function useCallbackRef$2(i,s=[]){const o=reactExports.useRef(i);return reactExports.useEffect(()=>{o.current=i}),reactExports.useCallback((...a)=>{var rt;return(rt=o.current)==null?void 0:rt.call(o,...a)},s)}function useTimeout(i,s){const o=useCallbackRef$2(i);reactExports.useEffect(()=>{if(s==null)return;let a=null;return a=window.setTimeout(()=>{o()},s),()=>{a&&window.clearTimeout(a)}},[s,o])}function useUpdateEffect(i,s){const o=reactExports.useRef(!1),a=reactExports.useRef(!1);reactExports.useEffect(()=>{if(o.current&&a.current)return i();a.current=!0},s),reactExports.useEffect(()=>(o.current=!0,()=>{o.current=!1}),[])}const MotionConfigContext=reactExports.createContext({transformPagePoint:i=>i,isStatic:!1,reducedMotion:"never"}),MotionContext=reactExports.createContext({}),PresenceContext=reactExports.createContext(null),isBrowser=typeof document<"u",useIsomorphicLayoutEffect$1=isBrowser?reactExports.useLayoutEffect:reactExports.useEffect,LazyContext=reactExports.createContext({strict:!1}),camelToDash=i=>i.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId),MotionGlobalConfig={skipAnimations:!1,useManualTiming:!1};function createRenderStep(i){let s=new Set,o=new Set,a=!1,rt=!1;const et=new WeakSet;let ot={delta:0,timestamp:0,isProcessing:!1};function at(it){et.has(it)&&(nt.schedule(it),i()),it(ot)}const nt={schedule:(it,j=!1,_=!1)=>{const tt=_&&a?s:o;return j&&et.add(it),tt.has(it)||tt.add(it),it},cancel:it=>{o.delete(it),et.delete(it)},process:it=>{if(ot=it,a){rt=!0;return}a=!0,[s,o]=[o,s],o.clear(),s.forEach(at),a=!1,rt&&(rt=!1,nt.process(it))}};return nt}const stepsOrder=["read","resolveKeyframes","update","preRender","render","postRender"],maxElapsed=40;function createRenderBatcher(i,s){let o=!1,a=!0;const rt={delta:0,timestamp:0,isProcessing:!1},et=()=>o=!0,ot=stepsOrder.reduce((ht,ut)=>(ht[ut]=createRenderStep(et),ht),{}),{read:at,resolveKeyframes:nt,update:it,preRender:j,render:_,postRender:$}=ot,tt=()=>{const ht=performance.now();o=!1,rt.delta=a?1e3/60:Math.max(Math.min(ht-rt.timestamp,maxElapsed),1),rt.timestamp=ht,rt.isProcessing=!0,at.process(rt),nt.process(rt),it.process(rt),j.process(rt),_.process(rt),$.process(rt),rt.isProcessing=!1,o&&s&&(a=!1,i(tt))},st=()=>{o=!0,a=!0,rt.isProcessing||i(tt)};return{schedule:stepsOrder.reduce((ht,ut)=>{const pt=ot[ut];return ht[ut]=(mt,vt=!1,dt=!1)=>(o||st(),pt.schedule(mt,vt,dt)),ht},{}),cancel:ht=>{for(let ut=0;ut{j&&j.update(o,at)});const $=reactExports.useRef(!!(o[optimizedAppearDataAttribute]&&!window.HandoffComplete));return useIsomorphicLayoutEffect$1(()=>{j&&(j.updateFeatures(),microtask.render(j.render),$.current&&j.animationState&&j.animationState.animateChanges())}),reactExports.useEffect(()=>{j&&(!$.current&&j.animationState&&j.animationState.animateChanges(),$.current&&($.current=!1,scheduleHandoffComplete||(scheduleHandoffComplete=!0,queueMicrotask(completeHandoff))))}),j}function completeHandoff(){window.HandoffComplete=!0}function createProjectionNode$1(i,s,o,a){const{layoutId:rt,layout:et,drag:ot,dragConstraints:at,layoutScroll:nt,layoutRoot:it}=s;i.projection=new o(i.latestValues,s["data-framer-portal-id"]?void 0:getClosestProjectingNode(i.parent)),i.projection.setOptions({layoutId:rt,layout:et,alwaysMeasureLayout:!!ot||at&&isRefObject(at),visualElement:i,scheduleRender:()=>i.scheduleRender(),animationType:typeof et=="string"?et:"both",initialPromotionConfig:a,layoutScroll:nt,layoutRoot:it})}function getClosestProjectingNode(i){if(i)return i.options.allowProjection!==!1?i.projection:getClosestProjectingNode(i.parent)}function useMotionRef(i,s,o){return reactExports.useCallback(a=>{a&&i.mount&&i.mount(a),s&&(a?s.mount(a):s.unmount()),o&&(typeof o=="function"?o(a):isRefObject(o)&&(o.current=a))},[s])}function isVariantLabel(i){return typeof i=="string"||Array.isArray(i)}function isAnimationControls(i){return i!==null&&typeof i=="object"&&typeof i.start=="function"}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder];function isControllingVariants(i){return isAnimationControls(i.animate)||variantProps.some(s=>isVariantLabel(i[s]))}function isVariantNode(i){return!!(isControllingVariants(i)||i.variants)}function getCurrentTreeVariants(i,s){if(isControllingVariants(i)){const{initial:o,animate:a}=i;return{initial:o===!1||isVariantLabel(o)?o:void 0,animate:isVariantLabel(a)?a:void 0}}return i.inherit!==!1?s:{}}function useCreateMotionContext(i){const{initial:s,animate:o}=getCurrentTreeVariants(i,reactExports.useContext(MotionContext));return reactExports.useMemo(()=>({initial:s,animate:o}),[variantLabelsAsDependency(s),variantLabelsAsDependency(o)])}function variantLabelsAsDependency(i){return Array.isArray(i)?i.join(" "):i}const featureProps={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"]},featureDefinitions={};for(const i in featureProps)featureDefinitions[i]={isEnabled:s=>featureProps[i].some(o=>!!s[o])};function loadFeatures(i){for(const s in i)featureDefinitions[s]={...featureDefinitions[s],...i[s]}}const LayoutGroupContext=reactExports.createContext({}),motionComponentSymbol=Symbol.for("motionComponentSymbol"),noop$1=i=>i;let invariant=noop$1;function createMotionComponent({preloadedFeatures:i,createVisualElement:s,useRender:o,useVisualState:a,Component:rt}){i&&loadFeatures(i);function et(at,nt){let it;const j={...reactExports.useContext(MotionConfigContext),...at,layoutId:useLayoutId(at)},{isStatic:_}=j,$=useCreateMotionContext(at),tt=a(at,_);if(!_&&isBrowser){useStrictMode();const st=getProjectionFunctionality(j);it=st.MeasureLayout,$.visualElement=useVisualElement(rt,tt,j,s,st.ProjectionNode)}return jsxRuntimeExports.jsxs(MotionContext.Provider,{value:$,children:[it&&$.visualElement?jsxRuntimeExports.jsx(it,{visualElement:$.visualElement,...j}):null,o(rt,at,useMotionRef(tt,$.visualElement,nt),tt,_,$.visualElement)]})}const ot=reactExports.forwardRef(et);return ot[motionComponentSymbol]=rt,ot}function useLayoutId({layoutId:i}){const s=reactExports.useContext(LayoutGroupContext).id;return s&&i!==void 0?s+"-"+i:i}function useStrictMode(i,s){reactExports.useContext(LazyContext).strict}function getProjectionFunctionality(i){const{drag:s,layout:o}=featureDefinitions;if(!s&&!o)return{};const a={...s,...o};return{MeasureLayout:s!=null&&s.isEnabled(i)||o!=null&&o.isEnabled(i)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}function createMotionProxy(i){function s(a,rt={}){return createMotionComponent(i(a,rt))}if(typeof Proxy>"u")return s;const o=new Map;return new Proxy(s,{get:(a,rt)=>(o.has(rt)||o.set(rt,s(rt)),o.get(rt))})}const lowercaseSVGElements=["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 isSVGComponent(i){return typeof i!="string"||i.includes("-")?!1:!!(lowercaseSVGElements.indexOf(i)>-1||/[A-Z]/u.test(i))}const scaleCorrectors={};function addScaleCorrector(i){Object.assign(scaleCorrectors,i)}const transformPropOrder=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],transformProps=new Set(transformPropOrder);function isForcedMotionValue(i,{layout:s,layoutId:o}){return transformProps.has(i)||i.startsWith("origin")||(s||o!==void 0)&&(!!scaleCorrectors[i]||i==="opacity")}const isMotionValue=i=>!!(i&&i.getVelocity),translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(i,s,o){let a="";for(let rt=0;rts=>typeof s=="string"&&s.startsWith(i),isCSSVariableName=checkStringStartsWith("--"),startsAsVariableToken=checkStringStartsWith("var(--"),isCSSVariableToken=i=>startsAsVariableToken(i)?singleCssVariableRegex.test(i.split("/*")[0].trim()):!1,singleCssVariableRegex=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,getValueAsType=(i,s)=>s&&typeof i=="number"?s.transform(i):i,clamp=(i,s,o)=>o>s?s:otypeof i=="number",parse:parseFloat,transform:i=>i},alpha={...number,transform:i=>clamp(0,1,i)},scale={...number,default:1},sanitize=i=>Math.round(i*1e5)/1e5,floatRegex=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,colorRegex=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,singleColorRegex=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function isString$1(i){return typeof i=="string"}function isNullish(i){return i==null}const createUnitType=i=>({test:s=>isString$1(s)&&s.endsWith(i)&&s.split(" ").length===1,parse:parseFloat,transform:s=>`${s}${i}`}),degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),vh=createUnitType("vh"),vw=createUnitType("vw"),progressPercentage={...percent,parse:i=>percent.parse(i)/100,transform:i=>percent.transform(i*100)},int={...number,transform:Math.round},numberValueTypes={borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,size:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px,zIndex:int,backgroundPositionX:px,backgroundPositionY:px,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int};function buildHTMLStyles(i,s,o){const{style:a,vars:rt,transform:et,transformOrigin:ot}=i;let at=!1,nt=!1,it=!0;for(const j in s){const _=s[j];if(isCSSVariableName(j)){rt[j]=_;continue}const $=numberValueTypes[j],tt=getValueAsType(_,$);if(transformProps.has(j)){if(at=!0,et[j]=tt,!it)continue;_!==($.default||0)&&(it=!1)}else j.startsWith("origin")?(nt=!0,ot[j]=tt):a[j]=tt}if(s.transform||(at||o?a.transform=buildTransform(i.transform,it,o):a.transform&&(a.transform="none")),nt){const{originX:j="50%",originY:_="50%",originZ:$=0}=ot;a.transformOrigin=`${j} ${_} ${$}`}}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function copyRawValuesOnly(i,s,o){for(const a in s)!isMotionValue(s[a])&&!isForcedMotionValue(a,o)&&(i[a]=s[a])}function useInitialMotionValues({transformTemplate:i},s){return reactExports.useMemo(()=>{const o=createHtmlRenderState();return buildHTMLStyles(o,s,i),Object.assign({},o.vars,o.style)},[s])}function useStyle(i,s){const o=i.style||{},a={};return copyRawValuesOnly(a,o,i),Object.assign(a,useInitialMotionValues(i,s)),a}function useHTMLProps(i,s){const o={},a=useStyle(i,s);return i.drag&&i.dragListener!==!1&&(o.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=i.drag===!0?"none":`pan-${i.drag==="x"?"y":"x"}`),i.tabIndex===void 0&&(i.onTap||i.onTapStart||i.whileTap)&&(o.tabIndex=0),o.style=a,o}const validMotionProps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function isValidMotionProp(i){return i.startsWith("while")||i.startsWith("drag")&&i!=="draggable"||i.startsWith("layout")||i.startsWith("onTap")||i.startsWith("onPan")||i.startsWith("onLayout")||validMotionProps.has(i)}let shouldForward=i=>!isValidMotionProp(i);function loadExternalIsValidProp(i){i&&(shouldForward=s=>s.startsWith("on")?!isValidMotionProp(s):i(s))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch{}function filterProps(i,s,o){const a={};for(const rt in i)rt==="values"&&typeof i.values=="object"||(shouldForward(rt)||o===!0&&isValidMotionProp(rt)||!s&&!isValidMotionProp(rt)||i.draggable&&rt.startsWith("onDrag"))&&(a[rt]=i[rt]);return a}function calcOrigin$1(i,s,o){return typeof i=="string"?i:px.transform(s+o*i)}function calcSVGTransformOrigin(i,s,o){const a=calcOrigin$1(s,i.x,i.width),rt=calcOrigin$1(o,i.y,i.height);return`${a} ${rt}`}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(i,s,o=1,a=0,rt=!0){i.pathLength=1;const et=rt?dashKeys:camelKeys;i[et.offset]=px.transform(-a);const ot=px.transform(s),at=px.transform(o);i[et.array]=`${ot} ${at}`}function buildSVGAttrs(i,{attrX:s,attrY:o,attrScale:a,originX:rt,originY:et,pathLength:ot,pathSpacing:at=1,pathOffset:nt=0,...it},j,_){if(buildHTMLStyles(i,it,_),j){i.style.viewBox&&(i.attrs.viewBox=i.style.viewBox);return}i.attrs=i.style,i.style={};const{attrs:$,style:tt,dimensions:st}=i;$.transform&&(st&&(tt.transform=$.transform),delete $.transform),st&&(rt!==void 0||et!==void 0||tt.transform)&&(tt.transformOrigin=calcSVGTransformOrigin(st,rt!==void 0?rt:.5,et!==void 0?et:.5)),s!==void 0&&($.x=s),o!==void 0&&($.y=o),a!==void 0&&($.scale=a),ot!==void 0&&buildSVGPath($,ot,at,nt,!1)}const createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=i=>typeof i=="string"&&i.toLowerCase()==="svg";function useSVGProps(i,s,o,a){const rt=reactExports.useMemo(()=>{const et=createSvgRenderState();return buildSVGAttrs(et,s,isSVGTag(a),i.transformTemplate),{...et.attrs,style:{...et.style}}},[s]);if(i.style){const et={};copyRawValuesOnly(et,i.style,i),rt.style={...et,...rt.style}}return rt}function createUseRender(i=!1){return(o,a,rt,{latestValues:et},ot)=>{const nt=(isSVGComponent(o)?useSVGProps:useHTMLProps)(a,et,ot,o),it=filterProps(a,typeof o=="string",i),j=o!==reactExports.Fragment?{...it,...nt,ref:rt}:{},{children:_}=a,$=reactExports.useMemo(()=>isMotionValue(_)?_.get():_,[_]);return reactExports.createElement(o,{...j,children:$})}}function renderHTML(i,{style:s,vars:o},a,rt){Object.assign(i.style,s,rt&&rt.getProjectionStyles(a));for(const et in o)i.style.setProperty(et,o[et])}const camelCaseAttributes=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 renderSVG(i,s,o,a){renderHTML(i,s,void 0,a);for(const rt in s.attrs)i.setAttribute(camelCaseAttributes.has(rt)?rt:camelToDash(rt),s.attrs[rt])}function scrapeMotionValuesFromProps$1(i,s,o){var a;const{style:rt}=i,et={};for(const ot in rt)(isMotionValue(rt[ot])||s.style&&isMotionValue(s.style[ot])||isForcedMotionValue(ot,i)||((a=o==null?void 0:o.getValue(ot))===null||a===void 0?void 0:a.liveStyle)!==void 0)&&(et[ot]=rt[ot]);return o&&rt&&typeof rt.willChange=="string"&&(o.applyWillChange=!1),et}function scrapeMotionValuesFromProps(i,s,o){const a=scrapeMotionValuesFromProps$1(i,s,o);for(const rt in i)if(isMotionValue(i[rt])||isMotionValue(s[rt])){const et=transformPropOrder.indexOf(rt)!==-1?"attr"+rt.charAt(0).toUpperCase()+rt.substring(1):rt;a[et]=i[rt]}return a}function getValueState(i){const s=[{},{}];return i==null||i.values.forEach((o,a)=>{s[0][a]=o.get(),s[1][a]=o.getVelocity()}),s}function resolveVariantFromProps(i,s,o,a){if(typeof s=="function"){const[rt,et]=getValueState(a);s=s(o!==void 0?o:i.custom,rt,et)}if(typeof s=="string"&&(s=i.variants&&i.variants[s]),typeof s=="function"){const[rt,et]=getValueState(a);s=s(o!==void 0?o:i.custom,rt,et)}return s}function useConstant(i){const s=reactExports.useRef(null);return s.current===null&&(s.current=i()),s.current}const isKeyframesTarget=i=>Array.isArray(i),isCustomValue=i=>!!(i&&typeof i=="object"&&i.mix&&i.toValue),resolveFinalValueInKeyframes=i=>isKeyframesTarget(i)?i[i.length-1]||0:i;function resolveMotionValue(i){const s=isMotionValue(i)?i.get():i;return isCustomValue(s)?s.toValue():s}const acceleratedValues=new Set(["opacity","clipPath","filter","transform"]);function getWillChangeName(i){if(transformProps.has(i))return"transform";if(acceleratedValues.has(i))return camelToDash(i)}function addUniqueItem(i,s){i.indexOf(s)===-1&&i.push(s)}function removeItem(i,s){const o=i.indexOf(s);o>-1&&i.splice(o,1)}function makeState({applyWillChange:i=!1,scrapeMotionValuesFromProps:s,createRenderState:o,onMount:a},rt,et,ot,at){const nt={latestValues:makeLatestValues(rt,et,ot,at?!1:i,s),renderState:o()};return a&&(nt.mount=it=>a(rt,it,nt)),nt}const makeUseVisualState=i=>(s,o)=>{const a=reactExports.useContext(MotionContext),rt=reactExports.useContext(PresenceContext),et=()=>makeState(i,s,a,rt,o);return o?et():useConstant(et)};function addWillChange(i,s){const o=getWillChangeName(s);o&&addUniqueItem(i,o)}function forEachDefinition(i,s,o){const a=Array.isArray(s)?s:[s];for(let rt=0;rt{for(const ut in ct){let pt=ct[ut];if(Array.isArray(pt)){const mt=st?pt.length-1:0;pt=pt[mt]}pt!==null&&(ot[ut]=pt)}for(const ut in ht)ot[ut]=ht[ut]}),nt&&(_&&j!==!1&&!isAnimationControls(_)&&forEachDefinition(i,_,ct=>{for(const ht in ct)addWillChange(at,ht)}),at.length&&(ot.willChange=at.join(","))),ot}const{schedule:frame,cancel:cancelFrame,state:frameData,steps}=createRenderBatcher(typeof requestAnimationFrame<"u"?requestAnimationFrame:noop$1,!0),svgMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState,onMount:(i,s,{renderState:o,latestValues:a})=>{frame.read(()=>{try{o.dimensions=typeof s.getBBox=="function"?s.getBBox():s.getBoundingClientRect()}catch{o.dimensions={x:0,y:0,width:0,height:0}}}),frame.render(()=>{buildSVGAttrs(o,a,isSVGTag(s.tagName),i.transformTemplate),renderSVG(s,o)})}})},htmlMotionConfig={useVisualState:makeUseVisualState({applyWillChange:!0,scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState})};function createDomMotionConfig(i,{forwardMotionProps:s=!1},o,a){return{...isSVGComponent(i)?svgMotionConfig:htmlMotionConfig,preloadedFeatures:o,useRender:createUseRender(s),createVisualElement:a,Component:i}}function addDomEvent(i,s,o,a={passive:!0}){return i.addEventListener(s,o,a),()=>i.removeEventListener(s,o)}const isPrimaryPointer=i=>i.pointerType==="mouse"?typeof i.button!="number"||i.button<=0:i.isPrimary!==!1;function extractEventInfo(i,s="page"){return{point:{x:i[`${s}X`],y:i[`${s}Y`]}}}const addPointerInfo=i=>s=>isPrimaryPointer(s)&&i(s,extractEventInfo(s));function addPointerEvent(i,s,o,a){return addDomEvent(i,s,addPointerInfo(o),a)}const combineFunctions=(i,s)=>o=>s(i(o)),pipe=(...i)=>i.reduce(combineFunctions);function createLock(i){let s=null;return()=>{const o=()=>{s=null};return s===null?(s=i,o):!1}}const globalHorizontalLock=createLock("dragHorizontal"),globalVerticalLock=createLock("dragVertical");function getGlobalLock(i){let s=!1;if(i==="y")s=globalVerticalLock();else if(i==="x")s=globalHorizontalLock();else{const o=globalHorizontalLock(),a=globalVerticalLock();o&&a?s=()=>{o(),a()}:(o&&o(),a&&a())}return s}function isDragActive(){const i=getGlobalLock(!0);return i?(i(),!1):!0}class Feature{constructor(s){this.isMounted=!1,this.node=s}update(){}}function addHoverEvent(i,s){const o=s?"pointerenter":"pointerleave",a=s?"onHoverStart":"onHoverEnd",rt=(et,ot)=>{if(et.pointerType==="touch"||isDragActive())return;const at=i.getProps();i.animationState&&at.whileHover&&i.animationState.setActive("whileHover",s);const nt=at[a];nt&&frame.postRender(()=>nt(et,ot))};return addPointerEvent(i.current,o,rt,{passive:!i.getProps()[a]})}class HoverGesture extends Feature{mount(){this.unmount=pipe(addHoverEvent(this.node,!0),addHoverEvent(this.node,!1))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let s=!1;try{s=this.node.current.matches(":focus-visible")}catch{s=!0}!s||!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=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const isNodeOrChild=(i,s)=>s?i===s?!0:isNodeOrChild(i,s.parentElement):!1;function fireSyntheticPointerEvent(i,s){if(!s)return;const o=new PointerEvent("pointer"+i);s(o,extractEventInfo(o))}class PressGesture extends Feature{constructor(){super(...arguments),this.removeStartListeners=noop$1,this.removeEndListeners=noop$1,this.removeAccessibleListeners=noop$1,this.startPointerPress=(s,o)=>{if(this.isPressing)return;this.removeEndListeners();const a=this.node.getProps(),et=addPointerEvent(window,"pointerup",(at,nt)=>{if(!this.checkPressEnd())return;const{onTap:it,onTapCancel:j,globalTapTarget:_}=this.node.getProps(),$=!_&&!isNodeOrChild(this.node.current,at.target)?j:it;$&&frame.update(()=>$(at,nt))},{passive:!(a.onTap||a.onPointerUp)}),ot=addPointerEvent(window,"pointercancel",(at,nt)=>this.cancelPress(at,nt),{passive:!(a.onTapCancel||a.onPointerCancel)});this.removeEndListeners=pipe(et,ot),this.startPress(s,o)},this.startAccessiblePress=()=>{const s=et=>{if(et.key!=="Enter"||this.isPressing)return;const ot=at=>{at.key!=="Enter"||!this.checkPressEnd()||fireSyntheticPointerEvent("up",(nt,it)=>{const{onTap:j}=this.node.getProps();j&&frame.postRender(()=>j(nt,it))})};this.removeEndListeners(),this.removeEndListeners=addDomEvent(this.node.current,"keyup",ot),fireSyntheticPointerEvent("down",(at,nt)=>{this.startPress(at,nt)})},o=addDomEvent(this.node.current,"keydown",s),a=()=>{this.isPressing&&fireSyntheticPointerEvent("cancel",(et,ot)=>this.cancelPress(et,ot))},rt=addDomEvent(this.node.current,"blur",a);this.removeAccessibleListeners=pipe(o,rt)}}startPress(s,o){this.isPressing=!0;const{onTapStart:a,whileTap:rt}=this.node.getProps();rt&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),a&&frame.postRender(()=>a(s,o))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!isDragActive()}cancelPress(s,o){if(!this.checkPressEnd())return;const{onTapCancel:a}=this.node.getProps();a&&frame.postRender(()=>a(s,o))}mount(){const s=this.node.getProps(),o=addPointerEvent(s.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(s.onTapStart||s.onPointerStart)}),a=addDomEvent(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pipe(o,a)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=i=>{const s=observerCallbacks.get(i.target);s&&s(i)},fireAllObserverCallbacks=i=>{i.forEach(fireObserverCallback)};function initIntersectionObserver({root:i,...s}){const o=i||document;observers.has(o)||observers.set(o,{});const a=observers.get(o),rt=JSON.stringify(s);return a[rt]||(a[rt]=new IntersectionObserver(fireAllObserverCallbacks,{root:i,...s})),a[rt]}function observeIntersection(i,s,o){const a=initIntersectionObserver(s);return observerCallbacks.set(i,o),a.observe(i),()=>{observerCallbacks.delete(i),a.unobserve(i)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:s={}}=this.node.getProps(),{root:o,margin:a,amount:rt="some",once:et}=s,ot={root:o?o.current:void 0,rootMargin:a,threshold:typeof rt=="number"?rt:thresholdNames[rt]},at=nt=>{const{isIntersecting:it}=nt;if(this.isInView===it||(this.isInView=it,et&&!it&&this.hasEnteredView))return;it&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",it);const{onViewportEnter:j,onViewportLeave:_}=this.node.getProps(),$=it?j:_;$&&$(nt)};return observeIntersection(this.node.current,ot,at)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:s,prevProps:o}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(s,o))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:i={}},{viewport:s={}}={}){return o=>i[o]!==s[o]}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}};function shallowCompare(i,s){if(!Array.isArray(s))return!1;const o=s.length;if(o!==i.length)return!1;for(let a=0;ai*1e3,millisecondsToSeconds=i=>i/1e3,underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=i=>({type:"spring",stiffness:550,damping:i===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(i,{keyframes:s})=>s.length>2?keyframesTransition:transformProps.has(i)?i.startsWith("scale")?criticallyDampedSpring(s[1]):underDampedSpring:ease;function isTransitionDefined({when:i,delay:s,delayChildren:o,staggerChildren:a,staggerDirection:rt,repeat:et,repeatType:ot,repeatDelay:at,from:nt,elapsed:it,...j}){return!!Object.keys(j).length}function getValueTransition(i,s){return i[s]||i.default||i}const isNotNull=i=>i!==null;function getFinalKeyframe(i,{repeat:s,repeatType:o="loop"},a){const rt=i.filter(isNotNull),et=s&&o!=="loop"&&s%2===1?0:rt.length-1;return!et||a===void 0?rt[et]:a}let now;function clearTime(){now=void 0}const time={now:()=>(now===void 0&&time.set(frameData.isProcessing||MotionGlobalConfig.useManualTiming?frameData.timestamp:performance.now()),now),set:i=>{now=i,queueMicrotask(clearTime)}},isZeroValueString=i=>/^0[^.\s]+$/u.test(i);function isNone(i){return typeof i=="number"?i===0:i!==null?i==="none"||i==="0"||isZeroValueString(i):!0}const isNumericalString=i=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i),splitCSSVariableRegex=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function parseCSSVariable(i){const s=splitCSSVariableRegex.exec(i);if(!s)return[,];const[,o,a,rt]=s;return[`--${o??a}`,rt]}function getVariableValue(i,s,o=1){const[a,rt]=parseCSSVariable(i);if(!a)return;const et=window.getComputedStyle(s).getPropertyValue(a);if(et){const ot=et.trim();return isNumericalString(ot)?parseFloat(ot):ot}return isCSSVariableToken(rt)?getVariableValue(rt,s,o+1):rt}const positionalKeys=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),isNumOrPxType=i=>i===number||i===px,getPosFromMatrix=(i,s)=>parseFloat(i.split(", ")[s]),getTranslateFromMatrix=(i,s)=>(o,{transform:a})=>{if(a==="none"||!a)return 0;const rt=a.match(/^matrix3d\((.+)\)$/u);if(rt)return getPosFromMatrix(rt[1],s);{const et=a.match(/^matrix\((.+)\)$/u);return et?getPosFromMatrix(et[1],i):0}},transformKeys=new Set(["x","y","z"]),nonTranslationalTransformKeys=transformPropOrder.filter(i=>!transformKeys.has(i));function removeNonTranslationalTransform(i){const s=[];return nonTranslationalTransformKeys.forEach(o=>{const a=i.getValue(o);a!==void 0&&(s.push([o,a.get()]),a.set(o.startsWith("scale")?1:0))}),s}const positionalValues={width:({x:i},{paddingLeft:s="0",paddingRight:o="0"})=>i.max-i.min-parseFloat(s)-parseFloat(o),height:({y:i},{paddingTop:s="0",paddingBottom:o="0"})=>i.max-i.min-parseFloat(s)-parseFloat(o),top:(i,{top:s})=>parseFloat(s),left:(i,{left:s})=>parseFloat(s),bottom:({y:i},{top:s})=>parseFloat(s)+(i.max-i.min),right:({x:i},{left:s})=>parseFloat(s)+(i.max-i.min),x:getTranslateFromMatrix(4,13),y:getTranslateFromMatrix(5,14)};positionalValues.translateX=positionalValues.x;positionalValues.translateY=positionalValues.y;const testValueType=i=>s=>s.test(i),auto={test:i=>i==="auto",parse:i=>i},dimensionValueTypes=[number,px,percent,degrees,vw,vh,auto],findDimensionValueType=i=>dimensionValueTypes.find(testValueType(i)),toResolve=new Set;let isScheduled=!1,anyNeedsMeasurement=!1;function measureAllKeyframes(){if(anyNeedsMeasurement){const i=Array.from(toResolve).filter(a=>a.needsMeasurement),s=new Set(i.map(a=>a.element)),o=new Map;s.forEach(a=>{const rt=removeNonTranslationalTransform(a);rt.length&&(o.set(a,rt),a.render())}),i.forEach(a=>a.measureInitialState()),s.forEach(a=>{a.render();const rt=o.get(a);rt&&rt.forEach(([et,ot])=>{var at;(at=a.getValue(et))===null||at===void 0||at.set(ot)})}),i.forEach(a=>a.measureEndState()),i.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}anyNeedsMeasurement=!1,isScheduled=!1,toResolve.forEach(i=>i.complete()),toResolve.clear()}function readAllKeyframes(){toResolve.forEach(i=>{i.readKeyframes(),i.needsMeasurement&&(anyNeedsMeasurement=!0)})}function flushKeyframeResolvers(){readAllKeyframes(),measureAllKeyframes()}class KeyframeResolver{constructor(s,o,a,rt,et,ot=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...s],this.onComplete=o,this.name=a,this.motionValue=rt,this.element=et,this.isAsync=ot}scheduleResolve(){this.isScheduled=!0,this.isAsync?(toResolve.add(this),isScheduled||(isScheduled=!0,frame.read(readAllKeyframes),frame.resolveKeyframes(measureAllKeyframes))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:s,name:o,element:a,motionValue:rt}=this;for(let et=0;eto=>!!(isString$1(o)&&singleColorRegex.test(o)&&o.startsWith(i)||s&&!isNullish(o)&&Object.prototype.hasOwnProperty.call(o,s)),splitColor=(i,s,o)=>a=>{if(!isString$1(a))return a;const[rt,et,ot,at]=a.match(floatRegex);return{[i]:parseFloat(rt),[s]:parseFloat(et),[o]:parseFloat(ot),alpha:at!==void 0?parseFloat(at):1}},clampRgbUnit=i=>clamp(0,255,i),rgbUnit={...number,transform:i=>Math.round(clampRgbUnit(i))},rgba={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:i,green:s,blue:o,alpha:a=1})=>"rgba("+rgbUnit.transform(i)+", "+rgbUnit.transform(s)+", "+rgbUnit.transform(o)+", "+sanitize(alpha.transform(a))+")"};function parseHex(i){let s="",o="",a="",rt="";return i.length>5?(s=i.substring(1,3),o=i.substring(3,5),a=i.substring(5,7),rt=i.substring(7,9)):(s=i.substring(1,2),o=i.substring(2,3),a=i.substring(3,4),rt=i.substring(4,5),s+=s,o+=o,a+=a,rt+=rt),{red:parseInt(s,16),green:parseInt(o,16),blue:parseInt(a,16),alpha:rt?parseInt(rt,16)/255:1}}const hex={test:isColorString("#"),parse:parseHex,transform:rgba.transform},hsla={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:i,saturation:s,lightness:o,alpha:a=1})=>"hsla("+Math.round(i)+", "+percent.transform(sanitize(s))+", "+percent.transform(sanitize(o))+", "+sanitize(alpha.transform(a))+")"},color={test:i=>rgba.test(i)||hex.test(i)||hsla.test(i),parse:i=>rgba.test(i)?rgba.parse(i):hsla.test(i)?hsla.parse(i):hex.parse(i),transform:i=>isString$1(i)?i:i.hasOwnProperty("red")?rgba.transform(i):hsla.transform(i)};function test(i){var s,o;return isNaN(i)&&isString$1(i)&&(((s=i.match(floatRegex))===null||s===void 0?void 0:s.length)||0)+(((o=i.match(colorRegex))===null||o===void 0?void 0:o.length)||0)>0}const NUMBER_TOKEN="number",COLOR_TOKEN="color",VAR_TOKEN="var",VAR_FUNCTION_TOKEN="var(",SPLIT_TOKEN="${}",complexRegex=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function analyseComplexValue(i){const s=i.toString(),o=[],a={color:[],number:[],var:[]},rt=[];let et=0;const at=s.replace(complexRegex,nt=>(color.test(nt)?(a.color.push(et),rt.push(COLOR_TOKEN),o.push(color.parse(nt))):nt.startsWith(VAR_FUNCTION_TOKEN)?(a.var.push(et),rt.push(VAR_TOKEN),o.push(nt)):(a.number.push(et),rt.push(NUMBER_TOKEN),o.push(parseFloat(nt))),++et,SPLIT_TOKEN)).split(SPLIT_TOKEN);return{values:o,split:at,indexes:a,types:rt}}function parseComplexValue(i){return analyseComplexValue(i).values}function createTransformer(i){const{split:s,types:o}=analyseComplexValue(i),a=s.length;return rt=>{let et="";for(let ot=0;ottypeof i=="number"?0:i;function getAnimatableNone$1(i){const s=parseComplexValue(i);return createTransformer(i)(s.map(convertNumbersToZero))}const complex={test,parse:parseComplexValue,createTransformer,getAnimatableNone:getAnimatableNone$1},maxDefaults=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(i){const[s,o]=i.slice(0,-1).split("(");if(s==="drop-shadow")return i;const[a]=o.match(floatRegex)||[];if(!a)return i;const rt=o.replace(a,"");let et=maxDefaults.has(s)?1:0;return a!==o&&(et*=100),s+"("+et+rt+")"}const functionRegex=/\b([a-z-]*)\(.*?\)/gu,filter$1={...complex,getAnimatableNone:i=>{const s=i.match(functionRegex);return s?s.map(applyDefaultFilter).join(" "):i}},defaultValueTypes={...numberValueTypes,color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,filter:filter$1,WebkitFilter:filter$1},getDefaultValueType=i=>defaultValueTypes[i];function getAnimatableNone(i,s){let o=getDefaultValueType(i);return o!==filter$1&&(o=complex),o.getAnimatableNone?o.getAnimatableNone(s):void 0}const invalidTemplates=new Set(["auto","none","0"]);function makeNoneKeyframesAnimatable(i,s,o){let a=0,rt;for(;a{o.getValue(nt).set(it)}),this.resolveNoneKeyframes()}}function memo(i){let s;return()=>(s===void 0&&(s=i()),s)}const isAnimatable=(i,s)=>s==="zIndex"?!1:!!(typeof i=="number"||Array.isArray(i)||typeof i=="string"&&(complex.test(i)||i==="0")&&!i.startsWith("url("));function hasKeyframesChanged(i){const s=i[0];if(i.length===1)return!0;for(let o=0;o{this.resolveFinishedPromise=s})}}function velocityPerSecond(i,s){return s?i*(1e3/s):0}const velocitySampleDuration=5;function calcGeneratorVelocity(i,s,o){const a=Math.max(s-velocitySampleDuration,0);return velocityPerSecond(o-i(a),s-a)}const safeMin=.001,minDuration=.01,maxDuration$1=10,minDamping=.05,maxDamping=1;function findSpring({duration:i=800,bounce:s=.25,velocity:o=0,mass:a=1}){let rt,et,ot=1-s;ot=clamp(minDamping,maxDamping,ot),i=clamp(minDuration,maxDuration$1,millisecondsToSeconds(i)),ot<1?(rt=it=>{const j=it*ot,_=j*i,$=j-o,tt=calcAngularFreq(it,ot),st=Math.exp(-_);return safeMin-$/tt*st},et=it=>{const _=it*ot*i,$=_*o+o,tt=Math.pow(ot,2)*Math.pow(it,2)*i,st=Math.exp(-_),lt=calcAngularFreq(Math.pow(it,2),ot);return(-rt(it)+safeMin>0?-1:1)*(($-tt)*st)/lt}):(rt=it=>{const j=Math.exp(-it*i),_=(it-o)*i+1;return-safeMin+j*_},et=it=>{const j=Math.exp(-it*i),_=(o-it)*(i*i);return j*_});const at=5/i,nt=approximateRoot(rt,et,at);if(i=secondsToMilliseconds(i),isNaN(nt))return{stiffness:100,damping:10,duration:i};{const it=Math.pow(nt,2)*a;return{stiffness:it,damping:ot*2*Math.sqrt(a*it),duration:i}}}const rootIterations=12;function approximateRoot(i,s,o){let a=o;for(let rt=1;rti[o]!==void 0)}function getSpringOptions(i){let s={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...i};if(!isSpringType(i,physicsKeys)&&isSpringType(i,durationKeys)){const o=findSpring(i);s={...s,...o,mass:1},s.isResolvedFromDuration=!0}return s}function spring({keyframes:i,restDelta:s,restSpeed:o,...a}){const rt=i[0],et=i[i.length-1],ot={done:!1,value:rt},{stiffness:at,damping:nt,mass:it,duration:j,velocity:_,isResolvedFromDuration:$}=getSpringOptions({...a,velocity:-millisecondsToSeconds(a.velocity||0)}),tt=_||0,st=nt/(2*Math.sqrt(at*it)),lt=et-rt,ct=millisecondsToSeconds(Math.sqrt(at/it)),ht=Math.abs(lt)<5;o||(o=ht?.01:2),s||(s=ht?.005:.5);let ut;if(st<1){const pt=calcAngularFreq(ct,st);ut=mt=>{const vt=Math.exp(-st*ct*mt);return et-vt*((tt+st*ct*lt)/pt*Math.sin(pt*mt)+lt*Math.cos(pt*mt))}}else if(st===1)ut=pt=>et-Math.exp(-ct*pt)*(lt+(tt+ct*lt)*pt);else{const pt=ct*Math.sqrt(st*st-1);ut=mt=>{const vt=Math.exp(-st*ct*mt),dt=Math.min(pt*mt,300);return et-vt*((tt+st*ct*lt)*Math.sinh(dt)+pt*lt*Math.cosh(dt))/pt}}return{calculatedDuration:$&&j||null,next:pt=>{const mt=ut(pt);if($)ot.done=pt>=j;else{let vt=tt;pt!==0&&(st<1?vt=calcGeneratorVelocity(ut,pt,mt):vt=0);const dt=Math.abs(vt)<=o,St=Math.abs(et-mt)<=s;ot.done=dt&&St}return ot.value=ot.done?et:mt,ot}}}function inertia({keyframes:i,velocity:s=0,power:o=.8,timeConstant:a=325,bounceDamping:rt=10,bounceStiffness:et=500,modifyTarget:ot,min:at,max:nt,restDelta:it=.5,restSpeed:j}){const _=i[0],$={done:!1,value:_},tt=yt=>at!==void 0&&ytnt,st=yt=>at===void 0?nt:nt===void 0||Math.abs(at-yt)-lt*Math.exp(-yt/a),pt=yt=>ht+ut(yt),mt=yt=>{const gt=ut(yt),Et=pt(yt);$.done=Math.abs(gt)<=it,$.value=$.done?ht:Et};let vt,dt;const St=yt=>{tt($.value)&&(vt=yt,dt=spring({keyframes:[$.value,st($.value)],velocity:calcGeneratorVelocity(pt,yt,$.value),damping:rt,stiffness:et,restDelta:it,restSpeed:j}))};return St(0),{calculatedDuration:null,next:yt=>{let gt=!1;return!dt&&vt===void 0&&(gt=!0,mt(yt),St(yt)),vt!==void 0&&yt>=vt?dt.next(yt-vt):(!gt&&mt(yt),$)}}}const calcBezier=(i,s,o)=>(((1-3*o+3*s)*i+(3*o-6*s))*i+3*s)*i,subdivisionPrecision=1e-7,subdivisionMaxIterations=12;function binarySubdivide(i,s,o,a,rt){let et,ot,at=0;do ot=s+(o-s)/2,et=calcBezier(ot,a,rt)-i,et>0?o=ot:s=ot;while(Math.abs(et)>subdivisionPrecision&&++atbinarySubdivide(et,0,1,i,o);return et=>et===0||et===1?et:calcBezier(rt(et),s,a)}const easeIn=cubicBezier(.42,0,1,1),easeOut=cubicBezier(0,0,.58,1),easeInOut=cubicBezier(.42,0,.58,1),isEasingArray=i=>Array.isArray(i)&&typeof i[0]!="number",mirrorEasing=i=>s=>s<=.5?i(2*s)/2:(2-i(2*(1-s)))/2,reverseEasing=i=>s=>1-i(1-s),circIn=i=>1-Math.sin(Math.acos(i)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circIn),backOut=cubicBezier(.33,1.53,.69,.99),backIn=reverseEasing(backOut),backInOut=mirrorEasing(backIn),anticipate=i=>(i*=2)<1?.5*backIn(i):.5*(2-Math.pow(2,-10*(i-1))),easingLookup={linear:noop$1,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate},easingDefinitionToFunction=i=>{if(Array.isArray(i)){invariant(i.length===4);const[s,o,a,rt]=i;return cubicBezier(s,o,a,rt)}else if(typeof i=="string")return invariant(easingLookup[i]!==void 0),easingLookup[i];return i},progress=(i,s,o)=>{const a=s-i;return a===0?1:(o-i)/a},mixNumber$1=(i,s,o)=>i+(s-i)*o;function hueToRgb(i,s,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?i+(s-i)*6*o:o<1/2?s:o<2/3?i+(s-i)*(2/3-o)*6:i}function hslaToRgba({hue:i,saturation:s,lightness:o,alpha:a}){i/=360,s/=100,o/=100;let rt=0,et=0,ot=0;if(!s)rt=et=ot=o;else{const at=o<.5?o*(1+s):o+s-o*s,nt=2*o-at;rt=hueToRgb(nt,at,i+1/3),et=hueToRgb(nt,at,i),ot=hueToRgb(nt,at,i-1/3)}return{red:Math.round(rt*255),green:Math.round(et*255),blue:Math.round(ot*255),alpha:a}}function mixImmediate(i,s){return o=>o>0?s:i}const mixLinearColor=(i,s,o)=>{const a=i*i,rt=o*(s*s-a)+a;return rt<0?0:Math.sqrt(rt)},colorTypes=[hex,rgba,hsla],getColorType=i=>colorTypes.find(s=>s.test(i));function asRGBA(i){const s=getColorType(i);if(!s)return!1;let o=s.parse(i);return s===hsla&&(o=hslaToRgba(o)),o}const mixColor=(i,s)=>{const o=asRGBA(i),a=asRGBA(s);if(!o||!a)return mixImmediate(i,s);const rt={...o};return et=>(rt.red=mixLinearColor(o.red,a.red,et),rt.green=mixLinearColor(o.green,a.green,et),rt.blue=mixLinearColor(o.blue,a.blue,et),rt.alpha=mixNumber$1(o.alpha,a.alpha,et),rgba.transform(rt))},invisibleValues=new Set(["none","hidden"]);function mixVisibility(i,s){return invisibleValues.has(i)?o=>o<=0?i:s:o=>o>=1?s:i}function mixNumber(i,s){return o=>mixNumber$1(i,s,o)}function getMixer(i){return typeof i=="number"?mixNumber:typeof i=="string"?isCSSVariableToken(i)?mixImmediate:color.test(i)?mixColor:mixComplex:Array.isArray(i)?mixArray:typeof i=="object"?color.test(i)?mixColor:mixObject:mixImmediate}function mixArray(i,s){const o=[...i],a=o.length,rt=i.map((et,ot)=>getMixer(et)(et,s[ot]));return et=>{for(let ot=0;ot{for(const et in a)o[et]=a[et](rt);return o}}function matchOrder(i,s){var o;const a=[],rt={color:0,var:0,number:0};for(let et=0;et{const o=complex.createTransformer(s),a=analyseComplexValue(i),rt=analyseComplexValue(s);return a.indexes.var.length===rt.indexes.var.length&&a.indexes.color.length===rt.indexes.color.length&&a.indexes.number.length>=rt.indexes.number.length?invisibleValues.has(i)&&!rt.values.length||invisibleValues.has(s)&&!a.values.length?mixVisibility(i,s):pipe(mixArray(matchOrder(a,rt),rt.values),o):mixImmediate(i,s)};function mix(i,s,o){return typeof i=="number"&&typeof s=="number"&&typeof o=="number"?mixNumber$1(i,s,o):getMixer(i)(i,s)}function createMixers(i,s,o){const a=[],rt=o||mix,et=i.length-1;for(let ot=0;ots[0];if(et===2&&i[0]===i[1])return()=>s[1];i[0]>i[et-1]&&(i=[...i].reverse(),s=[...s].reverse());const ot=createMixers(s,a,rt),at=ot.length,nt=it=>{let j=0;if(at>1)for(;jnt(clamp(i[0],i[et-1],it)):nt}function fillOffset(i,s){const o=i[i.length-1];for(let a=1;a<=s;a++){const rt=progress(0,s,a);i.push(mixNumber$1(o,1,rt))}}function defaultOffset(i){const s=[0];return fillOffset(s,i.length-1),s}function convertOffsetToTimes(i,s){return i.map(o=>o*s)}function defaultEasing(i,s){return i.map(()=>s||easeInOut).splice(0,i.length-1)}function keyframes({duration:i=300,keyframes:s,times:o,ease:a="easeInOut"}){const rt=isEasingArray(a)?a.map(easingDefinitionToFunction):easingDefinitionToFunction(a),et={done:!1,value:s[0]},ot=convertOffsetToTimes(o&&o.length===s.length?o:defaultOffset(s),i),at=interpolate(ot,s,{ease:Array.isArray(rt)?rt:defaultEasing(s,rt)});return{calculatedDuration:i,next:nt=>(et.value=at(nt),et.done=nt>=i,et)}}const maxGeneratorDuration=2e4;function calcGeneratorDuration(i){let s=0;const o=50;let a=i.next(s);for(;!a.done&&s=maxGeneratorDuration?1/0:s}const frameloopDriver=i=>{const s=({timestamp:o})=>i(o);return{start:()=>frame.update(s,!0),stop:()=>cancelFrame(s),now:()=>frameData.isProcessing?frameData.timestamp:time.now()}},generators={decay:inertia,inertia,tween:keyframes,keyframes,spring},percentToProgress=i=>i/100;class MainThreadAnimation extends BaseAnimation{constructor({KeyframeResolver:s=KeyframeResolver,...o}){super(o),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:at}=this.options;at&&at()};const{name:a,motionValue:rt,keyframes:et}=this.options,ot=(at,nt)=>this.onKeyframesResolved(at,nt);a&&rt&&rt.owner?this.resolver=rt.owner.resolveKeyframes(et,ot,a,rt):this.resolver=new s(et,ot,a,rt),this.resolver.scheduleResolve()}initPlayback(s){const{type:o="keyframes",repeat:a=0,repeatDelay:rt=0,repeatType:et,velocity:ot=0}=this.options,at=generators[o]||keyframes;let nt,it;at!==keyframes&&typeof s[0]!="number"&&(nt=pipe(percentToProgress,mix(s[0],s[1])),s=[0,100]);const j=at({...this.options,keyframes:s});et==="mirror"&&(it=at({...this.options,keyframes:[...s].reverse(),velocity:-ot})),j.calculatedDuration===null&&(j.calculatedDuration=calcGeneratorDuration(j));const{calculatedDuration:_}=j,$=_+rt,tt=$*(a+1)-rt;return{generator:j,mirroredGenerator:it,mapPercentToKeyframes:nt,calculatedDuration:_,resolvedDuration:$,totalDuration:tt}}onPostResolved(){const{autoplay:s=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!s?this.pause():this.state=this.pendingPlayState}tick(s,o=!1){const{resolved:a}=this;if(!a){const{keyframes:yt}=this.options;return{done:!0,value:yt[yt.length-1]}}const{finalKeyframe:rt,generator:et,mirroredGenerator:ot,mapPercentToKeyframes:at,keyframes:nt,calculatedDuration:it,totalDuration:j,resolvedDuration:_}=a;if(this.startTime===null)return et.next(0);const{delay:$,repeat:tt,repeatType:st,repeatDelay:lt,onUpdate:ct}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,s):this.speed<0&&(this.startTime=Math.min(s-j/this.speed,this.startTime)),o?this.currentTime=s:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(s-this.startTime)*this.speed;const ht=this.currentTime-$*(this.speed>=0?1:-1),ut=this.speed>=0?ht<0:ht>j;this.currentTime=Math.max(ht,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=j);let pt=this.currentTime,mt=et;if(tt){const yt=Math.min(this.currentTime,j)/_;let gt=Math.floor(yt),Et=yt%1;!Et&&yt>=1&&(Et=1),Et===1&>--,gt=Math.min(gt,tt+1),!!(gt%2)&&(st==="reverse"?(Et=1-Et,lt&&(Et-=lt/_)):st==="mirror"&&(mt=ot)),pt=clamp(0,1,Et)*_}const vt=ut?{done:!1,value:nt[0]}:mt.next(pt);at&&(vt.value=at(vt.value));let{done:dt}=vt;!ut&&it!==null&&(dt=this.speed>=0?this.currentTime>=j:this.currentTime<=0);const St=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&dt);return St&&rt!==void 0&&(vt.value=getFinalKeyframe(nt,this.options,rt)),ct&&ct(vt.value),St&&this.finish(),vt}get duration(){const{resolved:s}=this;return s?millisecondsToSeconds(s.calculatedDuration):0}get time(){return millisecondsToSeconds(this.currentTime)}set time(s){s=secondsToMilliseconds(s),this.currentTime=s,this.holdTime!==null||this.speed===0?this.holdTime=s:this.driver&&(this.startTime=this.driver.now()-s/this.speed)}get speed(){return this.playbackSpeed}set speed(s){const o=this.playbackSpeed!==s;this.playbackSpeed=s,o&&(this.time=millisecondsToSeconds(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:s=frameloopDriver,onPlay:o}=this.options;this.driver||(this.driver=s(rt=>this.tick(rt))),o&&o();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=a),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var s;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(s=this.currentTime)!==null&&s!==void 0?s:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:s}=this.options;s&&s()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(s){return this.startTime=0,this.tick(s,!0)}}const isBezierDefinition=i=>Array.isArray(i)&&typeof i[0]=="number";function isWaapiSupportedEasing(i){return!!(!i||typeof i=="string"&&i in supportedWaapiEasing||isBezierDefinition(i)||Array.isArray(i)&&i.every(isWaapiSupportedEasing))}const cubicBezierAsString=([i,s,o,a])=>`cubic-bezier(${i}, ${s}, ${o}, ${a})`,supportedWaapiEasing={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function mapEasingToNativeEasingWithDefault(i){return mapEasingToNativeEasing(i)||supportedWaapiEasing.easeOut}function mapEasingToNativeEasing(i){if(i)return isBezierDefinition(i)?cubicBezierAsString(i):Array.isArray(i)?i.map(mapEasingToNativeEasingWithDefault):supportedWaapiEasing[i]}function animateStyle(i,s,o,{delay:a=0,duration:rt=300,repeat:et=0,repeatType:ot="loop",ease:at,times:nt}={}){const it={[s]:o};nt&&(it.offset=nt);const j=mapEasingToNativeEasing(at);return Array.isArray(j)&&(it.easing=j),i.animate(it,{delay:a,duration:rt,easing:Array.isArray(j)?"linear":j,fill:"both",iterations:et+1,direction:ot==="reverse"?"alternate":"normal"})}const supportsWaapi=memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sampleDelta=10,maxDuration=2e4;function requiresPregeneratedKeyframes(i){return i.type==="spring"||!isWaapiSupportedEasing(i.ease)}function pregenerateKeyframes(i,s){const o=new MainThreadAnimation({...s,keyframes:i,repeat:0,delay:0,isGenerator:!0});let a={done:!1,value:i[0]};const rt=[];let et=0;for(;!a.done&&etthis.onKeyframesResolved(et,ot),o,a),this.resolver.scheduleResolve()}initPlayback(s,o){var a;let{duration:rt=300,times:et,ease:ot,type:at,motionValue:nt,name:it}=this.options;if(!(!((a=nt.owner)===null||a===void 0)&&a.current))return!1;if(requiresPregeneratedKeyframes(this.options)){const{onComplete:_,onUpdate:$,motionValue:tt,...st}=this.options,lt=pregenerateKeyframes(s,st);s=lt.keyframes,s.length===1&&(s[1]=s[0]),rt=lt.duration,et=lt.times,ot=lt.ease,at="keyframes"}const j=animateStyle(nt.owner.current,it,s,{...this.options,duration:rt,times:et,ease:ot});return j.startTime=time.now(),this.pendingTimeline?(j.timeline=this.pendingTimeline,this.pendingTimeline=void 0):j.onfinish=()=>{const{onComplete:_}=this.options;nt.set(getFinalKeyframe(s,this.options,o)),_&&_(),this.cancel(),this.resolveFinishedPromise()},{animation:j,duration:rt,times:et,type:at,ease:ot,keyframes:s}}get duration(){const{resolved:s}=this;if(!s)return 0;const{duration:o}=s;return millisecondsToSeconds(o)}get time(){const{resolved:s}=this;if(!s)return 0;const{animation:o}=s;return millisecondsToSeconds(o.currentTime||0)}set time(s){const{resolved:o}=this;if(!o)return;const{animation:a}=o;a.currentTime=secondsToMilliseconds(s)}get speed(){const{resolved:s}=this;if(!s)return 1;const{animation:o}=s;return o.playbackRate}set speed(s){const{resolved:o}=this;if(!o)return;const{animation:a}=o;a.playbackRate=s}get state(){const{resolved:s}=this;if(!s)return"idle";const{animation:o}=s;return o.playState}attachTimeline(s){if(!this._resolved)this.pendingTimeline=s;else{const{resolved:o}=this;if(!o)return noop$1;const{animation:a}=o;a.timeline=s,a.onfinish=null}return noop$1}play(){if(this.isStopped)return;const{resolved:s}=this;if(!s)return;const{animation:o}=s;o.playState==="finished"&&this.updateFinishedPromise(),o.play()}pause(){const{resolved:s}=this;if(!s)return;const{animation:o}=s;o.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:s}=this;if(!s)return;const{animation:o,keyframes:a,duration:rt,type:et,ease:ot,times:at}=s;if(o.playState==="idle"||o.playState==="finished")return;if(this.time){const{motionValue:it,onUpdate:j,onComplete:_,...$}=this.options,tt=new MainThreadAnimation({...$,keyframes:a,duration:rt,type:et,ease:ot,times:at,isGenerator:!0}),st=secondsToMilliseconds(this.time);it.setWithVelocity(tt.sample(st-sampleDelta).value,tt.sample(st).value,sampleDelta)}const{onStop:nt}=this.options;nt&&nt(),this.cancel()}complete(){const{resolved:s}=this;s&&s.animation.finish()}cancel(){const{resolved:s}=this;s&&s.animation.cancel()}static supports(s){const{motionValue:o,name:a,repeatDelay:rt,repeatType:et,damping:ot,type:at}=s;return supportsWaapi()&&a&&acceleratedValues.has(a)&&o&&o.owner&&o.owner.current instanceof HTMLElement&&!o.owner.getProps().onUpdate&&!rt&&et!=="mirror"&&ot!==0&&at!=="inertia"}}function observeTimeline(i,s){let o;const a=()=>{const{currentTime:rt}=s,ot=(rt===null?0:rt.value)/100;o!==ot&&i(ot),o=ot};return frame.update(a,!0),()=>cancelFrame(a)}const supportsScrollTimeline=memo(()=>window.ScrollTimeline!==void 0);class GroupPlaybackControls{constructor(s){this.stop=()=>this.runAll("stop"),this.animations=s.filter(Boolean)}then(s,o){return Promise.all(this.animations).then(s).catch(o)}getAll(s){return this.animations[0][s]}setAll(s,o){for(let a=0;a{if(supportsScrollTimeline()&&a.attachTimeline)a.attachTimeline(s);else return a.pause(),observeTimeline(rt=>{a.time=a.duration*rt},s)});return()=>{o.forEach((a,rt)=>{a&&a(),this.animations[rt].stop()})}}get time(){return this.getAll("time")}set time(s){this.setAll("time",s)}get speed(){return this.getAll("speed")}set speed(s){this.setAll("speed",s)}get duration(){let s=0;for(let o=0;oo[s]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const animateMotionValue=(i,s,o,a={},rt,et,ot)=>at=>{const nt=getValueTransition(a,i)||{},it=nt.delay||a.delay||0;let{elapsed:j=0}=a;j=j-secondsToMilliseconds(it);let _={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:s.getVelocity(),...nt,delay:-j,onUpdate:tt=>{s.set(tt),nt.onUpdate&&nt.onUpdate(tt)},onComplete:()=>{at(),nt.onComplete&&nt.onComplete(),ot&&ot()},onStop:ot,name:i,motionValue:s,element:et?void 0:rt};isTransitionDefined(nt)||(_={..._,...getDefaultTransition(i,_)}),_.duration&&(_.duration=secondsToMilliseconds(_.duration)),_.repeatDelay&&(_.repeatDelay=secondsToMilliseconds(_.repeatDelay)),_.from!==void 0&&(_.keyframes[0]=_.from);let $=!1;if((_.type===!1||_.duration===0&&!_.repeatDelay)&&(_.duration=0,_.delay===0&&($=!0)),$&&!et&&s.get()!==void 0){const tt=getFinalKeyframe(_.keyframes,nt);if(tt!==void 0)return frame.update(()=>{_.onUpdate(tt),_.onComplete()}),new GroupPlaybackControls([])}return!et&&AcceleratedAnimation.supports(_)?new AcceleratedAnimation(_):new MainThreadAnimation(_)};class SubscriptionManager{constructor(){this.subscriptions=[]}add(s){return addUniqueItem(this.subscriptions,s),()=>removeItem(this.subscriptions,s)}notify(s,o,a){const rt=this.subscriptions.length;if(rt)if(rt===1)this.subscriptions[0](s,o,a);else for(let et=0;et!isNaN(parseFloat(i));class MotionValue{constructor(s,o={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(a,rt=!0)=>{const et=time.now();this.updatedAt!==et&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),rt&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(s),this.owner=o.owner}setCurrent(s){this.current=s,this.updatedAt=time.now(),this.canTrackVelocity===null&&s!==void 0&&(this.canTrackVelocity=isFloat(this.current))}setPrevFrameValue(s=this.current){this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt}onChange(s){return this.on("change",s)}on(s,o){this.events[s]||(this.events[s]=new SubscriptionManager);const a=this.events[s].add(o);return s==="change"?()=>{a(),frame.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(const s in this.events)this.events[s].clear()}attach(s,o){this.passiveEffect=s,this.stopPassiveEffect=o}set(s,o=!0){!o||!this.passiveEffect?this.updateAndNotify(s,o):this.passiveEffect(s,this.updateAndNotify)}setWithVelocity(s,o,a){this.set(o),this.prev=void 0,this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt-a}jump(s,o=!0){this.updateAndNotify(s),this.prev=s,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const s=time.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||s-this.updatedAt>MAX_VELOCITY_DELTA)return 0;const o=Math.min(this.updatedAt-this.prevUpdatedAt,MAX_VELOCITY_DELTA);return velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(s){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=s(o),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 motionValue(i,s){return new MotionValue(i,s)}function setMotionValue(i,s,o){i.hasValue(s)?i.getValue(s).set(o):i.addValue(s,motionValue(o))}function setTarget(i,s){const o=resolveVariant(i,s);let{transitionEnd:a={},transition:rt={},...et}=o||{};et={...et,...a};for(const ot in et){const at=resolveFinalValueInKeyframes(et[ot]);setMotionValue(i,ot,at)}}function getOptimisedAppearId(i){return i.getProps()[optimizedAppearDataAttribute]}class WillChangeMotionValue extends MotionValue{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(s){const o=getWillChangeName(s);if(!o)return;const a=this.counts.get(o)||0;this.counts.set(o,a+1),a===0&&(this.output.push(o),this.update());let rt=!1;return()=>{if(rt)return;rt=!0;const et=this.counts.get(o)-1;this.counts.set(o,et),et===0&&(removeItem(this.output,o),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function isWillChangeMotionValue(i){return!!(isMotionValue(i)&&i.add)}function addValueToWillChange(i,s){var o;if(!i.applyWillChange)return;let a=i.getValue("willChange");if(!a&&!(!((o=i.props.style)===null||o===void 0)&&o.willChange)&&(a=new WillChangeMotionValue("auto"),i.addValue("willChange",a)),isWillChangeMotionValue(a))return a.add(s)}function shouldBlockAnimation({protectedKeys:i,needsAnimating:s},o){const a=i.hasOwnProperty(o)&&s[o]!==!0;return s[o]=!1,a}function animateTarget(i,s,{delay:o=0,transitionOverride:a,type:rt}={}){var et;let{transition:ot=i.getDefaultTransition(),transitionEnd:at,...nt}=s;a&&(ot=a);const it=[],j=rt&&i.animationState&&i.animationState.getState()[rt];for(const _ in nt){const $=i.getValue(_,(et=i.latestValues[_])!==null&&et!==void 0?et:null),tt=nt[_];if(tt===void 0||j&&shouldBlockAnimation(j,_))continue;const st={delay:o,elapsed:0,...getValueTransition(ot||{},_)};let lt=!1;if(window.HandoffAppearAnimations){const ht=getOptimisedAppearId(i);if(ht){const ut=window.HandoffAppearAnimations(ht,_,$,frame);ut!==null&&(st.elapsed=ut,lt=!0)}}$.start(animateMotionValue(_,$,tt,i.shouldReduceMotion&&transformProps.has(_)?{type:!1}:st,i,lt,addValueToWillChange(i,_)));const ct=$.animation;ct&&it.push(ct)}return at&&Promise.all(it).then(()=>{frame.update(()=>{at&&setTarget(i,at)})}),it}function animateVariant(i,s,o={}){var a;const rt=resolveVariant(i,s,o.type==="exit"?(a=i.presenceContext)===null||a===void 0?void 0:a.custom:void 0);let{transition:et=i.getDefaultTransition()||{}}=rt||{};o.transitionOverride&&(et=o.transitionOverride);const ot=rt?()=>Promise.all(animateTarget(i,rt,o)):()=>Promise.resolve(),at=i.variantChildren&&i.variantChildren.size?(it=0)=>{const{delayChildren:j=0,staggerChildren:_,staggerDirection:$}=et;return animateChildren(i,s,j+it,_,$,o)}:()=>Promise.resolve(),{when:nt}=et;if(nt){const[it,j]=nt==="beforeChildren"?[ot,at]:[at,ot];return it().then(()=>j())}else return Promise.all([ot(),at(o.delay)])}function animateChildren(i,s,o=0,a=0,rt=1,et){const ot=[],at=(i.variantChildren.size-1)*a,nt=rt===1?(it=0)=>it*a:(it=0)=>at-it*a;return Array.from(i.variantChildren).sort(sortByTreeOrder).forEach((it,j)=>{it.notify("AnimationStart",s),ot.push(animateVariant(it,s,{...et,delay:o+nt(j)}).then(()=>it.notify("AnimationComplete",s)))}),Promise.all(ot)}function sortByTreeOrder(i,s){return i.sortNodePosition(s)}function animateVisualElement(i,s,o={}){i.notify("AnimationStart",s);let a;if(Array.isArray(s)){const rt=s.map(et=>animateVariant(i,et,o));a=Promise.all(rt)}else if(typeof s=="string")a=animateVariant(i,s,o);else{const rt=typeof s=="function"?resolveVariant(i,s,o.custom):s;a=Promise.all(animateTarget(i,rt,o))}return a.then(()=>{frame.postRender(()=>{i.notify("AnimationComplete",s)})})}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(i){return s=>Promise.all(s.map(({animation:o,options:a})=>animateVisualElement(i,o,a)))}function createAnimationState(i){let s=animateList(i),o=createState(),a=!0;const rt=nt=>(it,j)=>{var _;const $=resolveVariant(i,j,nt==="exit"?(_=i.presenceContext)===null||_===void 0?void 0:_.custom:void 0);if($){const{transition:tt,transitionEnd:st,...lt}=$;it={...it,...lt,...st}}return it};function et(nt){s=nt(i)}function ot(nt){const it=i.getProps(),j=i.getVariantContext(!0)||{},_=[],$=new Set;let tt={},st=1/0;for(let ct=0;ctst&&mt,gt=!1;const Et=Array.isArray(pt)?pt:[pt];let _t=Et.reduce(rt(ht),{});vt===!1&&(_t={});const{prevResolvedValues:kt={}}=ut,Ct={...kt,..._t},Tt=At=>{yt=!0,$.has(At)&&(gt=!0,$.delete(At)),ut.needsAnimating[At]=!0;const It=i.getValue(At);It&&(It.liveStyle=!1)};for(const At in Ct){const It=_t[At],Ot=kt[At];if(tt.hasOwnProperty(At))continue;let Mt=!1;isKeyframesTarget(It)&&isKeyframesTarget(Ot)?Mt=!shallowCompare(It,Ot):Mt=It!==Ot,Mt?It!=null?Tt(At):$.add(At):It!==void 0&&$.has(At)?Tt(At):ut.protectedKeys[At]=!0}ut.prevProp=pt,ut.prevResolvedValues=_t,ut.isActive&&(tt={...tt,..._t}),a&&i.blockInitialAnimation&&(yt=!1),yt&&(!dt||gt)&&_.push(...Et.map(At=>({animation:At,options:{type:ht}})))}if($.size){const ct={};$.forEach(ht=>{const ut=i.getBaseTarget(ht),pt=i.getValue(ht);pt&&(pt.liveStyle=!0),ct[ht]=ut??null}),_.push({animation:ct})}let lt=!!_.length;return a&&(it.initial===!1||it.initial===it.animate)&&!i.manuallyAnimateOnMount&&(lt=!1),a=!1,lt?s(_):Promise.resolve()}function at(nt,it){var j;if(o[nt].isActive===it)return Promise.resolve();(j=i.variantChildren)===null||j===void 0||j.forEach($=>{var tt;return(tt=$.animationState)===null||tt===void 0?void 0:tt.setActive(nt,it)}),o[nt].isActive=it;const _=ot(nt);for(const $ in o)o[$].protectedKeys={};return _}return{animateChanges:ot,setActive:at,setAnimateFunction:et,getState:()=>o,reset:()=>{o=createState(),a=!0}}}function checkVariantsDidChange(i,s){return typeof s=="string"?s!==i:Array.isArray(s)?!shallowCompare(s,i):!1}function createTypeState(i=!1){return{isActive:i,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class AnimationFeature extends Feature{constructor(s){super(s),s.animationState||(s.animationState=createAnimationState(s))}updateAnimationControlsSubscription(){const{animate:s}=this.node.getProps();isAnimationControls(s)&&(this.unmountControls=s.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:s}=this.node.getProps(),{animate:o}=this.node.prevProps||{};s!==o&&this.updateAnimationControlsSubscription()}unmount(){var s;this.node.animationState.reset(),(s=this.unmountControls)===null||s===void 0||s.call(this)}}let id$1=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id$1++}update(){if(!this.node.presenceContext)return;const{isPresent:s,onExitComplete:o}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||s===a)return;const rt=this.node.animationState.setActive("exit",!s);o&&!s&&rt.then(()=>o(this.id))}mount(){const{register:s}=this.node.presenceContext||{};s&&(this.unmount=s(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}},distance=(i,s)=>Math.abs(i-s);function distance2D(i,s){const o=distance(i.x,s.x),a=distance(i.y,s.y);return Math.sqrt(o**2+a**2)}class PanSession{constructor(s,o,{transformPagePoint:a,contextWindow:rt,dragSnapToOrigin:et=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=getPanInfo(this.lastMoveEventInfo,this.history),$=this.startEvent!==null,tt=distance2D(_.offset,{x:0,y:0})>=3;if(!$&&!tt)return;const{point:st}=_,{timestamp:lt}=frameData;this.history.push({...st,timestamp:lt});const{onStart:ct,onMove:ht}=this.handlers;$||(ct&&ct(this.lastMoveEvent,_),this.startEvent=this.lastMoveEvent),ht&&ht(this.lastMoveEvent,_)},this.handlePointerMove=(_,$)=>{this.lastMoveEvent=_,this.lastMoveEventInfo=transformPoint($,this.transformPagePoint),frame.update(this.updatePoint,!0)},this.handlePointerUp=(_,$)=>{this.end();const{onEnd:tt,onSessionEnd:st,resumeAnimation:lt}=this.handlers;if(this.dragSnapToOrigin&<&<(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const ct=getPanInfo(_.type==="pointercancel"?this.lastMoveEventInfo:transformPoint($,this.transformPagePoint),this.history);this.startEvent&&tt&&tt(_,ct),st&&st(_,ct)},!isPrimaryPointer(s))return;this.dragSnapToOrigin=et,this.handlers=o,this.transformPagePoint=a,this.contextWindow=rt||window;const ot=extractEventInfo(s),at=transformPoint(ot,this.transformPagePoint),{point:nt}=at,{timestamp:it}=frameData;this.history=[{...nt,timestamp:it}];const{onSessionStart:j}=o;j&&j(s,getPanInfo(at,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(s){this.handlers=s}end(){this.removeListeners&&this.removeListeners(),cancelFrame(this.updatePoint)}}function transformPoint(i,s){return s?{point:s(i.point)}:i}function subtractPoint(i,s){return{x:i.x-s.x,y:i.y-s.y}}function getPanInfo({point:i},s){return{point:i,delta:subtractPoint(i,lastDevicePoint(s)),offset:subtractPoint(i,startDevicePoint(s)),velocity:getVelocity(s,.1)}}function startDevicePoint(i){return i[0]}function lastDevicePoint(i){return i[i.length-1]}function getVelocity(i,s){if(i.length<2)return{x:0,y:0};let o=i.length-1,a=null;const rt=lastDevicePoint(i);for(;o>=0&&(a=i[o],!(rt.timestamp-a.timestamp>secondsToMilliseconds(s)));)o--;if(!a)return{x:0,y:0};const et=millisecondsToSeconds(rt.timestamp-a.timestamp);if(et===0)return{x:0,y:0};const ot={x:(rt.x-a.x)/et,y:(rt.y-a.y)/et};return ot.x===1/0&&(ot.x=0),ot.y===1/0&&(ot.y=0),ot}const SCALE_PRECISION=1e-4,SCALE_MIN=1-SCALE_PRECISION,SCALE_MAX=1+SCALE_PRECISION,TRANSLATE_PRECISION=.01,TRANSLATE_MIN=0-TRANSLATE_PRECISION,TRANSLATE_MAX=0+TRANSLATE_PRECISION;function calcLength(i){return i.max-i.min}function isNear(i,s,o){return Math.abs(i-s)<=o}function calcAxisDelta(i,s,o,a=.5){i.origin=a,i.originPoint=mixNumber$1(s.min,s.max,i.origin),i.scale=calcLength(o)/calcLength(s),i.translate=mixNumber$1(o.min,o.max,i.origin)-i.originPoint,(i.scale>=SCALE_MIN&&i.scale<=SCALE_MAX||isNaN(i.scale))&&(i.scale=1),(i.translate>=TRANSLATE_MIN&&i.translate<=TRANSLATE_MAX||isNaN(i.translate))&&(i.translate=0)}function calcBoxDelta(i,s,o,a){calcAxisDelta(i.x,s.x,o.x,a?a.originX:void 0),calcAxisDelta(i.y,s.y,o.y,a?a.originY:void 0)}function calcRelativeAxis(i,s,o){i.min=o.min+s.min,i.max=i.min+calcLength(s)}function calcRelativeBox(i,s,o){calcRelativeAxis(i.x,s.x,o.x),calcRelativeAxis(i.y,s.y,o.y)}function calcRelativeAxisPosition(i,s,o){i.min=s.min-o.min,i.max=i.min+calcLength(s)}function calcRelativePosition(i,s,o){calcRelativeAxisPosition(i.x,s.x,o.x),calcRelativeAxisPosition(i.y,s.y,o.y)}function applyConstraints(i,{min:s,max:o},a){return s!==void 0&&io&&(i=a?mixNumber$1(o,i,a.max):Math.min(i,o)),i}function calcRelativeAxisConstraints(i,s,o){return{min:s!==void 0?i.min+s:void 0,max:o!==void 0?i.max+o-(i.max-i.min):void 0}}function calcRelativeConstraints(i,{top:s,left:o,bottom:a,right:rt}){return{x:calcRelativeAxisConstraints(i.x,o,rt),y:calcRelativeAxisConstraints(i.y,s,a)}}function calcViewportAxisConstraints(i,s){let o=s.min-i.min,a=s.max-i.max;return s.max-s.mina?o=progress(s.min,s.max-a,i.min):a>rt&&(o=progress(i.min,i.max-rt,s.min)),clamp(0,1,o)}function rebaseAxisConstraints(i,s){const o={};return s.min!==void 0&&(o.min=s.min-i.min),s.max!==void 0&&(o.max=s.max-i.min),o}const defaultElastic=.35;function resolveDragElastic(i=defaultElastic){return i===!1?i=0:i===!0&&(i=defaultElastic),{x:resolveAxisElastic(i,"left","right"),y:resolveAxisElastic(i,"top","bottom")}}function resolveAxisElastic(i,s,o){return{min:resolvePointElastic(i,s),max:resolvePointElastic(i,o)}}function resolvePointElastic(i,s){return typeof i=="number"?i:i[s]||0}const createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()});function eachAxis(i){return[i("x"),i("y")]}function convertBoundingBoxToBox({top:i,left:s,right:o,bottom:a}){return{x:{min:s,max:o},y:{min:i,max:a}}}function convertBoxToBoundingBox({x:i,y:s}){return{top:s.min,right:i.max,bottom:s.max,left:i.min}}function transformBoxPoints(i,s){if(!s)return i;const o=s({x:i.left,y:i.top}),a=s({x:i.right,y:i.bottom});return{top:o.y,left:o.x,bottom:a.y,right:a.x}}function isIdentityScale(i){return i===void 0||i===1}function hasScale({scale:i,scaleX:s,scaleY:o}){return!isIdentityScale(i)||!isIdentityScale(s)||!isIdentityScale(o)}function hasTransform(i){return hasScale(i)||has2DTranslate(i)||i.z||i.rotate||i.rotateX||i.rotateY||i.skewX||i.skewY}function has2DTranslate(i){return is2DTranslate(i.x)||is2DTranslate(i.y)}function is2DTranslate(i){return i&&i!=="0%"}function scalePoint(i,s,o){const a=i-o,rt=s*a;return o+rt}function applyPointDelta(i,s,o,a,rt){return rt!==void 0&&(i=scalePoint(i,rt,a)),scalePoint(i,o,a)+s}function applyAxisDelta(i,s=0,o=1,a,rt){i.min=applyPointDelta(i.min,s,o,a,rt),i.max=applyPointDelta(i.max,s,o,a,rt)}function applyBoxDelta(i,{x:s,y:o}){applyAxisDelta(i.x,s.translate,s.scale,s.originPoint),applyAxisDelta(i.y,o.translate,o.scale,o.originPoint)}const TREE_SCALE_SNAP_MIN=.999999999999,TREE_SCALE_SNAP_MAX=1.0000000000001;function applyTreeDeltas(i,s,o,a=!1){const rt=o.length;if(!rt)return;s.x=s.y=1;let et,ot;for(let at=0;atTREE_SCALE_SNAP_MIN&&(s.x=1),s.yTREE_SCALE_SNAP_MIN&&(s.y=1)}function translateAxis(i,s){i.min=i.min+s,i.max=i.max+s}function transformAxis(i,s,o,a,rt=.5){const et=mixNumber$1(i.min,i.max,rt);applyAxisDelta(i,s,o,et,a)}function transformBox(i,s){transformAxis(i.x,s.x,s.scaleX,s.scale,s.originX),transformAxis(i.y,s.y,s.scaleY,s.scale,s.originY)}function measureViewportBox(i,s){return convertBoundingBoxToBox(transformBoxPoints(i.getBoundingClientRect(),s))}function measurePageBox(i,s,o){const a=measureViewportBox(i,o),{scroll:rt}=s;return rt&&(translateAxis(a.x,rt.offset.x),translateAxis(a.y,rt.offset.y)),a}const getContextWindow=({current:i})=>i?i.ownerDocument.defaultView:null,elementDragControls=new WeakMap;class VisualElementDragControls{constructor(s){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.visualElement=s}start(s,{snapToCursor:o=!1}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const rt=j=>{const{dragSnapToOrigin:_}=this.getProps();_?this.pauseAnimation():this.stopAnimation(),o&&this.snapToCursor(extractEventInfo(j,"page").point)},et=(j,_)=>{var $;const{drag:tt,dragPropagation:st,onDragStart:lt}=this.getProps();if(tt&&!st&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=getGlobalLock(tt),!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),eachAxis(ht=>{let ut=this.getAxisMotionValue(ht).get()||0;if(percent.test(ut)){const{projection:pt}=this.visualElement;if(pt&&pt.layout){const mt=pt.layout.layoutBox[ht];mt&&(ut=calcLength(mt)*(parseFloat(ut)/100))}}this.originPoint[ht]=ut}),lt&&frame.postRender(()=>lt(j,_)),($=this.removeWillChange)===null||$===void 0||$.call(this),this.removeWillChange=addValueToWillChange(this.visualElement,"transform");const{animationState:ct}=this.visualElement;ct&&ct.setActive("whileDrag",!0)},ot=(j,_)=>{const{dragPropagation:$,dragDirectionLock:tt,onDirectionLock:st,onDrag:lt}=this.getProps();if(!$&&!this.openGlobalLock)return;const{offset:ct}=_;if(tt&&this.currentDirection===null){this.currentDirection=getCurrentDirection(ct),this.currentDirection!==null&&st&&st(this.currentDirection);return}this.updateAxis("x",_.point,ct),this.updateAxis("y",_.point,ct),this.visualElement.render(),lt&<(j,_)},at=(j,_)=>this.stop(j,_),nt=()=>eachAxis(j=>{var _;return this.getAnimationState(j)==="paused"&&((_=this.getAxisMotionValue(j).animation)===null||_===void 0?void 0:_.play())}),{dragSnapToOrigin:it}=this.getProps();this.panSession=new PanSession(s,{onSessionStart:rt,onStart:et,onMove:ot,onSessionEnd:at,resumeAnimation:nt},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:it,contextWindow:getContextWindow(this.visualElement)})}stop(s,o){var a;(a=this.removeWillChange)===null||a===void 0||a.call(this);const rt=this.isDragging;if(this.cancel(),!rt)return;const{velocity:et}=o;this.startAnimation(et);const{onDragEnd:ot}=this.getProps();ot&&frame.postRender(()=>ot(s,o))}cancel(){this.isDragging=!1;const{projection:s,animationState:o}=this.visualElement;s&&(s.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:a}=this.getProps();!a&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),o&&o.setActive("whileDrag",!1)}updateAxis(s,o,a){const{drag:rt}=this.getProps();if(!a||!shouldDrag(s,rt,this.currentDirection))return;const et=this.getAxisMotionValue(s);let ot=this.originPoint[s]+a[s];this.constraints&&this.constraints[s]&&(ot=applyConstraints(ot,this.constraints[s],this.elastic[s])),et.set(ot)}resolveConstraints(){var s;const{dragConstraints:o,dragElastic:a}=this.getProps(),rt=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)===null||s===void 0?void 0:s.layout,et=this.constraints;o&&isRefObject(o)?this.constraints||(this.constraints=this.resolveRefConstraints()):o&&rt?this.constraints=calcRelativeConstraints(rt.layoutBox,o):this.constraints=!1,this.elastic=resolveDragElastic(a),et!==this.constraints&&rt&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(ot=>{this.constraints!==!1&&this.getAxisMotionValue(ot)&&(this.constraints[ot]=rebaseAxisConstraints(rt.layoutBox[ot],this.constraints[ot]))})}resolveRefConstraints(){const{dragConstraints:s,onMeasureDragConstraints:o}=this.getProps();if(!s||!isRefObject(s))return!1;const a=s.current,{projection:rt}=this.visualElement;if(!rt||!rt.layout)return!1;const et=measurePageBox(a,rt.root,this.visualElement.getTransformPagePoint());let ot=calcViewportConstraints(rt.layout.layoutBox,et);if(o){const at=o(convertBoxToBoundingBox(ot));this.hasMutatedConstraints=!!at,at&&(ot=convertBoundingBoxToBox(at))}return ot}startAnimation(s){const{drag:o,dragMomentum:a,dragElastic:rt,dragTransition:et,dragSnapToOrigin:ot,onDragTransitionEnd:at}=this.getProps(),nt=this.constraints||{},it=eachAxis(j=>{if(!shouldDrag(j,o,this.currentDirection))return;let _=nt&&nt[j]||{};ot&&(_={min:0,max:0});const $=rt?200:1e6,tt=rt?40:1e7,st={type:"inertia",velocity:a?s[j]:0,bounceStiffness:$,bounceDamping:tt,timeConstant:750,restDelta:1,restSpeed:10,...et,..._};return this.startAxisValueAnimation(j,st)});return Promise.all(it).then(at)}startAxisValueAnimation(s,o){const a=this.getAxisMotionValue(s);return a.start(animateMotionValue(s,a,0,o,this.visualElement,!1,addValueToWillChange(this.visualElement,s)))}stopAnimation(){eachAxis(s=>this.getAxisMotionValue(s).stop())}pauseAnimation(){eachAxis(s=>{var o;return(o=this.getAxisMotionValue(s).animation)===null||o===void 0?void 0:o.pause()})}getAnimationState(s){var o;return(o=this.getAxisMotionValue(s).animation)===null||o===void 0?void 0:o.state}getAxisMotionValue(s){const o=`_drag${s.toUpperCase()}`,a=this.visualElement.getProps(),rt=a[o];return rt||this.visualElement.getValue(s,(a.initial?a.initial[s]:void 0)||0)}snapToCursor(s){eachAxis(o=>{const{drag:a}=this.getProps();if(!shouldDrag(o,a,this.currentDirection))return;const{projection:rt}=this.visualElement,et=this.getAxisMotionValue(o);if(rt&&rt.layout){const{min:ot,max:at}=rt.layout.layoutBox[o];et.set(s[o]-mixNumber$1(ot,at,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:s,dragConstraints:o}=this.getProps(),{projection:a}=this.visualElement;if(!isRefObject(o)||!a||!this.constraints)return;this.stopAnimation();const rt={x:0,y:0};eachAxis(ot=>{const at=this.getAxisMotionValue(ot);if(at&&this.constraints!==!1){const nt=at.get();rt[ot]=calcOrigin({min:nt,max:nt},this.constraints[ot])}});const{transformTemplate:et}=this.visualElement.getProps();this.visualElement.current.style.transform=et?et({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.resolveConstraints(),eachAxis(ot=>{if(!shouldDrag(ot,s,null))return;const at=this.getAxisMotionValue(ot),{min:nt,max:it}=this.constraints[ot];at.set(mixNumber$1(nt,it,rt[ot]))})}addListeners(){if(!this.visualElement.current)return;elementDragControls.set(this.visualElement,this);const s=this.visualElement.current,o=addPointerEvent(s,"pointerdown",nt=>{const{drag:it,dragListener:j=!0}=this.getProps();it&&j&&this.start(nt)}),a=()=>{const{dragConstraints:nt}=this.getProps();isRefObject(nt)&&nt.current&&(this.constraints=this.resolveRefConstraints())},{projection:rt}=this.visualElement,et=rt.addEventListener("measure",a);rt&&!rt.layout&&(rt.root&&rt.root.updateScroll(),rt.updateLayout()),frame.read(a);const ot=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),at=rt.addEventListener("didUpdate",({delta:nt,hasLayoutChanged:it})=>{this.isDragging&&it&&(eachAxis(j=>{const _=this.getAxisMotionValue(j);_&&(this.originPoint[j]+=nt[j].translate,_.set(_.get()+nt[j].translate))}),this.visualElement.render())});return()=>{ot(),o(),et(),at&&at()}}getProps(){const s=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:a=!1,dragPropagation:rt=!1,dragConstraints:et=!1,dragElastic:ot=defaultElastic,dragMomentum:at=!0}=s;return{...s,drag:o,dragDirectionLock:a,dragPropagation:rt,dragConstraints:et,dragElastic:ot,dragMomentum:at}}}function shouldDrag(i,s,o){return(s===!0||s===i)&&(o===null||o===i)}function getCurrentDirection(i,s=10){let o=null;return Math.abs(i.y)>s?o="y":Math.abs(i.x)>s&&(o="x"),o}class DragGesture extends Feature{constructor(s){super(s),this.removeGroupControls=noop$1,this.removeListeners=noop$1,this.controls=new VisualElementDragControls(s)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||noop$1}unmount(){this.removeGroupControls(),this.removeListeners()}}const asyncHandler=i=>(s,o)=>{i&&frame.postRender(()=>i(s,o))};class PanGesture extends Feature{constructor(){super(...arguments),this.removePointerDownListener=noop$1}onPointerDown(s){this.session=new PanSession(s,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:s,onPanStart:o,onPan:a,onPanEnd:rt}=this.node.getProps();return{onSessionStart:asyncHandler(s),onStart:asyncHandler(o),onMove:a,onEnd:(et,ot)=>{delete this.session,rt&&frame.postRender(()=>rt(et,ot))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,"pointerdown",s=>this.onPointerDown(s))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function usePresence(){const i=reactExports.useContext(PresenceContext);if(i===null)return[!0,null];const{isPresent:s,onExitComplete:o,register:a}=i,rt=reactExports.useId();return reactExports.useEffect(()=>a(rt),[]),!s&&o?[!1,()=>o&&o(rt)]:[!0]}function useIsPresent(){return isPresent(reactExports.useContext(PresenceContext))}function isPresent(i){return i===null?!0:i.isPresent}const globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(i,s){return s.max===s.min?0:i/(s.max-s.min)*100}const correctBorderRadius={correct:(i,s)=>{if(!s.target)return i;if(typeof i=="string")if(px.test(i))i=parseFloat(i);else return i;const o=pixelsToPercent(i,s.target.x),a=pixelsToPercent(i,s.target.y);return`${o}% ${a}%`}},correctBoxShadow={correct:(i,{treeScale:s,projectionDelta:o})=>{const a=i,rt=complex.parse(i);if(rt.length>5)return a;const et=complex.createTransformer(i),ot=typeof rt[0]!="number"?1:0,at=o.x.scale*s.x,nt=o.y.scale*s.y;rt[0+ot]/=at,rt[1+ot]/=nt;const it=mixNumber$1(at,nt,.5);return typeof rt[2+ot]=="number"&&(rt[2+ot]/=it),typeof rt[3+ot]=="number"&&(rt[3+ot]/=it),et(rt)}};class MeasureLayoutWithContext extends reactExports.Component{componentDidMount(){const{visualElement:s,layoutGroup:o,switchLayoutGroup:a,layoutId:rt}=this.props,{projection:et}=s;addScaleCorrector(defaultScaleCorrectors),et&&(o.group&&o.group.add(et),a&&a.register&&rt&&a.register(et),et.root.didUpdate(),et.addEventListener("animationComplete",()=>{this.safeToRemove()}),et.setOptions({...et.options,onExitComplete:()=>this.safeToRemove()})),globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(s){const{layoutDependency:o,visualElement:a,drag:rt,isPresent:et}=this.props,ot=a.projection;return ot&&(ot.isPresent=et,rt||s.layoutDependency!==o||o===void 0?ot.willUpdate():this.safeToRemove(),s.isPresent!==et&&(et?ot.promote():ot.relegate()||frame.postRender(()=>{const at=ot.getStack();(!at||!at.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:s}=this.props.visualElement;s&&(s.root.didUpdate(),microtask.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:s,layoutGroup:o,switchLayoutGroup:a}=this.props,{projection:rt}=s;rt&&(rt.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(rt),a&&a.deregister&&a.deregister(rt))}safeToRemove(){const{safeToRemove:s}=this.props;s&&s()}render(){return null}}function MeasureLayout(i){const[s,o]=usePresence(),a=reactExports.useContext(LayoutGroupContext);return jsxRuntimeExports.jsx(MeasureLayoutWithContext,{...i,layoutGroup:a,switchLayoutGroup:reactExports.useContext(SwitchLayoutGroupContext),isPresent:s,safeToRemove:o})}const defaultScaleCorrectors={borderRadius:{...correctBorderRadius,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:correctBorderRadius,borderTopRightRadius:correctBorderRadius,borderBottomLeftRadius:correctBorderRadius,borderBottomRightRadius:correctBorderRadius,boxShadow:correctBoxShadow},borders=["TopLeft","TopRight","BottomLeft","BottomRight"],numBorders=borders.length,asNumber=i=>typeof i=="string"?parseFloat(i):i,isPx=i=>typeof i=="number"||px.test(i);function mixValues(i,s,o,a,rt,et){rt?(i.opacity=mixNumber$1(0,o.opacity!==void 0?o.opacity:1,easeCrossfadeIn(a)),i.opacityExit=mixNumber$1(s.opacity!==void 0?s.opacity:1,0,easeCrossfadeOut(a))):et&&(i.opacity=mixNumber$1(s.opacity!==void 0?s.opacity:1,o.opacity!==void 0?o.opacity:1,a));for(let ot=0;otas?1:o(progress(i,s,a))}function copyAxisInto(i,s){i.min=s.min,i.max=s.max}function copyBoxInto(i,s){copyAxisInto(i.x,s.x),copyAxisInto(i.y,s.y)}function copyAxisDeltaInto(i,s){i.translate=s.translate,i.scale=s.scale,i.originPoint=s.originPoint,i.origin=s.origin}function removePointDelta(i,s,o,a,rt){return i-=s,i=scalePoint(i,1/o,a),rt!==void 0&&(i=scalePoint(i,1/rt,a)),i}function removeAxisDelta(i,s=0,o=1,a=.5,rt,et=i,ot=i){if(percent.test(s)&&(s=parseFloat(s),s=mixNumber$1(ot.min,ot.max,s/100)-ot.min),typeof s!="number")return;let at=mixNumber$1(et.min,et.max,a);i===et&&(at-=s),i.min=removePointDelta(i.min,s,o,at,rt),i.max=removePointDelta(i.max,s,o,at,rt)}function removeAxisTransforms(i,s,[o,a,rt],et,ot){removeAxisDelta(i,s[o],s[a],s[rt],s.scale,et,ot)}const xKeys=["x","scaleX","originX"],yKeys=["y","scaleY","originY"];function removeBoxTransforms(i,s,o,a){removeAxisTransforms(i.x,s,xKeys,o?o.x:void 0,a?a.x:void 0),removeAxisTransforms(i.y,s,yKeys,o?o.y:void 0,a?a.y:void 0)}function isAxisDeltaZero(i){return i.translate===0&&i.scale===1}function isDeltaZero(i){return isAxisDeltaZero(i.x)&&isAxisDeltaZero(i.y)}function boxEquals(i,s){return i.x.min===s.x.min&&i.x.max===s.x.max&&i.y.min===s.y.min&&i.y.max===s.y.max}function boxEqualsRounded(i,s){return Math.round(i.x.min)===Math.round(s.x.min)&&Math.round(i.x.max)===Math.round(s.x.max)&&Math.round(i.y.min)===Math.round(s.y.min)&&Math.round(i.y.max)===Math.round(s.y.max)}function aspectRatio(i){return calcLength(i.x)/calcLength(i.y)}function axisDeltaEquals(i,s){return i.translate===s.translate&&i.scale===s.scale&&i.originPoint===s.originPoint}class NodeStack{constructor(){this.members=[]}add(s){addUniqueItem(this.members,s),s.scheduleRender()}remove(s){if(removeItem(this.members,s),s===this.prevLead&&(this.prevLead=void 0),s===this.lead){const o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(s){const o=this.members.findIndex(rt=>s===rt);if(o===0)return!1;let a;for(let rt=o;rt>=0;rt--){const et=this.members[rt];if(et.isPresent!==!1){a=et;break}}return a?(this.promote(a),!0):!1}promote(s,o){const a=this.lead;if(s!==a&&(this.prevLead=a,this.lead=s,s.show(),a)){a.instance&&a.scheduleRender(),s.scheduleRender(),s.resumeFrom=a,o&&(s.resumeFrom.preserveOpacity=!0),a.snapshot&&(s.snapshot=a.snapshot,s.snapshot.latestValues=a.animationValues||a.latestValues),s.root&&s.root.isUpdating&&(s.isLayoutDirty=!0);const{crossfade:rt}=s.options;rt===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(s=>{const{options:o,resumingFrom:a}=s;o.onExitComplete&&o.onExitComplete(),a&&a.options.onExitComplete&&a.options.onExitComplete()})}scheduleRender(){this.members.forEach(s=>{s.instance&&s.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function buildProjectionTransform(i,s,o){let a="";const rt=i.x.translate/s.x,et=i.y.translate/s.y,ot=(o==null?void 0:o.z)||0;if((rt||et||ot)&&(a=`translate3d(${rt}px, ${et}px, ${ot}px) `),(s.x!==1||s.y!==1)&&(a+=`scale(${1/s.x}, ${1/s.y}) `),o){const{transformPerspective:it,rotate:j,rotateX:_,rotateY:$,skewX:tt,skewY:st}=o;it&&(a=`perspective(${it}px) ${a}`),j&&(a+=`rotate(${j}deg) `),_&&(a+=`rotateX(${_}deg) `),$&&(a+=`rotateY(${$}deg) `),tt&&(a+=`skewX(${tt}deg) `),st&&(a+=`skewY(${st}deg) `)}const at=i.x.scale*s.x,nt=i.y.scale*s.y;return(at!==1||nt!==1)&&(a+=`scale(${at}, ${nt})`),a||"none"}const compareByDepth=(i,s)=>i.depth-s.depth;class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(s){addUniqueItem(this.children,s),this.isDirty=!0}remove(s){removeItem(this.children,s),this.isDirty=!0}forEach(s){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(s)}}function delay(i,s){const o=time.now(),a=({timestamp:rt})=>{const et=rt-o;et>=s&&(cancelFrame(a),i(et-s))};return frame.read(a,!0),()=>cancelFrame(a)}function isSVGElement(i){return i instanceof SVGElement&&i.tagName!=="svg"}function animateSingleValue(i,s,o){const a=isMotionValue(i)?i:motionValue(i);return a.start(animateMotionValue("",a,s,o)),a.animation}const metrics={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},transformAxes=["","X","Y","Z"],hiddenVisibility={visibility:"hidden"},animationTarget=1e3;let id=0;function resetDistortingTransform(i,s,o,a){const{latestValues:rt}=s;rt[i]&&(o[i]=rt[i],s.setStaticValue(i,0),a&&(a[i]=0))}function isOptimisedAppearTree(i){if(i.hasCheckedOptimisedAppear=!0,i.root===i)return!1;const{visualElement:s}=i.options;return s?getOptimisedAppearId(s)?!0:i.parent&&!i.parent.hasCheckedOptimisedAppear?isOptimisedAppearTree(i.parent):!1:!1}function createProjectionNode({attachResizeListener:i,defaultParent:s,measureScroll:o,checkIsScrollRoot:a,resetTransform:rt}){return class{constructor(ot={},at=s==null?void 0:s()){this.id=id++,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.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(metrics.totalNodes=metrics.resolvedTargetDeltas=metrics.recalculatedProjection=0),this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes),window.MotionDebug&&window.MotionDebug.record(metrics)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=ot,this.root=at?at.root||at:this,this.path=at?[...at.path,at]:[],this.parent=at,this.depth=at?at.depth+1:0;for(let nt=0;ntthis.root.updateBlockedByResize=!1;i(ot,()=>{this.root.updateBlockedByResize=!0,_&&_(),_=delay($,250),globalProjectionState.hasAnimatedSinceResize&&(globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation))})}nt&&this.root.registerSharedNode(nt,this),this.options.animate!==!1&&j&&(nt||it)&&this.addEventListener("didUpdate",({delta:_,hasLayoutChanged:$,hasRelativeTargetChanged:tt,layout:st})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const lt=this.options.transition||j.getDefaultTransition()||defaultLayoutTransition,{onLayoutAnimationStart:ct,onLayoutAnimationComplete:ht}=j.getProps(),ut=!this.targetLayout||!boxEqualsRounded(this.targetLayout,st)||tt,pt=!$&&tt;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||pt||$&&(ut||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(_,pt);const mt={...getValueTransition(lt,"layout"),onPlay:ct,onComplete:ht};(j.shouldReduceMotion||this.options.layoutRoot)&&(mt.delay=0,mt.type=!1),this.startAnimation(mt)}else $||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=st})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const ot=this.getStack();ot&&ot.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,cancelFrame(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(resetSkewAndRotation),this.animationId++)}getTransformTemplate(){const{visualElement:ot}=this.options;return ot&&ot.getProps().transformTemplate}willUpdate(ot=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&isOptimisedAppearTree(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let j=0;j{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 nt=0;nt{const vt=mt/1e3;mixAxisDelta(_.x,ot.x,vt),mixAxisDelta(_.y,ot.y,vt),this.setTargetDelta(_),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(calcRelativePosition($,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mixBox(this.relativeTarget,this.relativeTargetOrigin,$,vt),pt&&boxEquals(this.relativeTarget,pt)&&(this.isProjectionDirty=!1),pt||(pt=createBox()),copyBoxInto(pt,this.relativeTarget)),lt&&(this.animationValues=j,mixValues(j,it,this.latestValues,vt,ut,ht)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=vt},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(ot){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=frame.update(()=>{globalProjectionState.hasAnimatedSinceResize=!0,this.currentAnimation=animateSingleValue(0,animationTarget,{...ot,onUpdate:at=>{this.mixTargetDelta(at),ot.onUpdate&&ot.onUpdate(at)},onComplete:()=>{ot.onComplete&&ot.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 ot=this.getStack();ot&&ot.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(animationTarget),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const ot=this.getLead();let{targetWithTransforms:at,target:nt,layout:it,latestValues:j}=ot;if(!(!at||!nt||!it)){if(this!==ot&&this.layout&&it&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,it.layoutBox)){nt=this.target||createBox();const _=calcLength(this.layout.layoutBox.x);nt.x.min=ot.target.x.min,nt.x.max=nt.x.min+_;const $=calcLength(this.layout.layoutBox.y);nt.y.min=ot.target.y.min,nt.y.max=nt.y.min+$}copyBoxInto(at,nt),transformBox(at,j),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,at,j)}}registerSharedNode(ot,at){this.sharedNodes.has(ot)||this.sharedNodes.set(ot,new NodeStack),this.sharedNodes.get(ot).add(at);const it=at.options.initialPromotionConfig;at.promote({transition:it?it.transition:void 0,preserveFollowOpacity:it&&it.shouldPreserveFollowOpacity?it.shouldPreserveFollowOpacity(at):void 0})}isLead(){const ot=this.getStack();return ot?ot.lead===this:!0}getLead(){var ot;const{layoutId:at}=this.options;return at?((ot=this.getStack())===null||ot===void 0?void 0:ot.lead)||this:this}getPrevLead(){var ot;const{layoutId:at}=this.options;return at?(ot=this.getStack())===null||ot===void 0?void 0:ot.prevLead:void 0}getStack(){const{layoutId:ot}=this.options;if(ot)return this.root.sharedNodes.get(ot)}promote({needsReset:ot,transition:at,preserveFollowOpacity:nt}={}){const it=this.getStack();it&&it.promote(this,nt),ot&&(this.projectionDelta=void 0,this.needsReset=!0),at&&this.setOptions({transition:at})}relegate(){const ot=this.getStack();return ot?ot.relegate(this):!1}resetSkewAndRotation(){const{visualElement:ot}=this.options;if(!ot)return;let at=!1;const{latestValues:nt}=ot;if((nt.z||nt.rotate||nt.rotateX||nt.rotateY||nt.rotateZ||nt.skewX||nt.skewY)&&(at=!0),!at)return;const it={};nt.z&&resetDistortingTransform("z",ot,it,this.animationValues);for(let j=0;j{var at;return(at=ot.currentAnimation)===null||at===void 0?void 0:at.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(i){i.updateLayout()}function notifyLayoutUpdate(i){var s;const o=((s=i.resumeFrom)===null||s===void 0?void 0:s.snapshot)||i.snapshot;if(i.isLead()&&i.layout&&o&&i.hasListeners("didUpdate")){const{layoutBox:a,measuredBox:rt}=i.layout,{animationType:et}=i.options,ot=o.source!==i.layout.source;et==="size"?eachAxis(_=>{const $=ot?o.measuredBox[_]:o.layoutBox[_],tt=calcLength($);$.min=a[_].min,$.max=$.min+tt}):shouldAnimatePositionOnly(et,o.layoutBox,a)&&eachAxis(_=>{const $=ot?o.measuredBox[_]:o.layoutBox[_],tt=calcLength(a[_]);$.max=$.min+tt,i.relativeTarget&&!i.currentAnimation&&(i.isProjectionDirty=!0,i.relativeTarget[_].max=i.relativeTarget[_].min+tt)});const at=createDelta();calcBoxDelta(at,a,o.layoutBox);const nt=createDelta();ot?calcBoxDelta(nt,i.applyTransform(rt,!0),o.measuredBox):calcBoxDelta(nt,a,o.layoutBox);const it=!isDeltaZero(at);let j=!1;if(!i.resumeFrom){const _=i.getClosestProjectingParent();if(_&&!_.resumeFrom){const{snapshot:$,layout:tt}=_;if($&&tt){const st=createBox();calcRelativePosition(st,o.layoutBox,$.layoutBox);const lt=createBox();calcRelativePosition(lt,a,tt.layoutBox),boxEqualsRounded(st,lt)||(j=!0),_.options.layoutRoot&&(i.relativeTarget=lt,i.relativeTargetOrigin=st,i.relativeParent=_)}}}i.notifyListeners("didUpdate",{layout:a,snapshot:o,delta:nt,layoutDelta:at,hasLayoutChanged:it,hasRelativeTargetChanged:j})}else if(i.isLead()){const{onExitComplete:a}=i.options;a&&a()}i.options.transition=void 0}function propagateDirtyNodes(i){window.MotionDebug&&metrics.totalNodes++,i.parent&&(i.isProjecting()||(i.isProjectionDirty=i.parent.isProjectionDirty),i.isSharedProjectionDirty||(i.isSharedProjectionDirty=!!(i.isProjectionDirty||i.parent.isProjectionDirty||i.parent.isSharedProjectionDirty)),i.isTransformDirty||(i.isTransformDirty=i.parent.isTransformDirty))}function cleanDirtyNodes(i){i.isProjectionDirty=i.isSharedProjectionDirty=i.isTransformDirty=!1}function clearSnapshot(i){i.clearSnapshot()}function clearMeasurements(i){i.clearMeasurements()}function clearIsLayoutDirty(i){i.isLayoutDirty=!1}function resetTransformStyle(i){const{visualElement:s}=i.options;s&&s.getProps().onBeforeLayoutMeasure&&s.notify("BeforeLayoutMeasure"),i.resetTransform()}function finishAnimation(i){i.finishAnimation(),i.targetDelta=i.relativeTarget=i.target=void 0,i.isProjectionDirty=!0}function resolveTargetDelta(i){i.resolveTargetDelta()}function calcProjection(i){i.calcProjection()}function resetSkewAndRotation(i){i.resetSkewAndRotation()}function removeLeadSnapshots(i){i.removeLeadSnapshot()}function mixAxisDelta(i,s,o){i.translate=mixNumber$1(s.translate,0,o),i.scale=mixNumber$1(s.scale,1,o),i.origin=s.origin,i.originPoint=s.originPoint}function mixAxis(i,s,o,a){i.min=mixNumber$1(s.min,o.min,a),i.max=mixNumber$1(s.max,o.max,a)}function mixBox(i,s,o,a){mixAxis(i.x,s.x,o.x,a),mixAxis(i.y,s.y,o.y,a)}function hasOpacityCrossfade(i){return i.animationValues&&i.animationValues.opacityExit!==void 0}const defaultLayoutTransition={duration:.45,ease:[.4,0,.1,1]},userAgentContains=i=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(i),roundPoint=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:noop$1;function roundAxis(i){i.min=roundPoint(i.min),i.max=roundPoint(i.max)}function roundBox(i){roundAxis(i.x),roundAxis(i.y)}function shouldAnimatePositionOnly(i,s,o){return i==="position"||i==="preserve-aspect"&&!isNear(aspectRatio(s),aspectRatio(o),.2)}const DocumentProjectionNode=createProjectionNode({attachResizeListener:(i,s)=>addDomEvent(i,"resize",s),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rootProjectionNode={current:void 0},HTMLProjectionNode=createProjectionNode({measureScroll:i=>({x:i.scrollLeft,y:i.scrollTop}),defaultParent:()=>{if(!rootProjectionNode.current){const i=new DocumentProjectionNode({});i.mount(window),i.setOptions({layoutScroll:!0}),rootProjectionNode.current=i}return rootProjectionNode.current},resetTransform:(i,s)=>{i.style.transform=s!==void 0?s:"none"},checkIsScrollRoot:i=>window.getComputedStyle(i).position==="fixed"}),drag={pan:{Feature:PanGesture},drag:{Feature:DragGesture,ProjectionNode:HTMLProjectionNode,MeasureLayout}},prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser)if(window.matchMedia){const i=window.matchMedia("(prefers-reduced-motion)"),s=()=>prefersReducedMotion.current=i.matches;i.addListener(s),s()}else prefersReducedMotion.current=!1}function updateMotionValuesFromProps(i,s,o){for(const a in s){const rt=s[a],et=o[a];if(isMotionValue(rt))i.addValue(a,rt);else if(isMotionValue(et))i.addValue(a,motionValue(rt,{owner:i}));else if(et!==rt)if(i.hasValue(a)){const ot=i.getValue(a);ot.liveStyle===!0?ot.jump(rt):ot.hasAnimated||ot.set(rt)}else{const ot=i.getStaticValue(a);i.addValue(a,motionValue(ot!==void 0?ot:rt,{owner:i}))}}for(const a in o)s[a]===void 0&&i.removeValue(a);return s}const visualElementStore=new WeakMap,valueTypes=[...dimensionValueTypes,color,complex],findValueType=i=>valueTypes.find(testValueType(i)),propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],numVariantProps=variantProps.length;class VisualElement{scrapeMotionValuesFromProps(s,o,a){return{}}constructor({parent:s,props:o,presenceContext:a,reducedMotionConfig:rt,blockInitialAnimation:et,visualState:ot},at={}){this.applyWillChange=!1,this.resolveKeyframes=($,tt,st,lt)=>new this.KeyframeResolver($,tt,st,lt,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,frame.render(this.render,!1,!0))};const{latestValues:nt,renderState:it}=ot;this.latestValues=nt,this.baseTarget={...nt},this.initialValues=o.initial?{...nt}:{},this.renderState=it,this.parent=s,this.props=o,this.presenceContext=a,this.depth=s?s.depth+1:0,this.reducedMotionConfig=rt,this.options=at,this.blockInitialAnimation=!!et,this.isControllingVariants=isControllingVariants(o),this.isVariantNode=isVariantNode(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(s&&s.current);const{willChange:j,..._}=this.scrapeMotionValuesFromProps(o,{},this);for(const $ in _){const tt=_[$];nt[$]!==void 0&&isMotionValue(tt)&&tt.set(nt[$],!1)}}mount(s){this.current=s,visualElementStore.set(s,this),this.projection&&!this.projection.instance&&this.projection.mount(s),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,a)=>this.bindToMotionValue(a,o)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){visualElementStore.delete(this.current),this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(s=>s()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const o=this.features[s];o&&(o.unmount(),o.isMounted=!1)}this.current=null}bindToMotionValue(s,o){const a=transformProps.has(s),rt=o.on("change",ot=>{this.latestValues[s]=ot,this.props.onUpdate&&frame.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0)}),et=o.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(s,()=>{rt(),et(),o.owner&&o.stop()})}sortNodePosition(s){return!this.current||!this.sortInstanceNodePosition||this.type!==s.type?0:this.sortInstanceNodePosition(this.current,s.current)}updateFeatures(){let s="animation";for(s in featureDefinitions){const o=featureDefinitions[s];if(!o)continue;const{isEnabled:a,Feature:rt}=o;if(!this.features[s]&&rt&&a(this.props)&&(this.features[s]=new rt(this)),this.features[s]){const et=this.features[s];et.isMounted?et.update():(et.mount(),et.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(s){return this.latestValues[s]}setStaticValue(s,o){this.latestValues[s]=o}update(s,o){(s.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=s,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let a=0;ao.variantChildren.delete(s)}addValue(s,o){const a=this.values.get(s);o!==a&&(a&&this.removeValue(s),this.bindToMotionValue(s,o),this.values.set(s,o),this.latestValues[s]=o.get())}removeValue(s){this.values.delete(s);const o=this.valueSubscriptions.get(s);o&&(o(),this.valueSubscriptions.delete(s)),delete this.latestValues[s],this.removeValueFromRenderState(s,this.renderState)}hasValue(s){return this.values.has(s)}getValue(s,o){if(this.props.values&&this.props.values[s])return this.props.values[s];let a=this.values.get(s);return a===void 0&&o!==void 0&&(a=motionValue(o===null?void 0:o,{owner:this}),this.addValue(s,a)),a}readValue(s,o){var a;let rt=this.latestValues[s]!==void 0||!this.current?this.latestValues[s]:(a=this.getBaseTargetFromProps(this.props,s))!==null&&a!==void 0?a:this.readValueFromInstance(this.current,s,this.options);return rt!=null&&(typeof rt=="string"&&(isNumericalString(rt)||isZeroValueString(rt))?rt=parseFloat(rt):!findValueType(rt)&&complex.test(o)&&(rt=getAnimatableNone(s,o)),this.setBaseTarget(s,isMotionValue(rt)?rt.get():rt)),isMotionValue(rt)?rt.get():rt}setBaseTarget(s,o){this.baseTarget[s]=o}getBaseTarget(s){var o;const{initial:a}=this.props;let rt;if(typeof a=="string"||typeof a=="object"){const ot=resolveVariantFromProps(this.props,a,(o=this.presenceContext)===null||o===void 0?void 0:o.custom);ot&&(rt=ot[s])}if(a&&rt!==void 0)return rt;const et=this.getBaseTargetFromProps(this.props,s);return et!==void 0&&!isMotionValue(et)?et:this.initialValues[s]!==void 0&&rt===void 0?void 0:this.baseTarget[s]}on(s,o){return this.events[s]||(this.events[s]=new SubscriptionManager),this.events[s].add(o)}notify(s,...o){this.events[s]&&this.events[s].notify(...o)}}class DOMVisualElement extends VisualElement{constructor(){super(...arguments),this.KeyframeResolver=DOMKeyframesResolver}sortInstanceNodePosition(s,o){return s.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(s,o){return s.style?s.style[o]:void 0}removeValueFromRenderState(s,{vars:o,style:a}){delete o[s],delete a[s]}}function getComputedStyle(i){return window.getComputedStyle(i)}class HTMLVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=renderHTML}readValueFromInstance(s,o){if(transformProps.has(o)){const a=getDefaultValueType(o);return a&&a.default||0}else{const a=getComputedStyle(s),rt=(isCSSVariableName(o)?a.getPropertyValue(o):a[o])||0;return typeof rt=="string"?rt.trim():rt}}measureInstanceViewportBox(s,{transformPagePoint:o}){return measureViewportBox(s,o)}build(s,o,a){buildHTMLStyles(s,o,a.transformTemplate)}scrapeMotionValuesFromProps(s,o,a){return scrapeMotionValuesFromProps$1(s,o,a)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:s}=this.props;isMotionValue(s)&&(this.childSubscription=s.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=createBox}getBaseTargetFromProps(s,o){return s[o]}readValueFromInstance(s,o){if(transformProps.has(o)){const a=getDefaultValueType(o);return a&&a.default||0}return o=camelCaseAttributes.has(o)?o:camelToDash(o),s.getAttribute(o)}scrapeMotionValuesFromProps(s,o,a){return scrapeMotionValuesFromProps(s,o,a)}build(s,o,a){buildSVGAttrs(s,o,this.isSVGTag,a.transformTemplate)}renderInstance(s,o,a,rt){renderSVG(s,o,a,rt)}mount(s){this.isSVGTag=isSVGTag(s.tagName),super.mount(s)}}const createDomVisualElement=(i,s)=>isSVGComponent(i)?new SVGVisualElement(s):new HTMLVisualElement(s,{allowProjection:i!==reactExports.Fragment}),layout={layout:{ProjectionNode:HTMLProjectionNode,MeasureLayout}},preloadedFeatures={...animations,...gestureAnimations,...drag,...layout},motion=createMotionProxy((i,s)=>createDomMotionConfig(i,s,preloadedFeatures,createDomVisualElement));function useIsMounted(){const i=reactExports.useRef(!1);return useIsomorphicLayoutEffect$1(()=>(i.current=!0,()=>{i.current=!1}),[]),i}function useForceUpdate(){const i=useIsMounted(),[s,o]=reactExports.useState(0),a=reactExports.useCallback(()=>{i.current&&o(s+1)},[s]);return[reactExports.useCallback(()=>frame.postRender(a),[a]),s]}class PopChildMeasure extends reactExports.Component{getSnapshotBeforeUpdate(s){const o=this.props.childRef.current;if(o&&s.isPresent&&!this.props.isPresent){const a=this.props.sizeRef.current;a.height=o.offsetHeight||0,a.width=o.offsetWidth||0,a.top=o.offsetTop,a.left=o.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function PopChild({children:i,isPresent:s}){const o=reactExports.useId(),a=reactExports.useRef(null),rt=reactExports.useRef({width:0,height:0,top:0,left:0}),{nonce:et}=reactExports.useContext(MotionConfigContext);return reactExports.useInsertionEffect(()=>{const{width:ot,height:at,top:nt,left:it}=rt.current;if(s||!a.current||!ot||!at)return;a.current.dataset.motionPopId=o;const j=document.createElement("style");return et&&(j.nonce=et),document.head.appendChild(j),j.sheet&&j.sheet.insertRule(` [data-motion-pop-id="${o}"] { position: absolute !important; width: ${ot}px !important; diff --git a/index.html b/index.html index 3b36005..5e43f77 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ /> SEKER: Source-SPIKE Prime Runner - +