@infinilabs/filter 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/filter.cjs +1 -1
- package/dist/filter.js +1 -0
- package/package.json +1 -1
package/dist/filter.cjs
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
${f}px !important;
|
|
8
8
|
top: ${l}px !important;
|
|
9
9
|
}
|
|
10
|
-
`),()=>{m.contains(p)&&m.removeChild(p)}},[t]),(0,f.jsx)(Si,{isPresent:t,childRef:a,sizeRef:o,children:d.cloneElement(e,{ref:c})})}var wi=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,root:c})=>{let l=g(Ti),u=(0,d.useId)(),p=!0,m=(0,d.useMemo)(()=>(p=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:e=>{l.set(e,!0);for(let e of l.values())if(!e)return;r&&r()},register:e=>(l.set(e,!1),()=>l.delete(e))}),[n,l,r]);return a&&p&&(m={...m}),(0,d.useMemo)(()=>{l.forEach((e,t)=>l.set(t,!1))},[n]),d.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o===`popLayout`&&(e=(0,f.jsx)(Ci,{isPresent:n,anchorX:s,root:c,children:e})),(0,f.jsx)(y.Provider,{value:m,children:e})};function Ti(){return new Map}function Ei(e=!0){let t=(0,d.useContext)(y);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,d.useId)();(0,d.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,d.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Di=e=>e.key||``;function Oi(e){let t=[];return d.Children.forEach(e,e=>{(0,d.isValidElement)(e)&&t.push(e)}),t}var ki=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,root:c})=>{let[l,u]=Ei(o),p=(0,d.useMemo)(()=>Oi(e),[e]),m=o&&!l?[]:p.map(Di),_=(0,d.useRef)(!0),y=(0,d.useRef)(p),b=g(()=>new Map),[x,S]=(0,d.useState)(p),[C,w]=(0,d.useState)(p);v(()=>{_.current=!1,y.current=p;for(let e=0;e<C.length;e++){let t=Di(C[e]);m.includes(t)?b.delete(t):b.get(t)!==!0&&b.set(t,!1)}},[C,m.length,m.join(`-`)]);let T=[];if(p!==x){let e=[...p];for(let t=0;t<C.length;t++){let n=C[t],r=Di(n);m.includes(r)||(e.splice(t,0,n),T.push(n))}return a===`wait`&&T.length&&(e=T),w(Oi(e)),S(p),null}process.env.NODE_ENV!==`production`&&a===`wait`&&C.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);let{forceRender:E}=(0,d.useContext)(h);return(0,f.jsx)(f.Fragment,{children:C.map(e=>{let d=Di(e),h=o&&!l?!1:p===C||m.includes(d);return(0,f.jsx)(wi,{isPresent:h,initial:!_.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:h?void 0:()=>{if(b.has(d))b.set(d,!0);else return;let e=!0;b.forEach(t=>{t||(e=!1)}),e&&(E?.(),w(y.current),o&&u?.(),r&&r())},anchorX:s,children:e},d)})})},Ai=(0,d.createContext)({strict:!1}),ji={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`]},Mi={};for(let e in ji)Mi[e]={isEnabled:t=>ji[e].some(e=>!!t[e])};function Ni(e){for(let t in e)Mi[t]={...Mi[t],...e[t]}}var Pi=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`.split(`.`));function Fi(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Pi.has(e)}var Ii=s({default:()=>Li}),Li,Ri=o((()=>{throw Li={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),zi=e=>!Fi(e);function Bi(e){typeof e==`function`&&(zi=t=>t.startsWith(`on`)?!Fi(t):e(t))}try{Bi((Ri(),u(Ii)).default)}catch{}function Vi(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||(zi(i)||n===!0&&Fi(i)||!t&&!Fi(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var Hi=(0,d.createContext)({});function Ui(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Wi(e){return typeof e==`string`||Array.isArray(e)}var Gi=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Ki=[`initial`,...Gi];function qi(e){return Ui(e.animate)||Ki.some(t=>Wi(e[t]))}function Ji(e){return!!(qi(e)||e.variants)}function Yi(e,t){if(qi(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Wi(t)?t:void 0,animate:Wi(n)?n:void 0}}return e.inherit===!1?{}:t}function Xi(e){let{initial:t,animate:n}=Yi(e,(0,d.useContext)(Hi));return(0,d.useMemo)(()=>({initial:t,animate:n}),[Zi(t),Zi(n)])}function Zi(e){return Array.isArray(e)?e.join(` `):e}function Qi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var $i={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(B.test(e))e=parseFloat(e);else return e;return`${Qi(e,t.target.x)}% ${Qi(e,t.target.y)}%`}},ea={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=xt.parse(e);if(i.length>5)return r;let a=xt.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=H(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},ta={borderRadius:{...$i,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:$i,borderTopRightRadius:$i,borderBottomLeftRadius:$i,borderBottomRightRadius:$i,boxShadow:ea};function na(e,{layout:t,layoutId:n}){return Mn.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!ta[e]||e===`opacity`)}var ra={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},ia=jn.length;function aa(e,t,n){let r=``,i=!0;for(let a=0;a<ia;a++){let o=jn[a],s=e[o];if(s===void 0)continue;let c=!0;if(c=typeof s==`number`?s===(o.startsWith(`scale`)?1:0):parseFloat(s)===0,!c||n){let e=Wr(s,Ir[o]);if(!c){i=!1;let t=ra[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function oa(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Mn.has(e)){o=!0;continue}else if(Re(e)){i[e]=n;continue}else{let t=Wr(n,Ir[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=aa(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var sa=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ca(e,t,n){for(let r in t)!G(t[r])&&!na(r,n)&&(e[r]=t[r])}function la({transformTemplate:e},t){return(0,d.useMemo)(()=>{let n=sa();return oa(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ua(e,t){let n=e.style||{},r={};return ca(r,n,e),Object.assign(r,la(e,t)),r}function da(e,t){let n={},r=ua(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var fa={offset:`stroke-dashoffset`,array:`stroke-dasharray`},pa={offset:`strokeDashoffset`,array:`strokeDasharray`};function ma(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?fa:pa;e[a.offset]=B.transform(-r);let o=B.transform(t),s=B.transform(n);e[a.array]=`${o} ${s}`}function ha(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(oa(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&ma(d,i,a,o,!1)}var ga=()=>({...sa(),attrs:{}}),_a=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function va(e,t,n,r){let i=(0,d.useMemo)(()=>{let n=ga();return ha(n,t,_a(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};ca(t,e.style,e),i.style={...t,...i.style}}return i}var ya=[`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 ba(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(ya.indexOf(e)>-1||/[A-Z]/u.test(e))}function xa(e,t,n,{latestValues:r},i,a=!1){let o=(ba(e)?va:da)(t,r,i,e),s=Vi(t,typeof e==`string`,a),c=e===d.Fragment?{}:{...s,...o,ref:n},{children:l}=t,u=(0,d.useMemo)(()=>G(l)?l.get():l,[l]);return(0,d.createElement)(e,{...c,children:u})}function Sa(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ca(e,t,n,r){if(typeof t==`function`){let[i,a]=Sa(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Sa(r);t=t(n===void 0?e.custom:n,i,a)}return t}function wa(e){return G(e)?e.get():e}function Ta({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Ea(n,r,i,e),renderState:t()}}function Ea(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=wa(a[e]);let{initial:o,animate:s}=e,c=qi(e),l=Ji(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Ui(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Ca(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Da=e=>(t,n)=>{let r=(0,d.useContext)(Hi),i=(0,d.useContext)(y),a=()=>Ta(e,t,r,i);return n?a():g(a)};function Oa(e,t,n){let{style:r}=e,i={};for(let a in r)(G(r[a])||t.style&&G(t.style[a])||na(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}var ka=Da({scrapeMotionValuesFromProps:Oa,createRenderState:sa});function Aa(e,t,n){let r=Oa(e,t,n);for(let n in e)if(G(e[n])||G(t[n])){let t=jn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var ja=Da({scrapeMotionValuesFromProps:Aa,createRenderState:ga}),Ma=Symbol.for(`motionComponentSymbol`);function Na(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Pa(e,t,n){return(0,d.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):Na(n)&&(n.current=r))},[t])}var Fa=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),Ia=`framerAppearId`,La=`data-`+Fa(Ia),Ra=(0,d.createContext)({});function za(e,t,n,r,i){let{visualElement:a}=(0,d.useContext)(Hi),o=(0,d.useContext)(Ai),s=(0,d.useContext)(y),c=(0,d.useContext)(vi).reducedMotion,l=(0,d.useRef)(null);r||=o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:a,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));let u=l.current,f=(0,d.useContext)(Ra);u&&!u.projection&&i&&(u.type===`html`||u.type===`svg`)&&Ba(l.current,n,i,f);let p=(0,d.useRef)(!1);(0,d.useInsertionEffect)(()=>{u&&p.current&&u.update(n,s)});let m=n[La],h=(0,d.useRef)(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return v(()=>{u&&(p.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),h.current&&u.animationState&&u.animationState.animateChanges())}),(0,d.useEffect)(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),!1),u.enteringChildren=void 0)}),u}function Ba(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Va(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Na(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function Va(e){if(e)return e.options.allowProjection===!1?Va(e.parent):e.projection}function Ha(e,{forwardMotionProps:t=!1}={},n,r){n&&Ni(n);let i=ba(e)?ja:ka;function a(a,o){let s,c={...(0,d.useContext)(vi),...a,layoutId:Ua(a)},{isStatic:l}=c,u=Xi(a),p=i(a,l);if(!l&&_){Wa(c,n);let t=Ga(c);s=t.MeasureLayout,u.visualElement=za(e,p,c,r,t.ProjectionNode)}return(0,f.jsxs)(Hi.Provider,{value:u,children:[s&&u.visualElement?(0,f.jsx)(s,{visualElement:u.visualElement,...c}):null,xa(e,a,Pa(p,u.visualElement,o),p,l,t)]})}a.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let o=(0,d.forwardRef)(a);return o[Ma]=e,o}function Ua({layoutId:e}){let t=(0,d.useContext)(h).id;return t&&e!==void 0?t+`-`+e:e}function Wa(e,t){let n=(0,d.useContext)(Ai).strict;if(process.env.NODE_ENV!==`production`&&t&&n){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?w(!1,t,`lazy-strict-mode`):T(!1,t,`lazy-strict-mode`)}}function Ga(e){let{drag:t,layout:n}=Mi;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Ka(e,t){if(typeof Proxy>`u`)return Ha;let n=new Map,r=(n,r)=>Ha(n,r,e,t);return new Proxy((e,t)=>(process.env.NODE_ENV!==`production`&&N(!1,`motion() is deprecated. Use motion.create() instead.`),r(e,t)),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Ha(a,void 0,e,t)),n.get(a))})}function qa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ja({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ya(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Xa(e){return e===void 0||e===1}function Za({scale:e,scaleX:t,scaleY:n}){return!Xa(e)||!Xa(t)||!Xa(n)}function Qa(e){return Za(e)||$a(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $a(e){return eo(e.x)||eo(e.y)}function eo(e){return e&&e!==`0%`}function to(e,t,n){return n+t*(e-n)}function no(e,t,n,r,i){return i!==void 0&&(e=to(e,i,r)),to(e,n,r)+t}function ro(e,t=0,n=1,r,i){e.min=no(e.min,t,n,r,i),e.max=no(e.max,t,n,r,i)}function io(e,{x:t,y:n}){ro(e.x,t.translate,t.scale,t.originPoint),ro(e.y,n.translate,n.scale,n.originPoint)}var ao=.999999999999,oo=1.0000000000001;function so(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&uo(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,io(e,o)),r&&Qa(a.latestValues)&&uo(e,a.latestValues))}t.x<oo&&t.x>ao&&(t.x=1),t.y<oo&&t.y>ao&&(t.y=1)}function co(e,t){e.min+=t,e.max+=t}function lo(e,t,n,r,i=.5){ro(e,t,n,H(e.min,e.max,i),r)}function uo(e,t){lo(e.x,t.x,t.scaleX,t.scale,t.originX),lo(e.y,t.y,t.scaleY,t.scale,t.originY)}function fo(e,t){return qa(Ya(e.getBoundingClientRect(),t))}function po(e,t,n){let r=fo(e,n),{scroll:i}=t;return i&&(co(r.x,i.offset.x),co(r.y,i.offset.y)),r}var mo=()=>({translate:0,scale:1,origin:0,originPoint:0}),ho=()=>({x:mo(),y:mo()}),go=()=>({min:0,max:0}),K=()=>({x:go(),y:go()}),_o={current:null},vo={current:!1};function yo(){if(vo.current=!0,_)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>_o.current=e.matches;e.addEventListener(`change`,t),t()}else _o.current=!1}var bo=new WeakMap;function xo(e,t,n){for(let r in t){let i=t[r],a=n[r];if(G(i))e.addValue(r,i);else if(G(a))e.addValue(r,Xr(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Xr(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var So=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Co=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Gn,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.renderScheduledAt=0,this.scheduleRender=()=>{let e=R.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,I.render(this.render,!1,!0))};let{latestValues:s,renderState:c}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=qi(t),this.isVariantNode=Ji(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:l,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in u){let t=u[e];s[e]!==void 0&&G(t)&&t.set(s[e])}}mount(e){this.current=e,bo.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),vo.current||yo(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:_o.current,process.env.NODE_ENV!==`production`&&N(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),Me(this.notifyUpdate),Me(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=Mn.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&I.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Mi){let t=Mi[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):K()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<So.length;t++){let n=So[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=xo(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Xr(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(ee(n)||ne(n))?n=parseFloat(n):!_i(n)&&xt.test(t)&&(n=zr(e,t)),this.setBaseTarget(e,G(n)?n.get():n)),G(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Ca(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!G(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new ae),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Zr.render(this.render)}},wo=class extends Co{constructor(){super(...arguments),this.KeyframeResolver=Hr}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;G(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function To(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Eo(e){return window.getComputedStyle(e)}var Do=class extends wo{constructor(){super(...arguments),this.type=`html`,this.renderInstance=To}readValueFromInstance(e,t){if(Mn.has(t))return this.projection?.isProjecting?Dn(t):kn(e,t);{let n=Eo(e),r=(Re(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return fo(e,t)}build(e,t,n){oa(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Oa(e,t,n)}},Oo=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 ko(e,t,n,r){for(let n in To(e,t,void 0,r),t.attrs)e.setAttribute(Oo.has(n)?n:Fa(n),t.attrs[n])}var Ao=class extends wo{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=K}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Mn.has(t)){let e=Rr(t);return e&&e.default||0}return t=Oo.has(t)?t:Fa(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Aa(e,t,n)}build(e,t,n){ha(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){ko(e,t,n,r)}mount(e){this.isSVGTag=_a(e.tagName),super.mount(e)}},jo=(e,t)=>ba(e)?new Ao(t):new Do(t,{allowProjection:e!==d.Fragment});function Mo(e,t,n){let r=e.getProps();return Ca(r,t,n===void 0?r.custom:n,e)}var No=e=>Array.isArray(e);function Po(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xr(n))}function Fo(e){return No(e)?e[e.length-1]||0:e}function Io(e,t){let{transitionEnd:n={},transition:r={},...i}=Mo(e,t)||{};for(let t in i={...i,...n},i)Po(e,t,Fo(i[t]))}function Lo(e){return!!(G(e)&&e.add)}function Ro(e,t){let n=e.getValue(`willChange`);if(Lo(n))return n.add(t);if(!n&&E.WillChange){let n=new E.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function zo(e){return e.props[La]}var Bo=e=>e!==null;function Vo(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(Bo),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var Ho={type:`spring`,stiffness:500,damping:25,restSpeed:10},Uo=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Wo={type:`keyframes`,duration:.8},Go={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Ko=(e,{keyframes:t})=>t.length>2?Wo:Mn.has(e)?e.startsWith(`scale`)?Uo(t[1]):Ho:Go;function qo({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}var Jo=(e,t,n,r={},i,a)=>o=>{let s=Cr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=A(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};qo(s)||Object.assign(u,Ko(e,u)),u.duration&&=A(u.duration),u.repeatDelay&&=A(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(pr(u),u.delay===0&&(d=!0)),(E.instantAnimations||E.skipAnimations)&&(d=!0,pr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Vo(u.keyframes,s);if(e!==void 0){I.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new _n(u):new vr(u)};function Yo({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Xo(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&Yo(l,t))continue;let o={delay:n,...Cr(a||{},t)},u=r.get();if(u!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===u&&!o.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let n=zo(e);if(n){let e=window.MotionHandoffAnimation(n,t,I);e!==null&&(o.startTime=e,d=!0)}}Ro(e,t),r.start(Jo(t,r,i,e.shouldReduceMotion&&wr.has(t)?{type:!1}:o,e,d));let f=r.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{I.update(()=>{o&&Io(e,o)})}),c}function Zo(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function Qo(e,t,n={}){let r=Mo(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Xo(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return $o(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function $o(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Qo(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Zo(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function es(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Qo(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Qo(e,t,n);else{let i=typeof t==`function`?Mo(e,t,n.custom):t;r=Promise.all(Xo(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function ts(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var ns=Ki.length;function rs(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&rs(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<ns;n++){let r=Ki[n],i=e.props[r];(Wi(i)||i===!1)&&(t[r]=i)}return t}var is=[...Gi].reverse(),as=Gi.length;function os(e){return t=>Promise.all(t.map(({animation:t,options:n})=>es(e,t,n)))}function ss(e){let t=os(e),n=us(),r=!0,i=t=>(n,r)=>{let i=Mo(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=rs(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<as;t++){let f=is[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=Wi(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||Ui(m)||typeof m==`boolean`)continue;let v=cs(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},T=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=No(t)&&No(n)?!ts(t,n):t!==n,r?t==null?l.add(e):T(e):t!==void 0&&l.has(e)?T(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1);let E=_&&v;y&&(!E||b)&&c.push(...x.map(t=>{let n={type:f};if(typeof t==`string`&&r&&!E&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=Mo(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Zo(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=Mo(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=us()}}}function cs(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!ts(t,e):!1}function ls(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function us(){return{animate:ls(!0),whileInView:ls(),whileHover:ls(),whileTap:ls(),whileDrag:ls(),whileFocus:ls(),exit:ls()}}var ds=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},fs=class extends ds{constructor(e){super(e),e.animationState||=ss(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Ui(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},ps=0,ms=class extends ds{constructor(){super(...arguments),this.id=ps++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}},hs={animation:{Feature:fs},exit:{Feature:ms}};function gs(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function _s(e){return{point:{x:e.pageX,y:e.pageY}}}var vs=e=>t=>ai(t)&&e(t,_s(t));function ys(e,t,n,r){return gs(e,t,vs(n),r)}var bs=1e-4,xs=1-bs,Ss=1+bs,Cs=.01,ws=0-Cs,Ts=0+Cs;function q(e){return e.max-e.min}function Es(e,t,n){return Math.abs(e-t)<=n}function Ds(e,t,n,r=.5){e.origin=r,e.originPoint=H(t.min,t.max,e.origin),e.scale=q(n)/q(t),e.translate=H(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xs&&e.scale<=Ss||isNaN(e.scale))&&(e.scale=1),(e.translate>=ws&&e.translate<=Ts||isNaN(e.translate))&&(e.translate=0)}function Os(e,t,n,r){Ds(e.x,t.x,n.x,r?r.originX:void 0),Ds(e.y,t.y,n.y,r?r.originY:void 0)}function ks(e,t,n){e.min=n.min+t.min,e.max=e.min+q(t)}function As(e,t,n){ks(e.x,t.x,n.x),ks(e.y,t.y,n.y)}function js(e,t,n){e.min=t.min-n.min,e.max=e.min+q(t)}function Ms(e,t,n){js(e.x,t.x,n.x),js(e.y,t.y,n.y)}function J(e){return[e(`x`),e(`y`)]}var Ns=({current:e})=>e?e.ownerDocument.defaultView:null,Ps=(e,t)=>Math.abs(e-t);function Fs(e,t){let n=Ps(e.x,t.x),r=Ps(e.y,t.y);return Math.sqrt(n**2+r**2)}var Is=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=zs(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Fs(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=L;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Ls(t,this.transformPagePoint),I.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=zs(e.type===`pointercancel`?this.lastMoveEventInfo:Ls(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!ai(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let o=Ls(_s(e),this.transformPagePoint),{point:s}=o,{timestamp:c}=L;this.history=[{...s,timestamp:c}];let{onSessionStart:l}=t;l&&l(e,zs(o,this.history)),this.removeListeners=O(ys(this.contextWindow,`pointermove`,this.handlePointerMove),ys(this.contextWindow,`pointerup`,this.handlePointerUp),ys(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Me(this.updatePoint)}};function Ls(e,t){return t?{point:t(e.point)}:e}function Rs(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zs({point:e},t){return{point:e,delta:Rs(e,Vs(t)),offset:Rs(e,Bs(t)),velocity:Hs(t,.1)}}function Bs(e){return e[0]}function Vs(e){return e[e.length-1]}function Hs(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Vs(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>A(t)));)n--;if(!r)return{x:0,y:0};let a=j(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Us(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?H(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?H(n,e,r.max):Math.min(e,n)),e}function Ws(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Gs(e,{top:t,left:n,bottom:r,right:i}){return{x:Ws(e.x,n,i),y:Ws(e.y,t,r)}}function Ks(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function qs(e,t){return{x:Ks(e.x,t.x),y:Ks(e.y,t.y)}}function Js(e,t){let n=.5,r=q(e),i=q(t);return i>r?n=k(t.min,t.max-r,e.min):r>i&&(n=k(e.min,e.max-i,t.min)),S(0,1,n)}function Ys(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Xs=.35;function Zs(e=Xs){return e===!1?e=0:e===!0&&(e=Xs),{x:Qs(e,`left`,`right`),y:Qs(e,`top`,`bottom`)}}function Qs(e,t,n){return{min:$s(e,t),max:$s(e,n)}}function $s(e,t){return typeof e==`number`?e:e[t]||0}var ec=new WeakMap,tc=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=K(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(_s(e).point)},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ei(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),J(e=>{let t=this.getAxisMotionValue(e).get()||0;if(z.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=q(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&I.postRender(()=>i(e,t)),Ro(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=rc(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>J(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:l}=this.getProps();this.panSession=new Is(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Ns(this.visualElement)})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&I.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!nc(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Us(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Na(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Gs(n.layoutBox,e):this.constraints=!1,this.elastic=Zs(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&J(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Ys(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Na(e))return!1;let n=e.current;T(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.",`drag-constraints-ref`);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=po(n,r.root,this.visualElement.getTransformPagePoint()),a=qs(r.layout.layoutBox,i);if(t){let e=t(Ja(a));this.hasMutatedConstraints=!!e,e&&(a=qa(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=J(o=>{if(!nc(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Ro(this.visualElement,e),n.start(Jo(e,n,0,t,this.visualElement,!1))}stopAnimation(){J(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){J(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){J(t=>{let{drag:n}=this.getProps();if(!nc(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-H(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Na(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};J(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Js({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),J(t=>{if(!nc(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(H(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;ec.set(this.visualElement,this);let e=this.visualElement.current,t=ys(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();Na(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),I.read(n);let a=gs(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(J(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Xs,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function nc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function rc(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var ic=class extends ds{constructor(e){super(e),this.removeGroupControls=D,this.removeListeners=D,this.controls=new tc(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||D}unmount(){this.removeGroupControls(),this.removeListeners()}},ac=e=>(t,n)=>{e&&I.postRender(()=>e(t,n))},oc=class extends ds{constructor(){super(...arguments),this.removePointerDownListener=D}onPointerDown(e){this.session=new Is(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ns(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ac(e),onStart:ac(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&I.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ys(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},sc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},cc=!1,lc=class extends d.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),cc&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),sc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,cc=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||I.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Zr.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;cc=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function uc(e){let[t,n]=Ei(),r=(0,d.useContext)(h);return(0,f.jsx)(lc,{...e,layoutGroup:r,switchLayoutGroup:(0,d.useContext)(Ra),isPresent:t,safeToRemove:n})}function dc(e,t,n){let r=G(e)?e:Xr(e);return r.start(Jo(``,r,t,n)),r.animation}var fc=(e,t)=>e.depth-t.depth,pc=class{constructor(){this.children=[],this.isDirty=!1}add(e){b(this.children,e),this.isDirty=!0}remove(e){x(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(fc),this.isDirty=!1,this.children.forEach(e)}};function mc(e,t){let n=R.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(Me(r),e(a-t))};return I.setup(r,!0),()=>Me(r)}var hc=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],gc=hc.length,_c=e=>typeof e==`string`?parseFloat(e):e,vc=e=>typeof e==`number`||B.test(e);function yc(e,t,n,r,i,a){i?(e.opacity=H(0,n.opacity??1,xc(r)),e.opacityExit=H(t.opacity??1,0,Sc(r))):a&&(e.opacity=H(t.opacity??1,n.opacity??1,r));for(let i=0;i<gc;i++){let a=`border${hc[i]}Radius`,o=bc(t,a),s=bc(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||vc(o)===vc(s)?(e[a]=Math.max(H(_c(o),_c(s),r),0),(z.test(s)||z.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=H(t.rotate||0,n.rotate||0,r))}function bc(e,t){return e[t]===void 0?e.borderRadius:e[t]}var xc=Cc(0,.5,ve),Sc=Cc(.5,.95,D);function Cc(e,t,n){return r=>r<e?0:r>t?1:n(k(e,t,r))}function wc(e,t){e.min=t.min,e.max=t.max}function Y(e,t){wc(e.x,t.x),wc(e.y,t.y)}function Tc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ec(e,t,n,r,i){return e-=t,e=to(e,1/n,r),i!==void 0&&(e=to(e,1/i,r)),e}function Dc(e,t=0,n=1,r=.5,i,a=e,o=e){if(z.test(t)&&(t=parseFloat(t),t=H(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=H(a.min,a.max,r);e===a&&(s-=t),e.min=Ec(e.min,t,n,s,i),e.max=Ec(e.max,t,n,s,i)}function Oc(e,t,[n,r,i],a,o){Dc(e,t[n],t[r],t[i],t.scale,a,o)}var kc=[`x`,`scaleX`,`originX`],Ac=[`y`,`scaleY`,`originY`];function jc(e,t,n,r){Oc(e.x,t,kc,n?n.x:void 0,r?r.x:void 0),Oc(e.y,t,Ac,n?n.y:void 0,r?r.y:void 0)}function Mc(e){return e.translate===0&&e.scale===1}function Nc(e){return Mc(e.x)&&Mc(e.y)}function Pc(e,t){return e.min===t.min&&e.max===t.max}function Fc(e,t){return Pc(e.x,t.x)&&Pc(e.y,t.y)}function Ic(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Lc(e,t){return Ic(e.x,t.x)&&Ic(e.y,t.y)}function Rc(e){return q(e.x)/q(e.y)}function zc(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Bc=class{constructor(){this.members=[]}add(e){b(this.members,e),e.scheduleRender()}remove(e){if(x(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function Vc(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Hc={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Uc=[``,`X`,`Y`,`Z`],Wc=1e3,Gc=0;function Kc(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function qc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=zo(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,I,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&qc(r)}function Jc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Gc++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,F.value&&(Hc.nodes=Hc.calculatedTargetDeltas=Hc.calculatedProjections=0),this.nodes.forEach(Zc),this.nodes.forEach(il),this.nodes.forEach(al),this.nodes.forEach(Qc),F.addProjectionMetrics&&F.addProjectionMetrics(Hc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new pc)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ae),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=mi(t)&&!hi(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;I.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=mc(i,250),sc.hasAnimatedSinceResize&&(sc.hasAnimatedSinceResize=!1,this.nodes.forEach(rl)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||fl,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Lc(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Cr(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||rl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Me(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(ol),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&qc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(el);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(tl);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nl),this.nodes.forEach(Yc),this.nodes.forEach(Xc)):this.nodes.forEach(tl),this.clearAllSnapshots();let e=R.now();L.delta=S(0,1e3/60,e-L.timestamp),L.timestamp=e,L.isProcessing=!0,Ne.update.process(L),Ne.preRender.process(L),Ne.render.process(L),L.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($c),this.sharedNodes.forEach(sl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,I.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){I.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!q(this.snapshot.measuredBox.x)&&!q(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=K(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Nc(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Qa(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),gl(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return K();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(vl))){let{scroll:e}=this.root;e&&(co(t.x,e.offset.x),co(t.y,e.offset.y))}return t}removeElementScroll(e){let t=K();if(Y(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Y(t,e),co(t.x,i.offset.x),co(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=K();Y(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&uo(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Qa(r.latestValues)&&uo(n,r.latestValues)}return Qa(this.latestValues)&&uo(n,this.latestValues),n}removeTransform(e){let t=K();Y(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!Qa(n.latestValues))continue;Za(n.latestValues)&&n.updateSnapshot();let r=K();Y(r,n.measurePageBox()),jc(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Qa(this.latestValues)&&jc(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==L.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=L.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=K(),this.targetWithTransforms=K()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),As(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Y(this.target,this.layout.layoutBox),io(this.target,this.targetDelta)):Y(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),F.value&&Hc.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Za(this.parent.latestValues)||$a(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=K(),this.relativeTargetOrigin=K(),Ms(this.relativeTargetOrigin,t,n),Y(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===L.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Y(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;so(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=K());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Tc(this.prevProjectionDelta.x,this.projectionDelta.x),Tc(this.prevProjectionDelta.y,this.projectionDelta.y)),Os(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!zc(this.projectionDelta.x,this.prevProjectionDelta.x)||!zc(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),F.value&&Hc.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ho(),this.projectionDelta=ho(),this.projectionDeltaWithTransform=ho()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=ho();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=K(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(dl));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;cl(a.x,e.x,n),cl(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ms(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ul(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Fc(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=K(),Y(d,this.relativeTarget)),s&&(this.animationValues=i,yc(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(Me(this.pendingAnimation),void 0),this.pendingAnimation=I.update(()=>{sc.hasAnimatedSinceResize=!0,Ie.layout++,this.motionValue||=Xr(0),this.currentAnimation=dc(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Ie.layout--},onComplete:()=>{Ie.layout--,e.onComplete&&e.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);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Wc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&_l(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||K();let t=q(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=q(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Y(t,n),uo(t,i),Os(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Bc),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Kc(`z`,e,r,this.animationValues);for(let t=0;t<Uc.length;t++)Kc(`rotate${Uc[t]}`,e,r,this.animationValues),Kc(`skew${Uc[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=wa(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=wa(t?.pointerEvents)||``),this.hasProjected&&!Qa(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Vc(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;for(let t in e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit,ta){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=ta[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?wa(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(el),this.root.sharedNodes.clear()}}}function Yc(e){e.updateLayout()}function Xc(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?J(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=q(r);r.min=n[e].min,r.max=r.min+i}):_l(i,t.layoutBox,n)&&J(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=q(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=ho();Os(o,n,t.layoutBox);let s=ho();a?Os(s,e.applyTransform(r,!0),t.measuredBox):Os(s,n,t.layoutBox);let c=!Nc(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=K();Ms(o,t.layoutBox,i.layoutBox);let s=K();Ms(s,n,a.layoutBox),Lc(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Zc(e){F.value&&Hc.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Qc(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function $c(e){e.clearSnapshot()}function el(e){e.clearMeasurements()}function tl(e){e.isLayoutDirty=!1}function nl(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function rl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function il(e){e.resolveTargetDelta()}function al(e){e.calcProjection()}function ol(e){e.resetSkewAndRotation()}function sl(e){e.removeLeadSnapshot()}function cl(e,t,n){e.translate=H(t.translate,0,n),e.scale=H(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ll(e,t,n,r){e.min=H(t.min,n.min,r),e.max=H(t.max,n.max,r)}function ul(e,t,n,r){ll(e.x,t.x,n.x,r),ll(e.y,t.y,n.y,r)}function dl(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var fl={duration:.45,ease:[.4,0,.1,1]},pl=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ml=pl(`applewebkit/`)&&!pl(`chrome/`)?Math.round:D;function hl(e){e.min=ml(e.min),e.max=ml(e.max)}function gl(e){hl(e.x),hl(e.y)}function _l(e,t,n){return e===`position`||e===`preserve-aspect`&&!Es(Rc(t),Rc(n),.2)}function vl(e){return e!==e.root&&e.scroll?.wasRoot}var yl=Jc({attachResizeListener:(e,t)=>gs(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),bl={current:void 0},xl=Jc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bl.current){let e=new yl({});e.mount(window),e.setOptions({layoutScroll:!0}),bl.current=e}return bl.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Sl={pan:{Feature:oc},drag:{Feature:ic,ProjectionNode:xl,MeasureLayout:uc}};function Cl(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&I.postRender(()=>i(t,_s(t)))}var wl=class extends ds{mount(){let{current:e}=this.node;e&&(this.unmount=ri(e,(e,t)=>(Cl(this.node,t,`Start`),e=>Cl(this.node,e,`End`))))}unmount(){}},Tl=class extends ds{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!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=O(gs(this.node.current,`focus`,()=>this.onFocus()),gs(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function El(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&I.postRender(()=>i(t,_s(t)))}var Dl=class extends ds{mount(){let{current:e}=this.node;e&&(this.unmount=pi(e,(e,t)=>(El(this.node,t,`Start`),(e,{success:t})=>El(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},Ol=new WeakMap,kl=new WeakMap,Al=e=>{let t=Ol.get(e.target);t&&t(e)},jl=e=>{e.forEach(Al)};function Ml({root:e,...t}){let n=e||document;kl.has(n)||kl.set(n,{});let r=kl.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(jl,{root:e,...t})),r[i]}function Nl(e,t,n){let r=Ml(t);return Ol.set(e,n),r.observe(e),()=>{Ol.delete(e),r.unobserve(e)}}var Pl={some:0,all:1},Fl=class extends ds{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Pl[r]};return Nl(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Il(e,t))&&this.startObserver()}unmount(){}};function Il({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Ll={inView:{Feature:Fl},tap:{Feature:Dl},focus:{Feature:Tl},hover:{Feature:wl}},Rl={layout:{ProjectionNode:xl,MeasureLayout:uc}},zl={...hs,...Ll,...Sl,...Rl},Bl=Ka(zl,jo),Vl=e=>{let{defaultExpand:t,title:n,children:r,onClear:i}=e,[a,o]=(0,d.useState)(t??!1),s=p.SquarePlus,c=p.SquareMinus,l=p.BrushCleaning??p.Eraser??p.Trash2??p.X;return(0,f.jsxs)(`div`,{className:`text-sm`,children:[(0,f.jsxs)(`div`,{className:`flex items-center justify-between cursor-pointer`,onClick:()=>{o(e=>!e)},children:[(0,f.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,f.jsxs)(`div`,{className:`relative size-4 children:absolute children:inset-0`,children:[(0,f.jsx)(Bl.div,{initial:{opacity:1},animate:{opacity:a?0:1},children:s?(0,f.jsx)(s,{className:`size-4`}):null}),(0,f.jsx)(Bl.div,{initial:{opacity:0},animate:{opacity:a?1:0},children:c?(0,f.jsx)(c,{className:`size-4`}):null})]}),(0,f.jsx)(`span`,{children:n})]}),l?(0,f.jsx)(l,{className:`size-4`,onClick:e=>{e.stopPropagation(),i?.(e)}}):null]}),(0,f.jsx)(Bl.div,{initial:{height:0,opacity:0},animate:{height:a?`auto`:0,opacity:a?1:0},className:`overflow-hidden`,children:(0,f.jsx)(`div`,{className:`pt-4`,children:r})})]})},Hl=Vl;function Ul(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ul(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Wl(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ul(e))&&(r&&(r+=` `),r+=t);return r}var Gl=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Kl=(e,t)=>({classGroupId:e,validator:t}),ql=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Jl=`-`,Yl=[],Xl=`arbitrary..`,Zl=e=>{let t=eu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return $l(e);let n=e.split(Jl);return Ql(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Gl(i,t):t:i||Yl}return n[e]||Yl}}},Ql=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Ql(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Jl):e.slice(t).join(Jl),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},$l=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Xl+r:void 0})(),eu=e=>{let{theme:t,classGroups:n}=e;return tu(n,t)},tu=(e,t)=>{let n=ql();for(let r in e){let i=e[r];nu(i,n,r,t)}return n},nu=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];ru(i,t,n,r)}},ru=(e,t,n,r)=>{if(typeof e==`string`){iu(e,t,n);return}if(typeof e==`function`){au(e,t,n,r);return}ou(e,t,n,r)},iu=(e,t,n)=>{let r=e===``?t:su(t,e);r.classGroupId=n},au=(e,t,n,r)=>{if(cu(e)){nu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Kl(n,e))},ou=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];nu(o,su(t,a),n,r)}},su=(e,t)=>{let n=e,r=t.split(Jl),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=ql(),n.nextPart.set(t,i)),n=i}return n},cu=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,lu=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},uu=`!`,du=`:`,fu=[],pu=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),mu=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===du){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(uu)?(c=s.slice(0,-1),l=!0):s.startsWith(uu)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return pu(t,l,c,u)};if(t){let e=t+du,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):pu(fu,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},hu=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},gu=e=>({cache:lu(e.cacheSize),parseClassName:mu(e),sortModifiers:hu(e),...Zl(e)}),_u=/\s+/,vu=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(_u),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+uu:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},yu=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=bu(n))&&(i&&(i+=` `),i+=r);return i},bu=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=bu(e[r]))&&(n&&(n+=` `),n+=t);return n},xu=(e,...t)=>{let n,r,i,a,o=o=>(n=gu(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=vu(e,n);return i(e,a),a};return a=o,(...e)=>a(yu(...e))},Su=[],X=e=>{let t=t=>t[e]||Su;return t.isThemeGetter=!0,t},Cu=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tu=/^\d+\/\d+$/,Eu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Du=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ou=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ku=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Au=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ju=e=>Tu.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),Mu=e=>!!e&&Number.isInteger(Number(e)),Nu=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),Pu=e=>Eu.test(e),Fu=()=>!0,Iu=e=>Du.test(e)&&!Ou.test(e),Lu=()=>!1,Ru=e=>ku.test(e),zu=e=>Au.test(e),Bu=e=>!Q(e)&&!$(e),Vu=e=>$u(e,rd,Lu),Q=e=>Cu.test(e),Hu=e=>$u(e,id,Iu),Uu=e=>$u(e,ad,Z),Wu=e=>$u(e,td,Lu),Gu=e=>$u(e,nd,zu),Ku=e=>$u(e,sd,Ru),$=e=>wu.test(e),qu=e=>ed(e,id),Ju=e=>ed(e,od),Yu=e=>ed(e,td),Xu=e=>ed(e,rd),Zu=e=>ed(e,nd),Qu=e=>ed(e,sd,!0),$u=(e,t,n)=>{let r=Cu.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ed=(e,t,n=!1)=>{let r=wu.exec(e);return r?r[1]?t(r[1]):n:!1},td=e=>e===`position`||e===`percentage`,nd=e=>e===`image`||e===`url`,rd=e=>e===`length`||e===`size`||e===`bg-size`,id=e=>e===`length`,ad=e=>e===`number`,od=e=>e===`family-name`,sd=e=>e===`shadow`,cd=()=>{let e=X(`color`),t=X(`font`),n=X(`text`),r=X(`font-weight`),i=X(`tracking`),a=X(`leading`),o=X(`breakpoint`),s=X(`container`),c=X(`spacing`),l=X(`radius`),u=X(`shadow`),d=X(`inset-shadow`),f=X(`text-shadow`),p=X(`drop-shadow`),m=X(`blur`),h=X(`perspective`),g=X(`aspect`),_=X(`ease`),v=X(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[ju,`full`,`auto`,...w()],E=()=>[Mu,`none`,`subgrid`,$,Q],ee=()=>[`auto`,{span:[`full`,Mu,$,Q]},Mu,$,Q],te=()=>[Mu,`auto`,$,Q],ne=()=>[`auto`,`min`,`max`,`fr`,$,Q],re=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],D=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ie=()=>[`auto`,...w()],O=()=>[ju,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],k=()=>[e,$,Q],ae=()=>[...b(),Yu,Wu,{position:[$,Q]}],A=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],j=()=>[`auto`,`cover`,`contain`,Xu,Vu,{size:[$,Q]}],oe=()=>[Nu,qu,Hu],M=()=>[``,`none`,`full`,l,$,Q],N=()=>[``,Z,qu,Hu],se=()=>[`solid`,`dashed`,`dotted`,`double`],ce=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],P=()=>[Z,Nu,Yu,Wu],le=()=>[``,`none`,m,$,Q],ue=()=>[`none`,Z,$,Q],de=()=>[`none`,Z,$,Q],fe=()=>[Z,$,Q],pe=()=>[ju,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Pu],breakpoint:[Pu],color:[Fu],container:[Pu],"drop-shadow":[Pu],ease:[`in`,`out`,`in-out`],font:[Bu],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Pu],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Pu],shadow:[Pu],spacing:[`px`,Z],text:[Pu],"text-shadow":[Pu],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ju,Q,$,g]}],container:[`container`],columns:[{columns:[Z,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Mu,`auto`,$,Q]}],basis:[{basis:[ju,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,ju,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[Mu,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...re(),`normal`]}],"justify-items":[{"justify-items":[...D(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...D()]}],"align-content":[{content:[`normal`,...re()]}],"align-items":[{items:[...D(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...D(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...D(),`baseline`]}],"place-self":[{"place-self":[`auto`,...D()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:O()}],w:[{w:[s,`screen`,...O()]}],"min-w":[{"min-w":[s,`screen`,`none`,...O()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...O()]}],h:[{h:[`screen`,`lh`,...O()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...O()]}],"max-h":[{"max-h":[`screen`,`lh`,...O()]}],"font-size":[{text:[`base`,n,qu,Hu]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,$,Uu]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Nu,Q]}],"font-family":[{font:[Ju,Q,t]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,$,Q]}],"line-clamp":[{"line-clamp":[Z,`none`,$,Uu]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...se(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,Hu]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[Z,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:A()}],"bg-size":[{bg:j()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Mu,$,Q],radial:[``,$,Q],conic:[Mu,$,Q]},Zu,Gu]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:N()}],"border-w-x":[{"border-x":N()}],"border-w-y":[{"border-y":N()}],"border-w-s":[{"border-s":N()}],"border-w-e":[{"border-e":N()}],"border-w-t":[{"border-t":N()}],"border-w-r":[{"border-r":N()}],"border-w-b":[{"border-b":N()}],"border-w-l":[{"border-l":N()}],"divide-x":[{"divide-x":N()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":N()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...se(),`hidden`,`none`]}],"divide-style":[{divide:[...se(),`hidden`,`none`]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...se(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,qu,Hu]}],"outline-color":[{outline:k()}],shadow:[{shadow:[``,`none`,u,Qu,Ku]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":[`none`,d,Qu,Ku]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:N()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[Z,Hu]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":N()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":[`none`,f,Qu,Ku]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...ce(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":P()}],"mask-image-linear-to-pos":[{"mask-linear-to":P()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":P()}],"mask-image-t-to-pos":[{"mask-t-to":P()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":P()}],"mask-image-r-to-pos":[{"mask-r-to":P()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":P()}],"mask-image-b-to-pos":[{"mask-b-to":P()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":P()}],"mask-image-l-to-pos":[{"mask-l-to":P()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":P()}],"mask-image-x-to-pos":[{"mask-x-to":P()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":P()}],"mask-image-y-to-pos":[{"mask-y-to":P()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":P()}],"mask-image-radial-to-pos":[{"mask-radial-to":P()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":P()}],"mask-image-conic-to-pos":[{"mask-conic-to":P()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:A()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:le()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Qu,Ku]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:[``,Z,$,Q]}],"hue-rotate":[{"hue-rotate":[Z,$,Q]}],invert:[{invert:[``,Z,$,Q]}],saturate:[{saturate:[Z,$,Q]}],sepia:[{sepia:[``,Z,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Z,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Z,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,Z,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Z,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Z,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[Z,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],accent:[{accent:k()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,$,Q]}],fill:[{fill:[`none`,...k()]}],"stroke-w":[{stroke:[Z,qu,Hu,Uu]}],stroke:[{stroke:[`none`,...k()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},ld=xu(cd);const ud=(...e)=>ld(Wl(e));var dd=e=>{let{value:t,options:n,onChange:r,...i}=e,a=n.filter(e=>!e.icon),o=n.filter(e=>e.icon),s=e=>{t.includes(e)?r?.(t.filter(t=>t!==e)):r?.([...t,e])};return(0,f.jsxs)(Hl,{...i,children:[(0,f.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:a.map(e=>{let{label:n,value:r}=e;return(0,f.jsx)(`div`,{className:ud(`inline-flex items-center h-6 px-3 cursor-pointer b-default rounded-full hover:border-primary transition-colors`,{"border-primary bg-primary-bg":t.includes(r)}),onClick:()=>{s(r)},children:n},r)})}),(0,f.jsx)(`div`,{className:`flex flex-wrap gap-2 mt-2`,children:o.map(e=>{let{label:n,value:r,icon:i}=e;return(0,f.jsx)(`div`,{className:ud(`size-12 rounded-full overflow-hidden cursor-pointer b-default b-2 border-transparent hover:border-primary transition-colors`,{"border-primary":t.includes(r)}),onClick:()=>{s(r)},children:(0,f.jsx)(`img`,{src:i,alt:n,className:`size-full`})},r)})})]})},fd=dd,pd=e=>{let{options:t,value:n,onChange:r,...i}=e,[a,o]=(0,d.useState)(!1),s=e=>(0,f.jsx)(`div`,{className:`flex flex-col gap-4`,children:e.map(e=>{let{label:t,value:i,icon:a,count:o}=e;return(0,f.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,f.jsx)(m.Checkbox,{checked:n.includes(i),onChange:e=>{e.target.checked?r?.([...n,i]):r?.(n.filter(e=>e!==i))},children:(0,f.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,f.jsx)(`img`,{src:a,alt:t,className:`size-4`}),(0,f.jsx)(`span`,{children:t})]})}),(0,f.jsx)(`span`,{children:o})]},i)})}),c=()=>{o(e=>!e)};return(0,f.jsxs)(Hl,{...i,children:[s(t.slice(0,5)),(0,f.jsx)(ki,{children:a&&(0,f.jsx)(Bl.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},className:`overflow-hidden`,children:(0,f.jsx)(`div`,{className:`mt-4`,children:s(t.slice(5))})})}),t.length>5&&(0,f.jsxs)(`div`,{className:`inline-flex items-center mt-4 text-primary cursor-pointer`,onClick:c,children:[(0,f.jsx)(`span`,{children:`更多`}),(0,f.jsx)(p.ChevronDown,{className:ud(`size-4 transition`,{"-scale-y-100":a})})]})]})},md=pd,hd=e=>(0,f.jsx)(Hl,{...e,children:(0,f.jsx)(`div`,{className:`px-0.5 pb-0.5`,children:(0,f.jsx)(m.Select,{className:`w-full`,...e})})}),gd=hd,_d=[`#FF0000`,`#FFA500`,`#FFFF00`,`#00FF00`,`#00FFFF`,`#0000FF`,`#8000FF`,`#FF00FF`,`#FFFFFF`,`#808080`,`#000000`,`#964B00`],vd=e=>{let{presets:t,...n}=e;return(0,f.jsx)(Hl,{...e,children:(0,f.jsx)(m.ColorPicker,{presets:[{label:`预设颜色`,colors:_d},...t??[]],...n})})},yd=vd,bd=e=>(0,f.jsx)(Hl,{...e,children:(0,f.jsx)(`div`,{className:`px-2`,children:(0,f.jsx)(m.Slider,{...e})})}),xd=bd,Sd=e=>(0,f.jsx)(Hl,{...e,children:(0,f.jsx)(`div`,{className:`px-0.5 pb-0.5`,children:(0,f.jsx)(m.Input,{...e})})}),Cd=Sd;exports.FilterCheckboxGroup=md,exports.FilterCollapse=Hl,exports.FilterColorPicker=yd,exports.FilterInput=Cd,exports.FilterSelect=gd,exports.FilterSlider=xd,exports.FilterTags=fd;
|
|
10
|
+
`),()=>{m.contains(p)&&m.removeChild(p)}},[t]),(0,f.jsx)(Si,{isPresent:t,childRef:a,sizeRef:o,children:d.cloneElement(e,{ref:c})})}var wi=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,root:c})=>{let l=g(Ti),u=(0,d.useId)(),p=!0,m=(0,d.useMemo)(()=>(p=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:e=>{l.set(e,!0);for(let e of l.values())if(!e)return;r&&r()},register:e=>(l.set(e,!1),()=>l.delete(e))}),[n,l,r]);return a&&p&&(m={...m}),(0,d.useMemo)(()=>{l.forEach((e,t)=>l.set(t,!1))},[n]),d.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o===`popLayout`&&(e=(0,f.jsx)(Ci,{isPresent:n,anchorX:s,root:c,children:e})),(0,f.jsx)(y.Provider,{value:m,children:e})};function Ti(){return new Map}function Ei(e=!0){let t=(0,d.useContext)(y);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,d.useId)();(0,d.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,d.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Di=e=>e.key||``;function Oi(e){let t=[];return d.Children.forEach(e,e=>{(0,d.isValidElement)(e)&&t.push(e)}),t}var ki=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,root:c})=>{let[l,u]=Ei(o),p=(0,d.useMemo)(()=>Oi(e),[e]),m=o&&!l?[]:p.map(Di),_=(0,d.useRef)(!0),y=(0,d.useRef)(p),b=g(()=>new Map),[x,S]=(0,d.useState)(p),[C,w]=(0,d.useState)(p);v(()=>{_.current=!1,y.current=p;for(let e=0;e<C.length;e++){let t=Di(C[e]);m.includes(t)?b.delete(t):b.get(t)!==!0&&b.set(t,!1)}},[C,m.length,m.join(`-`)]);let T=[];if(p!==x){let e=[...p];for(let t=0;t<C.length;t++){let n=C[t],r=Di(n);m.includes(r)||(e.splice(t,0,n),T.push(n))}return a===`wait`&&T.length&&(e=T),w(Oi(e)),S(p),null}process.env.NODE_ENV!==`production`&&a===`wait`&&C.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);let{forceRender:E}=(0,d.useContext)(h);return(0,f.jsx)(f.Fragment,{children:C.map(e=>{let d=Di(e),h=o&&!l?!1:p===C||m.includes(d);return(0,f.jsx)(wi,{isPresent:h,initial:!_.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:h?void 0:()=>{if(b.has(d))b.set(d,!0);else return;let e=!0;b.forEach(t=>{t||(e=!1)}),e&&(E?.(),w(y.current),o&&u?.(),r&&r())},anchorX:s,children:e},d)})})},Ai=(0,d.createContext)({strict:!1}),ji={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`]},Mi={};for(let e in ji)Mi[e]={isEnabled:t=>ji[e].some(e=>!!t[e])};function Ni(e){for(let t in e)Mi[t]={...Mi[t],...e[t]}}var Pi=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`.split(`.`));function Fi(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Pi.has(e)}var Ii=s({default:()=>Li}),Li,Ri=o((()=>{throw Li={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),zi=e=>!Fi(e);function Bi(e){typeof e==`function`&&(zi=t=>t.startsWith(`on`)?!Fi(t):e(t))}try{Bi((Ri(),u(Ii)).default)}catch{}function Vi(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||(zi(i)||n===!0&&Fi(i)||!t&&!Fi(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var Hi=(0,d.createContext)({});function Ui(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Wi(e){return typeof e==`string`||Array.isArray(e)}var Gi=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Ki=[`initial`,...Gi];function qi(e){return Ui(e.animate)||Ki.some(t=>Wi(e[t]))}function Ji(e){return!!(qi(e)||e.variants)}function Yi(e,t){if(qi(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Wi(t)?t:void 0,animate:Wi(n)?n:void 0}}return e.inherit===!1?{}:t}function Xi(e){let{initial:t,animate:n}=Yi(e,(0,d.useContext)(Hi));return(0,d.useMemo)(()=>({initial:t,animate:n}),[Zi(t),Zi(n)])}function Zi(e){return Array.isArray(e)?e.join(` `):e}function Qi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var $i={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(B.test(e))e=parseFloat(e);else return e;return`${Qi(e,t.target.x)}% ${Qi(e,t.target.y)}%`}},ea={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=xt.parse(e);if(i.length>5)return r;let a=xt.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=H(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},ta={borderRadius:{...$i,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:$i,borderTopRightRadius:$i,borderBottomLeftRadius:$i,borderBottomRightRadius:$i,boxShadow:ea};function na(e,{layout:t,layoutId:n}){return Mn.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!ta[e]||e===`opacity`)}var ra={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},ia=jn.length;function aa(e,t,n){let r=``,i=!0;for(let a=0;a<ia;a++){let o=jn[a],s=e[o];if(s===void 0)continue;let c=!0;if(c=typeof s==`number`?s===(o.startsWith(`scale`)?1:0):parseFloat(s)===0,!c||n){let e=Wr(s,Ir[o]);if(!c){i=!1;let t=ra[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function oa(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Mn.has(e)){o=!0;continue}else if(Re(e)){i[e]=n;continue}else{let t=Wr(n,Ir[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=aa(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var sa=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ca(e,t,n){for(let r in t)!G(t[r])&&!na(r,n)&&(e[r]=t[r])}function la({transformTemplate:e},t){return(0,d.useMemo)(()=>{let n=sa();return oa(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ua(e,t){let n=e.style||{},r={};return ca(r,n,e),Object.assign(r,la(e,t)),r}function da(e,t){let n={},r=ua(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var fa={offset:`stroke-dashoffset`,array:`stroke-dasharray`},pa={offset:`strokeDashoffset`,array:`strokeDasharray`};function ma(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?fa:pa;e[a.offset]=B.transform(-r);let o=B.transform(t),s=B.transform(n);e[a.array]=`${o} ${s}`}function ha(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(oa(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&ma(d,i,a,o,!1)}var ga=()=>({...sa(),attrs:{}}),_a=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function va(e,t,n,r){let i=(0,d.useMemo)(()=>{let n=ga();return ha(n,t,_a(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};ca(t,e.style,e),i.style={...t,...i.style}}return i}var ya=[`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 ba(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(ya.indexOf(e)>-1||/[A-Z]/u.test(e))}function xa(e,t,n,{latestValues:r},i,a=!1){let o=(ba(e)?va:da)(t,r,i,e),s=Vi(t,typeof e==`string`,a),c=e===d.Fragment?{}:{...s,...o,ref:n},{children:l}=t,u=(0,d.useMemo)(()=>G(l)?l.get():l,[l]);return(0,d.createElement)(e,{...c,children:u})}function Sa(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ca(e,t,n,r){if(typeof t==`function`){let[i,a]=Sa(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Sa(r);t=t(n===void 0?e.custom:n,i,a)}return t}function wa(e){return G(e)?e.get():e}function Ta({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Ea(n,r,i,e),renderState:t()}}function Ea(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=wa(a[e]);let{initial:o,animate:s}=e,c=qi(e),l=Ji(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Ui(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Ca(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Da=e=>(t,n)=>{let r=(0,d.useContext)(Hi),i=(0,d.useContext)(y),a=()=>Ta(e,t,r,i);return n?a():g(a)};function Oa(e,t,n){let{style:r}=e,i={};for(let a in r)(G(r[a])||t.style&&G(t.style[a])||na(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}var ka=Da({scrapeMotionValuesFromProps:Oa,createRenderState:sa});function Aa(e,t,n){let r=Oa(e,t,n);for(let n in e)if(G(e[n])||G(t[n])){let t=jn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var ja=Da({scrapeMotionValuesFromProps:Aa,createRenderState:ga}),Ma=Symbol.for(`motionComponentSymbol`);function Na(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Pa(e,t,n){return(0,d.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):Na(n)&&(n.current=r))},[t])}var Fa=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),Ia=`framerAppearId`,La=`data-`+Fa(Ia),Ra=(0,d.createContext)({});function za(e,t,n,r,i){let{visualElement:a}=(0,d.useContext)(Hi),o=(0,d.useContext)(Ai),s=(0,d.useContext)(y),c=(0,d.useContext)(vi).reducedMotion,l=(0,d.useRef)(null);r||=o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:a,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));let u=l.current,f=(0,d.useContext)(Ra);u&&!u.projection&&i&&(u.type===`html`||u.type===`svg`)&&Ba(l.current,n,i,f);let p=(0,d.useRef)(!1);(0,d.useInsertionEffect)(()=>{u&&p.current&&u.update(n,s)});let m=n[La],h=(0,d.useRef)(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return v(()=>{u&&(p.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),h.current&&u.animationState&&u.animationState.animateChanges())}),(0,d.useEffect)(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),!1),u.enteringChildren=void 0)}),u}function Ba(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Va(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Na(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function Va(e){if(e)return e.options.allowProjection===!1?Va(e.parent):e.projection}function Ha(e,{forwardMotionProps:t=!1}={},n,r){n&&Ni(n);let i=ba(e)?ja:ka;function a(a,o){let s,c={...(0,d.useContext)(vi),...a,layoutId:Ua(a)},{isStatic:l}=c,u=Xi(a),p=i(a,l);if(!l&&_){Wa(c,n);let t=Ga(c);s=t.MeasureLayout,u.visualElement=za(e,p,c,r,t.ProjectionNode)}return(0,f.jsxs)(Hi.Provider,{value:u,children:[s&&u.visualElement?(0,f.jsx)(s,{visualElement:u.visualElement,...c}):null,xa(e,a,Pa(p,u.visualElement,o),p,l,t)]})}a.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let o=(0,d.forwardRef)(a);return o[Ma]=e,o}function Ua({layoutId:e}){let t=(0,d.useContext)(h).id;return t&&e!==void 0?t+`-`+e:e}function Wa(e,t){let n=(0,d.useContext)(Ai).strict;if(process.env.NODE_ENV!==`production`&&t&&n){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?w(!1,t,`lazy-strict-mode`):T(!1,t,`lazy-strict-mode`)}}function Ga(e){let{drag:t,layout:n}=Mi;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Ka(e,t){if(typeof Proxy>`u`)return Ha;let n=new Map,r=(n,r)=>Ha(n,r,e,t);return new Proxy((e,t)=>(process.env.NODE_ENV!==`production`&&N(!1,`motion() is deprecated. Use motion.create() instead.`),r(e,t)),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Ha(a,void 0,e,t)),n.get(a))})}function qa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ja({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ya(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Xa(e){return e===void 0||e===1}function Za({scale:e,scaleX:t,scaleY:n}){return!Xa(e)||!Xa(t)||!Xa(n)}function Qa(e){return Za(e)||$a(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $a(e){return eo(e.x)||eo(e.y)}function eo(e){return e&&e!==`0%`}function to(e,t,n){return n+t*(e-n)}function no(e,t,n,r,i){return i!==void 0&&(e=to(e,i,r)),to(e,n,r)+t}function ro(e,t=0,n=1,r,i){e.min=no(e.min,t,n,r,i),e.max=no(e.max,t,n,r,i)}function io(e,{x:t,y:n}){ro(e.x,t.translate,t.scale,t.originPoint),ro(e.y,n.translate,n.scale,n.originPoint)}var ao=.999999999999,oo=1.0000000000001;function so(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&uo(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,io(e,o)),r&&Qa(a.latestValues)&&uo(e,a.latestValues))}t.x<oo&&t.x>ao&&(t.x=1),t.y<oo&&t.y>ao&&(t.y=1)}function co(e,t){e.min+=t,e.max+=t}function lo(e,t,n,r,i=.5){ro(e,t,n,H(e.min,e.max,i),r)}function uo(e,t){lo(e.x,t.x,t.scaleX,t.scale,t.originX),lo(e.y,t.y,t.scaleY,t.scale,t.originY)}function fo(e,t){return qa(Ya(e.getBoundingClientRect(),t))}function po(e,t,n){let r=fo(e,n),{scroll:i}=t;return i&&(co(r.x,i.offset.x),co(r.y,i.offset.y)),r}var mo=()=>({translate:0,scale:1,origin:0,originPoint:0}),ho=()=>({x:mo(),y:mo()}),go=()=>({min:0,max:0}),K=()=>({x:go(),y:go()}),_o={current:null},vo={current:!1};function yo(){if(vo.current=!0,_)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>_o.current=e.matches;e.addEventListener(`change`,t),t()}else _o.current=!1}var bo=new WeakMap;function xo(e,t,n){for(let r in t){let i=t[r],a=n[r];if(G(i))e.addValue(r,i);else if(G(a))e.addValue(r,Xr(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Xr(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var So=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Co=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Gn,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.renderScheduledAt=0,this.scheduleRender=()=>{let e=R.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,I.render(this.render,!1,!0))};let{latestValues:s,renderState:c}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=qi(t),this.isVariantNode=Ji(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:l,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in u){let t=u[e];s[e]!==void 0&&G(t)&&t.set(s[e])}}mount(e){this.current=e,bo.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),vo.current||yo(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:_o.current,process.env.NODE_ENV!==`production`&&N(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),Me(this.notifyUpdate),Me(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=Mn.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&I.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Mi){let t=Mi[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):K()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<So.length;t++){let n=So[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=xo(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Xr(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(ee(n)||ne(n))?n=parseFloat(n):!_i(n)&&xt.test(t)&&(n=zr(e,t)),this.setBaseTarget(e,G(n)?n.get():n)),G(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Ca(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!G(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new ae),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Zr.render(this.render)}},wo=class extends Co{constructor(){super(...arguments),this.KeyframeResolver=Hr}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;G(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function To(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Eo(e){return window.getComputedStyle(e)}var Do=class extends wo{constructor(){super(...arguments),this.type=`html`,this.renderInstance=To}readValueFromInstance(e,t){if(Mn.has(t))return this.projection?.isProjecting?Dn(t):kn(e,t);{let n=Eo(e),r=(Re(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return fo(e,t)}build(e,t,n){oa(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Oa(e,t,n)}},Oo=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 ko(e,t,n,r){for(let n in To(e,t,void 0,r),t.attrs)e.setAttribute(Oo.has(n)?n:Fa(n),t.attrs[n])}var Ao=class extends wo{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=K}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Mn.has(t)){let e=Rr(t);return e&&e.default||0}return t=Oo.has(t)?t:Fa(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Aa(e,t,n)}build(e,t,n){ha(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){ko(e,t,n,r)}mount(e){this.isSVGTag=_a(e.tagName),super.mount(e)}},jo=(e,t)=>ba(e)?new Ao(t):new Do(t,{allowProjection:e!==d.Fragment});function Mo(e,t,n){let r=e.getProps();return Ca(r,t,n===void 0?r.custom:n,e)}var No=e=>Array.isArray(e);function Po(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xr(n))}function Fo(e){return No(e)?e[e.length-1]||0:e}function Io(e,t){let{transitionEnd:n={},transition:r={},...i}=Mo(e,t)||{};for(let t in i={...i,...n},i)Po(e,t,Fo(i[t]))}function Lo(e){return!!(G(e)&&e.add)}function Ro(e,t){let n=e.getValue(`willChange`);if(Lo(n))return n.add(t);if(!n&&E.WillChange){let n=new E.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function zo(e){return e.props[La]}var Bo=e=>e!==null;function Vo(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(Bo),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var Ho={type:`spring`,stiffness:500,damping:25,restSpeed:10},Uo=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Wo={type:`keyframes`,duration:.8},Go={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Ko=(e,{keyframes:t})=>t.length>2?Wo:Mn.has(e)?e.startsWith(`scale`)?Uo(t[1]):Ho:Go;function qo({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}var Jo=(e,t,n,r={},i,a)=>o=>{let s=Cr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=A(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};qo(s)||Object.assign(u,Ko(e,u)),u.duration&&=A(u.duration),u.repeatDelay&&=A(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(pr(u),u.delay===0&&(d=!0)),(E.instantAnimations||E.skipAnimations)&&(d=!0,pr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Vo(u.keyframes,s);if(e!==void 0){I.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new _n(u):new vr(u)};function Yo({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Xo(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&Yo(l,t))continue;let o={delay:n,...Cr(a||{},t)},u=r.get();if(u!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===u&&!o.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let n=zo(e);if(n){let e=window.MotionHandoffAnimation(n,t,I);e!==null&&(o.startTime=e,d=!0)}}Ro(e,t),r.start(Jo(t,r,i,e.shouldReduceMotion&&wr.has(t)?{type:!1}:o,e,d));let f=r.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{I.update(()=>{o&&Io(e,o)})}),c}function Zo(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function Qo(e,t,n={}){let r=Mo(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Xo(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return $o(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function $o(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Qo(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Zo(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function es(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Qo(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Qo(e,t,n);else{let i=typeof t==`function`?Mo(e,t,n.custom):t;r=Promise.all(Xo(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function ts(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var ns=Ki.length;function rs(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&rs(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<ns;n++){let r=Ki[n],i=e.props[r];(Wi(i)||i===!1)&&(t[r]=i)}return t}var is=[...Gi].reverse(),as=Gi.length;function os(e){return t=>Promise.all(t.map(({animation:t,options:n})=>es(e,t,n)))}function ss(e){let t=os(e),n=us(),r=!0,i=t=>(n,r)=>{let i=Mo(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=rs(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<as;t++){let f=is[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=Wi(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||Ui(m)||typeof m==`boolean`)continue;let v=cs(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},T=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=No(t)&&No(n)?!ts(t,n):t!==n,r?t==null?l.add(e):T(e):t!==void 0&&l.has(e)?T(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1);let E=_&&v;y&&(!E||b)&&c.push(...x.map(t=>{let n={type:f};if(typeof t==`string`&&r&&!E&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=Mo(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Zo(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=Mo(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=us()}}}function cs(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!ts(t,e):!1}function ls(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function us(){return{animate:ls(!0),whileInView:ls(),whileHover:ls(),whileTap:ls(),whileDrag:ls(),whileFocus:ls(),exit:ls()}}var ds=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},fs=class extends ds{constructor(e){super(e),e.animationState||=ss(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Ui(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},ps=0,ms=class extends ds{constructor(){super(...arguments),this.id=ps++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}},hs={animation:{Feature:fs},exit:{Feature:ms}};function gs(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function _s(e){return{point:{x:e.pageX,y:e.pageY}}}var vs=e=>t=>ai(t)&&e(t,_s(t));function ys(e,t,n,r){return gs(e,t,vs(n),r)}var bs=1e-4,xs=1-bs,Ss=1+bs,Cs=.01,ws=0-Cs,Ts=0+Cs;function q(e){return e.max-e.min}function Es(e,t,n){return Math.abs(e-t)<=n}function Ds(e,t,n,r=.5){e.origin=r,e.originPoint=H(t.min,t.max,e.origin),e.scale=q(n)/q(t),e.translate=H(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xs&&e.scale<=Ss||isNaN(e.scale))&&(e.scale=1),(e.translate>=ws&&e.translate<=Ts||isNaN(e.translate))&&(e.translate=0)}function Os(e,t,n,r){Ds(e.x,t.x,n.x,r?r.originX:void 0),Ds(e.y,t.y,n.y,r?r.originY:void 0)}function ks(e,t,n){e.min=n.min+t.min,e.max=e.min+q(t)}function As(e,t,n){ks(e.x,t.x,n.x),ks(e.y,t.y,n.y)}function js(e,t,n){e.min=t.min-n.min,e.max=e.min+q(t)}function Ms(e,t,n){js(e.x,t.x,n.x),js(e.y,t.y,n.y)}function J(e){return[e(`x`),e(`y`)]}var Ns=({current:e})=>e?e.ownerDocument.defaultView:null,Ps=(e,t)=>Math.abs(e-t);function Fs(e,t){let n=Ps(e.x,t.x),r=Ps(e.y,t.y);return Math.sqrt(n**2+r**2)}var Is=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=zs(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Fs(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=L;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Ls(t,this.transformPagePoint),I.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=zs(e.type===`pointercancel`?this.lastMoveEventInfo:Ls(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!ai(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let o=Ls(_s(e),this.transformPagePoint),{point:s}=o,{timestamp:c}=L;this.history=[{...s,timestamp:c}];let{onSessionStart:l}=t;l&&l(e,zs(o,this.history)),this.removeListeners=O(ys(this.contextWindow,`pointermove`,this.handlePointerMove),ys(this.contextWindow,`pointerup`,this.handlePointerUp),ys(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Me(this.updatePoint)}};function Ls(e,t){return t?{point:t(e.point)}:e}function Rs(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zs({point:e},t){return{point:e,delta:Rs(e,Vs(t)),offset:Rs(e,Bs(t)),velocity:Hs(t,.1)}}function Bs(e){return e[0]}function Vs(e){return e[e.length-1]}function Hs(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Vs(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>A(t)));)n--;if(!r)return{x:0,y:0};let a=j(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Us(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?H(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?H(n,e,r.max):Math.min(e,n)),e}function Ws(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Gs(e,{top:t,left:n,bottom:r,right:i}){return{x:Ws(e.x,n,i),y:Ws(e.y,t,r)}}function Ks(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function qs(e,t){return{x:Ks(e.x,t.x),y:Ks(e.y,t.y)}}function Js(e,t){let n=.5,r=q(e),i=q(t);return i>r?n=k(t.min,t.max-r,e.min):r>i&&(n=k(e.min,e.max-i,t.min)),S(0,1,n)}function Ys(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Xs=.35;function Zs(e=Xs){return e===!1?e=0:e===!0&&(e=Xs),{x:Qs(e,`left`,`right`),y:Qs(e,`top`,`bottom`)}}function Qs(e,t,n){return{min:$s(e,t),max:$s(e,n)}}function $s(e,t){return typeof e==`number`?e:e[t]||0}var ec=new WeakMap,tc=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=K(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(_s(e).point)},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ei(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),J(e=>{let t=this.getAxisMotionValue(e).get()||0;if(z.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=q(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&I.postRender(()=>i(e,t)),Ro(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=rc(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>J(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:l}=this.getProps();this.panSession=new Is(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Ns(this.visualElement)})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&I.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!nc(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Us(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Na(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Gs(n.layoutBox,e):this.constraints=!1,this.elastic=Zs(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&J(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Ys(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Na(e))return!1;let n=e.current;T(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.",`drag-constraints-ref`);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=po(n,r.root,this.visualElement.getTransformPagePoint()),a=qs(r.layout.layoutBox,i);if(t){let e=t(Ja(a));this.hasMutatedConstraints=!!e,e&&(a=qa(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=J(o=>{if(!nc(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Ro(this.visualElement,e),n.start(Jo(e,n,0,t,this.visualElement,!1))}stopAnimation(){J(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){J(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){J(t=>{let{drag:n}=this.getProps();if(!nc(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-H(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Na(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};J(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Js({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),J(t=>{if(!nc(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(H(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;ec.set(this.visualElement,this);let e=this.visualElement.current,t=ys(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();Na(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),I.read(n);let a=gs(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(J(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Xs,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function nc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function rc(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var ic=class extends ds{constructor(e){super(e),this.removeGroupControls=D,this.removeListeners=D,this.controls=new tc(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||D}unmount(){this.removeGroupControls(),this.removeListeners()}},ac=e=>(t,n)=>{e&&I.postRender(()=>e(t,n))},oc=class extends ds{constructor(){super(...arguments),this.removePointerDownListener=D}onPointerDown(e){this.session=new Is(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ns(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ac(e),onStart:ac(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&I.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ys(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},sc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},cc=!1,lc=class extends d.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),cc&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),sc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,cc=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||I.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Zr.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;cc=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function uc(e){let[t,n]=Ei(),r=(0,d.useContext)(h);return(0,f.jsx)(lc,{...e,layoutGroup:r,switchLayoutGroup:(0,d.useContext)(Ra),isPresent:t,safeToRemove:n})}function dc(e,t,n){let r=G(e)?e:Xr(e);return r.start(Jo(``,r,t,n)),r.animation}var fc=(e,t)=>e.depth-t.depth,pc=class{constructor(){this.children=[],this.isDirty=!1}add(e){b(this.children,e),this.isDirty=!0}remove(e){x(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(fc),this.isDirty=!1,this.children.forEach(e)}};function mc(e,t){let n=R.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(Me(r),e(a-t))};return I.setup(r,!0),()=>Me(r)}var hc=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],gc=hc.length,_c=e=>typeof e==`string`?parseFloat(e):e,vc=e=>typeof e==`number`||B.test(e);function yc(e,t,n,r,i,a){i?(e.opacity=H(0,n.opacity??1,xc(r)),e.opacityExit=H(t.opacity??1,0,Sc(r))):a&&(e.opacity=H(t.opacity??1,n.opacity??1,r));for(let i=0;i<gc;i++){let a=`border${hc[i]}Radius`,o=bc(t,a),s=bc(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||vc(o)===vc(s)?(e[a]=Math.max(H(_c(o),_c(s),r),0),(z.test(s)||z.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=H(t.rotate||0,n.rotate||0,r))}function bc(e,t){return e[t]===void 0?e.borderRadius:e[t]}var xc=Cc(0,.5,ve),Sc=Cc(.5,.95,D);function Cc(e,t,n){return r=>r<e?0:r>t?1:n(k(e,t,r))}function wc(e,t){e.min=t.min,e.max=t.max}function Y(e,t){wc(e.x,t.x),wc(e.y,t.y)}function Tc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ec(e,t,n,r,i){return e-=t,e=to(e,1/n,r),i!==void 0&&(e=to(e,1/i,r)),e}function Dc(e,t=0,n=1,r=.5,i,a=e,o=e){if(z.test(t)&&(t=parseFloat(t),t=H(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=H(a.min,a.max,r);e===a&&(s-=t),e.min=Ec(e.min,t,n,s,i),e.max=Ec(e.max,t,n,s,i)}function Oc(e,t,[n,r,i],a,o){Dc(e,t[n],t[r],t[i],t.scale,a,o)}var kc=[`x`,`scaleX`,`originX`],Ac=[`y`,`scaleY`,`originY`];function jc(e,t,n,r){Oc(e.x,t,kc,n?n.x:void 0,r?r.x:void 0),Oc(e.y,t,Ac,n?n.y:void 0,r?r.y:void 0)}function Mc(e){return e.translate===0&&e.scale===1}function Nc(e){return Mc(e.x)&&Mc(e.y)}function Pc(e,t){return e.min===t.min&&e.max===t.max}function Fc(e,t){return Pc(e.x,t.x)&&Pc(e.y,t.y)}function Ic(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Lc(e,t){return Ic(e.x,t.x)&&Ic(e.y,t.y)}function Rc(e){return q(e.x)/q(e.y)}function zc(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Bc=class{constructor(){this.members=[]}add(e){b(this.members,e),e.scheduleRender()}remove(e){if(x(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function Vc(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Hc={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Uc=[``,`X`,`Y`,`Z`],Wc=1e3,Gc=0;function Kc(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function qc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=zo(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,I,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&qc(r)}function Jc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Gc++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,F.value&&(Hc.nodes=Hc.calculatedTargetDeltas=Hc.calculatedProjections=0),this.nodes.forEach(Zc),this.nodes.forEach(il),this.nodes.forEach(al),this.nodes.forEach(Qc),F.addProjectionMetrics&&F.addProjectionMetrics(Hc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new pc)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ae),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=mi(t)&&!hi(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;I.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=mc(i,250),sc.hasAnimatedSinceResize&&(sc.hasAnimatedSinceResize=!1,this.nodes.forEach(rl)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||fl,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Lc(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Cr(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||rl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Me(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(ol),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&qc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(el);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(tl);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nl),this.nodes.forEach(Yc),this.nodes.forEach(Xc)):this.nodes.forEach(tl),this.clearAllSnapshots();let e=R.now();L.delta=S(0,1e3/60,e-L.timestamp),L.timestamp=e,L.isProcessing=!0,Ne.update.process(L),Ne.preRender.process(L),Ne.render.process(L),L.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($c),this.sharedNodes.forEach(sl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,I.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){I.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!q(this.snapshot.measuredBox.x)&&!q(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=K(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Nc(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Qa(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),gl(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return K();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(vl))){let{scroll:e}=this.root;e&&(co(t.x,e.offset.x),co(t.y,e.offset.y))}return t}removeElementScroll(e){let t=K();if(Y(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Y(t,e),co(t.x,i.offset.x),co(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=K();Y(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&uo(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Qa(r.latestValues)&&uo(n,r.latestValues)}return Qa(this.latestValues)&&uo(n,this.latestValues),n}removeTransform(e){let t=K();Y(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!Qa(n.latestValues))continue;Za(n.latestValues)&&n.updateSnapshot();let r=K();Y(r,n.measurePageBox()),jc(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Qa(this.latestValues)&&jc(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==L.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=L.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=K(),this.targetWithTransforms=K()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),As(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Y(this.target,this.layout.layoutBox),io(this.target,this.targetDelta)):Y(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),F.value&&Hc.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Za(this.parent.latestValues)||$a(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=K(),this.relativeTargetOrigin=K(),Ms(this.relativeTargetOrigin,t,n),Y(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===L.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Y(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;so(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=K());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Tc(this.prevProjectionDelta.x,this.projectionDelta.x),Tc(this.prevProjectionDelta.y,this.projectionDelta.y)),Os(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!zc(this.projectionDelta.x,this.prevProjectionDelta.x)||!zc(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),F.value&&Hc.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ho(),this.projectionDelta=ho(),this.projectionDeltaWithTransform=ho()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=ho();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=K(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(dl));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;cl(a.x,e.x,n),cl(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ms(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ul(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Fc(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=K(),Y(d,this.relativeTarget)),s&&(this.animationValues=i,yc(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(Me(this.pendingAnimation),void 0),this.pendingAnimation=I.update(()=>{sc.hasAnimatedSinceResize=!0,Ie.layout++,this.motionValue||=Xr(0),this.currentAnimation=dc(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Ie.layout--},onComplete:()=>{Ie.layout--,e.onComplete&&e.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);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Wc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&_l(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||K();let t=q(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=q(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Y(t,n),uo(t,i),Os(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Bc),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Kc(`z`,e,r,this.animationValues);for(let t=0;t<Uc.length;t++)Kc(`rotate${Uc[t]}`,e,r,this.animationValues),Kc(`skew${Uc[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=wa(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=wa(t?.pointerEvents)||``),this.hasProjected&&!Qa(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Vc(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;for(let t in e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit,ta){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=ta[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?wa(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(el),this.root.sharedNodes.clear()}}}function Yc(e){e.updateLayout()}function Xc(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?J(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=q(r);r.min=n[e].min,r.max=r.min+i}):_l(i,t.layoutBox,n)&&J(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=q(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=ho();Os(o,n,t.layoutBox);let s=ho();a?Os(s,e.applyTransform(r,!0),t.measuredBox):Os(s,n,t.layoutBox);let c=!Nc(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=K();Ms(o,t.layoutBox,i.layoutBox);let s=K();Ms(s,n,a.layoutBox),Lc(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Zc(e){F.value&&Hc.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Qc(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function $c(e){e.clearSnapshot()}function el(e){e.clearMeasurements()}function tl(e){e.isLayoutDirty=!1}function nl(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function rl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function il(e){e.resolveTargetDelta()}function al(e){e.calcProjection()}function ol(e){e.resetSkewAndRotation()}function sl(e){e.removeLeadSnapshot()}function cl(e,t,n){e.translate=H(t.translate,0,n),e.scale=H(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ll(e,t,n,r){e.min=H(t.min,n.min,r),e.max=H(t.max,n.max,r)}function ul(e,t,n,r){ll(e.x,t.x,n.x,r),ll(e.y,t.y,n.y,r)}function dl(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var fl={duration:.45,ease:[.4,0,.1,1]},pl=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ml=pl(`applewebkit/`)&&!pl(`chrome/`)?Math.round:D;function hl(e){e.min=ml(e.min),e.max=ml(e.max)}function gl(e){hl(e.x),hl(e.y)}function _l(e,t,n){return e===`position`||e===`preserve-aspect`&&!Es(Rc(t),Rc(n),.2)}function vl(e){return e!==e.root&&e.scroll?.wasRoot}var yl=Jc({attachResizeListener:(e,t)=>gs(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),bl={current:void 0},xl=Jc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bl.current){let e=new yl({});e.mount(window),e.setOptions({layoutScroll:!0}),bl.current=e}return bl.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Sl={pan:{Feature:oc},drag:{Feature:ic,ProjectionNode:xl,MeasureLayout:uc}};function Cl(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&I.postRender(()=>i(t,_s(t)))}var wl=class extends ds{mount(){let{current:e}=this.node;e&&(this.unmount=ri(e,(e,t)=>(Cl(this.node,t,`Start`),e=>Cl(this.node,e,`End`))))}unmount(){}},Tl=class extends ds{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!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=O(gs(this.node.current,`focus`,()=>this.onFocus()),gs(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function El(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&I.postRender(()=>i(t,_s(t)))}var Dl=class extends ds{mount(){let{current:e}=this.node;e&&(this.unmount=pi(e,(e,t)=>(El(this.node,t,`Start`),(e,{success:t})=>El(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},Ol=new WeakMap,kl=new WeakMap,Al=e=>{let t=Ol.get(e.target);t&&t(e)},jl=e=>{e.forEach(Al)};function Ml({root:e,...t}){let n=e||document;kl.has(n)||kl.set(n,{});let r=kl.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(jl,{root:e,...t})),r[i]}function Nl(e,t,n){let r=Ml(t);return Ol.set(e,n),r.observe(e),()=>{Ol.delete(e),r.unobserve(e)}}var Pl={some:0,all:1},Fl=class extends ds{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Pl[r]};return Nl(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Il(e,t))&&this.startObserver()}unmount(){}};function Il({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Ll={inView:{Feature:Fl},tap:{Feature:Dl},focus:{Feature:Tl},hover:{Feature:wl}},Rl={layout:{ProjectionNode:xl,MeasureLayout:uc}},zl={...hs,...Ll,...Sl,...Rl},Bl=Ka(zl,jo),Vl=e=>{let{defaultExpand:t,title:n,children:r,onClear:i}=e,[a,o]=(0,d.useState)(t??!1),s=p.SquarePlus,c=p.SquareMinus,l=p.BrushCleaning??p.Eraser??p.Trash2??p.X;return(0,f.jsxs)(`div`,{className:`text-sm`,children:[(0,f.jsxs)(`div`,{className:`flex items-center justify-between cursor-pointer`,onClick:()=>{o(e=>!e)},children:[(0,f.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,f.jsxs)(`div`,{className:`relative size-4 children:absolute children:inset-0`,children:[(0,f.jsx)(Bl.div,{initial:{opacity:1},animate:{opacity:a?0:1},children:s?(0,f.jsx)(s,{className:`size-4`}):null}),(0,f.jsx)(Bl.div,{initial:{opacity:0},animate:{opacity:a?1:0},children:c?(0,f.jsx)(c,{className:`size-4`}):null})]}),(0,f.jsx)(`span`,{children:n})]}),l?(0,f.jsx)(l,{className:`size-4`,onClick:e=>{e.stopPropagation(),i?.(e)}}):null]}),(0,f.jsx)(Bl.div,{initial:{height:0,opacity:0},animate:{height:a?`auto`:0,opacity:a?1:0},className:`overflow-hidden`,children:(0,f.jsx)(`div`,{className:`pt-4`,children:r})})]})},Hl=Vl;function Ul(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ul(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Wl(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ul(e))&&(r&&(r+=` `),r+=t);return r}var Gl=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Kl=(e,t)=>({classGroupId:e,validator:t}),ql=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Jl=`-`,Yl=[],Xl=`arbitrary..`,Zl=e=>{let t=eu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return $l(e);let n=e.split(Jl);return Ql(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Gl(i,t):t:i||Yl}return n[e]||Yl}}},Ql=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Ql(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Jl):e.slice(t).join(Jl),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},$l=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Xl+r:void 0})(),eu=e=>{let{theme:t,classGroups:n}=e;return tu(n,t)},tu=(e,t)=>{let n=ql();for(let r in e){let i=e[r];nu(i,n,r,t)}return n},nu=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];ru(i,t,n,r)}},ru=(e,t,n,r)=>{if(typeof e==`string`){iu(e,t,n);return}if(typeof e==`function`){au(e,t,n,r);return}ou(e,t,n,r)},iu=(e,t,n)=>{let r=e===``?t:su(t,e);r.classGroupId=n},au=(e,t,n,r)=>{if(cu(e)){nu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Kl(n,e))},ou=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];nu(o,su(t,a),n,r)}},su=(e,t)=>{let n=e,r=t.split(Jl),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=ql(),n.nextPart.set(t,i)),n=i}return n},cu=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,lu=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},uu=`!`,du=`:`,fu=[],pu=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),mu=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===du){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(uu)?(c=s.slice(0,-1),l=!0):s.startsWith(uu)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return pu(t,l,c,u)};if(t){let e=t+du,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):pu(fu,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},hu=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},gu=e=>({cache:lu(e.cacheSize),parseClassName:mu(e),sortModifiers:hu(e),...Zl(e)}),_u=/\s+/,vu=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(_u),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+uu:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},yu=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=bu(n))&&(i&&(i+=` `),i+=r);return i},bu=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=bu(e[r]))&&(n&&(n+=` `),n+=t);return n},xu=(e,...t)=>{let n,r,i,a,o=o=>(n=gu(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=vu(e,n);return i(e,a),a};return a=o,(...e)=>a(yu(...e))},Su=[],X=e=>{let t=t=>t[e]||Su;return t.isThemeGetter=!0,t},Cu=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tu=/^\d+\/\d+$/,Eu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Du=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ou=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ku=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Au=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ju=e=>Tu.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),Mu=e=>!!e&&Number.isInteger(Number(e)),Nu=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),Pu=e=>Eu.test(e),Fu=()=>!0,Iu=e=>Du.test(e)&&!Ou.test(e),Lu=()=>!1,Ru=e=>ku.test(e),zu=e=>Au.test(e),Bu=e=>!Q(e)&&!$(e),Vu=e=>$u(e,rd,Lu),Q=e=>Cu.test(e),Hu=e=>$u(e,id,Iu),Uu=e=>$u(e,ad,Z),Wu=e=>$u(e,td,Lu),Gu=e=>$u(e,nd,zu),Ku=e=>$u(e,sd,Ru),$=e=>wu.test(e),qu=e=>ed(e,id),Ju=e=>ed(e,od),Yu=e=>ed(e,td),Xu=e=>ed(e,rd),Zu=e=>ed(e,nd),Qu=e=>ed(e,sd,!0),$u=(e,t,n)=>{let r=Cu.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ed=(e,t,n=!1)=>{let r=wu.exec(e);return r?r[1]?t(r[1]):n:!1},td=e=>e===`position`||e===`percentage`,nd=e=>e===`image`||e===`url`,rd=e=>e===`length`||e===`size`||e===`bg-size`,id=e=>e===`length`,ad=e=>e===`number`,od=e=>e===`family-name`,sd=e=>e===`shadow`,cd=()=>{let e=X(`color`),t=X(`font`),n=X(`text`),r=X(`font-weight`),i=X(`tracking`),a=X(`leading`),o=X(`breakpoint`),s=X(`container`),c=X(`spacing`),l=X(`radius`),u=X(`shadow`),d=X(`inset-shadow`),f=X(`text-shadow`),p=X(`drop-shadow`),m=X(`blur`),h=X(`perspective`),g=X(`aspect`),_=X(`ease`),v=X(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[ju,`full`,`auto`,...w()],E=()=>[Mu,`none`,`subgrid`,$,Q],ee=()=>[`auto`,{span:[`full`,Mu,$,Q]},Mu,$,Q],te=()=>[Mu,`auto`,$,Q],ne=()=>[`auto`,`min`,`max`,`fr`,$,Q],re=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],D=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ie=()=>[`auto`,...w()],O=()=>[ju,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],k=()=>[e,$,Q],ae=()=>[...b(),Yu,Wu,{position:[$,Q]}],A=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],j=()=>[`auto`,`cover`,`contain`,Xu,Vu,{size:[$,Q]}],oe=()=>[Nu,qu,Hu],M=()=>[``,`none`,`full`,l,$,Q],N=()=>[``,Z,qu,Hu],se=()=>[`solid`,`dashed`,`dotted`,`double`],ce=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],P=()=>[Z,Nu,Yu,Wu],le=()=>[``,`none`,m,$,Q],ue=()=>[`none`,Z,$,Q],de=()=>[`none`,Z,$,Q],fe=()=>[Z,$,Q],pe=()=>[ju,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Pu],breakpoint:[Pu],color:[Fu],container:[Pu],"drop-shadow":[Pu],ease:[`in`,`out`,`in-out`],font:[Bu],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Pu],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Pu],shadow:[Pu],spacing:[`px`,Z],text:[Pu],"text-shadow":[Pu],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ju,Q,$,g]}],container:[`container`],columns:[{columns:[Z,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Mu,`auto`,$,Q]}],basis:[{basis:[ju,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,ju,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[Mu,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...re(),`normal`]}],"justify-items":[{"justify-items":[...D(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...D()]}],"align-content":[{content:[`normal`,...re()]}],"align-items":[{items:[...D(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...D(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...D(),`baseline`]}],"place-self":[{"place-self":[`auto`,...D()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:O()}],w:[{w:[s,`screen`,...O()]}],"min-w":[{"min-w":[s,`screen`,`none`,...O()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...O()]}],h:[{h:[`screen`,`lh`,...O()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...O()]}],"max-h":[{"max-h":[`screen`,`lh`,...O()]}],"font-size":[{text:[`base`,n,qu,Hu]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,$,Uu]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Nu,Q]}],"font-family":[{font:[Ju,Q,t]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,$,Q]}],"line-clamp":[{"line-clamp":[Z,`none`,$,Uu]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...se(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,Hu]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[Z,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:A()}],"bg-size":[{bg:j()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Mu,$,Q],radial:[``,$,Q],conic:[Mu,$,Q]},Zu,Gu]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:N()}],"border-w-x":[{"border-x":N()}],"border-w-y":[{"border-y":N()}],"border-w-s":[{"border-s":N()}],"border-w-e":[{"border-e":N()}],"border-w-t":[{"border-t":N()}],"border-w-r":[{"border-r":N()}],"border-w-b":[{"border-b":N()}],"border-w-l":[{"border-l":N()}],"divide-x":[{"divide-x":N()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":N()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...se(),`hidden`,`none`]}],"divide-style":[{divide:[...se(),`hidden`,`none`]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...se(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,qu,Hu]}],"outline-color":[{outline:k()}],shadow:[{shadow:[``,`none`,u,Qu,Ku]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":[`none`,d,Qu,Ku]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:N()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[Z,Hu]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":N()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":[`none`,f,Qu,Ku]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...ce(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":P()}],"mask-image-linear-to-pos":[{"mask-linear-to":P()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":P()}],"mask-image-t-to-pos":[{"mask-t-to":P()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":P()}],"mask-image-r-to-pos":[{"mask-r-to":P()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":P()}],"mask-image-b-to-pos":[{"mask-b-to":P()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":P()}],"mask-image-l-to-pos":[{"mask-l-to":P()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":P()}],"mask-image-x-to-pos":[{"mask-x-to":P()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":P()}],"mask-image-y-to-pos":[{"mask-y-to":P()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":P()}],"mask-image-radial-to-pos":[{"mask-radial-to":P()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":P()}],"mask-image-conic-to-pos":[{"mask-conic-to":P()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:A()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:le()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Qu,Ku]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:[``,Z,$,Q]}],"hue-rotate":[{"hue-rotate":[Z,$,Q]}],invert:[{invert:[``,Z,$,Q]}],saturate:[{saturate:[Z,$,Q]}],sepia:[{sepia:[``,Z,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Z,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Z,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,Z,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Z,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Z,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[Z,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],accent:[{accent:k()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,$,Q]}],fill:[{fill:[`none`,...k()]}],"stroke-w":[{stroke:[Z,qu,Hu,Uu]}],stroke:[{stroke:[`none`,...k()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},ld=xu(cd);const ud=(...e)=>ld(Wl(e));var dd=e=>{let{value:t,options:n,onChange:r,...i}=e,a=n.filter(e=>!e.icon),o=n.filter(e=>e.icon),s=e=>{t.includes(e)?r?.(t.filter(t=>t!==e)):r?.([...t,e])};return(0,f.jsxs)(Hl,{...i,children:[(0,f.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:a.map(e=>{let{label:n,value:r}=e;return(0,f.jsx)(`div`,{className:ud(`inline-flex items-center h-6 px-3 cursor-pointer b-default rounded-full hover:border-primary transition-colors`,{"border-primary bg-primary-bg":t.includes(r)}),onClick:()=>{s(r)},children:n},r)})}),(0,f.jsx)(`div`,{className:`flex flex-wrap gap-2 mt-2`,children:o.map(e=>{let{label:n,value:r,icon:i}=e;return(0,f.jsx)(`div`,{className:ud(`size-12 rounded-full overflow-hidden cursor-pointer b-default b-2 border-transparent hover:border-primary transition-colors`,{"border-primary":t.includes(r)}),onClick:()=>{s(r)},children:(0,f.jsx)(`img`,{src:i,alt:n,className:`size-full`})},r)})})]})},fd=dd,pd=e=>{let{options:t,value:n,onChange:r,...i}=e,[a,o]=(0,d.useState)(!1),s=e=>(0,f.jsx)(`div`,{className:`flex flex-col gap-4`,children:e.map(e=>{let{label:t,value:i,icon:a,count:o}=e;return(0,f.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,f.jsx)(m.Checkbox,{className:`inline-flex items-center`,checked:n.includes(i),onChange:e=>{e.target.checked?r?.([...n,i]):r?.(n.filter(e=>e!==i))},children:(0,f.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,f.jsx)(`img`,{src:a,alt:t,className:`size-4`}),(0,f.jsx)(`span`,{children:t})]})}),(0,f.jsx)(`span`,{children:o})]},i)})}),c=()=>{o(e=>!e)};return(0,f.jsxs)(Hl,{...i,children:[s(t.slice(0,5)),(0,f.jsx)(ki,{children:a&&(0,f.jsx)(Bl.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},className:`overflow-hidden`,children:(0,f.jsx)(`div`,{className:`mt-4`,children:s(t.slice(5))})})}),t.length>5&&(0,f.jsxs)(`div`,{className:`inline-flex items-center mt-4 text-primary cursor-pointer`,onClick:c,children:[(0,f.jsx)(`span`,{children:`更多`}),(0,f.jsx)(p.ChevronDown,{className:ud(`size-4 transition`,{"-scale-y-100":a})})]})]})},md=pd,hd=e=>(0,f.jsx)(Hl,{...e,children:(0,f.jsx)(`div`,{className:`px-0.5 pb-0.5`,children:(0,f.jsx)(m.Select,{className:`w-full`,...e})})}),gd=hd,_d=[`#FF0000`,`#FFA500`,`#FFFF00`,`#00FF00`,`#00FFFF`,`#0000FF`,`#8000FF`,`#FF00FF`,`#FFFFFF`,`#808080`,`#000000`,`#964B00`],vd=e=>{let{presets:t,...n}=e;return(0,f.jsx)(Hl,{...e,children:(0,f.jsx)(m.ColorPicker,{presets:[{label:`预设颜色`,colors:_d},...t??[]],...n})})},yd=vd,bd=e=>(0,f.jsx)(Hl,{...e,children:(0,f.jsx)(`div`,{className:`px-2`,children:(0,f.jsx)(m.Slider,{...e})})}),xd=bd,Sd=e=>(0,f.jsx)(Hl,{...e,children:(0,f.jsx)(`div`,{className:`px-0.5 pb-0.5`,children:(0,f.jsx)(m.Input,{...e})})}),Cd=Sd;exports.FilterCheckboxGroup=md,exports.FilterCollapse=Hl,exports.FilterColorPicker=yd,exports.FilterInput=Cd,exports.FilterSelect=gd,exports.FilterSlider=xd,exports.FilterTags=fd;
|
package/dist/filter.js
CHANGED
|
@@ -6074,6 +6074,7 @@ var FilterTags_default = (t) => {
|
|
|
6074
6074
|
return /* @__PURE__ */ jsxs("div", {
|
|
6075
6075
|
className: "flex items-center justify-between",
|
|
6076
6076
|
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
6077
|
+
className: "inline-flex items-center",
|
|
6077
6078
|
checked: s.includes(l),
|
|
6078
6079
|
onChange: (t) => {
|
|
6079
6080
|
t.target.checked ? c?.([...s, l]) : c?.(s.filter((t) => t !== l));
|