@dss-kit/ui-kit 0.2.29 → 0.2.30

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.
@@ -31,7 +31,7 @@
31
31
  ${g}px !important;
32
32
  top: ${f}px !important;
33
33
  }
34
- `),()=>{m.contains(p)&&m.removeChild(p)}},[t]),C.jsx(WE,{isPresent:t,childRef:i,sizeRef:s,children:M.cloneElement(e,{ref:l})})}const UE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s,anchorX:a,root:l})=>{const c=Tf(GE),u=S.useId();let f=!0,d=S.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:o,onExitComplete:h=>{c.set(h,!0);for(const g of c.values())if(!g)return;r&&r()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,r]);return i&&f&&(d={...d}),S.useMemo(()=>{c.forEach((h,g)=>c.set(g,!1))},[n]),M.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),s==="popLayout"&&(e=C.jsx(KE,{isPresent:n,anchorX:a,root:l,children:e})),C.jsx(Il.Provider,{value:d,children:e})};function GE(){return new Map}function Mx(e=!0){const t=S.useContext(Il);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const s=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const ga=e=>e.key||"";function ap(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Nx=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:s=!1,anchorX:a="left",root:l})=>{const[c,u]=Mx(s),f=S.useMemo(()=>ap(e),[e]),d=s&&!c?[]:f.map(ga),h=S.useRef(!0),g=S.useRef(f),p=Tf(()=>new Map),[m,x]=S.useState(f),[y,v]=S.useState(f);D0(()=>{h.current=!1,g.current=f;for(let _=0;_<y.length;_++){const E=ga(y[_]);d.includes(E)?p.delete(E):p.get(E)!==!0&&p.set(E,!1)}},[y,d.length,d.join("-")]);const b=[];if(f!==m){let _=[...f];for(let E=0;E<y.length;E++){const T=y[E],k=ga(T);d.includes(k)||(_.splice(E,0,T),b.push(T))}return i==="wait"&&b.length&&(_=b),v(ap(_)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&y.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.`);const{forceRender:w}=S.useContext(_f);return C.jsx(C.Fragment,{children:y.map(_=>{const E=ga(_),T=s&&!c?!1:f===y||d.includes(E),k=()=>{if(p.has(E))p.set(E,!0);else return;let P=!0;p.forEach(O=>{O||(P=!1)}),P&&(w?.(),v(g.current),s&&u?.(),r&&r())};return C.jsx(UE,{isPresent:T,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:l,onExitComplete:T?void 0:k,anchorX:a,children:_},E)})})},Px=S.createContext({strict:!1}),lp={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"]},Ci={};for(const e in lp)Ci[e]={isEnabled:t=>lp[e].some(n=>!!t[n])};function qE(e){for(const t in e)Ci[t]={...Ci[t],...e[t]}}const YE=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function al(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||YE.has(e)}let Lx=e=>!al(e);function XE(e){typeof e=="function"&&(Lx=t=>t.startsWith("on")?!al(t):e(t))}try{XE(require("@emotion/is-prop-valid").default)}catch{}function ZE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Lx(o)||n===!0&&al(o)||!t&&!al(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Dl=S.createContext({});function jl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function As(e){return typeof e=="string"||Array.isArray(e)}const qf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Yf=["initial",...qf];function Vl(e){return jl(e.animate)||Yf.some(t=>As(e[t]))}function Fx(e){return!!(Vl(e)||e.variants)}function JE(e,t){if(Vl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||As(n)?n:void 0,animate:As(r)?r:void 0}}return e.inherit!==!1?t:{}}function QE(e){const{initial:t,animate:n}=JE(e,S.useContext(Dl));return S.useMemo(()=>({initial:t,animate:n}),[cp(t),cp(n)])}function cp(e){return Array.isArray(e)?e.join(" "):e}function up(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Xi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(he.test(e))e=parseFloat(e);else return e;const n=up(e,t.target.x),r=up(e,t.target.y);return`${n}% ${r}%`}},e2={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Or.parse(e);if(o.length>5)return r;const i=Or.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=Ze(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}},cd={borderRadius:{...Xi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xi,borderTopRightRadius:Xi,borderBottomLeftRadius:Xi,borderBottomRightRadius:Xi,boxShadow:e2};function $x(e,{layout:t,layoutId:n}){return Fi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!cd[e]||e==="opacity")}const t2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},n2=Li.length;function r2(e,t,n){let r="",o=!0;for(let i=0;i<n2;i++){const s=Li[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=_x(a,Wf[s]);if(!l){o=!1;const u=t2[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Xf(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(Fi.has(l)){s=!0;continue}else if(tx(l)){o[l]=c;continue}else{const u=_x(c,Wf[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=r2(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const Zf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ox(e,t,n){for(const r in t)!wt(t[r])&&!$x(r,n)&&(e[r]=t[r])}function o2({transformTemplate:e},t){return S.useMemo(()=>{const n=Zf();return Xf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function i2(e,t){const n=e.style||{},r={};return Ox(r,n,e),Object.assign(r,o2(e,t)),r}function s2(e,t){const n={},r=i2(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}const a2={offset:"stroke-dashoffset",array:"stroke-dasharray"},l2={offset:"strokeDashoffset",array:"strokeDasharray"};function c2(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?a2:l2;e[i.offset]=he.transform(-r);const s=he.transform(t),a=he.transform(n);e[i.array]=`${s} ${a}`}function Ix(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:s=0,...a},l,c,u){if(Xf(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&c2(f,o,i,s,!1)}const Dx=()=>({...Zf(),attrs:{}}),jx=e=>typeof e=="string"&&e.toLowerCase()==="svg";function u2(e,t,n,r){const o=S.useMemo(()=>{const i=Dx();return Ix(i,t,jx(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Ox(i,e.style,e),o.style={...i,...o.style}}return o}const d2=["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 Jf(e){return typeof e!="string"||e.includes("-")?!1:!!(d2.indexOf(e)>-1||/[A-Z]/u.test(e))}function f2(e,t,n,{latestValues:r},o,i=!1){const a=(Jf(e)?u2:s2)(t,r,o,e),l=ZE(t,typeof e=="string",i),c=e!==S.Fragment?{...l,...a,ref:n}:{},{children:u}=t,f=S.useMemo(()=>wt(u)?u.get():u,[u]);return S.createElement(e,{...c,children:f})}function dp(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Qf(e,t,n,r){if(typeof t=="function"){const[o,i]=dp(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=dp(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Ka(e){return wt(e)?e.get():e}function h2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:g2(n,r,o,e),renderState:t()}}function g2(e,t,n,r){const o={},i=r(e,{});for(const d in i)o[d]=Ka(i[d]);let{initial:s,animate:a}=e;const l=Vl(e),c=Fx(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const f=u?a:s;if(f&&typeof f!="boolean"&&!jl(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const g=Qf(e,d[h]);if(g){const{transitionEnd:p,transition:m,...x}=g;for(const y in x){let v=x[y];if(Array.isArray(v)){const b=u?v.length-1:0;v=v[b]}v!==null&&(o[y]=v)}for(const y in p)o[y]=p[y]}}}return o}const Vx=e=>(t,n)=>{const r=S.useContext(Dl),o=S.useContext(Il),i=()=>h2(e,t,r,o);return n?i():Tf(i)};function eh(e,t,n){const{style:r}=e,o={};for(const i in r)(wt(r[i])||t.style&&wt(t.style[i])||$x(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(o[i]=r[i]);return o}const p2=Vx({scrapeMotionValuesFromProps:eh,createRenderState:Zf});function Bx(e,t,n){const r=eh(e,t,n);for(const o in e)if(wt(e[o])||wt(t[o])){const i=Li.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const m2=Vx({scrapeMotionValuesFromProps:Bx,createRenderState:Dx}),y2=Symbol.for("motionComponentSymbol");function si(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function v2(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):si(n)&&(n.current=r))},[t])}const th=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),x2="framerAppearId",zx="data-"+th(x2),Hx=S.createContext({});function b2(e,t,n,r,o){const{visualElement:i}=S.useContext(Dl),s=S.useContext(Px),a=S.useContext(Il),l=S.useContext(Gf).reducedMotion,c=S.useRef(null);r=r||s.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=S.useContext(Hx);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&w2(c.current,n,o,f);const d=S.useRef(!1);S.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const h=n[zx],g=S.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return D0(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),g.current&&u.animationState&&u.animationState.animateChanges())}),S.useEffect(()=>{u&&(!g.current&&u.animationState&&u.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),g.current=!1),u.enteringChildren=void 0)}),u}function w2(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Wx(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&si(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Wx(e){if(e)return e.options.allowProjection!==!1?e.projection:Wx(e.parent)}function Lc(e,{forwardMotionProps:t=!1}={},n,r){n&&qE(n);const o=Jf(e)?m2:p2;function i(a,l){let c;const u={...S.useContext(Gf),...a,layoutId:C2(a)},{isStatic:f}=u,d=QE(a),h=o(a,f);if(!f&&Ef){S2(u,n);const g=_2(u);c=g.MeasureLayout,d.visualElement=b2(e,h,u,r,g.ProjectionNode)}return C.jsxs(Dl.Provider,{value:d,children:[c&&d.visualElement?C.jsx(c,{visualElement:d.visualElement,...u}):null,f2(e,a,v2(h,d.visualElement,l),h,f,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const s=S.forwardRef(i);return s[y2]=e,s}function C2({layoutId:e}){const t=S.useContext(_f).id;return t&&e!==void 0?t+"-"+e:e}function S2(e,t){const n=S.useContext(Px).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ni(!1,r,"lazy-strict-mode"):pr(!1,r,"lazy-strict-mode")}}function _2(e){const{drag:t,layout:n}=Ci;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function T2(e,t){if(typeof Proxy>"u")return Lc;const n=new Map,r=(i,s)=>Lc(i,s,e,t),o=(i,s)=>(process.env.NODE_ENV!=="production"&&Nf(!1,"motion() is deprecated. Use motion.create() instead."),r(i,s));return new Proxy(o,{get:(i,s)=>s==="create"?r:(n.has(s)||n.set(s,Lc(s,void 0,e,t)),n.get(s))})}function Kx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function E2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function R2(e,t){if(!t)return e;const 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 Fc(e){return e===void 0||e===1}function ud({scale:e,scaleX:t,scaleY:n}){return!Fc(e)||!Fc(t)||!Fc(n)}function ro(e){return ud(e)||Ux(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ux(e){return fp(e.x)||fp(e.y)}function fp(e){return e&&e!=="0%"}function ll(e,t,n){const r=e-n,o=t*r;return n+o}function hp(e,t,n,r,o){return o!==void 0&&(e=ll(e,o,r)),ll(e,n,r)+t}function dd(e,t=0,n=1,r,o){e.min=hp(e.min,t,n,r,o),e.max=hp(e.max,t,n,r,o)}function Gx(e,{x:t,y:n}){dd(e.x,t.translate,t.scale,t.originPoint),dd(e.y,n.translate,n.scale,n.originPoint)}const gp=.999999999999,pp=1.0000000000001;function k2(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&li(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Gx(e,s)),r&&ro(i.latestValues)&&li(e,i.latestValues))}t.x<pp&&t.x>gp&&(t.x=1),t.y<pp&&t.y>gp&&(t.y=1)}function ai(e,t){e.min=e.min+t,e.max=e.max+t}function mp(e,t,n,r,o=.5){const i=Ze(e.min,e.max,o);dd(e,t,n,i,r)}function li(e,t){mp(e.x,t.x,t.scaleX,t.scale,t.originX),mp(e.y,t.y,t.scaleY,t.scale,t.originY)}function qx(e,t){return Kx(R2(e.getBoundingClientRect(),t))}function A2(e,t,n){const r=qx(e,n),{scroll:o}=t;return o&&(ai(r.x,o.offset.x),ai(r.y,o.offset.y)),r}const yp=()=>({translate:0,scale:1,origin:0,originPoint:0}),ci=()=>({x:yp(),y:yp()}),vp=()=>({min:0,max:0}),at=()=>({x:vp(),y:vp()}),fd={current:null},Yx={current:!1};function M2(){if(Yx.current=!0,!!Ef)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fd.current=e.matches;e.addEventListener("change",t),t()}else fd.current=!1}const N2=new WeakMap;function P2(e,t,n){for(const r in t){const o=t[r],i=n[r];if(wt(o))e.addValue(r,o);else if(wt(i))e.addValue(r,wi(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,wi(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const xp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class L2{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=zf,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=()=>{const d=Ot.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,Ue.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Vl(n),this.isVariantNode=Fx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&wt(h)&&h.set(l[d])}}mount(t){this.current=t,N2.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Yx.current||M2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:fd.current,process.env.NODE_ENV!=="production"&&Nf(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(){this.projection&&this.projection.unmount(),$r(this.notifyUpdate),$r(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Fi.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ci){const n=Ci[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):at()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<xp.length;r++){const o=xp[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=P2(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=wi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(j0(r)||B0(r))?r=parseFloat(r):!BE(r)&&Or.test(n)&&(r=Sx(t,n)),this.setBaseTarget(t,wt(r)?r.get():r)),wt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Qf(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!wt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Mf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Kf.render(this.render)}}class Xx extends L2{constructor(){super(...arguments),this.KeyframeResolver=AE}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;wt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Zx(e,{style:t,vars:n},r,o){const i=e.style;let s;for(s in t)i[s]=t[s];o?.applyProjectionStyles(i,r);for(s in n)i.setProperty(s,n[s])}function F2(e){return window.getComputedStyle(e)}class $2 extends Xx{constructor(){super(...arguments),this.type="html",this.renderInstance=Zx}readValueFromInstance(t,n){if(Fi.has(n))return this.projection?.isProjecting?nd(n):GT(t,n);{const r=F2(t),o=(tx(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return qx(t,n)}build(t,n,r){Xf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return eh(t,n,r)}}const Jx=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 O2(e,t,n,r){Zx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Jx.has(o)?o:th(o),t.attrs[o])}class I2 extends Xx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=at}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Fi.has(n)){const r=Cx(n);return r&&r.default||0}return n=Jx.has(n)?n:th(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Bx(t,n,r)}build(t,n,r){Ix(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){O2(t,n,r,o)}mount(t){this.isSVGTag=jx(t.tagName),super.mount(t)}}const D2=(e,t)=>Jf(e)?new I2(t):new $2(t,{allowProjection:e!==S.Fragment});function di(e,t,n){const r=e.getProps();return Qf(r,t,n!==void 0?n:r.custom,e)}const hd=e=>Array.isArray(e);function j2(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wi(n))}function V2(e){return hd(e)?e[e.length-1]||0:e}function B2(e,t){const n=di(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=V2(i[s]);j2(e,s,a)}}function z2(e){return!!(wt(e)&&e.add)}function gd(e,t){const n=e.getValue("willChange");if(z2(n))return n.add(t);if(!n&&mr.WillChange){const r=new mr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Qx(e){return e.props[zx]}const H2=e=>e!==null;function W2(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(H2),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}const K2={type:"spring",stiffness:500,damping:25,restSpeed:10},U2=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),G2={type:"keyframes",duration:.8},q2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Y2=(e,{keyframes:t})=>t.length>2?G2:Fi.has(e)?e.startsWith("scale")?U2(t[1]):K2:q2;function X2({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const nh=(e,t,n,r={},o,i)=>s=>{const a=Hf(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Cn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};X2(a)||Object.assign(u,Y2(e,u)),u.duration&&(u.duration=Cn(u.duration)),u.repeatDelay&&(u.repeatDelay=Cn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ad(u),u.delay===0&&(f=!0)),(mr.instantAnimations||mr.skipAnimations)&&(f=!0,ad(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!i&&t.get()!==void 0){const d=W2(u.keyframes,a);if(d!==void 0){Ue.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Bf(u):new mE(u)};function Z2({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function eb(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:s,...a}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in a){const f=e.getValue(u,e.latestValues[u]??null),d=a[u];if(d===void 0||c&&Z2(c,u))continue;const h={delay:n,...Hf(i||{},u)},g=f.get();if(g!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===g&&!h.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const x=Qx(e);if(x){const y=window.MotionHandoffAnimation(x,u,Ue);y!==null&&(h.startTime=y,p=!0)}}gd(e,u),f.start(nh(u,f,d,e.shouldReduceMotion&&xx.has(u)?{type:!1}:h,e,p));const m=f.animation;m&&l.push(m)}return s&&Promise.all(l).then(()=>{Ue.update(()=>{s&&B2(e,s)})}),l}function tb(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(i,s):o===1?i*r:a-i*r}function pd(e,t,n={}){const r=di(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(eb(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=o;return J2(e,t,l,c,u,f,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,c]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>c())}else return Promise.all([i(),s(n.delay)])}function J2(e,t,n=0,r=0,o=0,i=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(pd(l,t,{...s,delay:n+(typeof r=="function"?0:r)+tb(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Q2(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>pd(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=pd(e,t,n);else{const o=typeof t=="function"?di(e,t,n.custom):t;r=Promise.all(eb(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function nb(e,t){if(!Array.isArray(t))return!1;const 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}const eR=Yf.length;function rb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?rb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<eR;n++){const r=Yf[n],o=e.props[r];(As(o)||o===!1)&&(t[r]=o)}return t}const tR=[...qf].reverse(),nR=qf.length;function rR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Q2(e,n,r)))}function oR(e){let t=rR(e),n=bp(),r=!0;const o=l=>(c,u)=>{const f=di(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:h,...g}=f;c={...c,...g,...h}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,u=rb(e.parent)||{},f=[],d=new Set;let h={},g=1/0;for(let m=0;m<nR;m++){const x=tR[m],y=n[x],v=c[x]!==void 0?c[x]:u[x],b=As(v),w=x===l?y.isActive:null;w===!1&&(g=m);let _=v===u[x]&&v!==c[x]&&b;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),y.protectedKeys={...h},!y.isActive&&w===null||!v&&!y.prevProp||jl(v)||typeof v=="boolean")continue;const E=iR(y.prevProp,v);let T=E||x===l&&y.isActive&&!_&&b||m>g&&b,k=!1;const P=Array.isArray(v)?v:[v];let O=P.reduce(o(x),{});w===!1&&(O={});const{prevResolvedValues:D={}}=y,I={...D,...O},$=L=>{T=!0,d.has(L)&&(k=!0,d.delete(L)),y.needsAnimating[L]=!0;const N=e.getValue(L);N&&(N.liveStyle=!1)};for(const L in I){const N=O[L],V=D[L];if(h.hasOwnProperty(L))continue;let K=!1;hd(N)&&hd(V)?K=!nb(N,V):K=N!==V,K?N!=null?$(L):d.add(L):N!==void 0&&d.has(L)?$(L):y.protectedKeys[L]=!0}y.prevProp=v,y.prevResolvedValues=O,y.isActive&&(h={...h,...O}),r&&e.blockInitialAnimation&&(T=!1);const H=_&&E;T&&(!H||k)&&f.push(...P.map(L=>{const N={type:x};if(typeof L=="string"&&r&&!H&&e.manuallyAnimateOnMount&&e.parent){const{parent:V}=e,K=di(V,L);if(V.enteringChildren&&K){const{delayChildren:te}=K.transition||{};N.delay=tb(V.enteringChildren,e,te)}}return{animation:L,options:N}}))}if(d.size){const m={};if(typeof c.initial!="boolean"){const x=di(e,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(m.transition=x.transition)}d.forEach(x=>{const y=e.getBaseTarget(x),v=e.getValue(x);v&&(v.liveStyle=!0),m[x]=y??null}),f.push({animation:m})}let p=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(f):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,c)),n[l].isActive=c;const u=s(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=bp()}}}function iR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!nb(t,e):!1}function Qr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function bp(){return{animate:Qr(!0),whileInView:Qr(),whileHover:Qr(),whileTap:Qr(),whileDrag:Qr(),whileFocus:Qr(),exit:Qr()}}class Ur{constructor(t){this.isMounted=!1,this.node=t}update(){}}class sR extends Ur{constructor(t){super(t),t.animationState||(t.animationState=oR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();jl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let aR=0;class lR extends Ur{constructor(){super(...arguments),this.id=aR++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const cR={animation:{Feature:sR},exit:{Feature:lR}};function Ms(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Hs(e){return{point:{x:e.pageX,y:e.pageY}}}const uR=e=>t=>Uf(t)&&e(t,Hs(t));function ms(e,t,n,r){return Ms(e,t,uR(n),r)}const ob=1e-4,dR=1-ob,fR=1+ob,ib=.01,hR=0-ib,gR=0+ib;function At(e){return e.max-e.min}function pR(e,t,n){return Math.abs(e-t)<=n}function wp(e,t,n,r=.5){e.origin=r,e.originPoint=Ze(t.min,t.max,e.origin),e.scale=At(n)/At(t),e.translate=Ze(n.min,n.max,e.origin)-e.originPoint,(e.scale>=dR&&e.scale<=fR||isNaN(e.scale))&&(e.scale=1),(e.translate>=hR&&e.translate<=gR||isNaN(e.translate))&&(e.translate=0)}function ys(e,t,n,r){wp(e.x,t.x,n.x,r?r.originX:void 0),wp(e.y,t.y,n.y,r?r.originY:void 0)}function Cp(e,t,n){e.min=n.min+t.min,e.max=e.min+At(t)}function mR(e,t,n){Cp(e.x,t.x,n.x),Cp(e.y,t.y,n.y)}function Sp(e,t,n){e.min=t.min-n.min,e.max=e.min+At(t)}function cl(e,t,n){Sp(e.x,t.x,n.x),Sp(e.y,t.y,n.y)}function rn(e){return[e("x"),e("y")]}const sb=({current:e})=>e?e.ownerDocument.defaultView:null,_p=(e,t)=>Math.abs(e-t);function yR(e,t){const n=_p(e.x,t.x),r=_p(e.y,t.y);return Math.sqrt(n**2+r**2)}class ab{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Oc(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=yR(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!g)return;const{point:p}=d,{timestamp:m}=ht;this.history.push({...p,timestamp:m});const{onStart:x,onMove:y}=this.handlers;h||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=$c(h,this.transformPagePoint),Ue.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:g,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Oc(d.type==="pointercancel"?this.lastMoveEventInfo:$c(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,x),p&&p(d,x)},!Uf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const a=Hs(t),l=$c(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=ht;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,Oc(l,this.history)),this.removeListeners=Vs(ms(this.contextWindow,"pointermove",this.handlePointerMove),ms(this.contextWindow,"pointerup",this.handlePointerUp),ms(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),$r(this.updatePoint)}}function $c(e,t){return t?{point:t(e.point)}:e}function Tp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Oc({point:e},t){return{point:e,delta:Tp(e,lb(t)),offset:Tp(e,vR(t)),velocity:xR(t,.1)}}function vR(e){return e[0]}function lb(e){return e[e.length-1]}function xR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=lb(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Cn(t)));)n--;if(!r)return{x:0,y:0};const i=sn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function bR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ze(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ze(n,e,r.max):Math.min(e,n)),e}function Ep(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function wR(e,{top:t,left:n,bottom:r,right:o}){return{x:Ep(e.x,n,o),y:Ep(e.y,t,r)}}function Rp(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 CR(e,t){return{x:Rp(e.x,t.x),y:Rp(e.y,t.y)}}function SR(e,t){let n=.5;const r=At(e),o=At(t);return o>r?n=Es(t.min,t.max-r,e.min):r>o&&(n=Es(e.min,e.max-o,t.min)),gr(0,1,n)}function _R(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const md=.35;function TR(e=md){return e===!1?e=0:e===!0&&(e=md),{x:kp(e,"left","right"),y:kp(e,"top","bottom")}}function kp(e,t,n){return{min:Ap(e,t),max:Ap(e,n)}}function Ap(e,t){return typeof e=="number"?e:e[t]||0}const ER=new WeakMap;class RR{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=at(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Hs(f).point)},s=(f,d)=>{const{drag:h,dragPropagation:g,onDragStart:p}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=LE(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rn(x=>{let y=this.getAxisMotionValue(x).get()||0;if(Vn.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[x];b&&(y=At(b)*(parseFloat(y)/100))}}this.originPoint[x]=y}),p&&Ue.postRender(()=>p(f,d)),gd(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:g,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:x}=d;if(g&&this.currentDirection===null){this.currentDirection=kR(x),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),m&&m(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>rn(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ab(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:sb(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:s}=o;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&Ue.postRender(()=>a(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!pa(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=bR(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&si(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=wR(r.layoutBox,t):this.constraints=!1,this.elastic=TR(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&rn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=_R(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!si(t))return!1;const r=t.current;pr(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=A2(r,o.root,this.visualElement.getTransformPagePoint());let s=CR(o.layout.layoutBox,i);if(n){const a=n(E2(s));this.hasMutatedConstraints=!!a,a&&(s=Kx(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=rn(u=>{if(!pa(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,g={type:"inertia",velocity:r?t[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,g)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return gd(this.visualElement,t),r.start(nh(t,r,0,n,this.visualElement,!1))}stopAnimation(){rn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){rn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){rn(n=>{const{drag:r}=this.getProps();if(!pa(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-Ze(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!si(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};rn(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=SR({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),rn(s=>{if(!pa(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Ze(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;ER.set(this.visualElement,this);const t=this.visualElement.current,n=ms(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();si(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ue.read(r);const s=Ms(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(rn(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())}));return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=md,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function pa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function kR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class AR extends Ur{constructor(t){super(t),this.removeGroupControls=an,this.removeListeners=an,this.controls=new RR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||an}unmount(){this.removeGroupControls(),this.removeListeners()}}const Mp=e=>(t,n)=>{e&&Ue.postRender(()=>e(t,n))};class MR extends Ur{constructor(){super(...arguments),this.removePointerDownListener=an}onPointerDown(t){this.session=new ab(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Mp(t),onStart:Mp(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&Ue.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=ms(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ua={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Ic=!1;class NR extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),Ic&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Ua.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:s}=r;return s&&(s.isPresent=i,Ic=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Ue.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Kf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Ic=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function cb(e){const[t,n]=Mx(),r=S.useContext(_f);return C.jsx(NR,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Hx),isPresent:t,safeToRemove:n})}function PR(e,t,n){const r=wt(e)?e:wi(e);return r.start(nh("",r,t,n)),r.animation}const LR=(e,t)=>e.depth-t.depth;class FR{constructor(){this.children=[],this.isDirty=!1}add(t){Rf(this.children,t),this.isDirty=!0}remove(t){kf(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(LR),this.isDirty=!1,this.children.forEach(t)}}function $R(e,t){const n=Ot.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&($r(r),e(i-t))};return Ue.setup(r,!0),()=>$r(r)}const ub=["TopLeft","TopRight","BottomLeft","BottomRight"],OR=ub.length,Np=e=>typeof e=="string"?parseFloat(e):e,Pp=e=>typeof e=="number"||he.test(e);function IR(e,t,n,r,o,i){o?(e.opacity=Ze(0,n.opacity??1,DR(r)),e.opacityExit=Ze(t.opacity??1,0,jR(r))):i&&(e.opacity=Ze(t.opacity??1,n.opacity??1,r));for(let s=0;s<OR;s++){const a=`border${ub[s]}Radius`;let l=Lp(t,a),c=Lp(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Pp(l)===Pp(c)?(e[a]=Math.max(Ze(Np(l),Np(c),r),0),(Vn.test(c)||Vn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ze(t.rotate||0,n.rotate||0,r))}function Lp(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const DR=db(0,.5,Y0),jR=db(.5,.95,an);function db(e,t,n){return r=>r<e?0:r>t?1:n(Es(e,t,r))}function Fp(e,t){e.min=t.min,e.max=t.max}function hn(e,t){Fp(e.x,t.x),Fp(e.y,t.y)}function $p(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Op(e,t,n,r,o){return e-=t,e=ll(e,1/n,r),o!==void 0&&(e=ll(e,1/o,r)),e}function VR(e,t=0,n=1,r=.5,o,i=e,s=e){if(Vn.test(t)&&(t=parseFloat(t),t=Ze(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ze(i.min,i.max,r);e===i&&(a-=t),e.min=Op(e.min,t,n,a,o),e.max=Op(e.max,t,n,a,o)}function Ip(e,t,[n,r,o],i,s){VR(e,t[n],t[r],t[o],t.scale,i,s)}const BR=["x","scaleX","originX"],zR=["y","scaleY","originY"];function Dp(e,t,n,r){Ip(e.x,t,BR,n?n.x:void 0,r?r.x:void 0),Ip(e.y,t,zR,n?n.y:void 0,r?r.y:void 0)}function jp(e){return e.translate===0&&e.scale===1}function fb(e){return jp(e.x)&&jp(e.y)}function Vp(e,t){return e.min===t.min&&e.max===t.max}function HR(e,t){return Vp(e.x,t.x)&&Vp(e.y,t.y)}function Bp(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function hb(e,t){return Bp(e.x,t.x)&&Bp(e.y,t.y)}function zp(e){return At(e.x)/At(e.y)}function Hp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class WR{constructor(){this.members=[]}add(t){Rf(this.members,t),t.scheduleRender()}remove(t){if(kf(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function KR(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=n?.z||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:g}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),g&&(r+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Dc=["","X","Y","Z"],UR=1e3;let GR=0;function jc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function gb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Qx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ue,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&gb(r)}function pb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=GR++,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,this.nodes.forEach(XR),this.nodes.forEach(ek),this.nodes.forEach(tk),this.nodes.forEach(ZR)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new FR)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Mf),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Ax(s)&&!jE(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,f=0;const d=()=>this.root.updateBlockedByResize=!1;Ue.read(()=>{f=window.innerWidth}),e(s,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=$R(d,250),Ua.hasAnimatedSinceResize&&(Ua.hasAnimatedSinceResize=!1,this.nodes.forEach(Up)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||sk,{onLayoutAnimationStart:p,onLayoutAnimationComplete:m}=c.getProps(),x=!this.targetLayout||!hb(this.targetLayout,h),y=!f&&d;if(this.options.layoutRoot||this.resumeFrom||y||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Hf(g,"layout"),onPlay:p,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,y)}else f||Up(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),$r(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(nk),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&gb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Wp);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Kp);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(QR),this.nodes.forEach(qR),this.nodes.forEach(YR)):this.nodes.forEach(Kp),this.clearAllSnapshots();const a=Ot.now();ht.delta=gr(0,1e3/60,a-ht.timestamp),ht.timestamp=a,ht.isProcessing=!0,Rc.update.process(ht),Rc.preRender.process(ht),Rc.render.process(ht),ht.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Kf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(JR),this.sharedNodes.forEach(rk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ue.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ue.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!At(this.snapshot.measuredBox.x)&&!At(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=at(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!fb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||ro(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),ak(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return at();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(lk))){const{scroll:c}=this.root;c&&(ai(a.x,c.offset.x),ai(a.y,c.offset.y))}return a}removeElementScroll(s){const a=at();if(hn(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;c!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&hn(a,s),ai(a.x,u.offset.x),ai(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=at();hn(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&li(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),ro(u.latestValues)&&li(l,u.latestValues)}return ro(this.latestValues)&&li(l,this.latestValues),l}removeTransform(s){const a=at();hn(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ro(c.latestValues))continue;ud(c.latestValues)&&c.updateSnapshot();const u=at(),f=c.measurePageBox();hn(u,f),Dp(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return ro(this.latestValues)&&Dp(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}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!==ht.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=ht.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=at(),this.targetWithTransforms=at()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hn(this.target,this.layout.layoutBox),Gx(this.target,this.targetDelta)):hn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ud(this.parent.latestValues)||Ux(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,l){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),cl(this.relativeTargetOrigin,a,l),hn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===ht.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;hn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;k2(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=at());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($p(this.prevProjectionDelta.x,this.projectionDelta.x),$p(this.prevProjectionDelta.y,this.projectionDelta.y)),ys(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Hp(this.projectionDelta.x,this.prevProjectionDelta.x)||!Hp(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ci(),this.projectionDelta=ci(),this.projectionDeltaWithTransform=ci()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=ci();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=at(),h=l?l.source:void 0,g=this.layout?this.layout.source:void 0,p=h!==g,m=this.getStack(),x=!m||m.members.length<=1,y=!!(p&&!x&&this.options.crossfade===!0&&!this.path.some(ik));this.animationProgress=0;let v;this.mixTargetDelta=b=>{const w=b/1e3;Gp(f.x,s.x,w),Gp(f.y,s.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(cl(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ok(this.relativeTarget,this.relativeTargetOrigin,d,w),v&&HR(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=at()),hn(v,this.relativeTarget)),p&&(this.animationValues=u,IR(u,c,this.latestValues,w,y,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&($r(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ue.update(()=>{Ua.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=wi(0)),this.currentAnimation=PR(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(UR),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&mb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||at();const f=At(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=At(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}hn(a,l),li(a,u),ys(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new WR),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&jc("z",s,c,this.animationValues);for(let u=0;u<Dc.length;u++)jc(`rotate${Dc[u]}`,s,c,this.animationValues),jc(`skew${Dc[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Ka(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Ka(a?.pointerEvents)||""),this.hasProjected&&!ro(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=KR(this.projectionDeltaWithTransform,this.treeScale,u);l&&(f=l(u,f)),s.transform=f;const{x:d,y:h}=this.projectionDelta;s.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in cd){if(u[g]===void 0)continue;const{correct:p,applyTo:m,isCSSVariable:x}=cd[g],y=f==="none"?u[g]:p(u[g],c);if(m){const v=m.length;for(let b=0;b<v;b++)s[m[b]]=y}else x?this.options.visualElement.renderState.vars[g]=y:s[g]=y}this.options.layoutId&&(s.pointerEvents=c===this?Ka(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(Wp),this.root.sharedNodes.clear()}}}function qR(e){e.updateLayout()}function YR(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?rn(u=>{const f=i?t.measuredBox[u]:t.layoutBox[u],d=At(f);f.min=n[u].min,f.max=f.min+d}):mb(o,t.layoutBox,n)&&rn(u=>{const f=i?t.measuredBox[u]:t.layoutBox[u],d=At(n[u]);f.max=f.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+d)});const s=ci();ys(s,n,t.layoutBox);const a=ci();i?ys(a,e.applyTransform(r,!0),t.measuredBox):ys(a,n,t.layoutBox);const l=!fb(s);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:d}=u;if(f&&d){const h=at();cl(h,t.layoutBox,f.layoutBox);const g=at();cl(g,n,d.layoutBox),hb(h,g)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function XR(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ZR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function JR(e){e.clearSnapshot()}function Wp(e){e.clearMeasurements()}function Kp(e){e.isLayoutDirty=!1}function QR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Up(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ek(e){e.resolveTargetDelta()}function tk(e){e.calcProjection()}function nk(e){e.resetSkewAndRotation()}function rk(e){e.removeLeadSnapshot()}function Gp(e,t,n){e.translate=Ze(t.translate,0,n),e.scale=Ze(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function qp(e,t,n,r){e.min=Ze(t.min,n.min,r),e.max=Ze(t.max,n.max,r)}function ok(e,t,n,r){qp(e.x,t.x,n.x,r),qp(e.y,t.y,n.y,r)}function ik(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const sk={duration:.45,ease:[.4,0,.1,1]},Yp=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Xp=Yp("applewebkit/")&&!Yp("chrome/")?Math.round:an;function Zp(e){e.min=Xp(e.min),e.max=Xp(e.max)}function ak(e){Zp(e.x),Zp(e.y)}function mb(e,t,n){return e==="position"||e==="preserve-aspect"&&!pR(zp(t),zp(n),.2)}function lk(e){return e!==e.root&&e.scroll?.wasRoot}const ck=pb({attachResizeListener:(e,t)=>Ms(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vc={current:void 0},yb=pb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vc.current){const e=new ck({});e.mount(window),e.setOptions({layoutScroll:!0}),Vc.current=e}return Vc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),uk={pan:{Feature:MR},drag:{Feature:AR,ProjectionNode:yb,MeasureLayout:cb}};function Jp(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&Ue.postRender(()=>i(t,Hs(t)))}class dk extends Ur{mount(){const{current:t}=this.node;t&&(this.unmount=FE(t,(n,r)=>(Jp(this.node,r,"Start"),o=>Jp(this.node,o,"End"))))}unmount(){}}class fk extends Ur{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Vs(Ms(this.node.current,"focus",()=>this.onFocus()),Ms(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Qp(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&Ue.postRender(()=>i(t,Hs(t)))}class hk extends Ur{mount(){const{current:t}=this.node;t&&(this.unmount=DE(t,(n,r)=>(Qp(this.node,r,"Start"),(o,{success:i})=>Qp(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const yd=new WeakMap,Bc=new WeakMap,gk=e=>{const t=yd.get(e.target);t&&t(e)},pk=e=>{e.forEach(gk)};function mk({root:e,...t}){const n=e||document;Bc.has(n)||Bc.set(n,{});const r=Bc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(pk,{root:e,...t})),r[o]}function yk(e,t,n){const r=mk(t);return yd.set(e,n),r.observe(e),()=>{yd.delete(e),r.unobserve(e)}}const vk={some:0,all:1};class xk extends Ur{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:vk[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return yk(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(bk(t,n))&&this.startObserver()}unmount(){}}function bk({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const wk={inView:{Feature:xk},tap:{Feature:hk},focus:{Feature:fk},hover:{Feature:dk}},Ck={layout:{ProjectionNode:yb,MeasureLayout:cb}},Sk={...cR,...wk,...uk,...Ck},Ws=T2(Sk,D2),gn={fontFamily:"Inter, sans-serif",wordBreak:"break-word"},me={common:gn,title1:{...gn,fontSize:32,lineHeight:"36px",[ls.md()]:{fontSize:24}},title2:{...gn,fontSize:24,lineHeight:"28px",[ls.md()]:{fontSize:20}},title3:{...gn,fontSize:20,lineHeight:"28px",[ls.md()]:{fontSize:18},[ls.xs()]:{fontSize:16}},headline1:{...gn,fontSize:22,lineHeight:"26px"},headline2:{...gn,fontSize:18,lineHeight:"22px"},headline3:{...gn,fontSize:16,lineHeight:"20px"},body1:{...gn,fontSize:16,lineHeight:"24px"},body2:{...gn,fontSize:14,lineHeight:"20px"},caption1:{...gn,fontSize:12,lineHeight:"16px"},caption2:{...gn,fontSize:10,lineHeight:"14px"}},{transition:_k,color:Zn,fontWeight:ma}=j,ya={text:R.css({...me.common,transition:_k.general}),"title-1":R.css({...me.title1}),"title-2":R.css({...me.title2}),"title-3":R.css({...me.title3}),"headline-1":R.css({...me.headline1}),"headline-2":R.css({...me.headline2}),"headline-3":R.css({...me.headline3}),"body-1":R.css({...me.body1}),"body-2":R.css({...me.body2}),"caption-1":R.css({...me.caption1}),"caption-2":R.css({...me.caption2}),primary:R.css({color:Zn.text.primary}),secondary:R.css({color:Zn.text.secondary}),tertiary:R.css({color:Zn.text.tertiary}),positive:R.css({color:Zn.text.positive}),negative:R.css({color:Zn.text.negative}),warning:R.css({color:Zn.text.warning}),accent:R.css({color:Zn.text.accent}),inverse:R.css({color:Zn.text.inverse}),transfer:R.css({color:Zn.text.transfer}),regular:R.css({fontWeight:ma.regular}),medium:R.css({fontWeight:ma.medium}),semibold:R.css({fontWeight:ma.semibold}),bold:R.css({fontWeight:ma.bold})},Tk=e=>{let t;e.center?t="center":e.left?t="left":e.right&&(t="right");let n;return e.uppercase?n="uppercase":e.lowercase?n="lowercase":e.capitalize&&(n="capitalize"),R.css({marginTop:e.mt,marginBottom:e.mb,marginRight:e.mr,marginLeft:e.ml,flex:e.flex,cursor:e.cursor,wordBreak:e.wordBreak,whiteSpace:e.whiteSpace,textOverflow:e.textOverflow,textDecoration:e.decoration,textAlign:t,textTransform:n,color:e.color,opacity:e.disabled?.5:void 0,overflow:e.overflow})},se=S.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:r="medium",tag:o="p",colorName:i="primary",style:s,clickOpacity:a=.5,opacityDuration:l=200,onClick:c,disabled:u,mt:f,mb:d,ml:h,mr:g,flex:p,cursor:m,wordBreak:x,whiteSpace:y,textOverflow:v,decoration:b,color:w,center:_,left:E,right:T,uppercase:k,lowercase:P,capitalize:O,overflow:D,...I},$)=>{const[H,U]=S.useState(!1),L=!!c,N=()=>L&&U(!0),V=()=>L&&U(!1),K=Tk({mt:f,mb:d,ml:h,mr:g,flex:p,cursor:m,wordBreak:x,whiteSpace:y,textOverflow:v,decoration:b,color:w,center:_,left:E,right:T,uppercase:k,lowercase:P,capitalize:O,overflow:D}),te=o,J=L?R.css({opacity:H?a:1,transition:`opacity ${l}ms ease`}):"";return C.jsx(te,{ref:$,...I,className:R.cx(ya.text,ya[n],ya[i],ya[r],J,t,K),style:s,onClick:c,onMouseDown:N,onMouseUp:V,onMouseLeave:V,onTouchStart:N,onTouchEnd:V,role:L?"button":void 0,tabIndex:L?0:void 0,children:e})});se.displayName="Text";const vb=Ws(se),{color:vd,cornerRadius:Kt,height:va,transition:Ek}=j,Rk=R.css({display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:16,height:48,padding:"0 16px",cursor:"pointer",fontSize:16,fontWeight:600,overflow:"hidden",transition:"all 0.2s ease",gap:8}),Zi={zero:Kt.zero,xs:Kt.xs,sm:Kt.sm,md:Kt.md,lg:Kt.lg,xl:Kt.xl,"2xl":Kt["2xl"],"3xl":Kt["3xl"],"4xl":Kt["4xl"],"5xl":Kt["5xl"],"6xl":Kt["6xl"],"full-round":Kt.fullRound},kk={xs:va.button.xs,sm:va.button.sm,md:va.button.md,lg:va.button.lg},Ak={clear:R.css({backgroundColor:"transparent",border:"none"}),filled:R.css({backgroundColor:vd.fill.accentPrimary,color:"white",border:"none"}),outline:R.css({backgroundColor:"transparent",border:`1px solid ${vd.border.accentPrimary}`})},Mk=(e,t,n,r)=>{if(r)return R.css({cursor:"not-allowed",opacity:.7});const o={transition:Ek.general,borderRadius:Kt.lg,border:"none",color:e==="filled"?vd.text.inverse:`var(--text-${t})`};switch(e){case"filled":return R.css({...o,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return R.css({...o,backgroundColor:"transparent",border:`1px solid var(--border-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});case"clear":return R.css({...o,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return R.css(o)}},{color:xa}=j,Si=({disabled:e,loading:t,wrapperClassName:n,buttonClassName:r,buttonDisabledClassName:o,textClassName:i,children:s,variant:a="filled",backgroundColor:l,textColor:c,textFontWeight:u,borderColor:f,color:d="accent",opacity:h,borderRadius:g,width:p="full",size:m="md",iconLeft:x,iconRight:y,intensity:v="primary",flex:b,type:w="button",..._})=>{const E=S.useMemo(()=>{switch(p){case"full":return"100%";case"auto":return"auto";default:return p}},[p]),T=S.useMemo(()=>l||(a==="filled"?d==="neutral"?xa.fill.neutralSecondary:`var(--fill-${d}-${v})`:"transparent"),[a,l,d,v]),k=S.useMemo(()=>{if(v==="primary"){if(d==="neutral")return xa.text.secondary;if(a==="filled")return xa.text.inverse}else if(d==="neutral")return xa.text.secondary;return`var(--text-${d})`},[v,d,a]),P=S.useMemo(()=>{if(v==="primary"){if(d==="neutral")return"secondary";if(a==="filled")return"inverse"}else if(d==="neutral")return"secondary";return d},[a,d,v]),O=S.useMemo(()=>f||(a==="outline"?`var(--border-${d}-${v})`:"transparent"),[a,f,d,v]),D=S.useMemo(()=>{switch(m){case"lg":return Zi.lg;case"md":case"sm":return Zi.md;case"xs":return Zi.sm;default:return Zi.md}},[m]),I=R.cx(Rk,Mk(a,d,v,e),Ak[a],e?o:void 0,R.css({borderRadius:g?Zi[g]:D,backgroundColor:T,borderColor:O,color:c,width:"100%",height:kk[m],opacity:h||(e?.7:1)}),r),$=S.useMemo(()=>{switch(m){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[m]);return C.jsx(G,{className:R.cx(n),w:E,flex:b,relative:!0,overflow:"hidden",children:C.jsxs(Ws.button,{..._,whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},disabled:e||t,className:I,type:w,children:[t?C.jsx(L0,{color:k}):C.jsxs(C.Fragment,{children:[x,C.jsx(vb,{style:{color:c},colorName:P,variant:$,className:i,textOverflow:"ellipsis",overflow:"hidden",children:s}),y]}),C.jsx(Lo,{})]})})},Nk=e=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},M.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),Pk=e=>M.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},M.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),{color:eo}=j,br={checkbox:R.css({display:"inline-flex",alignItems:"flex-start",gap:8,userSelect:"none"}),disabled:R.css({cursor:"not-allowed",opacity:.5}),checkbox__input:R.css({position:"absolute",opacity:0,width:"var(--checkbox-size)",height:"var(--checkbox-size)"}),checkbox__box:R.css({width:"var(--checkbox-size)",height:"var(--checkbox-size)",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:4,border:`1px solid ${eo.border.neutralAlphaHigh}`,backgroundColor:eo.fill.bgSecondary,opacity:1,transition:"all 0.15s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative","& svg":{color:eo.border.accentPrimary}}),checked:R.css({borderColor:`${eo.border.accentPrimary} !important`,backgroundColor:`${eo.fill.accentSecondary} !important`}),error:R.css({borderColor:eo.border.negativePrimary,backgroundColor:eo.fill.negativeSecondary})},Lk={primary:R.css({}),secondary:R.css({backgroundColor:"transparent"})},Fk={sm:20,md:24},rh=S.forwardRef(({checked:e,onChange:t,disabled:n,error:r,indeterminate:o,size:i="md",title:s,titleColor:a,subtitle:l,subtitleColor:c="secondary",name:u,required:f,variant:d="primary",flex:h,readOnly:g},p)=>{const[m,x]=S.useState(!1),y=e!==void 0,v=y?e:m,b=k=>{y||x(k.target.checked),t?.(k)},w=Fk[i],_=v||o,E=!!g&&!n,T=n?"not-allowed":E?"auto":"pointer";return C.jsxs("label",{className:R.cx(br.checkbox,R.css({flex:h,cursor:T}),{[br.disabled]:n}),children:[C.jsxs(G,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${w}px`,"--checkbox-size-double":`${w*2}px`},children:[C.jsx("input",{ref:p,type:"checkbox",checked:v,onChange:E?void 0:b,onClick:k=>k.stopPropagation(),disabled:n,readOnly:E,name:u,required:f,className:R.cx(br.checkbox__input,{[br.disabled]:n},R.css({cursor:T}))}),C.jsx("div",{className:R.cx(br.checkbox__box,Lk[d],{[br.disabled]:n,[br.error]:r,[br.checked]:_}),children:_&&(o?C.jsx(Pk,{width:w*.75,height:w*.75}):C.jsx(Nk,{width:w*.75,height:w*.75}))})]}),(s||l)&&C.jsxs(G,{gap:4,children:[s&&C.jsx(se,{colorName:a,variant:i==="sm"?"body-2":"body-1",children:s}),l&&C.jsx(se,{variant:"body-2",colorName:c,children:l})]})]})});rh.displayName="Checkbox";const $k=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("g",{opacity:.5},M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0002 17.9999C14.4185 17.9999 18.0002 14.4182 18.0002 9.99991C18.0002 5.58163 14.4185 1.99991 10.0002 1.99991C5.58197 1.99991 2.00024 5.58163 2.00024 9.99991C2.00024 14.4182 5.58197 17.9999 10.0002 17.9999ZM6.46514 6.46446C6.85566 6.07393 7.48883 6.07393 7.87935 6.46446L9.64712 8.23222C9.84238 8.42749 10.159 8.42749 10.3542 8.23222L12.122 6.46446C12.5125 6.07393 13.1457 6.07393 13.5362 6.46446C13.9267 6.85498 13.9267 7.48814 13.5362 7.87867L11.7684 9.64644C11.5732 9.8417 11.5732 10.1583 11.7684 10.3535L13.5362 12.1213C13.9267 12.5118 13.9267 13.145 13.5362 13.5355C13.1457 13.926 12.5125 13.926 12.122 13.5355L10.3542 11.7678C10.159 11.5725 9.84238 11.5725 9.64712 11.7678L7.87935 13.5355C7.48883 13.926 6.85566 13.926 6.46514 13.5355C6.07462 13.145 6.07462 12.5118 6.46514 12.1213L8.23291 10.3535C8.42817 10.1583 8.42817 9.8417 8.23291 9.64644L6.46514 7.87867C6.07462 7.48815 6.07462 6.85498 6.46514 6.46446Z",fill:"currentColor"}))),{color:Jt,spacing:Ji}=j,zc=R.css({opacity:.6,cursor:"not-allowed"}),yt={"input-container":R.css({backgroundColor:Jt.fill.accentSecondary,border:`1px solid ${Jt.border.neutralAlphaBasic}`,padding:`${Ji.md} ${Ji.lg}`,borderRadius:12,minHeight:40,width:"100%",transition:"border-color 0.2s ease, background-color 0.2s ease","& textarea":{resize:"none"},[`&:not(.${zc}):hover`]:{backgroundColor:Jt.fill.neutralPrimaryHover},"&:focus-within":{borderColor:Jt.border.accentPrimary,[`&:not(.${zc}):hover`]:{borderColor:Jt.border.accentPrimary}}}),input:R.css({...me.common,...me.body1,background:"transparent",width:"100%",color:Jt.text.primary,"&::placeholder":{color:Jt.text.tertiary,textOverflow:"ellipsis"}}),"input-text-size_sm":R.css({...me.body2}),"input-text-size_md":R.css({...me.body2}),"input-text-align_left":R.css({textAlign:"left"}),"input-text-align_center":R.css({textAlign:"center"}),"input-text-align_right":R.css({textAlign:"right"}),sm:R.css({height:40,padding:Ji.md}),md:R.css({height:48,padding:`14px ${Ji.lg} 14px ${Ji.lg}`}),error:R.css({borderColor:Jt.border.negativePrimary}),disabled:zc,multiline:R.css({height:"auto"}),primary:R.css({background:Jt.fill.bgPrimary}),secondary:R.css({background:Jt.fill.bgSecondary}),"clear-button":R.css({cursor:"pointer",color:Jt.text.tertiary,height:20,"&:hover":{color:Jt.text.primary}})},{spacing:em}=j;function tm(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const _i=S.forwardRef((e,t)=>{const{label:n,prompt:r,error:o,errorText:i,size:s="md",prefix:a,suffix:l,background:c="primary",showClearButton:u,disabled:f,value:d,defaultValue:h,inputClassName:g,textAlign:p="left",...m}=e,x=e.multiline===!0,y=S.useRef(null),v=S.useRef(null),[b,w]=Po(typeof d=="string"||typeof d=="number"?String(d):void 0,typeof h=="string"||typeof h=="number"?String(h):"");S.useImperativeHandle(t,()=>({focus:()=>{y.current?.focus(),v.current?.focus()},blur:()=>{y.current?.blur(),v.current?.blur()},get value(){return y.current?.value||v.current?.value},set value(P){w(P),y.current&&(y.current.value=P),v.current&&(v.current.value=P)}}));const _=P=>{if(w(P.target.value),x){const O=e.onChange;O?.(P)}else{const O=e.onChange;O?.(P)}};S.useEffect(()=>{x&&e.autoResize&&v.current&&(v.current.style.height="auto",v.current.style.height=`${v.current.scrollHeight}px`)},[b,x,e.autoResize]);const E=()=>{if(w(""),!x){const O=y.current;if(O){O.value="";const D=tm(O),I=e.onChange;I?.(D)}return}const P=v.current;if(P){P.value="";const O=tm(P),D=e.onChange;D?.(O)}},T=()=>{if(x){const{rows:I,autoResize:$,onChange:H,multiline:U,...L}=m;return C.jsx("textarea",{ref:v,rows:e.rows??3,className:R.cx(yt.input,g,{[yt.disabled]:f,[yt[`input-text-align_${p}`]]:!!p}),disabled:f,maxLength:e.maxLength,...L,value:b,onChange:_})}const{onChange:P,multiline:O,...D}=m;return C.jsx("input",{...D,ref:y,className:R.cx(yt.input,yt[`input-text-size_${s}`],g,{[yt.disabled]:f,[yt[`input-text-align_${p}`]]:!!p}),disabled:f,type:e.type??"text",value:b,onChange:_})},k=S.useMemo(()=>c==="white"?yt.primary:c==="gray"?yt.secondary:yt[c],[c]);return C.jsxs(G,{w:"full",gap:em.sm,children:[typeof n=="string"?C.jsx(se,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}):n,C.jsxs(G,{row:!0,alignItems:x?"flex-start":"center",w:"full",gap:em.md,className:R.cx(yt["input-container"],k,yt[s],{[yt.error]:o,[yt.disabled]:f,[yt.multiline]:x}),children:[a&&C.jsx(G,{flex:"none",children:a}),C.jsx(G,{flex:"1",children:T()}),u&&b&&!f&&C.jsx(G,{flex:"none",children:C.jsx("span",{className:yt["clear-button"],onClick:E,children:C.jsx($k,{})})}),l&&C.jsx(G,{flex:"none",children:l})]}),(r||x)&&C.jsxs(G,{row:!0,gap:10,w:"full",children:[typeof r=="string"?C.jsx(se,{variant:"caption-1",colorName:"tertiary",children:r}):r,x&&e.maxLength&&C.jsx(se,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${b.length}/${e.maxLength}`})]}),i&&o&&C.jsx(se,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:i})]})});_i.displayName="Input";const Ok=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M15 8.33333H5M17.5 5H2.5M17.5 11.6667H2.5M15 15H5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Ik=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M13.3333 8.33333H2.5M16.6667 5H2.5M16.6667 11.6667H2.5M13.3333 15H2.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Dk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M17.5 8.33333H6.66665M17.5 5H3.33331M17.5 11.6667H3.33331M17.5 15H6.66665",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),jk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M5 10H11.6667C13.5076 10 15 8.50766 15 6.66671C15 4.82576 13.5076 3.33337 11.6667 3.33337H5V10ZM5 10H12.5C14.3409 10 15.8333 11.4924 15.8333 13.3334C15.8333 15.1743 14.3409 16.6667 12.5 16.6667H5V10Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Vk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M13.5 17.5H5.77614C5.2713 17.5 5.01887 17.5 4.90199 17.4002C4.80056 17.3135 4.74674 17.1836 4.75721 17.0506C4.76927 16.8974 4.94776 16.7189 5.30474 16.3619L12.3905 9.27614C12.7205 8.94613 12.8855 8.78112 13.0758 8.7193C13.2432 8.66492 13.4235 8.66492 13.5908 8.7193C13.7811 8.78112 13.9461 8.94613 14.2761 9.27614L17.5 12.5V13.5M13.5 17.5C14.9001 17.5 15.6002 17.5 16.135 17.2275C16.6054 16.9878 16.9878 16.6054 17.2275 16.135C17.5 15.6002 17.5 14.9001 17.5 13.5M13.5 17.5H6.5C5.09987 17.5 4.3998 17.5 3.86502 17.2275C3.39462 16.9878 3.01217 16.6054 2.77248 16.135C2.5 15.6002 2.5 14.9001 2.5 13.5V6.5C2.5 5.09987 2.5 4.3998 2.77248 3.86502C3.01217 3.39462 3.39462 3.01217 3.86502 2.77248C4.3998 2.5 5.09987 2.5 6.5 2.5H13.5C14.9001 2.5 15.6002 2.5 16.135 2.77248C16.6054 3.01217 16.9878 3.39462 17.2275 3.86502C17.5 4.3998 17.5 5.09987 17.5 6.5V13.5M8.75 7.08333C8.75 8.00381 8.00381 8.75 7.08333 8.75C6.16286 8.75 5.41667 8.00381 5.41667 7.08333C5.41667 6.16286 6.16286 5.41667 7.08333 5.41667C8.00381 5.41667 8.75 6.16286 8.75 7.08333Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Bk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M15.8334 3.33337H8.33335M11.6667 16.6667H4.16669M12.5 3.33337L7.50002 16.6667",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),zk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("g",{clipPath:"url(#clip0_1571_1710)"},M.createElement("path",{d:"M8.33332 10.8333C8.69119 11.3118 9.14778 11.7077 9.67211 11.9941C10.1964 12.2806 10.7762 12.4509 11.3722 12.4936C11.9681 12.5363 12.5663 12.4503 13.1261 12.2415C13.6859 12.0327 14.1942 11.7059 14.6167 11.2833L17.1167 8.78335C17.8756 7.9975 18.2956 6.94499 18.2861 5.85251C18.2766 4.76002 17.8384 3.71497 17.0659 2.94243C16.2934 2.1699 15.2483 1.7317 14.1558 1.7222C13.0633 1.71271 12.0108 2.13269 11.225 2.89168L9.79165 4.31668M11.6666 9.16668C11.3088 8.68824 10.8522 8.29236 10.3279 8.0059C9.80353 7.71943 9.22373 7.54908 8.62777 7.5064C8.03182 7.46372 7.43366 7.54971 6.87386 7.75853C6.31406 7.96735 5.80572 8.29412 5.38332 8.71668L2.88332 11.2167C2.12432 12.0025 1.70435 13.055 1.71384 14.1475C1.72334 15.24 2.16154 16.2851 2.93407 17.0576C3.70661 17.8301 4.75166 18.2683 5.84414 18.2778C6.93663 18.2873 7.98914 17.8673 8.77498 17.1083L10.2 15.6833",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),M.createElement("defs",null,M.createElement("clipPath",{id:"clip0_1571_1710"},M.createElement("rect",{width:20,height:20,fill:"white"})))),Hk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M17.5 9.99996L7.5 9.99996M17.5 4.99996L7.5 4.99996M17.5 15L7.5 15M4.16667 9.99996C4.16667 10.4602 3.79357 10.8333 3.33333 10.8333C2.8731 10.8333 2.5 10.4602 2.5 9.99996C2.5 9.53972 2.8731 9.16663 3.33333 9.16663C3.79357 9.16663 4.16667 9.53972 4.16667 9.99996ZM4.16667 4.99996C4.16667 5.4602 3.79357 5.83329 3.33333 5.83329C2.8731 5.83329 2.5 5.4602 2.5 4.99996C2.5 4.53972 2.8731 4.16663 3.33333 4.16663C3.79357 4.16663 4.16667 4.53972 4.16667 4.99996ZM4.16667 15C4.16667 15.4602 3.79357 15.8333 3.33333 15.8333C2.8731 15.8333 2.5 15.4602 2.5 15C2.5 14.5397 2.8731 14.1666 3.33333 14.1666C3.79357 14.1666 4.16667 14.5397 4.16667 15Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Wk=e=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M14 8.74967C14.4142 8.74967 14.75 8.41389 14.75 7.99967C14.75 7.58546 14.4142 7.24967 14 7.24967V7.99967V8.74967ZM6 7.24967C5.58579 7.24967 5.25 7.58546 5.25 7.99967C5.25 8.41389 5.58579 8.74967 6 8.74967V7.99967V7.24967ZM14 4.74967C14.4142 4.74967 14.75 4.41389 14.75 3.99967C14.75 3.58546 14.4142 3.24967 14 3.24967V3.99967V4.74967ZM6 3.24967C5.58579 3.24967 5.25 3.58546 5.25 3.99967C5.25 4.41389 5.58579 4.74967 6 4.74967V3.99967V3.24967ZM14 12.7497C14.4142 12.7497 14.75 12.4139 14.75 11.9997C14.75 11.5855 14.4142 11.2497 14 11.2497V11.9997V12.7497ZM6 11.2497C5.58579 11.2497 5.25 11.5855 5.25 11.9997C5.25 12.4139 5.58579 12.7497 6 12.7497V11.9997V11.2497ZM1.58967 3.48952C1.24295 3.71614 1.14558 4.18092 1.3722 4.52765C1.59882 4.87437 2.0636 4.97174 2.41033 4.74512L2 4.11732L1.58967 3.48952ZM3.2 3.33301H3.95C3.95 3.05764 3.79909 2.80441 3.5569 2.67337C3.31471 2.54233 3.02018 2.55455 2.78967 2.70521L3.2 3.33301ZM2.4 5.91634C1.98579 5.91634 1.65 6.25213 1.65 6.66634C1.65 7.08055 1.98579 7.41634 2.4 7.41634V6.66634V5.91634ZM4 7.41634C4.41421 7.41634 4.75 7.08055 4.75 6.66634C4.75 6.25213 4.41421 5.91634 4 5.91634V6.66634V7.41634ZM3.73743 10.8967L4.2726 11.4222L4.2726 11.4222L3.73743 10.8967ZM2 12.6663L1.46483 12.1409C1.25318 12.3565 1.19153 12.678 1.30841 12.9565C1.4253 13.2351 1.69791 13.4163 2 13.4163V12.6663ZM4 13.4163C4.41421 13.4163 4.75 13.0806 4.75 12.6663C4.75 12.2521 4.41421 11.9163 4 11.9163V12.6663V13.4163ZM1.25 10.2589C1.25 10.6731 1.58579 11.0089 2 11.0089C2.41421 11.0089 2.75 10.6731 2.75 10.2589H2H1.25ZM14 7.99967V7.24967L6 7.24967V7.99967V8.74967L14 8.74967V7.99967ZM14 3.99967V3.24967H6V3.99967V4.74967H14V3.99967ZM14 11.9997V11.2497L6 11.2497V11.9997V12.7497L14 12.7497V11.9997ZM2 4.11732L2.41033 4.74512L3.61033 3.96081L3.2 3.33301L2.78967 2.70521L1.58967 3.48952L2 4.11732ZM3.2 3.33301H2.45V6.66634H3.2H3.95V3.33301H3.2ZM3.2 6.66634V5.91634H2.4V6.66634V7.41634H3.2V6.66634ZM3.2 6.66634V7.41634H4V6.66634V5.91634H3.2V6.66634ZM3.73743 10.8967L3.20226 10.3713L1.46483 12.1409L2 12.6663L2.53517 13.1918L4.2726 11.4222L3.73743 10.8967ZM2 12.6663V13.4163H4V12.6663V11.9163H2V12.6663ZM4 10.2654H3.25C3.25 10.2957 3.23759 10.3353 3.20225 10.3713L3.73743 10.8967L4.2726 11.4222C4.57518 11.114 4.75 10.7002 4.75 10.2654H4ZM3 9.33301V10.083C3.08406 10.083 3.1515 10.1147 3.19493 10.1553C3.23791 10.1955 3.25 10.2354 3.25 10.2654H4H4.75C4.75 9.29296 3.91808 8.58301 3 8.58301V9.33301ZM2 10.2589H2.75C2.75 10.2299 2.76126 10.1927 2.80245 10.1545C2.84462 10.1155 2.91258 10.083 3 10.083V9.33301V8.58301C2.0889 8.58301 1.25 9.28004 1.25 10.2589H2Z",fill:"currentColor"})),Kk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M5 13.3334C5 15.1743 6.49238 16.6667 8.33333 16.6667H11.6667C13.5076 16.6667 15 15.1743 15 13.3334C15 11.4924 13.5076 10 11.6667 10M15 6.66671C15 4.82576 13.5076 3.33337 11.6667 3.33337H8.33333C6.49238 3.33337 5 4.82576 5 6.66671M2.5 10H17.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Uk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M2.5 7.5L17.5 7.5M7.5 2.5L7.5 17.5M6.5 2.5H13.5C14.9001 2.5 15.6002 2.5 16.135 2.77248C16.6054 3.01217 16.9878 3.39462 17.2275 3.86502C17.5 4.3998 17.5 5.09987 17.5 6.5V13.5C17.5 14.9001 17.5 15.6002 17.2275 16.135C16.9878 16.6054 16.6054 16.9878 16.135 17.2275C15.6002 17.5 14.9001 17.5 13.5 17.5H6.5C5.09987 17.5 4.3998 17.5 3.86502 17.2275C3.39462 16.9878 3.01217 16.6054 2.77248 16.135C2.5 15.6002 2.5 14.9001 2.5 13.5V6.5C2.5 5.09987 2.5 4.3998 2.77248 3.86502C3.01217 3.39462 3.39462 3.01217 3.86502 2.77248C4.3998 2.5 5.09987 2.5 6.5 2.5Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Gk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M15 3.33337V9.16671C15 11.9281 12.7614 14.1667 9.99998 14.1667C7.23856 14.1667 4.99998 11.9281 4.99998 9.16671V3.33337M3.33331 17.5H16.6666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),oh=S.createContext(null);function Ks(){const e=S.useContext(oh);if(!e)throw new Error("useEditorStates must be used within EditorState Provider");return e}const xb=S.createContext(null);function qk(){const e=S.useContext(xb);if(!e)throw new Error("useToolbarContext must be used within ToolbarContext provider");return e}var us={exports:{}};us.exports;var nm;function Yk(){return nm||(nm=1,(function(e,t){var n=200,r="__lodash_hash_undefined__",o=800,i=16,s=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",f="[object Date]",d="[object Error]",h="[object Function]",g="[object GeneratorFunction]",p="[object Map]",m="[object Number]",x="[object Null]",y="[object Object]",v="[object Proxy]",b="[object RegExp]",w="[object Set]",_="[object String]",E="[object Undefined]",T="[object WeakMap]",k="[object ArrayBuffer]",P="[object DataView]",O="[object Float32Array]",D="[object Float64Array]",I="[object Int8Array]",$="[object Int16Array]",H="[object Int32Array]",U="[object Uint8Array]",L="[object Uint8ClampedArray]",N="[object Uint16Array]",V="[object Uint32Array]",K=/[\\^$.*+?()[\]{}|]/g,te=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,Z={};Z[O]=Z[D]=Z[I]=Z[$]=Z[H]=Z[U]=Z[L]=Z[N]=Z[V]=!0,Z[a]=Z[l]=Z[k]=Z[u]=Z[P]=Z[f]=Z[d]=Z[h]=Z[p]=Z[m]=Z[y]=Z[b]=Z[w]=Z[_]=Z[T]=!1;var ae=typeof Dn=="object"&&Dn&&Dn.Object===Object&&Dn,oe=typeof self=="object"&&self&&self.Object===Object&&self,fe=ae||oe||Function("return this")(),Te=t&&!t.nodeType&&t,ne=Te&&!0&&e&&!e.nodeType&&e,ve=ne&&ne.exports===Te,Ee=ve&&ae.process,De=(function(){try{var A=ne&&ne.require&&ne.require("util").types;return A||Ee&&Ee.binding&&Ee.binding("util")}catch{}})(),st=De&&De.isTypedArray;function ee(A,F,z){switch(z.length){case 0:return A.call(F);case 1:return A.call(F,z[0]);case 2:return A.call(F,z[0],z[1]);case 3:return A.call(F,z[0],z[1],z[2])}return A.apply(F,z)}function Ce(A,F){for(var z=-1,re=Array(A);++z<A;)re[z]=F(z);return re}function ze(A){return function(F){return A(F)}}function Re(A,F){return A?.[F]}function mt(A,F){return function(z){return A(F(z))}}var Ft=Array.prototype,Yt=Function.prototype,Xt=Object.prototype,xe=fe["__core-js_shared__"],Me=Yt.toString,Zt=Xt.hasOwnProperty,vg=(function(){var A=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return A?"Symbol(src)_1."+A:""})(),xg=Xt.toString,yS=Me.call(Object),vS=RegExp("^"+Me.call(Zt).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ia=ve?fe.Buffer:void 0,bg=fe.Symbol,wg=fe.Uint8Array;ia&&ia.allocUnsafe;var Cg=mt(Object.getPrototypeOf,Object),Sg=Object.create,xS=Xt.propertyIsEnumerable,bS=Ft.splice,Xr=bg?bg.toStringTag:void 0,sa=(function(){try{var A=yc(Object,"defineProperty");return A({},"",{}),A}catch{}})(),wS=ia?ia.isBuffer:void 0,_g=Math.max,CS=Date.now,Tg=yc(fe,"Map"),Gi=yc(Object,"create"),SS=(function(){function A(){}return function(F){if(!Jr(F))return{};if(Sg)return Sg(F);A.prototype=F;var z=new A;return A.prototype=void 0,z}})();function Zr(A){var F=-1,z=A==null?0:A.length;for(this.clear();++F<z;){var re=A[F];this.set(re[0],re[1])}}function _S(){this.__data__=Gi?Gi(null):{},this.size=0}function TS(A){var F=this.has(A)&&delete this.__data__[A];return this.size-=F?1:0,F}function ES(A){var F=this.__data__;if(Gi){var z=F[A];return z===r?void 0:z}return Zt.call(F,A)?F[A]:void 0}function RS(A){var F=this.__data__;return Gi?F[A]!==void 0:Zt.call(F,A)}function kS(A,F){var z=this.__data__;return this.size+=this.has(A)?0:1,z[A]=Gi&&F===void 0?r:F,this}Zr.prototype.clear=_S,Zr.prototype.delete=TS,Zr.prototype.get=ES,Zr.prototype.has=RS,Zr.prototype.set=kS;function Xn(A){var F=-1,z=A==null?0:A.length;for(this.clear();++F<z;){var re=A[F];this.set(re[0],re[1])}}function AS(){this.__data__=[],this.size=0}function MS(A){var F=this.__data__,z=aa(F,A);if(z<0)return!1;var re=F.length-1;return z==re?F.pop():bS.call(F,z,1),--this.size,!0}function NS(A){var F=this.__data__,z=aa(F,A);return z<0?void 0:F[z][1]}function PS(A){return aa(this.__data__,A)>-1}function LS(A,F){var z=this.__data__,re=aa(z,A);return re<0?(++this.size,z.push([A,F])):z[re][1]=F,this}Xn.prototype.clear=AS,Xn.prototype.delete=MS,Xn.prototype.get=NS,Xn.prototype.has=PS,Xn.prototype.set=LS;function jo(A){var F=-1,z=A==null?0:A.length;for(this.clear();++F<z;){var re=A[F];this.set(re[0],re[1])}}function FS(){this.size=0,this.__data__={hash:new Zr,map:new(Tg||Xn),string:new Zr}}function $S(A){var F=ca(this,A).delete(A);return this.size-=F?1:0,F}function OS(A){return ca(this,A).get(A)}function IS(A){return ca(this,A).has(A)}function DS(A,F){var z=ca(this,A),re=z.size;return z.set(A,F),this.size+=z.size==re?0:1,this}jo.prototype.clear=FS,jo.prototype.delete=$S,jo.prototype.get=OS,jo.prototype.has=IS,jo.prototype.set=DS;function Vo(A){var F=this.__data__=new Xn(A);this.size=F.size}function jS(){this.__data__=new Xn,this.size=0}function VS(A){var F=this.__data__,z=F.delete(A);return this.size=F.size,z}function BS(A){return this.__data__.get(A)}function zS(A){return this.__data__.has(A)}function HS(A,F){var z=this.__data__;if(z instanceof Xn){var re=z.__data__;if(!Tg||re.length<n-1)return re.push([A,F]),this.size=++z.size,this;z=this.__data__=new jo(re)}return z.set(A,F),this.size=z.size,this}Vo.prototype.clear=jS,Vo.prototype.delete=VS,Vo.prototype.get=BS,Vo.prototype.has=zS,Vo.prototype.set=HS;function WS(A,F){var z=bc(A),re=!z&&xc(A),Se=!z&&!re&&Mg(A),Oe=!z&&!re&&!Se&&Pg(A),He=z||re||Se||Oe,Ae=He?Ce(A.length,String):[],We=Ae.length;for(var fn in A)He&&(fn=="length"||Se&&(fn=="offset"||fn=="parent")||Oe&&(fn=="buffer"||fn=="byteLength"||fn=="byteOffset")||kg(fn,We))||Ae.push(fn);return Ae}function pc(A,F,z){(z!==void 0&&!ua(A[F],z)||z===void 0&&!(F in A))&&mc(A,F,z)}function KS(A,F,z){var re=A[F];(!(Zt.call(A,F)&&ua(re,z))||z===void 0&&!(F in A))&&mc(A,F,z)}function aa(A,F){for(var z=A.length;z--;)if(ua(A[z][0],F))return z;return-1}function mc(A,F,z){F=="__proto__"&&sa?sa(A,F,{configurable:!0,enumerable:!0,value:z,writable:!0}):A[F]=z}var US=i_();function la(A){return A==null?A===void 0?E:x:Xr&&Xr in Object(A)?s_(A):f_(A)}function Eg(A){return qi(A)&&la(A)==a}function GS(A){if(!Jr(A)||u_(A))return!1;var F=Cc(A)?vS:te;return F.test(m_(A))}function qS(A){return qi(A)&&Ng(A.length)&&!!Z[la(A)]}function YS(A){if(!Jr(A))return d_(A);var F=Ag(A),z=[];for(var re in A)re=="constructor"&&(F||!Zt.call(A,re))||z.push(re);return z}function Rg(A,F,z,re,Se){A!==F&&US(F,function(Oe,He){if(Se||(Se=new Vo),Jr(Oe))XS(A,F,He,z,Rg,re,Se);else{var Ae=re?re(vc(A,He),Oe,He+"",A,F,Se):void 0;Ae===void 0&&(Ae=Oe),pc(A,He,Ae)}},Lg)}function XS(A,F,z,re,Se,Oe,He){var Ae=vc(A,z),We=vc(F,z),fn=He.get(We);if(fn){pc(A,z,fn);return}var Wt=Oe?Oe(Ae,We,z+"",A,F,He):void 0,Yi=Wt===void 0;if(Yi){var Sc=bc(We),_c=!Sc&&Mg(We),$g=!Sc&&!_c&&Pg(We);Wt=We,Sc||_c||$g?bc(Ae)?Wt=Ae:y_(Ae)?Wt=n_(Ae):_c?(Yi=!1,Wt=QS(We)):$g?(Yi=!1,Wt=t_(We)):Wt=[]:v_(We)||xc(We)?(Wt=Ae,xc(Ae)?Wt=x_(Ae):(!Jr(Ae)||Cc(Ae))&&(Wt=a_(We))):Yi=!1}Yi&&(He.set(We,Wt),Se(Wt,We,re,Oe,He),He.delete(We)),pc(A,z,Wt)}function ZS(A,F){return g_(h_(A,F,Fg),A+"")}var JS=sa?function(A,F){return sa(A,"toString",{configurable:!0,enumerable:!1,value:w_(F),writable:!0})}:Fg;function QS(A,F){return A.slice()}function e_(A){var F=new A.constructor(A.byteLength);return new wg(F).set(new wg(A)),F}function t_(A,F){var z=e_(A.buffer);return new A.constructor(z,A.byteOffset,A.length)}function n_(A,F){var z=-1,re=A.length;for(F||(F=Array(re));++z<re;)F[z]=A[z];return F}function r_(A,F,z,re){var Se=!z;z||(z={});for(var Oe=-1,He=F.length;++Oe<He;){var Ae=F[Oe],We=void 0;We===void 0&&(We=A[Ae]),Se?mc(z,Ae,We):KS(z,Ae,We)}return z}function o_(A){return ZS(function(F,z){var re=-1,Se=z.length,Oe=Se>1?z[Se-1]:void 0,He=Se>2?z[2]:void 0;for(Oe=A.length>3&&typeof Oe=="function"?(Se--,Oe):void 0,He&&l_(z[0],z[1],He)&&(Oe=Se<3?void 0:Oe,Se=1),F=Object(F);++re<Se;){var Ae=z[re];Ae&&A(F,Ae,re,Oe)}return F})}function i_(A){return function(F,z,re){for(var Se=-1,Oe=Object(F),He=re(F),Ae=He.length;Ae--;){var We=He[++Se];if(z(Oe[We],We,Oe)===!1)break}return F}}function ca(A,F){var z=A.__data__;return c_(F)?z[typeof F=="string"?"string":"hash"]:z.map}function yc(A,F){var z=Re(A,F);return GS(z)?z:void 0}function s_(A){var F=Zt.call(A,Xr),z=A[Xr];try{A[Xr]=void 0;var re=!0}catch{}var Se=xg.call(A);return re&&(F?A[Xr]=z:delete A[Xr]),Se}function a_(A){return typeof A.constructor=="function"&&!Ag(A)?SS(Cg(A)):{}}function kg(A,F){var z=typeof A;return F=F??s,!!F&&(z=="number"||z!="symbol"&&J.test(A))&&A>-1&&A%1==0&&A<F}function l_(A,F,z){if(!Jr(z))return!1;var re=typeof F;return(re=="number"?wc(z)&&kg(F,z.length):re=="string"&&F in z)?ua(z[F],A):!1}function c_(A){var F=typeof A;return F=="string"||F=="number"||F=="symbol"||F=="boolean"?A!=="__proto__":A===null}function u_(A){return!!vg&&vg in A}function Ag(A){var F=A&&A.constructor,z=typeof F=="function"&&F.prototype||Xt;return A===z}function d_(A){var F=[];if(A!=null)for(var z in Object(A))F.push(z);return F}function f_(A){return xg.call(A)}function h_(A,F,z){return F=_g(F===void 0?A.length-1:F,0),function(){for(var re=arguments,Se=-1,Oe=_g(re.length-F,0),He=Array(Oe);++Se<Oe;)He[Se]=re[F+Se];Se=-1;for(var Ae=Array(F+1);++Se<F;)Ae[Se]=re[Se];return Ae[F]=z(He),ee(A,this,Ae)}}function vc(A,F){if(!(F==="constructor"&&typeof A[F]=="function")&&F!="__proto__")return A[F]}var g_=p_(JS);function p_(A){var F=0,z=0;return function(){var re=CS(),Se=i-(re-z);if(z=re,Se>0){if(++F>=o)return arguments[0]}else F=0;return A.apply(void 0,arguments)}}function m_(A){if(A!=null){try{return Me.call(A)}catch{}try{return A+""}catch{}}return""}function ua(A,F){return A===F||A!==A&&F!==F}var xc=Eg((function(){return arguments})())?Eg:function(A){return qi(A)&&Zt.call(A,"callee")&&!xS.call(A,"callee")},bc=Array.isArray;function wc(A){return A!=null&&Ng(A.length)&&!Cc(A)}function y_(A){return qi(A)&&wc(A)}var Mg=wS||C_;function Cc(A){if(!Jr(A))return!1;var F=la(A);return F==h||F==g||F==c||F==v}function Ng(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=s}function Jr(A){var F=typeof A;return A!=null&&(F=="object"||F=="function")}function qi(A){return A!=null&&typeof A=="object"}function v_(A){if(!qi(A)||la(A)!=y)return!1;var F=Cg(A);if(F===null)return!0;var z=Zt.call(F,"constructor")&&F.constructor;return typeof z=="function"&&z instanceof z&&Me.call(z)==yS}var Pg=st?ze(st):qS;function x_(A){return r_(A,Lg(A))}function Lg(A){return wc(A)?WS(A):YS(A)}var b_=o_(function(A,F,z){Rg(A,F,z)});function w_(A){return function(){return A}}function Fg(A){return A}function C_(){return!1}e.exports=b_})(us,us.exports)),us.exports}var Xk=Yk();const Zk=Cf(Xk),bb=S.createContext(null);function Jk(){return S.useContext(bb)}function Qk({children:e,locale:t}){return C.jsx(bb.Provider,{value:t||null,children:e})}function e3({localeKey:e,defaultLocale:t}){const n=S.createContext(t);function r(s){const{extraLocale:a}=s||{},l=Jk();return{value:S.useMemo(()=>{const u=l?l[e]:null,f=[{},t];return u&&f.push(u),a&&f.push(a),Zk(...f)},[t,a,e,l])}}function o(){return S.useContext(n)}function i({children:s,locale:a}){const{value:l}=r({extraLocale:a});return C.jsx(n.Provider,{value:l,children:s})}return{Context:n,useComposeLocaleProviderValue:r,useLocale:o,Provider:i}}const wb="MarkdownTextEditor",t3={toolbar:{link:{textPlaceholder:"Enter the text to display",linkPlaceholder:"Paste a link",linkErrorText:"Please enter a valid link",buttonText:"Save"},table:{maxRowsErrorText:e=>`Maximum number of rows is ${e.limit}`,maxColumnsErrorText:e=>`Maximum number of columns is ${e.limit}`,minRowsErrorText:e=>`Minimum number of rows is ${e.limit}`,minColumnsErrorText:e=>`Minimum number of columns is ${e.limit}`,rowsPlaceholder:"Rows count",columnsPlaceholder:"Columns count",buttonText:"Create table"},textSize:{paragraph:"Normal text",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3"},preview:{show:"Preview",hide:"Preview"},actions:{bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",link:"Link",image:"Image",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",table:"Table",bulletList:"Bullet list",numberedList:"Numbered list"}}},{Provider:n3,useLocale:Us}=e3({localeKey:wb,defaultLocale:t3}),Cb=S.createContext(null);function r3(e,t){return{getTheme:function(){return t??null}}}function it(){const e=S.useContext(Cb);return e==null&&(function(t,...n){const r=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const i of n)o.append("v",i);throw r.search=o.toString(),Error(`Minified Lexical error #${t}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),e}function q(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Sb(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Mn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,o3=Mn&&"documentMode"in document?document.documentMode:null,vn=Mn&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),xo=Mn&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ul=!(!Mn||!("InputEvent"in window)||o3)&&"getTargetRanges"in new window.InputEvent("input"),Gs=Mn&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),$i=Mn&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,i3=Mn&&/Android/.test(navigator.userAgent),_b=Mn&&/^(?=.*Chrome).*/i.test(navigator.userAgent),rm=Mn&&i3&&_b,qs=Mn&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&vn&&!_b;function Tb(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}const s3=0,a3=1,l3=2,Eb=128,c3=1,u3=2,d3=3,f3=4,h3=5,g3=6,Bl=Gs||$i||qs?" ":"​",Ir=`
34
+ `),()=>{m.contains(p)&&m.removeChild(p)}},[t]),C.jsx(WE,{isPresent:t,childRef:i,sizeRef:s,children:M.cloneElement(e,{ref:l})})}const UE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s,anchorX:a,root:l})=>{const c=Tf(GE),u=S.useId();let f=!0,d=S.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:o,onExitComplete:h=>{c.set(h,!0);for(const g of c.values())if(!g)return;r&&r()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,r]);return i&&f&&(d={...d}),S.useMemo(()=>{c.forEach((h,g)=>c.set(g,!1))},[n]),M.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),s==="popLayout"&&(e=C.jsx(KE,{isPresent:n,anchorX:a,root:l,children:e})),C.jsx(Il.Provider,{value:d,children:e})};function GE(){return new Map}function Mx(e=!0){const t=S.useContext(Il);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const s=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const ga=e=>e.key||"";function ap(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Nx=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:s=!1,anchorX:a="left",root:l})=>{const[c,u]=Mx(s),f=S.useMemo(()=>ap(e),[e]),d=s&&!c?[]:f.map(ga),h=S.useRef(!0),g=S.useRef(f),p=Tf(()=>new Map),[m,x]=S.useState(f),[y,v]=S.useState(f);D0(()=>{h.current=!1,g.current=f;for(let _=0;_<y.length;_++){const E=ga(y[_]);d.includes(E)?p.delete(E):p.get(E)!==!0&&p.set(E,!1)}},[y,d.length,d.join("-")]);const b=[];if(f!==m){let _=[...f];for(let E=0;E<y.length;E++){const T=y[E],k=ga(T);d.includes(k)||(_.splice(E,0,T),b.push(T))}return i==="wait"&&b.length&&(_=b),v(ap(_)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&y.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.`);const{forceRender:w}=S.useContext(_f);return C.jsx(C.Fragment,{children:y.map(_=>{const E=ga(_),T=s&&!c?!1:f===y||d.includes(E),k=()=>{if(p.has(E))p.set(E,!0);else return;let P=!0;p.forEach(O=>{O||(P=!1)}),P&&(w?.(),v(g.current),s&&u?.(),r&&r())};return C.jsx(UE,{isPresent:T,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:l,onExitComplete:T?void 0:k,anchorX:a,children:_},E)})})},Px=S.createContext({strict:!1}),lp={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"]},Ci={};for(const e in lp)Ci[e]={isEnabled:t=>lp[e].some(n=>!!t[n])};function qE(e){for(const t in e)Ci[t]={...Ci[t],...e[t]}}const YE=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function al(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||YE.has(e)}let Lx=e=>!al(e);function XE(e){typeof e=="function"&&(Lx=t=>t.startsWith("on")?!al(t):e(t))}try{XE(require("@emotion/is-prop-valid").default)}catch{}function ZE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Lx(o)||n===!0&&al(o)||!t&&!al(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Dl=S.createContext({});function jl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function As(e){return typeof e=="string"||Array.isArray(e)}const qf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Yf=["initial",...qf];function Vl(e){return jl(e.animate)||Yf.some(t=>As(e[t]))}function Fx(e){return!!(Vl(e)||e.variants)}function JE(e,t){if(Vl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||As(n)?n:void 0,animate:As(r)?r:void 0}}return e.inherit!==!1?t:{}}function QE(e){const{initial:t,animate:n}=JE(e,S.useContext(Dl));return S.useMemo(()=>({initial:t,animate:n}),[cp(t),cp(n)])}function cp(e){return Array.isArray(e)?e.join(" "):e}function up(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Xi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(he.test(e))e=parseFloat(e);else return e;const n=up(e,t.target.x),r=up(e,t.target.y);return`${n}% ${r}%`}},e2={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Or.parse(e);if(o.length>5)return r;const i=Or.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=Ze(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}},cd={borderRadius:{...Xi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xi,borderTopRightRadius:Xi,borderBottomLeftRadius:Xi,borderBottomRightRadius:Xi,boxShadow:e2};function $x(e,{layout:t,layoutId:n}){return Fi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!cd[e]||e==="opacity")}const t2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},n2=Li.length;function r2(e,t,n){let r="",o=!0;for(let i=0;i<n2;i++){const s=Li[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=_x(a,Wf[s]);if(!l){o=!1;const u=t2[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Xf(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(Fi.has(l)){s=!0;continue}else if(tx(l)){o[l]=c;continue}else{const u=_x(c,Wf[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=r2(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const Zf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ox(e,t,n){for(const r in t)!wt(t[r])&&!$x(r,n)&&(e[r]=t[r])}function o2({transformTemplate:e},t){return S.useMemo(()=>{const n=Zf();return Xf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function i2(e,t){const n=e.style||{},r={};return Ox(r,n,e),Object.assign(r,o2(e,t)),r}function s2(e,t){const n={},r=i2(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}const a2={offset:"stroke-dashoffset",array:"stroke-dasharray"},l2={offset:"strokeDashoffset",array:"strokeDasharray"};function c2(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?a2:l2;e[i.offset]=he.transform(-r);const s=he.transform(t),a=he.transform(n);e[i.array]=`${s} ${a}`}function Ix(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:s=0,...a},l,c,u){if(Xf(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&c2(f,o,i,s,!1)}const Dx=()=>({...Zf(),attrs:{}}),jx=e=>typeof e=="string"&&e.toLowerCase()==="svg";function u2(e,t,n,r){const o=S.useMemo(()=>{const i=Dx();return Ix(i,t,jx(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Ox(i,e.style,e),o.style={...i,...o.style}}return o}const d2=["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 Jf(e){return typeof e!="string"||e.includes("-")?!1:!!(d2.indexOf(e)>-1||/[A-Z]/u.test(e))}function f2(e,t,n,{latestValues:r},o,i=!1){const a=(Jf(e)?u2:s2)(t,r,o,e),l=ZE(t,typeof e=="string",i),c=e!==S.Fragment?{...l,...a,ref:n}:{},{children:u}=t,f=S.useMemo(()=>wt(u)?u.get():u,[u]);return S.createElement(e,{...c,children:f})}function dp(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Qf(e,t,n,r){if(typeof t=="function"){const[o,i]=dp(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=dp(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Ka(e){return wt(e)?e.get():e}function h2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:g2(n,r,o,e),renderState:t()}}function g2(e,t,n,r){const o={},i=r(e,{});for(const d in i)o[d]=Ka(i[d]);let{initial:s,animate:a}=e;const l=Vl(e),c=Fx(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const f=u?a:s;if(f&&typeof f!="boolean"&&!jl(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const g=Qf(e,d[h]);if(g){const{transitionEnd:p,transition:m,...x}=g;for(const y in x){let v=x[y];if(Array.isArray(v)){const b=u?v.length-1:0;v=v[b]}v!==null&&(o[y]=v)}for(const y in p)o[y]=p[y]}}}return o}const Vx=e=>(t,n)=>{const r=S.useContext(Dl),o=S.useContext(Il),i=()=>h2(e,t,r,o);return n?i():Tf(i)};function eh(e,t,n){const{style:r}=e,o={};for(const i in r)(wt(r[i])||t.style&&wt(t.style[i])||$x(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(o[i]=r[i]);return o}const p2=Vx({scrapeMotionValuesFromProps:eh,createRenderState:Zf});function Bx(e,t,n){const r=eh(e,t,n);for(const o in e)if(wt(e[o])||wt(t[o])){const i=Li.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const m2=Vx({scrapeMotionValuesFromProps:Bx,createRenderState:Dx}),y2=Symbol.for("motionComponentSymbol");function si(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function v2(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):si(n)&&(n.current=r))},[t])}const th=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),x2="framerAppearId",zx="data-"+th(x2),Hx=S.createContext({});function b2(e,t,n,r,o){const{visualElement:i}=S.useContext(Dl),s=S.useContext(Px),a=S.useContext(Il),l=S.useContext(Gf).reducedMotion,c=S.useRef(null);r=r||s.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=S.useContext(Hx);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&w2(c.current,n,o,f);const d=S.useRef(!1);S.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const h=n[zx],g=S.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return D0(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),g.current&&u.animationState&&u.animationState.animateChanges())}),S.useEffect(()=>{u&&(!g.current&&u.animationState&&u.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),g.current=!1),u.enteringChildren=void 0)}),u}function w2(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Wx(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&si(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Wx(e){if(e)return e.options.allowProjection!==!1?e.projection:Wx(e.parent)}function Lc(e,{forwardMotionProps:t=!1}={},n,r){n&&qE(n);const o=Jf(e)?m2:p2;function i(a,l){let c;const u={...S.useContext(Gf),...a,layoutId:C2(a)},{isStatic:f}=u,d=QE(a),h=o(a,f);if(!f&&Ef){S2(u,n);const g=_2(u);c=g.MeasureLayout,d.visualElement=b2(e,h,u,r,g.ProjectionNode)}return C.jsxs(Dl.Provider,{value:d,children:[c&&d.visualElement?C.jsx(c,{visualElement:d.visualElement,...u}):null,f2(e,a,v2(h,d.visualElement,l),h,f,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const s=S.forwardRef(i);return s[y2]=e,s}function C2({layoutId:e}){const t=S.useContext(_f).id;return t&&e!==void 0?t+"-"+e:e}function S2(e,t){const n=S.useContext(Px).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ni(!1,r,"lazy-strict-mode"):pr(!1,r,"lazy-strict-mode")}}function _2(e){const{drag:t,layout:n}=Ci;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function T2(e,t){if(typeof Proxy>"u")return Lc;const n=new Map,r=(i,s)=>Lc(i,s,e,t),o=(i,s)=>(process.env.NODE_ENV!=="production"&&Nf(!1,"motion() is deprecated. Use motion.create() instead."),r(i,s));return new Proxy(o,{get:(i,s)=>s==="create"?r:(n.has(s)||n.set(s,Lc(s,void 0,e,t)),n.get(s))})}function Kx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function E2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function R2(e,t){if(!t)return e;const 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 Fc(e){return e===void 0||e===1}function ud({scale:e,scaleX:t,scaleY:n}){return!Fc(e)||!Fc(t)||!Fc(n)}function ro(e){return ud(e)||Ux(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ux(e){return fp(e.x)||fp(e.y)}function fp(e){return e&&e!=="0%"}function ll(e,t,n){const r=e-n,o=t*r;return n+o}function hp(e,t,n,r,o){return o!==void 0&&(e=ll(e,o,r)),ll(e,n,r)+t}function dd(e,t=0,n=1,r,o){e.min=hp(e.min,t,n,r,o),e.max=hp(e.max,t,n,r,o)}function Gx(e,{x:t,y:n}){dd(e.x,t.translate,t.scale,t.originPoint),dd(e.y,n.translate,n.scale,n.originPoint)}const gp=.999999999999,pp=1.0000000000001;function k2(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&li(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Gx(e,s)),r&&ro(i.latestValues)&&li(e,i.latestValues))}t.x<pp&&t.x>gp&&(t.x=1),t.y<pp&&t.y>gp&&(t.y=1)}function ai(e,t){e.min=e.min+t,e.max=e.max+t}function mp(e,t,n,r,o=.5){const i=Ze(e.min,e.max,o);dd(e,t,n,i,r)}function li(e,t){mp(e.x,t.x,t.scaleX,t.scale,t.originX),mp(e.y,t.y,t.scaleY,t.scale,t.originY)}function qx(e,t){return Kx(R2(e.getBoundingClientRect(),t))}function A2(e,t,n){const r=qx(e,n),{scroll:o}=t;return o&&(ai(r.x,o.offset.x),ai(r.y,o.offset.y)),r}const yp=()=>({translate:0,scale:1,origin:0,originPoint:0}),ci=()=>({x:yp(),y:yp()}),vp=()=>({min:0,max:0}),at=()=>({x:vp(),y:vp()}),fd={current:null},Yx={current:!1};function M2(){if(Yx.current=!0,!!Ef)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fd.current=e.matches;e.addEventListener("change",t),t()}else fd.current=!1}const N2=new WeakMap;function P2(e,t,n){for(const r in t){const o=t[r],i=n[r];if(wt(o))e.addValue(r,o);else if(wt(i))e.addValue(r,wi(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,wi(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const xp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class L2{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=zf,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=()=>{const d=Ot.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,Ue.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Vl(n),this.isVariantNode=Fx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&wt(h)&&h.set(l[d])}}mount(t){this.current=t,N2.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Yx.current||M2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:fd.current,process.env.NODE_ENV!=="production"&&Nf(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(){this.projection&&this.projection.unmount(),$r(this.notifyUpdate),$r(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Fi.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ci){const n=Ci[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):at()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<xp.length;r++){const o=xp[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=P2(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=wi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(j0(r)||B0(r))?r=parseFloat(r):!BE(r)&&Or.test(n)&&(r=Sx(t,n)),this.setBaseTarget(t,wt(r)?r.get():r)),wt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Qf(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!wt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Mf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Kf.render(this.render)}}class Xx extends L2{constructor(){super(...arguments),this.KeyframeResolver=AE}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;wt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Zx(e,{style:t,vars:n},r,o){const i=e.style;let s;for(s in t)i[s]=t[s];o?.applyProjectionStyles(i,r);for(s in n)i.setProperty(s,n[s])}function F2(e){return window.getComputedStyle(e)}class $2 extends Xx{constructor(){super(...arguments),this.type="html",this.renderInstance=Zx}readValueFromInstance(t,n){if(Fi.has(n))return this.projection?.isProjecting?nd(n):GT(t,n);{const r=F2(t),o=(tx(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return qx(t,n)}build(t,n,r){Xf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return eh(t,n,r)}}const Jx=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 O2(e,t,n,r){Zx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Jx.has(o)?o:th(o),t.attrs[o])}class I2 extends Xx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=at}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Fi.has(n)){const r=Cx(n);return r&&r.default||0}return n=Jx.has(n)?n:th(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Bx(t,n,r)}build(t,n,r){Ix(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){O2(t,n,r,o)}mount(t){this.isSVGTag=jx(t.tagName),super.mount(t)}}const D2=(e,t)=>Jf(e)?new I2(t):new $2(t,{allowProjection:e!==S.Fragment});function di(e,t,n){const r=e.getProps();return Qf(r,t,n!==void 0?n:r.custom,e)}const hd=e=>Array.isArray(e);function j2(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wi(n))}function V2(e){return hd(e)?e[e.length-1]||0:e}function B2(e,t){const n=di(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=V2(i[s]);j2(e,s,a)}}function z2(e){return!!(wt(e)&&e.add)}function gd(e,t){const n=e.getValue("willChange");if(z2(n))return n.add(t);if(!n&&mr.WillChange){const r=new mr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Qx(e){return e.props[zx]}const H2=e=>e!==null;function W2(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(H2),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}const K2={type:"spring",stiffness:500,damping:25,restSpeed:10},U2=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),G2={type:"keyframes",duration:.8},q2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Y2=(e,{keyframes:t})=>t.length>2?G2:Fi.has(e)?e.startsWith("scale")?U2(t[1]):K2:q2;function X2({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const nh=(e,t,n,r={},o,i)=>s=>{const a=Hf(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Cn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};X2(a)||Object.assign(u,Y2(e,u)),u.duration&&(u.duration=Cn(u.duration)),u.repeatDelay&&(u.repeatDelay=Cn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ad(u),u.delay===0&&(f=!0)),(mr.instantAnimations||mr.skipAnimations)&&(f=!0,ad(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!i&&t.get()!==void 0){const d=W2(u.keyframes,a);if(d!==void 0){Ue.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Bf(u):new mE(u)};function Z2({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function eb(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:s,...a}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in a){const f=e.getValue(u,e.latestValues[u]??null),d=a[u];if(d===void 0||c&&Z2(c,u))continue;const h={delay:n,...Hf(i||{},u)},g=f.get();if(g!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===g&&!h.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const x=Qx(e);if(x){const y=window.MotionHandoffAnimation(x,u,Ue);y!==null&&(h.startTime=y,p=!0)}}gd(e,u),f.start(nh(u,f,d,e.shouldReduceMotion&&xx.has(u)?{type:!1}:h,e,p));const m=f.animation;m&&l.push(m)}return s&&Promise.all(l).then(()=>{Ue.update(()=>{s&&B2(e,s)})}),l}function tb(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(i,s):o===1?i*r:a-i*r}function pd(e,t,n={}){const r=di(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(eb(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=o;return J2(e,t,l,c,u,f,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,c]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>c())}else return Promise.all([i(),s(n.delay)])}function J2(e,t,n=0,r=0,o=0,i=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(pd(l,t,{...s,delay:n+(typeof r=="function"?0:r)+tb(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Q2(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>pd(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=pd(e,t,n);else{const o=typeof t=="function"?di(e,t,n.custom):t;r=Promise.all(eb(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function nb(e,t){if(!Array.isArray(t))return!1;const 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}const eR=Yf.length;function rb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?rb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<eR;n++){const r=Yf[n],o=e.props[r];(As(o)||o===!1)&&(t[r]=o)}return t}const tR=[...qf].reverse(),nR=qf.length;function rR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Q2(e,n,r)))}function oR(e){let t=rR(e),n=bp(),r=!0;const o=l=>(c,u)=>{const f=di(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:h,...g}=f;c={...c,...g,...h}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,u=rb(e.parent)||{},f=[],d=new Set;let h={},g=1/0;for(let m=0;m<nR;m++){const x=tR[m],y=n[x],v=c[x]!==void 0?c[x]:u[x],b=As(v),w=x===l?y.isActive:null;w===!1&&(g=m);let _=v===u[x]&&v!==c[x]&&b;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),y.protectedKeys={...h},!y.isActive&&w===null||!v&&!y.prevProp||jl(v)||typeof v=="boolean")continue;const E=iR(y.prevProp,v);let T=E||x===l&&y.isActive&&!_&&b||m>g&&b,k=!1;const P=Array.isArray(v)?v:[v];let O=P.reduce(o(x),{});w===!1&&(O={});const{prevResolvedValues:D={}}=y,I={...D,...O},$=L=>{T=!0,d.has(L)&&(k=!0,d.delete(L)),y.needsAnimating[L]=!0;const N=e.getValue(L);N&&(N.liveStyle=!1)};for(const L in I){const N=O[L],V=D[L];if(h.hasOwnProperty(L))continue;let K=!1;hd(N)&&hd(V)?K=!nb(N,V):K=N!==V,K?N!=null?$(L):d.add(L):N!==void 0&&d.has(L)?$(L):y.protectedKeys[L]=!0}y.prevProp=v,y.prevResolvedValues=O,y.isActive&&(h={...h,...O}),r&&e.blockInitialAnimation&&(T=!1);const H=_&&E;T&&(!H||k)&&f.push(...P.map(L=>{const N={type:x};if(typeof L=="string"&&r&&!H&&e.manuallyAnimateOnMount&&e.parent){const{parent:V}=e,K=di(V,L);if(V.enteringChildren&&K){const{delayChildren:te}=K.transition||{};N.delay=tb(V.enteringChildren,e,te)}}return{animation:L,options:N}}))}if(d.size){const m={};if(typeof c.initial!="boolean"){const x=di(e,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(m.transition=x.transition)}d.forEach(x=>{const y=e.getBaseTarget(x),v=e.getValue(x);v&&(v.liveStyle=!0),m[x]=y??null}),f.push({animation:m})}let p=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(f):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,c)),n[l].isActive=c;const u=s(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=bp()}}}function iR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!nb(t,e):!1}function Qr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function bp(){return{animate:Qr(!0),whileInView:Qr(),whileHover:Qr(),whileTap:Qr(),whileDrag:Qr(),whileFocus:Qr(),exit:Qr()}}class Ur{constructor(t){this.isMounted=!1,this.node=t}update(){}}class sR extends Ur{constructor(t){super(t),t.animationState||(t.animationState=oR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();jl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let aR=0;class lR extends Ur{constructor(){super(...arguments),this.id=aR++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const cR={animation:{Feature:sR},exit:{Feature:lR}};function Ms(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Hs(e){return{point:{x:e.pageX,y:e.pageY}}}const uR=e=>t=>Uf(t)&&e(t,Hs(t));function ms(e,t,n,r){return Ms(e,t,uR(n),r)}const ob=1e-4,dR=1-ob,fR=1+ob,ib=.01,hR=0-ib,gR=0+ib;function At(e){return e.max-e.min}function pR(e,t,n){return Math.abs(e-t)<=n}function wp(e,t,n,r=.5){e.origin=r,e.originPoint=Ze(t.min,t.max,e.origin),e.scale=At(n)/At(t),e.translate=Ze(n.min,n.max,e.origin)-e.originPoint,(e.scale>=dR&&e.scale<=fR||isNaN(e.scale))&&(e.scale=1),(e.translate>=hR&&e.translate<=gR||isNaN(e.translate))&&(e.translate=0)}function ys(e,t,n,r){wp(e.x,t.x,n.x,r?r.originX:void 0),wp(e.y,t.y,n.y,r?r.originY:void 0)}function Cp(e,t,n){e.min=n.min+t.min,e.max=e.min+At(t)}function mR(e,t,n){Cp(e.x,t.x,n.x),Cp(e.y,t.y,n.y)}function Sp(e,t,n){e.min=t.min-n.min,e.max=e.min+At(t)}function cl(e,t,n){Sp(e.x,t.x,n.x),Sp(e.y,t.y,n.y)}function rn(e){return[e("x"),e("y")]}const sb=({current:e})=>e?e.ownerDocument.defaultView:null,_p=(e,t)=>Math.abs(e-t);function yR(e,t){const n=_p(e.x,t.x),r=_p(e.y,t.y);return Math.sqrt(n**2+r**2)}class ab{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Oc(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=yR(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!g)return;const{point:p}=d,{timestamp:m}=ht;this.history.push({...p,timestamp:m});const{onStart:x,onMove:y}=this.handlers;h||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=$c(h,this.transformPagePoint),Ue.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:g,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Oc(d.type==="pointercancel"?this.lastMoveEventInfo:$c(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,x),p&&p(d,x)},!Uf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const a=Hs(t),l=$c(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=ht;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,Oc(l,this.history)),this.removeListeners=Vs(ms(this.contextWindow,"pointermove",this.handlePointerMove),ms(this.contextWindow,"pointerup",this.handlePointerUp),ms(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),$r(this.updatePoint)}}function $c(e,t){return t?{point:t(e.point)}:e}function Tp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Oc({point:e},t){return{point:e,delta:Tp(e,lb(t)),offset:Tp(e,vR(t)),velocity:xR(t,.1)}}function vR(e){return e[0]}function lb(e){return e[e.length-1]}function xR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=lb(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Cn(t)));)n--;if(!r)return{x:0,y:0};const i=sn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function bR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ze(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ze(n,e,r.max):Math.min(e,n)),e}function Ep(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function wR(e,{top:t,left:n,bottom:r,right:o}){return{x:Ep(e.x,n,o),y:Ep(e.y,t,r)}}function Rp(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 CR(e,t){return{x:Rp(e.x,t.x),y:Rp(e.y,t.y)}}function SR(e,t){let n=.5;const r=At(e),o=At(t);return o>r?n=Es(t.min,t.max-r,e.min):r>o&&(n=Es(e.min,e.max-o,t.min)),gr(0,1,n)}function _R(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const md=.35;function TR(e=md){return e===!1?e=0:e===!0&&(e=md),{x:kp(e,"left","right"),y:kp(e,"top","bottom")}}function kp(e,t,n){return{min:Ap(e,t),max:Ap(e,n)}}function Ap(e,t){return typeof e=="number"?e:e[t]||0}const ER=new WeakMap;class RR{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=at(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Hs(f).point)},s=(f,d)=>{const{drag:h,dragPropagation:g,onDragStart:p}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=LE(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rn(x=>{let y=this.getAxisMotionValue(x).get()||0;if(Vn.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[x];b&&(y=At(b)*(parseFloat(y)/100))}}this.originPoint[x]=y}),p&&Ue.postRender(()=>p(f,d)),gd(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:g,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:x}=d;if(g&&this.currentDirection===null){this.currentDirection=kR(x),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),m&&m(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>rn(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ab(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:sb(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:s}=o;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&Ue.postRender(()=>a(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!pa(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=bR(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&si(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=wR(r.layoutBox,t):this.constraints=!1,this.elastic=TR(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&rn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=_R(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!si(t))return!1;const r=t.current;pr(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=A2(r,o.root,this.visualElement.getTransformPagePoint());let s=CR(o.layout.layoutBox,i);if(n){const a=n(E2(s));this.hasMutatedConstraints=!!a,a&&(s=Kx(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=rn(u=>{if(!pa(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,g={type:"inertia",velocity:r?t[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,g)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return gd(this.visualElement,t),r.start(nh(t,r,0,n,this.visualElement,!1))}stopAnimation(){rn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){rn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){rn(n=>{const{drag:r}=this.getProps();if(!pa(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-Ze(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!si(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};rn(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=SR({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),rn(s=>{if(!pa(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Ze(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;ER.set(this.visualElement,this);const t=this.visualElement.current,n=ms(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();si(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ue.read(r);const s=Ms(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(rn(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())}));return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=md,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function pa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function kR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class AR extends Ur{constructor(t){super(t),this.removeGroupControls=an,this.removeListeners=an,this.controls=new RR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||an}unmount(){this.removeGroupControls(),this.removeListeners()}}const Mp=e=>(t,n)=>{e&&Ue.postRender(()=>e(t,n))};class MR extends Ur{constructor(){super(...arguments),this.removePointerDownListener=an}onPointerDown(t){this.session=new ab(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Mp(t),onStart:Mp(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&Ue.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=ms(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ua={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Ic=!1;class NR extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),Ic&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Ua.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:s}=r;return s&&(s.isPresent=i,Ic=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Ue.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Kf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Ic=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function cb(e){const[t,n]=Mx(),r=S.useContext(_f);return C.jsx(NR,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Hx),isPresent:t,safeToRemove:n})}function PR(e,t,n){const r=wt(e)?e:wi(e);return r.start(nh("",r,t,n)),r.animation}const LR=(e,t)=>e.depth-t.depth;class FR{constructor(){this.children=[],this.isDirty=!1}add(t){Rf(this.children,t),this.isDirty=!0}remove(t){kf(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(LR),this.isDirty=!1,this.children.forEach(t)}}function $R(e,t){const n=Ot.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&($r(r),e(i-t))};return Ue.setup(r,!0),()=>$r(r)}const ub=["TopLeft","TopRight","BottomLeft","BottomRight"],OR=ub.length,Np=e=>typeof e=="string"?parseFloat(e):e,Pp=e=>typeof e=="number"||he.test(e);function IR(e,t,n,r,o,i){o?(e.opacity=Ze(0,n.opacity??1,DR(r)),e.opacityExit=Ze(t.opacity??1,0,jR(r))):i&&(e.opacity=Ze(t.opacity??1,n.opacity??1,r));for(let s=0;s<OR;s++){const a=`border${ub[s]}Radius`;let l=Lp(t,a),c=Lp(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Pp(l)===Pp(c)?(e[a]=Math.max(Ze(Np(l),Np(c),r),0),(Vn.test(c)||Vn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ze(t.rotate||0,n.rotate||0,r))}function Lp(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const DR=db(0,.5,Y0),jR=db(.5,.95,an);function db(e,t,n){return r=>r<e?0:r>t?1:n(Es(e,t,r))}function Fp(e,t){e.min=t.min,e.max=t.max}function hn(e,t){Fp(e.x,t.x),Fp(e.y,t.y)}function $p(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Op(e,t,n,r,o){return e-=t,e=ll(e,1/n,r),o!==void 0&&(e=ll(e,1/o,r)),e}function VR(e,t=0,n=1,r=.5,o,i=e,s=e){if(Vn.test(t)&&(t=parseFloat(t),t=Ze(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ze(i.min,i.max,r);e===i&&(a-=t),e.min=Op(e.min,t,n,a,o),e.max=Op(e.max,t,n,a,o)}function Ip(e,t,[n,r,o],i,s){VR(e,t[n],t[r],t[o],t.scale,i,s)}const BR=["x","scaleX","originX"],zR=["y","scaleY","originY"];function Dp(e,t,n,r){Ip(e.x,t,BR,n?n.x:void 0,r?r.x:void 0),Ip(e.y,t,zR,n?n.y:void 0,r?r.y:void 0)}function jp(e){return e.translate===0&&e.scale===1}function fb(e){return jp(e.x)&&jp(e.y)}function Vp(e,t){return e.min===t.min&&e.max===t.max}function HR(e,t){return Vp(e.x,t.x)&&Vp(e.y,t.y)}function Bp(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function hb(e,t){return Bp(e.x,t.x)&&Bp(e.y,t.y)}function zp(e){return At(e.x)/At(e.y)}function Hp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class WR{constructor(){this.members=[]}add(t){Rf(this.members,t),t.scheduleRender()}remove(t){if(kf(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function KR(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=n?.z||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:g}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),g&&(r+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Dc=["","X","Y","Z"],UR=1e3;let GR=0;function jc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function gb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Qx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ue,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&gb(r)}function pb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=GR++,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,this.nodes.forEach(XR),this.nodes.forEach(ek),this.nodes.forEach(tk),this.nodes.forEach(ZR)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new FR)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Mf),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Ax(s)&&!jE(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,f=0;const d=()=>this.root.updateBlockedByResize=!1;Ue.read(()=>{f=window.innerWidth}),e(s,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=$R(d,250),Ua.hasAnimatedSinceResize&&(Ua.hasAnimatedSinceResize=!1,this.nodes.forEach(Up)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||sk,{onLayoutAnimationStart:p,onLayoutAnimationComplete:m}=c.getProps(),x=!this.targetLayout||!hb(this.targetLayout,h),y=!f&&d;if(this.options.layoutRoot||this.resumeFrom||y||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Hf(g,"layout"),onPlay:p,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,y)}else f||Up(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),$r(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(nk),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&gb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Wp);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Kp);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(QR),this.nodes.forEach(qR),this.nodes.forEach(YR)):this.nodes.forEach(Kp),this.clearAllSnapshots();const a=Ot.now();ht.delta=gr(0,1e3/60,a-ht.timestamp),ht.timestamp=a,ht.isProcessing=!0,Rc.update.process(ht),Rc.preRender.process(ht),Rc.render.process(ht),ht.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Kf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(JR),this.sharedNodes.forEach(rk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ue.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ue.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!At(this.snapshot.measuredBox.x)&&!At(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=at(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!fb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||ro(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),ak(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return at();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(lk))){const{scroll:c}=this.root;c&&(ai(a.x,c.offset.x),ai(a.y,c.offset.y))}return a}removeElementScroll(s){const a=at();if(hn(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;c!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&hn(a,s),ai(a.x,u.offset.x),ai(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=at();hn(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&li(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),ro(u.latestValues)&&li(l,u.latestValues)}return ro(this.latestValues)&&li(l,this.latestValues),l}removeTransform(s){const a=at();hn(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ro(c.latestValues))continue;ud(c.latestValues)&&c.updateSnapshot();const u=at(),f=c.measurePageBox();hn(u,f),Dp(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return ro(this.latestValues)&&Dp(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}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!==ht.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=ht.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=at(),this.targetWithTransforms=at()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hn(this.target,this.layout.layoutBox),Gx(this.target,this.targetDelta)):hn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ud(this.parent.latestValues)||Ux(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,l){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),cl(this.relativeTargetOrigin,a,l),hn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===ht.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;hn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;k2(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=at());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($p(this.prevProjectionDelta.x,this.projectionDelta.x),$p(this.prevProjectionDelta.y,this.projectionDelta.y)),ys(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Hp(this.projectionDelta.x,this.prevProjectionDelta.x)||!Hp(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ci(),this.projectionDelta=ci(),this.projectionDeltaWithTransform=ci()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=ci();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=at(),h=l?l.source:void 0,g=this.layout?this.layout.source:void 0,p=h!==g,m=this.getStack(),x=!m||m.members.length<=1,y=!!(p&&!x&&this.options.crossfade===!0&&!this.path.some(ik));this.animationProgress=0;let v;this.mixTargetDelta=b=>{const w=b/1e3;Gp(f.x,s.x,w),Gp(f.y,s.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(cl(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ok(this.relativeTarget,this.relativeTargetOrigin,d,w),v&&HR(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=at()),hn(v,this.relativeTarget)),p&&(this.animationValues=u,IR(u,c,this.latestValues,w,y,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&($r(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ue.update(()=>{Ua.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=wi(0)),this.currentAnimation=PR(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(UR),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&mb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||at();const f=At(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=At(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}hn(a,l),li(a,u),ys(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new WR),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&jc("z",s,c,this.animationValues);for(let u=0;u<Dc.length;u++)jc(`rotate${Dc[u]}`,s,c,this.animationValues),jc(`skew${Dc[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Ka(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Ka(a?.pointerEvents)||""),this.hasProjected&&!ro(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=KR(this.projectionDeltaWithTransform,this.treeScale,u);l&&(f=l(u,f)),s.transform=f;const{x:d,y:h}=this.projectionDelta;s.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in cd){if(u[g]===void 0)continue;const{correct:p,applyTo:m,isCSSVariable:x}=cd[g],y=f==="none"?u[g]:p(u[g],c);if(m){const v=m.length;for(let b=0;b<v;b++)s[m[b]]=y}else x?this.options.visualElement.renderState.vars[g]=y:s[g]=y}this.options.layoutId&&(s.pointerEvents=c===this?Ka(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(Wp),this.root.sharedNodes.clear()}}}function qR(e){e.updateLayout()}function YR(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?rn(u=>{const f=i?t.measuredBox[u]:t.layoutBox[u],d=At(f);f.min=n[u].min,f.max=f.min+d}):mb(o,t.layoutBox,n)&&rn(u=>{const f=i?t.measuredBox[u]:t.layoutBox[u],d=At(n[u]);f.max=f.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+d)});const s=ci();ys(s,n,t.layoutBox);const a=ci();i?ys(a,e.applyTransform(r,!0),t.measuredBox):ys(a,n,t.layoutBox);const l=!fb(s);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:d}=u;if(f&&d){const h=at();cl(h,t.layoutBox,f.layoutBox);const g=at();cl(g,n,d.layoutBox),hb(h,g)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function XR(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ZR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function JR(e){e.clearSnapshot()}function Wp(e){e.clearMeasurements()}function Kp(e){e.isLayoutDirty=!1}function QR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Up(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ek(e){e.resolveTargetDelta()}function tk(e){e.calcProjection()}function nk(e){e.resetSkewAndRotation()}function rk(e){e.removeLeadSnapshot()}function Gp(e,t,n){e.translate=Ze(t.translate,0,n),e.scale=Ze(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function qp(e,t,n,r){e.min=Ze(t.min,n.min,r),e.max=Ze(t.max,n.max,r)}function ok(e,t,n,r){qp(e.x,t.x,n.x,r),qp(e.y,t.y,n.y,r)}function ik(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const sk={duration:.45,ease:[.4,0,.1,1]},Yp=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Xp=Yp("applewebkit/")&&!Yp("chrome/")?Math.round:an;function Zp(e){e.min=Xp(e.min),e.max=Xp(e.max)}function ak(e){Zp(e.x),Zp(e.y)}function mb(e,t,n){return e==="position"||e==="preserve-aspect"&&!pR(zp(t),zp(n),.2)}function lk(e){return e!==e.root&&e.scroll?.wasRoot}const ck=pb({attachResizeListener:(e,t)=>Ms(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vc={current:void 0},yb=pb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vc.current){const e=new ck({});e.mount(window),e.setOptions({layoutScroll:!0}),Vc.current=e}return Vc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),uk={pan:{Feature:MR},drag:{Feature:AR,ProjectionNode:yb,MeasureLayout:cb}};function Jp(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&Ue.postRender(()=>i(t,Hs(t)))}class dk extends Ur{mount(){const{current:t}=this.node;t&&(this.unmount=FE(t,(n,r)=>(Jp(this.node,r,"Start"),o=>Jp(this.node,o,"End"))))}unmount(){}}class fk extends Ur{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Vs(Ms(this.node.current,"focus",()=>this.onFocus()),Ms(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Qp(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&Ue.postRender(()=>i(t,Hs(t)))}class hk extends Ur{mount(){const{current:t}=this.node;t&&(this.unmount=DE(t,(n,r)=>(Qp(this.node,r,"Start"),(o,{success:i})=>Qp(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const yd=new WeakMap,Bc=new WeakMap,gk=e=>{const t=yd.get(e.target);t&&t(e)},pk=e=>{e.forEach(gk)};function mk({root:e,...t}){const n=e||document;Bc.has(n)||Bc.set(n,{});const r=Bc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(pk,{root:e,...t})),r[o]}function yk(e,t,n){const r=mk(t);return yd.set(e,n),r.observe(e),()=>{yd.delete(e),r.unobserve(e)}}const vk={some:0,all:1};class xk extends Ur{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:vk[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return yk(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(bk(t,n))&&this.startObserver()}unmount(){}}function bk({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const wk={inView:{Feature:xk},tap:{Feature:hk},focus:{Feature:fk},hover:{Feature:dk}},Ck={layout:{ProjectionNode:yb,MeasureLayout:cb}},Sk={...cR,...wk,...uk,...Ck},Ws=T2(Sk,D2),gn={fontFamily:"Inter, sans-serif",wordBreak:"break-word"},me={common:gn,title1:{...gn,fontSize:32,lineHeight:"36px",[ls.md()]:{fontSize:24}},title2:{...gn,fontSize:24,lineHeight:"28px",[ls.md()]:{fontSize:20}},title3:{...gn,fontSize:20,lineHeight:"28px",[ls.md()]:{fontSize:18},[ls.xs()]:{fontSize:16}},headline1:{...gn,fontSize:22,lineHeight:"26px"},headline2:{...gn,fontSize:18,lineHeight:"22px"},headline3:{...gn,fontSize:16,lineHeight:"20px"},body1:{...gn,fontSize:16,lineHeight:"24px"},body2:{...gn,fontSize:14,lineHeight:"20px"},caption1:{...gn,fontSize:12,lineHeight:"16px"},caption2:{...gn,fontSize:10,lineHeight:"14px"}},{transition:_k,color:Zn,fontWeight:ma}=j,ya={text:R.css({...me.common,transition:_k.general}),"title-1":R.css({...me.title1}),"title-2":R.css({...me.title2}),"title-3":R.css({...me.title3}),"headline-1":R.css({...me.headline1}),"headline-2":R.css({...me.headline2}),"headline-3":R.css({...me.headline3}),"body-1":R.css({...me.body1}),"body-2":R.css({...me.body2}),"caption-1":R.css({...me.caption1}),"caption-2":R.css({...me.caption2}),primary:R.css({color:Zn.text.primary}),secondary:R.css({color:Zn.text.secondary}),tertiary:R.css({color:Zn.text.tertiary}),positive:R.css({color:Zn.text.positive}),negative:R.css({color:Zn.text.negative}),warning:R.css({color:Zn.text.warning}),accent:R.css({color:Zn.text.accent}),inverse:R.css({color:Zn.text.inverse}),transfer:R.css({color:Zn.text.transfer}),regular:R.css({fontWeight:ma.regular}),medium:R.css({fontWeight:ma.medium}),semibold:R.css({fontWeight:ma.semibold}),bold:R.css({fontWeight:ma.bold})},Tk=e=>{let t;e.center?t="center":e.left?t="left":e.right&&(t="right");let n;return e.uppercase?n="uppercase":e.lowercase?n="lowercase":e.capitalize&&(n="capitalize"),R.css({marginTop:e.mt,marginBottom:e.mb,marginRight:e.mr,marginLeft:e.ml,flex:e.flex,cursor:e.cursor,wordBreak:e.wordBreak,whiteSpace:e.whiteSpace,textOverflow:e.textOverflow,textDecoration:e.decoration,textAlign:t,textTransform:n,color:e.color,opacity:e.disabled?.5:void 0,overflow:e.overflow})},se=S.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:r="medium",tag:o="p",colorName:i="primary",style:s,clickOpacity:a=.5,opacityDuration:l=200,onClick:c,disabled:u,mt:f,mb:d,ml:h,mr:g,flex:p,cursor:m,wordBreak:x,whiteSpace:y,textOverflow:v,decoration:b,color:w,center:_,left:E,right:T,uppercase:k,lowercase:P,capitalize:O,overflow:D,...I},$)=>{const[H,U]=S.useState(!1),L=!!c,N=()=>L&&U(!0),V=()=>L&&U(!1),K=Tk({mt:f,mb:d,ml:h,mr:g,flex:p,cursor:m,wordBreak:x,whiteSpace:y,textOverflow:v,decoration:b,color:w,center:_,left:E,right:T,uppercase:k,lowercase:P,capitalize:O,overflow:D}),te=o,J=L?R.css({opacity:H?a:1,transition:`opacity ${l}ms ease`}):"";return C.jsx(te,{ref:$,...I,className:R.cx(ya.text,ya[n],ya[i],ya[r],J,t,K),style:s,onClick:c,onMouseDown:N,onMouseUp:V,onMouseLeave:V,onTouchStart:N,onTouchEnd:V,role:L?"button":void 0,tabIndex:L?0:void 0,children:e})});se.displayName="Text";const vb=Ws(se),{color:vd,cornerRadius:Kt,height:va,transition:Ek}=j,Rk=R.css({display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:16,height:48,padding:"0 16px",cursor:"pointer",fontSize:16,fontWeight:600,overflow:"hidden",transition:"all 0.2s ease",gap:8}),Zi={zero:Kt.zero,xs:Kt.xs,sm:Kt.sm,md:Kt.md,lg:Kt.lg,xl:Kt.xl,"2xl":Kt["2xl"],"3xl":Kt["3xl"],"4xl":Kt["4xl"],"5xl":Kt["5xl"],"6xl":Kt["6xl"],"full-round":Kt.fullRound},kk={xs:va.button.xs,sm:va.button.sm,md:va.button.md,lg:va.button.lg},Ak={clear:R.css({backgroundColor:"transparent",border:"none"}),filled:R.css({backgroundColor:vd.fill.accentPrimary,color:"white",border:"none"}),outline:R.css({backgroundColor:"transparent",border:`1px solid ${vd.border.accentPrimary}`})},Mk=(e,t,n,r)=>{if(r)return R.css({cursor:"not-allowed",opacity:.7});const o={transition:Ek.general,borderRadius:Kt.lg,border:"none",color:e==="filled"?vd.text.inverse:`var(--text-${t})`};switch(e){case"filled":return R.css({...o,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return R.css({...o,backgroundColor:"transparent",border:`1px solid var(--border-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});case"clear":return R.css({...o,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return R.css(o)}},{color:xa}=j,Si=({disabled:e,loading:t,wrapperClassName:n,buttonClassName:r,buttonDisabledClassName:o,textClassName:i,children:s,variant:a="filled",backgroundColor:l,textColor:c,textFontWeight:u,borderColor:f,color:d="accent",opacity:h,borderRadius:g,width:p="full",size:m="md",iconLeft:x,iconRight:y,intensity:v="primary",flex:b,type:w="button",..._})=>{const E=S.useMemo(()=>{switch(p){case"full":return"100%";case"auto":return"auto";default:return p}},[p]),T=S.useMemo(()=>l||(a==="filled"?d==="neutral"?xa.fill.neutralSecondary:`var(--fill-${d}-${v})`:"transparent"),[a,l,d,v]),k=S.useMemo(()=>{if(v==="primary"){if(d==="neutral")return xa.text.secondary;if(a==="filled")return xa.text.inverse}else if(d==="neutral")return xa.text.secondary;return`var(--text-${d})`},[v,d,a]),P=S.useMemo(()=>{if(v==="primary"){if(d==="neutral")return"secondary";if(a==="filled")return"inverse"}else if(d==="neutral")return"secondary";return d},[a,d,v]),O=S.useMemo(()=>f||(a==="outline"?`var(--border-${d}-${v})`:"transparent"),[a,f,d,v]),D=S.useMemo(()=>{switch(m){case"lg":return Zi.lg;case"md":case"sm":return Zi.md;case"xs":return Zi.sm;default:return Zi.md}},[m]),I=R.cx(Rk,Mk(a,d,v,e),Ak[a],e?o:void 0,R.css({borderRadius:g?Zi[g]:D,backgroundColor:T,borderColor:O,color:c??`var(--text-${P})`,width:"100%",height:kk[m],opacity:h||(e?.7:1)}),r),$=S.useMemo(()=>{switch(m){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[m]);return C.jsx(G,{className:R.cx(n),w:E,flex:b,relative:!0,overflow:"hidden",children:C.jsxs(Ws.button,{..._,whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},disabled:e||t,className:I,type:w,children:[t?C.jsx(L0,{color:k}):C.jsxs(C.Fragment,{children:[x,C.jsx(vb,{style:{color:c},colorName:P,variant:$,className:i,textOverflow:"ellipsis",overflow:"hidden",children:s}),y]}),C.jsx(Lo,{})]})})},Nk=e=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},M.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),Pk=e=>M.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},M.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),{color:eo}=j,br={checkbox:R.css({display:"inline-flex",alignItems:"flex-start",gap:8,userSelect:"none"}),disabled:R.css({cursor:"not-allowed",opacity:.5}),checkbox__input:R.css({position:"absolute",opacity:0,width:"var(--checkbox-size)",height:"var(--checkbox-size)"}),checkbox__box:R.css({width:"var(--checkbox-size)",height:"var(--checkbox-size)",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:4,border:`1px solid ${eo.border.neutralAlphaHigh}`,backgroundColor:eo.fill.bgSecondary,opacity:1,transition:"all 0.15s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative","& svg":{color:eo.border.accentPrimary}}),checked:R.css({borderColor:`${eo.border.accentPrimary} !important`,backgroundColor:`${eo.fill.accentSecondary} !important`}),error:R.css({borderColor:eo.border.negativePrimary,backgroundColor:eo.fill.negativeSecondary})},Lk={primary:R.css({}),secondary:R.css({backgroundColor:"transparent"})},Fk={sm:20,md:24},rh=S.forwardRef(({checked:e,onChange:t,disabled:n,error:r,indeterminate:o,size:i="md",title:s,titleColor:a,subtitle:l,subtitleColor:c="secondary",name:u,required:f,variant:d="primary",flex:h,readOnly:g},p)=>{const[m,x]=S.useState(!1),y=e!==void 0,v=y?e:m,b=k=>{y||x(k.target.checked),t?.(k)},w=Fk[i],_=v||o,E=!!g&&!n,T=n?"not-allowed":E?"auto":"pointer";return C.jsxs("label",{className:R.cx(br.checkbox,R.css({flex:h,cursor:T}),{[br.disabled]:n}),children:[C.jsxs(G,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${w}px`,"--checkbox-size-double":`${w*2}px`},children:[C.jsx("input",{ref:p,type:"checkbox",checked:v,onChange:E?void 0:b,onClick:k=>k.stopPropagation(),disabled:n,readOnly:E,name:u,required:f,className:R.cx(br.checkbox__input,{[br.disabled]:n},R.css({cursor:T}))}),C.jsx("div",{className:R.cx(br.checkbox__box,Lk[d],{[br.disabled]:n,[br.error]:r,[br.checked]:_}),children:_&&(o?C.jsx(Pk,{width:w*.75,height:w*.75}):C.jsx(Nk,{width:w*.75,height:w*.75}))})]}),(s||l)&&C.jsxs(G,{gap:4,children:[s&&C.jsx(se,{colorName:a,variant:i==="sm"?"body-2":"body-1",children:s}),l&&C.jsx(se,{variant:"body-2",colorName:c,children:l})]})]})});rh.displayName="Checkbox";const $k=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("g",{opacity:.5},M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0002 17.9999C14.4185 17.9999 18.0002 14.4182 18.0002 9.99991C18.0002 5.58163 14.4185 1.99991 10.0002 1.99991C5.58197 1.99991 2.00024 5.58163 2.00024 9.99991C2.00024 14.4182 5.58197 17.9999 10.0002 17.9999ZM6.46514 6.46446C6.85566 6.07393 7.48883 6.07393 7.87935 6.46446L9.64712 8.23222C9.84238 8.42749 10.159 8.42749 10.3542 8.23222L12.122 6.46446C12.5125 6.07393 13.1457 6.07393 13.5362 6.46446C13.9267 6.85498 13.9267 7.48814 13.5362 7.87867L11.7684 9.64644C11.5732 9.8417 11.5732 10.1583 11.7684 10.3535L13.5362 12.1213C13.9267 12.5118 13.9267 13.145 13.5362 13.5355C13.1457 13.926 12.5125 13.926 12.122 13.5355L10.3542 11.7678C10.159 11.5725 9.84238 11.5725 9.64712 11.7678L7.87935 13.5355C7.48883 13.926 6.85566 13.926 6.46514 13.5355C6.07462 13.145 6.07462 12.5118 6.46514 12.1213L8.23291 10.3535C8.42817 10.1583 8.42817 9.8417 8.23291 9.64644L6.46514 7.87867C6.07462 7.48815 6.07462 6.85498 6.46514 6.46446Z",fill:"currentColor"}))),{color:Jt,spacing:Ji}=j,zc=R.css({opacity:.6,cursor:"not-allowed"}),yt={"input-container":R.css({backgroundColor:Jt.fill.accentSecondary,border:`1px solid ${Jt.border.neutralAlphaBasic}`,padding:`${Ji.md} ${Ji.lg}`,borderRadius:12,minHeight:40,width:"100%",transition:"border-color 0.2s ease, background-color 0.2s ease","& textarea":{resize:"none"},[`&:not(.${zc}):hover`]:{backgroundColor:Jt.fill.neutralPrimaryHover},"&:focus-within":{borderColor:Jt.border.accentPrimary,[`&:not(.${zc}):hover`]:{borderColor:Jt.border.accentPrimary}}}),input:R.css({...me.common,...me.body1,background:"transparent",width:"100%",color:Jt.text.primary,"&::placeholder":{color:Jt.text.tertiary,textOverflow:"ellipsis"}}),"input-text-size_sm":R.css({...me.body2}),"input-text-size_md":R.css({...me.body2}),"input-text-align_left":R.css({textAlign:"left"}),"input-text-align_center":R.css({textAlign:"center"}),"input-text-align_right":R.css({textAlign:"right"}),sm:R.css({height:40,padding:Ji.md}),md:R.css({height:48,padding:`14px ${Ji.lg} 14px ${Ji.lg}`}),error:R.css({borderColor:Jt.border.negativePrimary}),disabled:zc,multiline:R.css({height:"auto"}),primary:R.css({background:Jt.fill.bgPrimary}),secondary:R.css({background:Jt.fill.bgSecondary}),"clear-button":R.css({cursor:"pointer",color:Jt.text.tertiary,height:20,"&:hover":{color:Jt.text.primary}})},{spacing:em}=j;function tm(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const _i=S.forwardRef((e,t)=>{const{label:n,prompt:r,error:o,errorText:i,size:s="md",prefix:a,suffix:l,background:c="primary",showClearButton:u,disabled:f,value:d,defaultValue:h,inputClassName:g,textAlign:p="left",...m}=e,x=e.multiline===!0,y=S.useRef(null),v=S.useRef(null),[b,w]=Po(typeof d=="string"||typeof d=="number"?String(d):void 0,typeof h=="string"||typeof h=="number"?String(h):"");S.useImperativeHandle(t,()=>({focus:()=>{y.current?.focus(),v.current?.focus()},blur:()=>{y.current?.blur(),v.current?.blur()},get value(){return y.current?.value||v.current?.value},set value(P){w(P),y.current&&(y.current.value=P),v.current&&(v.current.value=P)}}));const _=P=>{if(w(P.target.value),x){const O=e.onChange;O?.(P)}else{const O=e.onChange;O?.(P)}};S.useEffect(()=>{x&&e.autoResize&&v.current&&(v.current.style.height="auto",v.current.style.height=`${v.current.scrollHeight}px`)},[b,x,e.autoResize]);const E=()=>{if(w(""),!x){const O=y.current;if(O){O.value="";const D=tm(O),I=e.onChange;I?.(D)}return}const P=v.current;if(P){P.value="";const O=tm(P),D=e.onChange;D?.(O)}},T=()=>{if(x){const{rows:I,autoResize:$,onChange:H,multiline:U,...L}=m;return C.jsx("textarea",{ref:v,rows:e.rows??3,className:R.cx(yt.input,g,{[yt.disabled]:f,[yt[`input-text-align_${p}`]]:!!p}),disabled:f,maxLength:e.maxLength,...L,value:b,onChange:_})}const{onChange:P,multiline:O,...D}=m;return C.jsx("input",{...D,ref:y,className:R.cx(yt.input,yt[`input-text-size_${s}`],g,{[yt.disabled]:f,[yt[`input-text-align_${p}`]]:!!p}),disabled:f,type:e.type??"text",value:b,onChange:_})},k=S.useMemo(()=>c==="white"?yt.primary:c==="gray"?yt.secondary:yt[c],[c]);return C.jsxs(G,{w:"full",gap:em.sm,children:[typeof n=="string"?C.jsx(se,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}):n,C.jsxs(G,{row:!0,alignItems:x?"flex-start":"center",w:"full",gap:em.md,className:R.cx(yt["input-container"],k,yt[s],{[yt.error]:o,[yt.disabled]:f,[yt.multiline]:x}),children:[a&&C.jsx(G,{flex:"none",children:a}),C.jsx(G,{flex:"1",children:T()}),u&&b&&!f&&C.jsx(G,{flex:"none",children:C.jsx("span",{className:yt["clear-button"],onClick:E,children:C.jsx($k,{})})}),l&&C.jsx(G,{flex:"none",children:l})]}),(r||x)&&C.jsxs(G,{row:!0,gap:10,w:"full",children:[typeof r=="string"?C.jsx(se,{variant:"caption-1",colorName:"tertiary",children:r}):r,x&&e.maxLength&&C.jsx(se,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${b.length}/${e.maxLength}`})]}),i&&o&&C.jsx(se,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:i})]})});_i.displayName="Input";const Ok=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M15 8.33333H5M17.5 5H2.5M17.5 11.6667H2.5M15 15H5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Ik=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M13.3333 8.33333H2.5M16.6667 5H2.5M16.6667 11.6667H2.5M13.3333 15H2.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Dk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M17.5 8.33333H6.66665M17.5 5H3.33331M17.5 11.6667H3.33331M17.5 15H6.66665",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),jk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M5 10H11.6667C13.5076 10 15 8.50766 15 6.66671C15 4.82576 13.5076 3.33337 11.6667 3.33337H5V10ZM5 10H12.5C14.3409 10 15.8333 11.4924 15.8333 13.3334C15.8333 15.1743 14.3409 16.6667 12.5 16.6667H5V10Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Vk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M13.5 17.5H5.77614C5.2713 17.5 5.01887 17.5 4.90199 17.4002C4.80056 17.3135 4.74674 17.1836 4.75721 17.0506C4.76927 16.8974 4.94776 16.7189 5.30474 16.3619L12.3905 9.27614C12.7205 8.94613 12.8855 8.78112 13.0758 8.7193C13.2432 8.66492 13.4235 8.66492 13.5908 8.7193C13.7811 8.78112 13.9461 8.94613 14.2761 9.27614L17.5 12.5V13.5M13.5 17.5C14.9001 17.5 15.6002 17.5 16.135 17.2275C16.6054 16.9878 16.9878 16.6054 17.2275 16.135C17.5 15.6002 17.5 14.9001 17.5 13.5M13.5 17.5H6.5C5.09987 17.5 4.3998 17.5 3.86502 17.2275C3.39462 16.9878 3.01217 16.6054 2.77248 16.135C2.5 15.6002 2.5 14.9001 2.5 13.5V6.5C2.5 5.09987 2.5 4.3998 2.77248 3.86502C3.01217 3.39462 3.39462 3.01217 3.86502 2.77248C4.3998 2.5 5.09987 2.5 6.5 2.5H13.5C14.9001 2.5 15.6002 2.5 16.135 2.77248C16.6054 3.01217 16.9878 3.39462 17.2275 3.86502C17.5 4.3998 17.5 5.09987 17.5 6.5V13.5M8.75 7.08333C8.75 8.00381 8.00381 8.75 7.08333 8.75C6.16286 8.75 5.41667 8.00381 5.41667 7.08333C5.41667 6.16286 6.16286 5.41667 7.08333 5.41667C8.00381 5.41667 8.75 6.16286 8.75 7.08333Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Bk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M15.8334 3.33337H8.33335M11.6667 16.6667H4.16669M12.5 3.33337L7.50002 16.6667",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),zk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("g",{clipPath:"url(#clip0_1571_1710)"},M.createElement("path",{d:"M8.33332 10.8333C8.69119 11.3118 9.14778 11.7077 9.67211 11.9941C10.1964 12.2806 10.7762 12.4509 11.3722 12.4936C11.9681 12.5363 12.5663 12.4503 13.1261 12.2415C13.6859 12.0327 14.1942 11.7059 14.6167 11.2833L17.1167 8.78335C17.8756 7.9975 18.2956 6.94499 18.2861 5.85251C18.2766 4.76002 17.8384 3.71497 17.0659 2.94243C16.2934 2.1699 15.2483 1.7317 14.1558 1.7222C13.0633 1.71271 12.0108 2.13269 11.225 2.89168L9.79165 4.31668M11.6666 9.16668C11.3088 8.68824 10.8522 8.29236 10.3279 8.0059C9.80353 7.71943 9.22373 7.54908 8.62777 7.5064C8.03182 7.46372 7.43366 7.54971 6.87386 7.75853C6.31406 7.96735 5.80572 8.29412 5.38332 8.71668L2.88332 11.2167C2.12432 12.0025 1.70435 13.055 1.71384 14.1475C1.72334 15.24 2.16154 16.2851 2.93407 17.0576C3.70661 17.8301 4.75166 18.2683 5.84414 18.2778C6.93663 18.2873 7.98914 17.8673 8.77498 17.1083L10.2 15.6833",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),M.createElement("defs",null,M.createElement("clipPath",{id:"clip0_1571_1710"},M.createElement("rect",{width:20,height:20,fill:"white"})))),Hk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M17.5 9.99996L7.5 9.99996M17.5 4.99996L7.5 4.99996M17.5 15L7.5 15M4.16667 9.99996C4.16667 10.4602 3.79357 10.8333 3.33333 10.8333C2.8731 10.8333 2.5 10.4602 2.5 9.99996C2.5 9.53972 2.8731 9.16663 3.33333 9.16663C3.79357 9.16663 4.16667 9.53972 4.16667 9.99996ZM4.16667 4.99996C4.16667 5.4602 3.79357 5.83329 3.33333 5.83329C2.8731 5.83329 2.5 5.4602 2.5 4.99996C2.5 4.53972 2.8731 4.16663 3.33333 4.16663C3.79357 4.16663 4.16667 4.53972 4.16667 4.99996ZM4.16667 15C4.16667 15.4602 3.79357 15.8333 3.33333 15.8333C2.8731 15.8333 2.5 15.4602 2.5 15C2.5 14.5397 2.8731 14.1666 3.33333 14.1666C3.79357 14.1666 4.16667 14.5397 4.16667 15Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Wk=e=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M14 8.74967C14.4142 8.74967 14.75 8.41389 14.75 7.99967C14.75 7.58546 14.4142 7.24967 14 7.24967V7.99967V8.74967ZM6 7.24967C5.58579 7.24967 5.25 7.58546 5.25 7.99967C5.25 8.41389 5.58579 8.74967 6 8.74967V7.99967V7.24967ZM14 4.74967C14.4142 4.74967 14.75 4.41389 14.75 3.99967C14.75 3.58546 14.4142 3.24967 14 3.24967V3.99967V4.74967ZM6 3.24967C5.58579 3.24967 5.25 3.58546 5.25 3.99967C5.25 4.41389 5.58579 4.74967 6 4.74967V3.99967V3.24967ZM14 12.7497C14.4142 12.7497 14.75 12.4139 14.75 11.9997C14.75 11.5855 14.4142 11.2497 14 11.2497V11.9997V12.7497ZM6 11.2497C5.58579 11.2497 5.25 11.5855 5.25 11.9997C5.25 12.4139 5.58579 12.7497 6 12.7497V11.9997V11.2497ZM1.58967 3.48952C1.24295 3.71614 1.14558 4.18092 1.3722 4.52765C1.59882 4.87437 2.0636 4.97174 2.41033 4.74512L2 4.11732L1.58967 3.48952ZM3.2 3.33301H3.95C3.95 3.05764 3.79909 2.80441 3.5569 2.67337C3.31471 2.54233 3.02018 2.55455 2.78967 2.70521L3.2 3.33301ZM2.4 5.91634C1.98579 5.91634 1.65 6.25213 1.65 6.66634C1.65 7.08055 1.98579 7.41634 2.4 7.41634V6.66634V5.91634ZM4 7.41634C4.41421 7.41634 4.75 7.08055 4.75 6.66634C4.75 6.25213 4.41421 5.91634 4 5.91634V6.66634V7.41634ZM3.73743 10.8967L4.2726 11.4222L4.2726 11.4222L3.73743 10.8967ZM2 12.6663L1.46483 12.1409C1.25318 12.3565 1.19153 12.678 1.30841 12.9565C1.4253 13.2351 1.69791 13.4163 2 13.4163V12.6663ZM4 13.4163C4.41421 13.4163 4.75 13.0806 4.75 12.6663C4.75 12.2521 4.41421 11.9163 4 11.9163V12.6663V13.4163ZM1.25 10.2589C1.25 10.6731 1.58579 11.0089 2 11.0089C2.41421 11.0089 2.75 10.6731 2.75 10.2589H2H1.25ZM14 7.99967V7.24967L6 7.24967V7.99967V8.74967L14 8.74967V7.99967ZM14 3.99967V3.24967H6V3.99967V4.74967H14V3.99967ZM14 11.9997V11.2497L6 11.2497V11.9997V12.7497L14 12.7497V11.9997ZM2 4.11732L2.41033 4.74512L3.61033 3.96081L3.2 3.33301L2.78967 2.70521L1.58967 3.48952L2 4.11732ZM3.2 3.33301H2.45V6.66634H3.2H3.95V3.33301H3.2ZM3.2 6.66634V5.91634H2.4V6.66634V7.41634H3.2V6.66634ZM3.2 6.66634V7.41634H4V6.66634V5.91634H3.2V6.66634ZM3.73743 10.8967L3.20226 10.3713L1.46483 12.1409L2 12.6663L2.53517 13.1918L4.2726 11.4222L3.73743 10.8967ZM2 12.6663V13.4163H4V12.6663V11.9163H2V12.6663ZM4 10.2654H3.25C3.25 10.2957 3.23759 10.3353 3.20225 10.3713L3.73743 10.8967L4.2726 11.4222C4.57518 11.114 4.75 10.7002 4.75 10.2654H4ZM3 9.33301V10.083C3.08406 10.083 3.1515 10.1147 3.19493 10.1553C3.23791 10.1955 3.25 10.2354 3.25 10.2654H4H4.75C4.75 9.29296 3.91808 8.58301 3 8.58301V9.33301ZM2 10.2589H2.75C2.75 10.2299 2.76126 10.1927 2.80245 10.1545C2.84462 10.1155 2.91258 10.083 3 10.083V9.33301V8.58301C2.0889 8.58301 1.25 9.28004 1.25 10.2589H2Z",fill:"currentColor"})),Kk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M5 13.3334C5 15.1743 6.49238 16.6667 8.33333 16.6667H11.6667C13.5076 16.6667 15 15.1743 15 13.3334C15 11.4924 13.5076 10 11.6667 10M15 6.66671C15 4.82576 13.5076 3.33337 11.6667 3.33337H8.33333C6.49238 3.33337 5 4.82576 5 6.66671M2.5 10H17.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Uk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M2.5 7.5L17.5 7.5M7.5 2.5L7.5 17.5M6.5 2.5H13.5C14.9001 2.5 15.6002 2.5 16.135 2.77248C16.6054 3.01217 16.9878 3.39462 17.2275 3.86502C17.5 4.3998 17.5 5.09987 17.5 6.5V13.5C17.5 14.9001 17.5 15.6002 17.2275 16.135C16.9878 16.6054 16.6054 16.9878 16.135 17.2275C15.6002 17.5 14.9001 17.5 13.5 17.5H6.5C5.09987 17.5 4.3998 17.5 3.86502 17.2275C3.39462 16.9878 3.01217 16.6054 2.77248 16.135C2.5 15.6002 2.5 14.9001 2.5 13.5V6.5C2.5 5.09987 2.5 4.3998 2.77248 3.86502C3.01217 3.39462 3.39462 3.01217 3.86502 2.77248C4.3998 2.5 5.09987 2.5 6.5 2.5Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Gk=e=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M15 3.33337V9.16671C15 11.9281 12.7614 14.1667 9.99998 14.1667C7.23856 14.1667 4.99998 11.9281 4.99998 9.16671V3.33337M3.33331 17.5H16.6666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),oh=S.createContext(null);function Ks(){const e=S.useContext(oh);if(!e)throw new Error("useEditorStates must be used within EditorState Provider");return e}const xb=S.createContext(null);function qk(){const e=S.useContext(xb);if(!e)throw new Error("useToolbarContext must be used within ToolbarContext provider");return e}var us={exports:{}};us.exports;var nm;function Yk(){return nm||(nm=1,(function(e,t){var n=200,r="__lodash_hash_undefined__",o=800,i=16,s=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",f="[object Date]",d="[object Error]",h="[object Function]",g="[object GeneratorFunction]",p="[object Map]",m="[object Number]",x="[object Null]",y="[object Object]",v="[object Proxy]",b="[object RegExp]",w="[object Set]",_="[object String]",E="[object Undefined]",T="[object WeakMap]",k="[object ArrayBuffer]",P="[object DataView]",O="[object Float32Array]",D="[object Float64Array]",I="[object Int8Array]",$="[object Int16Array]",H="[object Int32Array]",U="[object Uint8Array]",L="[object Uint8ClampedArray]",N="[object Uint16Array]",V="[object Uint32Array]",K=/[\\^$.*+?()[\]{}|]/g,te=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,Z={};Z[O]=Z[D]=Z[I]=Z[$]=Z[H]=Z[U]=Z[L]=Z[N]=Z[V]=!0,Z[a]=Z[l]=Z[k]=Z[u]=Z[P]=Z[f]=Z[d]=Z[h]=Z[p]=Z[m]=Z[y]=Z[b]=Z[w]=Z[_]=Z[T]=!1;var ae=typeof Dn=="object"&&Dn&&Dn.Object===Object&&Dn,oe=typeof self=="object"&&self&&self.Object===Object&&self,fe=ae||oe||Function("return this")(),Te=t&&!t.nodeType&&t,ne=Te&&!0&&e&&!e.nodeType&&e,ve=ne&&ne.exports===Te,Ee=ve&&ae.process,De=(function(){try{var A=ne&&ne.require&&ne.require("util").types;return A||Ee&&Ee.binding&&Ee.binding("util")}catch{}})(),st=De&&De.isTypedArray;function ee(A,F,z){switch(z.length){case 0:return A.call(F);case 1:return A.call(F,z[0]);case 2:return A.call(F,z[0],z[1]);case 3:return A.call(F,z[0],z[1],z[2])}return A.apply(F,z)}function Ce(A,F){for(var z=-1,re=Array(A);++z<A;)re[z]=F(z);return re}function ze(A){return function(F){return A(F)}}function Re(A,F){return A?.[F]}function mt(A,F){return function(z){return A(F(z))}}var Ft=Array.prototype,Yt=Function.prototype,Xt=Object.prototype,xe=fe["__core-js_shared__"],Me=Yt.toString,Zt=Xt.hasOwnProperty,vg=(function(){var A=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return A?"Symbol(src)_1."+A:""})(),xg=Xt.toString,yS=Me.call(Object),vS=RegExp("^"+Me.call(Zt).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ia=ve?fe.Buffer:void 0,bg=fe.Symbol,wg=fe.Uint8Array;ia&&ia.allocUnsafe;var Cg=mt(Object.getPrototypeOf,Object),Sg=Object.create,xS=Xt.propertyIsEnumerable,bS=Ft.splice,Xr=bg?bg.toStringTag:void 0,sa=(function(){try{var A=yc(Object,"defineProperty");return A({},"",{}),A}catch{}})(),wS=ia?ia.isBuffer:void 0,_g=Math.max,CS=Date.now,Tg=yc(fe,"Map"),Gi=yc(Object,"create"),SS=(function(){function A(){}return function(F){if(!Jr(F))return{};if(Sg)return Sg(F);A.prototype=F;var z=new A;return A.prototype=void 0,z}})();function Zr(A){var F=-1,z=A==null?0:A.length;for(this.clear();++F<z;){var re=A[F];this.set(re[0],re[1])}}function _S(){this.__data__=Gi?Gi(null):{},this.size=0}function TS(A){var F=this.has(A)&&delete this.__data__[A];return this.size-=F?1:0,F}function ES(A){var F=this.__data__;if(Gi){var z=F[A];return z===r?void 0:z}return Zt.call(F,A)?F[A]:void 0}function RS(A){var F=this.__data__;return Gi?F[A]!==void 0:Zt.call(F,A)}function kS(A,F){var z=this.__data__;return this.size+=this.has(A)?0:1,z[A]=Gi&&F===void 0?r:F,this}Zr.prototype.clear=_S,Zr.prototype.delete=TS,Zr.prototype.get=ES,Zr.prototype.has=RS,Zr.prototype.set=kS;function Xn(A){var F=-1,z=A==null?0:A.length;for(this.clear();++F<z;){var re=A[F];this.set(re[0],re[1])}}function AS(){this.__data__=[],this.size=0}function MS(A){var F=this.__data__,z=aa(F,A);if(z<0)return!1;var re=F.length-1;return z==re?F.pop():bS.call(F,z,1),--this.size,!0}function NS(A){var F=this.__data__,z=aa(F,A);return z<0?void 0:F[z][1]}function PS(A){return aa(this.__data__,A)>-1}function LS(A,F){var z=this.__data__,re=aa(z,A);return re<0?(++this.size,z.push([A,F])):z[re][1]=F,this}Xn.prototype.clear=AS,Xn.prototype.delete=MS,Xn.prototype.get=NS,Xn.prototype.has=PS,Xn.prototype.set=LS;function jo(A){var F=-1,z=A==null?0:A.length;for(this.clear();++F<z;){var re=A[F];this.set(re[0],re[1])}}function FS(){this.size=0,this.__data__={hash:new Zr,map:new(Tg||Xn),string:new Zr}}function $S(A){var F=ca(this,A).delete(A);return this.size-=F?1:0,F}function OS(A){return ca(this,A).get(A)}function IS(A){return ca(this,A).has(A)}function DS(A,F){var z=ca(this,A),re=z.size;return z.set(A,F),this.size+=z.size==re?0:1,this}jo.prototype.clear=FS,jo.prototype.delete=$S,jo.prototype.get=OS,jo.prototype.has=IS,jo.prototype.set=DS;function Vo(A){var F=this.__data__=new Xn(A);this.size=F.size}function jS(){this.__data__=new Xn,this.size=0}function VS(A){var F=this.__data__,z=F.delete(A);return this.size=F.size,z}function BS(A){return this.__data__.get(A)}function zS(A){return this.__data__.has(A)}function HS(A,F){var z=this.__data__;if(z instanceof Xn){var re=z.__data__;if(!Tg||re.length<n-1)return re.push([A,F]),this.size=++z.size,this;z=this.__data__=new jo(re)}return z.set(A,F),this.size=z.size,this}Vo.prototype.clear=jS,Vo.prototype.delete=VS,Vo.prototype.get=BS,Vo.prototype.has=zS,Vo.prototype.set=HS;function WS(A,F){var z=bc(A),re=!z&&xc(A),Se=!z&&!re&&Mg(A),Oe=!z&&!re&&!Se&&Pg(A),He=z||re||Se||Oe,Ae=He?Ce(A.length,String):[],We=Ae.length;for(var fn in A)He&&(fn=="length"||Se&&(fn=="offset"||fn=="parent")||Oe&&(fn=="buffer"||fn=="byteLength"||fn=="byteOffset")||kg(fn,We))||Ae.push(fn);return Ae}function pc(A,F,z){(z!==void 0&&!ua(A[F],z)||z===void 0&&!(F in A))&&mc(A,F,z)}function KS(A,F,z){var re=A[F];(!(Zt.call(A,F)&&ua(re,z))||z===void 0&&!(F in A))&&mc(A,F,z)}function aa(A,F){for(var z=A.length;z--;)if(ua(A[z][0],F))return z;return-1}function mc(A,F,z){F=="__proto__"&&sa?sa(A,F,{configurable:!0,enumerable:!0,value:z,writable:!0}):A[F]=z}var US=i_();function la(A){return A==null?A===void 0?E:x:Xr&&Xr in Object(A)?s_(A):f_(A)}function Eg(A){return qi(A)&&la(A)==a}function GS(A){if(!Jr(A)||u_(A))return!1;var F=Cc(A)?vS:te;return F.test(m_(A))}function qS(A){return qi(A)&&Ng(A.length)&&!!Z[la(A)]}function YS(A){if(!Jr(A))return d_(A);var F=Ag(A),z=[];for(var re in A)re=="constructor"&&(F||!Zt.call(A,re))||z.push(re);return z}function Rg(A,F,z,re,Se){A!==F&&US(F,function(Oe,He){if(Se||(Se=new Vo),Jr(Oe))XS(A,F,He,z,Rg,re,Se);else{var Ae=re?re(vc(A,He),Oe,He+"",A,F,Se):void 0;Ae===void 0&&(Ae=Oe),pc(A,He,Ae)}},Lg)}function XS(A,F,z,re,Se,Oe,He){var Ae=vc(A,z),We=vc(F,z),fn=He.get(We);if(fn){pc(A,z,fn);return}var Wt=Oe?Oe(Ae,We,z+"",A,F,He):void 0,Yi=Wt===void 0;if(Yi){var Sc=bc(We),_c=!Sc&&Mg(We),$g=!Sc&&!_c&&Pg(We);Wt=We,Sc||_c||$g?bc(Ae)?Wt=Ae:y_(Ae)?Wt=n_(Ae):_c?(Yi=!1,Wt=QS(We)):$g?(Yi=!1,Wt=t_(We)):Wt=[]:v_(We)||xc(We)?(Wt=Ae,xc(Ae)?Wt=x_(Ae):(!Jr(Ae)||Cc(Ae))&&(Wt=a_(We))):Yi=!1}Yi&&(He.set(We,Wt),Se(Wt,We,re,Oe,He),He.delete(We)),pc(A,z,Wt)}function ZS(A,F){return g_(h_(A,F,Fg),A+"")}var JS=sa?function(A,F){return sa(A,"toString",{configurable:!0,enumerable:!1,value:w_(F),writable:!0})}:Fg;function QS(A,F){return A.slice()}function e_(A){var F=new A.constructor(A.byteLength);return new wg(F).set(new wg(A)),F}function t_(A,F){var z=e_(A.buffer);return new A.constructor(z,A.byteOffset,A.length)}function n_(A,F){var z=-1,re=A.length;for(F||(F=Array(re));++z<re;)F[z]=A[z];return F}function r_(A,F,z,re){var Se=!z;z||(z={});for(var Oe=-1,He=F.length;++Oe<He;){var Ae=F[Oe],We=void 0;We===void 0&&(We=A[Ae]),Se?mc(z,Ae,We):KS(z,Ae,We)}return z}function o_(A){return ZS(function(F,z){var re=-1,Se=z.length,Oe=Se>1?z[Se-1]:void 0,He=Se>2?z[2]:void 0;for(Oe=A.length>3&&typeof Oe=="function"?(Se--,Oe):void 0,He&&l_(z[0],z[1],He)&&(Oe=Se<3?void 0:Oe,Se=1),F=Object(F);++re<Se;){var Ae=z[re];Ae&&A(F,Ae,re,Oe)}return F})}function i_(A){return function(F,z,re){for(var Se=-1,Oe=Object(F),He=re(F),Ae=He.length;Ae--;){var We=He[++Se];if(z(Oe[We],We,Oe)===!1)break}return F}}function ca(A,F){var z=A.__data__;return c_(F)?z[typeof F=="string"?"string":"hash"]:z.map}function yc(A,F){var z=Re(A,F);return GS(z)?z:void 0}function s_(A){var F=Zt.call(A,Xr),z=A[Xr];try{A[Xr]=void 0;var re=!0}catch{}var Se=xg.call(A);return re&&(F?A[Xr]=z:delete A[Xr]),Se}function a_(A){return typeof A.constructor=="function"&&!Ag(A)?SS(Cg(A)):{}}function kg(A,F){var z=typeof A;return F=F??s,!!F&&(z=="number"||z!="symbol"&&J.test(A))&&A>-1&&A%1==0&&A<F}function l_(A,F,z){if(!Jr(z))return!1;var re=typeof F;return(re=="number"?wc(z)&&kg(F,z.length):re=="string"&&F in z)?ua(z[F],A):!1}function c_(A){var F=typeof A;return F=="string"||F=="number"||F=="symbol"||F=="boolean"?A!=="__proto__":A===null}function u_(A){return!!vg&&vg in A}function Ag(A){var F=A&&A.constructor,z=typeof F=="function"&&F.prototype||Xt;return A===z}function d_(A){var F=[];if(A!=null)for(var z in Object(A))F.push(z);return F}function f_(A){return xg.call(A)}function h_(A,F,z){return F=_g(F===void 0?A.length-1:F,0),function(){for(var re=arguments,Se=-1,Oe=_g(re.length-F,0),He=Array(Oe);++Se<Oe;)He[Se]=re[F+Se];Se=-1;for(var Ae=Array(F+1);++Se<F;)Ae[Se]=re[Se];return Ae[F]=z(He),ee(A,this,Ae)}}function vc(A,F){if(!(F==="constructor"&&typeof A[F]=="function")&&F!="__proto__")return A[F]}var g_=p_(JS);function p_(A){var F=0,z=0;return function(){var re=CS(),Se=i-(re-z);if(z=re,Se>0){if(++F>=o)return arguments[0]}else F=0;return A.apply(void 0,arguments)}}function m_(A){if(A!=null){try{return Me.call(A)}catch{}try{return A+""}catch{}}return""}function ua(A,F){return A===F||A!==A&&F!==F}var xc=Eg((function(){return arguments})())?Eg:function(A){return qi(A)&&Zt.call(A,"callee")&&!xS.call(A,"callee")},bc=Array.isArray;function wc(A){return A!=null&&Ng(A.length)&&!Cc(A)}function y_(A){return qi(A)&&wc(A)}var Mg=wS||C_;function Cc(A){if(!Jr(A))return!1;var F=la(A);return F==h||F==g||F==c||F==v}function Ng(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=s}function Jr(A){var F=typeof A;return A!=null&&(F=="object"||F=="function")}function qi(A){return A!=null&&typeof A=="object"}function v_(A){if(!qi(A)||la(A)!=y)return!1;var F=Cg(A);if(F===null)return!0;var z=Zt.call(F,"constructor")&&F.constructor;return typeof z=="function"&&z instanceof z&&Me.call(z)==yS}var Pg=st?ze(st):qS;function x_(A){return r_(A,Lg(A))}function Lg(A){return wc(A)?WS(A):YS(A)}var b_=o_(function(A,F,z){Rg(A,F,z)});function w_(A){return function(){return A}}function Fg(A){return A}function C_(){return!1}e.exports=b_})(us,us.exports)),us.exports}var Xk=Yk();const Zk=Cf(Xk),bb=S.createContext(null);function Jk(){return S.useContext(bb)}function Qk({children:e,locale:t}){return C.jsx(bb.Provider,{value:t||null,children:e})}function e3({localeKey:e,defaultLocale:t}){const n=S.createContext(t);function r(s){const{extraLocale:a}=s||{},l=Jk();return{value:S.useMemo(()=>{const u=l?l[e]:null,f=[{},t];return u&&f.push(u),a&&f.push(a),Zk(...f)},[t,a,e,l])}}function o(){return S.useContext(n)}function i({children:s,locale:a}){const{value:l}=r({extraLocale:a});return C.jsx(n.Provider,{value:l,children:s})}return{Context:n,useComposeLocaleProviderValue:r,useLocale:o,Provider:i}}const wb="MarkdownTextEditor",t3={toolbar:{link:{textPlaceholder:"Enter the text to display",linkPlaceholder:"Paste a link",linkErrorText:"Please enter a valid link",buttonText:"Save"},table:{maxRowsErrorText:e=>`Maximum number of rows is ${e.limit}`,maxColumnsErrorText:e=>`Maximum number of columns is ${e.limit}`,minRowsErrorText:e=>`Minimum number of rows is ${e.limit}`,minColumnsErrorText:e=>`Minimum number of columns is ${e.limit}`,rowsPlaceholder:"Rows count",columnsPlaceholder:"Columns count",buttonText:"Create table"},textSize:{paragraph:"Normal text",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3"},preview:{show:"Preview",hide:"Preview"},actions:{bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",link:"Link",image:"Image",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",table:"Table",bulletList:"Bullet list",numberedList:"Numbered list"}}},{Provider:n3,useLocale:Us}=e3({localeKey:wb,defaultLocale:t3}),Cb=S.createContext(null);function r3(e,t){return{getTheme:function(){return t??null}}}function it(){const e=S.useContext(Cb);return e==null&&(function(t,...n){const r=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const i of n)o.append("v",i);throw r.search=o.toString(),Error(`Minified Lexical error #${t}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),e}function q(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Sb(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Mn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,o3=Mn&&"documentMode"in document?document.documentMode:null,vn=Mn&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),xo=Mn&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ul=!(!Mn||!("InputEvent"in window)||o3)&&"getTargetRanges"in new window.InputEvent("input"),Gs=Mn&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),$i=Mn&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,i3=Mn&&/Android/.test(navigator.userAgent),_b=Mn&&/^(?=.*Chrome).*/i.test(navigator.userAgent),rm=Mn&&i3&&_b,qs=Mn&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&vn&&!_b;function Tb(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}const s3=0,a3=1,l3=2,Eb=128,c3=1,u3=2,d3=3,f3=4,h3=5,g3=6,Bl=Gs||$i||qs?" ":"​",Ir=`
35
35
 
36
36
  `,p3=xo?" ":Bl,Dr={bold:1,capitalize:1024,code:16,highlight:Eb,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},m3={directionless:1,unmergeable:2},om={center:2,end:6,justify:4,left:1,right:3,start:5},y3={[u3]:"center",[g3]:"end",[f3]:"justify",[c3]:"left",[d3]:"right",[h3]:"start"},v3={normal:0,segmented:2,token:1},x3={[s3]:"normal",[l3]:"segmented",[a3]:"token"},im="$config";function Rb(e,t,n,r,o,i){let s=e.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===t&&(B(s)&&Rb(s,a,n,r,o,i),n.has(a)||i.delete(a),o.push(a)),s=s.getNextSibling()}}let xd=!1,ih=0;function b3(e){ih=e.timeStamp}function Hc(e,t,n){const r=e.nodeName==="BR",o=t.__lexicalLineBreak;return o&&(e===o||r&&e.previousSibling===o)||r&&Ql(e,n)!==void 0}function w3(e,t,n){const r=Lt(dn(n));let o=null,i=null;r!==null&&r.anchorNode===e&&(o=r.anchorOffset,i=r.focusOffset);const s=e.nodeValue;s!==null&&Rh(t,s,o,i,!1)}function C3(e,t,n){if(W(e)){const r=e.anchor.getNode();if(r.is(n)&&e.format!==r.getFormat())return!1}return xr(t)&&n.isAttached()}function S3(e,t,n,r){for(let o=e;o&&!RA(o);o=Js(o)){const i=Ql(o,t);if(i!==void 0){const s=Le(i,n);if(s)return _e(s)||!Be(o)?void 0:[o,s]}else if(o===r)return[r,k1(n)]}}function kb(e,t,n){xd=!0;const r=performance.now()-ih>100;try{Hn(e,()=>{const o=Y()||(function(d){return d.getEditorState().read(()=>{const h=Y();return h!==null?h.clone():null})})(e),i=new Map,s=e.getRootElement(),a=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let d=0;d<t.length;d++){const h=t[d],g=h.type,p=h.target,m=S3(p,e,a,s);if(!m)continue;const[x,y]=m;if(g==="characterData")r&&X(y)&&xr(p)&&C3(o,p,y)&&w3(p,y,e);else if(g==="childList"){c=!0;const v=h.addedNodes;for(let _=0;_<v.length;_++){const E=v[_],T=E1(E),k=E.parentNode;if(k!=null&&E!==l&&T===null&&!Hc(E,k,e)){if(xo){const P=(Be(E)?E.innerText:null)||E.nodeValue;P&&(u+=P)}k.removeChild(E)}}const b=h.removedNodes,w=b.length;if(w>0){let _=0;for(let E=0;E<w;E++){const T=b[E];(Hc(T,p,e)||l===T)&&(p.appendChild(T),_++)}w!==_&&i.set(x,y)}}}if(i.size>0)for(const[d,h]of i)h.reconcileObservedMutation(d,e);const f=n.takeRecords();if(f.length>0){for(let d=0;d<f.length;d++){const h=f[d],g=h.addedNodes,p=h.target;for(let m=0;m<g.length;m++){const x=g[m],y=x.parentNode;y==null||x.nodeName!=="BR"||Hc(x,p,e)||y.removeChild(x)}}n.takeRecords()}o!==null&&(c&&Ge(o),xo&&P1(e)&&o.insertRawText(u))})}finally{xd=!1}}function Ab(e){const t=e._observer;t!==null&&kb(e,t.takeRecords(),t)}function Mb(e){(function(t){ih===0&&dn(t).addEventListener("textInput",b3,!0)})(e),e._observer=new MutationObserver((t,n)=>{kb(e,t,n)})}let _3=class{key;parse;unparse;isEqual;defaultValue;constructor(t,n){this.key=t,this.parse=n.parse.bind(n),this.unparse=(n.unparse||k3).bind(n),this.isEqual=(n.isEqual||Object.is).bind(n),this.defaultValue=this.parse(void 0)}};function T3(e,t){return new _3(e,t)}function Nb(e,t,n="latest"){const r=(n==="latest"?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function Wc(e,t,n){let r;if(ut(),typeof n=="function"){const i=e.getLatest(),s=Nb(i,t);if(r=n(s),t.isEqual(s,r))return i}else r=n;const o=e.getWritable();return Lb(o).updateFromKnown(t,r),o}function E3(e){const t=new Map,n=new Set;for(let r=typeof e=="function"?e:e.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:o}=tc(r);if(o&&o.stateConfigs)for(const i of o.stateConfigs){let s;"stateConfig"in i?(s=i.stateConfig,i.flat&&n.add(s.key)):s=i,t.set(s.key,s)}}return{flatKeys:n,sharedConfigMap:t}}let R3=class Pb{node;knownState;unknownState;sharedNodeState;size;constructor(t,n,r=void 0,o=new Map,i=void 0){this.node=t,this.sharedNodeState=n,this.unknownState=r,this.knownState=o;const{sharedConfigMap:s}=this.sharedNodeState,a=i!==void 0?i:(function(l,c,u){let f=u.size;if(c)for(const d in c){const h=l.get(d);h&&u.has(h)||f++}return f})(s,r,o);this.size=a}getValue(t){const n=this.knownState.get(t);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(t.key,t);let r=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const o=this.unknownState[t.key];o!==void 0&&(r=t.parse(o)),this.updateFromKnown(t,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},n={};for(const[r,o]of this.knownState)r.isEqual(o,r.defaultValue)?delete t[r.key]:t[r.key]=r.unparse(o);for(const r of this.sharedNodeState.flatKeys)r in t&&(n[r]=t[r],delete t[r]);return sm(t)&&(n.$=t),n}getWritable(t){if(this.node===t)return this;const{sharedNodeState:n,unknownState:r}=this,o=new Map(this.knownState);return new Pb(t,n,(function(i,s,a){let l;if(a)for(const[c,u]of Object.entries(a)){const f=i.get(c);f?s.has(f)||s.set(f,f.parse(u)):(l=l||{},l[c]=u)}return l})(n.sharedConfigMap,o,r),o,this.size)}updateFromKnown(t,n){const r=t.key;this.sharedNodeState.sharedConfigMap.set(r,t);const{knownState:o,unknownState:i}=this;o.has(t)||i&&r in i||(i&&(delete i[r],this.unknownState=sm(i)),this.size++),o.set(t,n)}updateFromUnknown(t,n){const r=this.sharedNodeState.sharedConfigMap.get(t);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=n)}updateFromJSON(t){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState=void 0,t)for(const[r,o]of Object.entries(t))this.updateFromUnknown(r,o)}};function Lb(e){const t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new R3(t,Fb(t));return t.__state=n,n}function Fb(e){return e.__state?e.__state.sharedNodeState:b1(Bi(),e.getType()).sharedNodeState}function sm(e){if(e)for(const t in e)return e}function k3(e){return e}function am(e,t,n){for(const[r,o]of t.knownState){if(e.has(r.key))continue;e.add(r.key);const i=n?n.getValue(r):r.defaultValue;if(i!==o&&!r.isEqual(i,o))return!0}return!1}function lm(e,t,n){const{unknownState:r}=t,o=n?n.unknownState:void 0;if(r){for(const[i,s]of Object.entries(r))if(!e.has(i)&&(e.add(i),s!==(o?o[i]:void 0)))return!0}return!1}function cm(e,t){const n=e.__state;return n&&n.node===e?n.getWritable(t):n}function um(e,t){const n=e.__mode,r=e.__format,o=e.__style,i=t.__mode,s=t.__format,a=t.__style,l=e.__state,c=t.__state;return(n===null||n===i)&&(r===null||r===s)&&(o===null||o===a)&&(e.__state===null||l===c||(function(u,f){if(u===f)return!0;if(u&&f&&u.size!==f.size)return!1;const d=new Set;return!(u&&am(d,u,f)||f&&am(d,f,u)||u&&lm(d,u,f)||f&&lm(d,f,u))})(l,c))}function dm(e,t){const n=e.mergeWithSibling(t),r=$e()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function fm(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&X(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(um(t,r)){r=dm(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&X(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(um(r,n)){r=dm(r,n);break}break}n.remove()}}else r.remove()}function Ns(e){return hm(e.anchor),hm(e.focus),e}function hm(e){for(;e.type==="element";){const t=e.getNode(),n=e.offset;let r,o;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),o=!0):(r=t.getChildAtIndex(n),o=!1),X(r)){e.set(r.__key,o?r.getTextContentSize():0,"text",!0);break}if(!B(r))break;e.set(r.__key,o?r.getChildrenSize():0,"element",!0)}}let bo,Ct,Ps,zl,bd,wd,wo,Sn,Cd,Ls,lt="",$n=null,oo=null,ir="",Jo=!1,dl=!1;function fl(e,t){const n=wo.get(e);if(t!==null){const r=Ed(e);r.parentNode===t&&t.removeChild(r)}if(Sn.has(e)||Ct._keyToDOMMap.delete(e),B(n)){const r=gl(n,wo);Sd(r,0,r.length-1,null)}n!==void 0&&kh(Ls,Ps,zl,n,"destroyed")}function Sd(e,t,n,r){let o=t;for(;o<=n;++o){const i=e[o];i!==void 0&&fl(i,r)}}function to(e,t){e.setProperty("text-align",t)}const A3="40px";function $b(e,t){const n=bo.theme.indent;if(typeof n=="string"){const o=e.classList.contains(n);t>0&&!o?e.classList.add(n):t<1&&o&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||A3;e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${r})`)}function Ob(e,t){const n=e.style;t===0?to(n,""):t===1?to(n,"left"):t===2?to(n,"center"):t===3?to(n,"right"):t===4?to(n,"justify"):t===5?to(n,"start"):t===6&&to(n,"end")}function _d(e,t){const n=(function(r){const o=r.__dir;if(o!==null)return o;if(ot(r))return null;const i=r.getParentOrThrow();return ot(i)&&i.__dir===null?"auto":null})(t);n!==null?e.dir=n:e.removeAttribute("dir")}function hl(e,t){const n=Sn.get(e);n===void 0&&q(60);const r=n.createDOM(bo,Ct);if((function(o,i,s){const a=s._keyToDOMMap;(function(l,c,u){const f=`__lexicalKey_${c._key}`;l[f]=u})(i,s,o),a.set(o,i)})(e,r,Ct),X(n)?r.setAttribute("data-lexical-text","true"):_e(n)&&r.setAttribute("data-lexical-decorator","true"),B(n)){const o=n.__indent,i=n.__size;if(_d(r,n),o!==0&&$b(r,o),i!==0){const a=i-1;Td(gl(n,Sn),n,0,a,n.getDOMSlot(r))}const s=n.__format;s!==0&&Ob(r,s),n.isInline()||Ib(null,n,r),ec(n)&&(lt+=Ir,ir+=Ir)}else{const o=n.getTextContent();if(_e(n)){const i=n.decorate(Ct,bo);i!==null&&Db(e,i),r.contentEditable="false"}lt+=o,ir+=o}return t!==null&&t.insertChild(r),kh(Ls,Ps,zl,n,"created"),r}function Td(e,t,n,r,o){const i=lt;lt="";let s=n;for(;s<=r;++s){hl(e[s],o);const a=Sn.get(e[s]);a!==null&&X(a)&&$n===null&&($n=a.getFormat(),oo=a.getStyle())}ec(t)&&(lt+=Ir),o.element.__lexicalTextContent=lt,lt=i+lt}function gm(e,t){if(e){const n=e.__last;if(n){const r=t.get(n);if(r)return zn(r)?"line-break":_e(r)&&r.isInline()?"decorator":null}return"empty"}return null}function Ib(e,t,n){const r=gm(e,wo),o=gm(t,Sn);r!==o&&t.getDOMSlot(n).setManagedLineBreak(o)}function M3(e,t,n){var r;$n=null,oo=null,(function(o,i,s){const a=lt,l=o.__size,c=i.__size;lt="";const u=s.element;if(l===1&&c===1){const f=o.__first,d=i.__first;if(f===d)ds(f,u);else{const g=Ed(f),p=hl(d,null);try{u.replaceChild(p,g)}catch(m){if(typeof m=="object"&&m!=null){const x=`${m.toString()} Parent: ${u.tagName}, new child: {tag: ${p.tagName} key: ${d}}, old child: {tag: ${g.tagName}, key: ${f}}.`;throw new Error(x)}throw m}fl(f,null)}const h=Sn.get(d);X(h)&&$n===null&&($n=h.getFormat(),oo=h.getStyle())}else{const f=gl(o,wo),d=gl(i,Sn);if(f.length!==l&&q(227),d.length!==c&&q(228),l===0)c!==0&&Td(d,i,0,c-1,s);else if(c===0){if(l!==0){const h=s.after==null&&s.before==null&&s.element.__lexicalLineBreak==null;Sd(f,0,l-1,h?null:u),h&&(u.textContent="")}}else(function(h,g,p,m,x,y){const v=m-1,b=x-1;let w,_,E=y.getFirstChild(),T=0,k=0;for(;T<=v&&k<=b;){const D=g[T],I=p[k];if(D===I)E=Kc(ds(I,y.element)),T++,k++;else{w===void 0&&(w=new Set(g)),_===void 0&&(_=new Set(p));const H=_.has(D),U=w.has(I);if(H)if(U){const L=_o(Ct,I);L===E?E=Kc(ds(I,y.element)):(y.withBefore(E).insertChild(L),ds(I,y.element)),T++,k++}else hl(I,y.withBefore(E)),k++;else E=Kc(Ed(D)),fl(D,y.element),T++}const $=Sn.get(I);$!==null&&X($)&&$n===null&&($n=$.getFormat(),oo=$.getStyle())}const P=T>v,O=k>b;if(P&&!O){const D=p[b+1],I=D===void 0?null:Ct.getElementByKey(D);Td(p,h,k,b,y.withBefore(I))}else O&&!P&&Sd(g,T,v,y.element)})(i,f,d,l,c,s)}ec(i)&&(lt+=Ir),u.__lexicalTextContent=lt,lt=a+lt})(e,t,t.getDOMSlot(n)),r=t,$n==null||$n===r.__textFormat||dl||r.setTextFormat($n),(function(o){oo==null||oo===o.__textStyle||dl||o.setTextStyle(oo)})(t)}function gl(e,t){const n=[];let r=e.__first;for(;r!==null;){const o=t.get(r);o===void 0&&q(101),n.push(r),r=o.__next}return n}function ds(e,t){const n=wo.get(e);let r=Sn.get(e);n!==void 0&&r!==void 0||q(61);const o=Jo||wd.has(e)||bd.has(e),i=_o(Ct,e);if(n===r&&!o){if(B(n)){const s=i.__lexicalTextContent;s!==void 0&&(lt+=s,ir+=s)}else{const s=n.getTextContent();ir+=s,lt+=s}return i}if(n!==r&&o&&kh(Ls,Ps,zl,r,"updated"),r.updateDOM(n,i,bo)){const s=hl(e,null);return t===null&&q(62),t.replaceChild(s,i),fl(e,null),s}if(B(n)&&B(r)){const s=r.__indent;(Jo||s!==n.__indent)&&$b(i,s);const a=r.__format;if((Jo||a!==n.__format)&&Ob(i,a),o&&(M3(n,r,i),ot(r)||r.isInline()||Ib(n,r,i)),ec(r)&&(lt+=Ir,ir+=Ir),(Jo||r.__dir!==n.__dir)&&(_d(i,r),ot(r)&&!Jo))for(const l of r.getChildren())B(l)&&_d(_o(Ct,l.getKey()),l)}else{const s=r.getTextContent();if(_e(r)){const a=r.decorate(Ct,bo);a!==null&&Db(e,a)}lt+=s,ir+=s}if(!dl&&ot(r)&&r.__cachedText!==ir){const s=r.getWritable();s.__cachedText=ir,r=s}return i}function Db(e,t){let n=Ct._pendingDecorators;const r=Ct._decorators;if(n===null){if(r[e]===t)return;n=R1(Ct)}n[e]=t}function Kc(e){let t=e.nextSibling;return t!==null&&t===Ct._blockCursorElement&&(t=t.nextSibling),t}function N3(e,t,n,r,o,i){lt="",ir="",Jo=r===2,Ct=n,bo=n._config,Ps=n._nodes,zl=Ct._listeners.mutation,bd=o,wd=i,wo=e._nodeMap,Sn=t._nodeMap,dl=t._readOnly,Cd=new Map(n._keyToDOMMap);const s=new Map;return Ls=s,ds("root",null),Ct=void 0,Ps=void 0,bd=void 0,wd=void 0,wo=void 0,Sn=void 0,bo=void 0,Cd=void 0,Ls=void 0,s}function Ed(e){const t=Cd.get(e);return t===void 0&&q(75,e),t}function le(e){return{type:e}}const cr=le("SELECTION_CHANGE_COMMAND"),sh=le("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Hl=le("CLICK_COMMAND"),jb=le("BEFORE_INPUT_COMMAND"),Vb=le("INPUT_COMMAND"),Bb=le("COMPOSITION_START_COMMAND"),zb=le("COMPOSITION_END_COMMAND"),Lr=le("DELETE_CHARACTER_COMMAND"),fi=le("INSERT_LINE_BREAK_COMMAND"),Co=le("INSERT_PARAGRAPH_COMMAND"),mo=le("CONTROLLED_TEXT_INSERTION_COMMAND"),ah=le("PASTE_COMMAND"),Rd=le("REMOVE_TEXT_COMMAND"),Ti=le("DELETE_WORD_COMMAND"),So=le("DELETE_LINE_COMMAND"),It=le("FORMAT_TEXT_COMMAND"),Hb=le("UNDO_COMMAND"),Wb=le("REDO_COMMAND"),Kb=le("KEYDOWN_COMMAND"),lh=le("KEY_ARROW_RIGHT_COMMAND"),P3=le("MOVE_TO_END"),ch=le("KEY_ARROW_LEFT_COMMAND"),L3=le("MOVE_TO_START"),uh=le("KEY_ARROW_UP_COMMAND"),dh=le("KEY_ARROW_DOWN_COMMAND"),pl=le("KEY_ENTER_COMMAND"),Ub=le("KEY_SPACE_COMMAND"),Wl=le("KEY_BACKSPACE_COMMAND"),fh=le("KEY_ESCAPE_COMMAND"),hh=le("KEY_DELETE_COMMAND"),gh=le("KEY_TAB_COMMAND"),F3=le("INSERT_TAB_COMMAND"),$3=le("INDENT_CONTENT_COMMAND"),pm=le("OUTDENT_CONTENT_COMMAND"),Gb=le("DROP_COMMAND"),hi=le("FORMAT_ELEMENT_COMMAND"),qb=le("DRAGSTART_COMMAND"),Yb=le("DRAGOVER_COMMAND"),O3=le("DRAGEND_COMMAND"),Kl=le("COPY_COMMAND"),Ul=le("CUT_COMMAND"),kd=le("SELECT_ALL_COMMAND"),Xb=le("FOCUS_COMMAND"),I3=le("BLUR_COMMAND"),D3=le("KEY_MODIFIER_COMMAND"),Jn=Object.freeze({}),Ad=[["keydown",function(e,t){Fs=e.timeStamp,Zb=e.key,!t.isComposing()&&Q(t,Kb,e)}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;xn(n)&&r!=="touch"&&r!=="pen"&&e.button===0&&Hn(t,()=>{w1(n)||(Pd=!0)})}],["compositionstart",function(e,t){Q(t,Bb,e)}],["compositionend",function(e,t){xo?fs=!0:$i||!Gs&&!qs?Q(t,zb,e):(Ld=!0,Fd=e.data)}],["input",function(e,t){e.stopPropagation(),Hn(t,()=>{t.dispatchCommand(Vb,e)},{event:e}),Qo=null}],["click",function(e,t){Hn(t,()=>{const n=Y(),r=Lt(dn(t)),o=qn();if(r){if(W(n)){const i=n.anchor,s=i.getNode();if(i.type==="element"&&i.offset===0&&n.isCollapsed()&&!ot(s)&&qe().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&o!==null&&n.is(o))r.removeAllRanges(),n.dirty=!0;else if(e.detail===3&&!n.isCollapsed()&&s!==n.focus.getNode()){const a=we(s,l=>B(l)&&!l.isInline());B(a)&&a.select(0)}}else if(e.pointerType==="touch"||e.pointerType==="pen"){const i=r.anchorNode;(Be(i)||xr(i))&&Ge(Xl(o,r,t,e))}}Q(t,Hl,e)})}],["cut",Jn],["copy",Jn],["dragstart",Jn],["dragover",Jn],["dragend",Jn],["paste",Jn],["focus",Jn],["blur",Jn],["drop",Jn]];ul&&Ad.push(["beforeinput",(e,t)=>(function(n,r){const o=n.inputType;o==="deleteCompositionText"||xo&&P1(r)||o!=="insertCompositionText"&&Q(r,jb,n)})(e,t)]);let Fs=0,Zb=null,Jb=0,Qo=null;const Md=new WeakMap,ml=new WeakMap;let Nd=!1,Pd=!1,vs=!1,fs=!1,Ld=!1,Fd="",ao=null,Qb=[0,"",0,"root",0];function e1(e,t,n,r,o){const i=e.anchor,s=e.focus,a=i.getNode(),l=$e(),c=Lt(dn(l)),u=c!==null?c.anchorNode:null,f=i.key,d=l.getElementByKey(f),h=n.length;return f!==s.key||!X(a)||(!o&&(!ul||Jb<r+50)||a.isDirty()&&h<2||A1(n))&&i.offset!==s.offset&&!a.isComposing()||rr(a)||a.isDirty()&&h>1||(o||!ul)&&d!==null&&!a.isComposing()&&u!==Ri(d)||c!==null&&t!==null&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||a.getFormat()!==e.format||a.getStyle()!==e.style||(function(g,p){if(p.isSegmented())return!0;if(!g.isCollapsed())return!1;const m=g.anchor.offset,x=p.getParentOrThrow(),y=yo(p);return m===0?!p.canInsertTextBefore()||!x.canInsertTextBefore()&&!p.isComposing()||y||(function(v){const b=v.getPreviousSibling();return(X(b)||B(b)&&b.isInline())&&!b.canInsertTextAfter()})(p):m===p.getTextContentSize()&&(!p.canInsertTextAfter()||!x.canInsertTextAfter()&&!p.isComposing()||y)})(e,a)}function mm(e,t){return xr(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function ym(e,t,n){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}=e;Nd&&(Nd=!1,mm(r,o)&&mm(i,s)&&!ao)||Hn(t,()=>{if(!n)return void Ge(null);if(!Zs(t,r,i))return;let a=Y();if(ao&&W(a)&&a.isCollapsed()){const l=a.anchor,c=ao.anchor;(l.key===c.key&&l.offset===c.offset+1||l.offset===1&&c.getNode().is(l.getNode().getPreviousSibling()))&&(a=ao.clone(),Ge(a))}if(ao=null,W(a)){const l=a.anchor,c=l.getNode();if(a.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(a.dirty=!0);const u=dn(t).event,f=u?u.timeStamp:performance.now(),[d,h,g,p,m]=Qb,x=qe(),y=t.isComposing()===!1&&x.getTextContent()==="";if(f<m+200&&l.offset===g&&l.key===p)Ga(a,d,h);else if(l.type==="text")X(c)||q(141),t1(a,c);else if(l.type==="element"&&!y){B(c)||q(259);const v=l.getNode();v.isEmpty()?(function(b,w){const _=w.getTextFormat(),E=w.getTextStyle();Ga(b,_,E)})(a,v):Ga(a,0,"")}}else{const u=l.key,f=a.focus.key,d=a.getNodes(),h=d.length,g=a.isBackward(),p=g?s:o,m=g?o:s,x=g?f:u,y=g?u:f;let v=2047,b=!1;for(let w=0;w<h;w++){const _=d[w],E=_.getTextContentSize();if(X(_)&&E!==0&&!(w===0&&_.__key===x&&p===E||w===h-1&&_.__key===y&&m===0)&&(b=!0,v&=_.getFormat(),v===0))break}a.format=b?v:0}}Q(t,cr,void 0)})}function Ga(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function t1(e,t){Ga(e,t.getFormat(),t.getStyle())}function n1(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function j3(e){const t=e.inputType,n=n1(e),r=$e(),o=Y();if(t==="deleteContentBackward"){if(o===null){const f=qn();if(!W(f))return!0;Ge(f.clone())}if(W(o)){const f=o.anchor.key===o.focus.key;if(i=e.timeStamp,Zb==="MediaLast"&&i<Fs+30&&r.isComposing()&&f){if(gt(null),Fs=0,setTimeout(()=>{Hn(r,()=>{gt(null)})},30),W(o)){const d=o.anchor.getNode();d.markDirty(),X(d)||q(142),t1(o,d)}}else{gt(null),e.preventDefault();const d=o.anchor.getNode(),h=d.getTextContent(),g=d.canInsertTextAfter(),p=o.anchor.offset===0&&o.focus.offset===h.length;let m=rm&&f&&!p&&g;if(m&&o.isCollapsed()&&(m=!_e(jd(o.anchor,!0))),!m){Q(r,Lr,!0);const x=Y();rm&&W(x)&&x.isCollapsed()&&(ao=x,setTimeout(()=>ao=null))}}return!0}}var i;if(!W(o))return!0;const s=e.data;Qo!==null&&Eh(!1,r,Qo),o.dirty&&Qo===null||!o.isCollapsed()||ot(o.anchor.getNode())||n===null||o.applyDOMRange(n),Qo=null;const a=o.anchor,l=o.focus,c=a.getNode(),u=l.getNode();if(t==="insertText"||t==="insertTranspose"){if(s===`
37
37
  `)e.preventDefault(),Q(r,fi,!1);else if(s===Ir)e.preventDefault(),Q(r,Co,void 0);else if(s==null&&e.dataTransfer){const f=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(f)}else s!=null&&e1(o,n,s,e.timeStamp,!0)?(e.preventDefault(),Q(r,mo,s)):Qo=s;return Jb=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Q(r,mo,e);break;case"insertFromComposition":gt(null),Q(r,mo,e);break;case"insertLineBreak":gt(null),Q(r,fi,!1);break;case"insertParagraph":gt(null),vs&&!$i?(vs=!1,Q(r,fi,!1)):Q(r,Co,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Q(r,ah,e);break;case"deleteByComposition":(function(f,d){return f!==d||B(f)||B(d)||!yo(f)||!yo(d)})(c,u)&&Q(r,Rd,e);break;case"deleteByDrag":case"deleteByCut":Q(r,Rd,e);break;case"deleteContent":Q(r,Lr,!1);break;case"deleteWordBackward":Q(r,Ti,!0);break;case"deleteWordForward":Q(r,Ti,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Q(r,So,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Q(r,So,!1);break;case"formatStrikeThrough":Q(r,It,"strikethrough");break;case"formatBold":Q(r,It,"bold");break;case"formatItalic":Q(r,It,"italic");break;case"formatUnderline":Q(r,It,"underline");break;case"historyUndo":Q(r,Hb,void 0);break;case"historyRedo":Q(r,Wb,void 0)}return!0}function V3(e){if(Be(e.target)&&w1(e.target))return!0;const t=$e(),n=Y(),r=e.data,o=n1(e);if(r!=null&&W(n)&&e1(n,o,r,e.timeStamp,!1)){fs&&(yl(t,r),fs=!1);const i=n.anchor.getNode(),s=Lt(dn(t));if(s===null)return!0;const a=n.isBackward(),l=a?n.anchor.offset:n.focus.offset,c=a?n.focus.offset:n.anchor.offset;ul&&!n.isCollapsed()&&X(i)&&s.anchorNode!==null&&i.getTextContent().slice(0,l)+r+i.getTextContent().slice(l+c)===N1(s.anchorNode)||Q(t,mo,r);const u=r.length;xo&&u>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=u),Gs||$i||qs||!t.isComposing()||(Fs=0,gt(null))}else Eh(!1,t,r!==null?r:void 0),fs&&(yl(t,r||void 0),fs=!1);return(function(){ut();const i=$e();Ab(i)})(),!0}function B3(e){const t=$e(),n=Y();if(W(n)&&!t.isComposing()){const r=n.anchor,o=n.anchor.getNode();gt(r.key),(e.timeStamp<Fs+30||r.type==="element"||!n.isCollapsed()||o.getFormat()!==n.format||X(o)&&o.getStyle()!==n.style)&&Q(t,mo,p3)}return!0}function z3(e){return yl($e(),e.data),!0}function yl(e,t){const n=e._compositionKey;if(gt(null),n!==null&&t!=null){if(t===""){const r=Le(n),o=Ri(e.getElementByKey(n));return void(o!==null&&o.nodeValue!==null&&X(r)&&Rh(r,o.nodeValue,null,null,!0))}if(t[t.length-1]===`
@@ -82,7 +82,7 @@
82
82
  transform-origin: center;
83
83
  animation: spin 1s linear infinite;
84
84
  }
85
- `),M.createElement("g",{className:"spinner"},M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0003 6.83317C13.5692 6.83317 11.2376 7.79894 9.51851 9.51803C7.79943 11.2371 6.83366 13.5687 6.83366 15.9998C6.83366 18.431 7.79943 20.7626 9.51851 22.4817C11.2376 24.2007 13.5692 25.1665 16.0003 25.1665C18.4315 25.1665 20.7631 24.2007 22.4821 22.4817C24.2012 20.7626 25.167 18.431 25.167 15.9998C25.167 13.5687 24.2012 11.2371 22.4821 9.51803C20.7631 7.79894 18.4315 6.83317 16.0003 6.83317ZM3.16699 15.9998C3.16699 8.91217 8.91266 3.1665 16.0003 3.1665C23.088 3.1665 28.8337 8.91217 28.8337 15.9998C28.8337 23.0875 23.088 28.8332 16.0003 28.8332C8.91266 28.8332 3.16699 23.0875 3.16699 15.9998Z",fill:"currentColor",fillOpacity:.12}),M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9997 6.83319C13.6363 6.82787 11.3633 7.74068 9.65999 9.37907C9.30711 9.70535 8.84021 9.88001 8.35982 9.86545C7.87943 9.85089 7.42396 9.64827 7.09149 9.30122C6.75902 8.95416 6.57612 8.49043 6.58218 8.00985C6.58823 7.52928 6.78276 7.07031 7.12388 6.73174C9.50956 4.43941 12.6912 3.16143 15.9997 3.16652C16.4859 3.16652 16.9522 3.35967 17.296 3.70349C17.6398 4.04731 17.833 4.51362 17.833 4.99985C17.833 5.48608 17.6398 5.9524 17.296 6.29621C16.9522 6.64003 16.4859 6.83319 15.9997 6.83319Z",fill:"currentColor"}))),aO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("g",{clipPath:"url(#clip0_2074_3858)"},M.createElement("path",{d:"M21 21L16.65 16.65M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),M.createElement("defs",null,M.createElement("clipPath",{id:"clip0_2074_3858"},M.createElement("rect",{width:24,height:24,fill:"white"})))),lO={table:R.css({...me.body2,fontWeight:500})},nS=S.forwardRef(({children:e,className:t,style:n,...r},o)=>C.jsx("td",{ref:o,className:R.cx(t),style:n,...r,children:e}));nS.displayName="TableBodyCell";const{spacing:m0}=j,rS=S.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:r="center",py:o=m0.sm,px:i=m0.md,minHeight:s="56px",...a},l)=>C.jsx(G,{row:t,justifyContent:n,alignItems:r,py:o,px:i,minHeight:s,ref:l,...a,children:e}));rS.displayName="TableBodyCellContent";const{color:cO}=j,oS=S.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:r=!1,...o},i)=>{const s=R.css({borderBottom:n?`1px solid ${cO.border.neutralAlphaLow}`:"none"});return C.jsx("tr",{ref:i,className:R.cx(s,t),...o,children:e})});oS.displayName="TableBodyRow";const uO=S.forwardRef(({children:e,className:t,style:n,justifyContent:r="flex-start",alignItems:o="flex-start",...i},s)=>{const a=R.css({justifyContent:r,alignItems:o,fontWeight:"inherit"});return C.jsx("th",{ref:s,className:R.cx(a,t),style:n,...i,children:e})}),{spacing:y0}=j,mg=S.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:r="center",py:o=y0.sm,px:i=y0.md,minHeight:s="56px",...a},l)=>C.jsx(G,{row:t,justifyContent:n,alignItems:r,py:o,px:i,minHeight:s,ref:l,...a,children:e}));mg.displayName="TableHeadCellContent";const dO=e=>M.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),fO=e=>M.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{color:ja}=j,hO=({sortDirection:e,gap:t="5px",...n})=>C.jsxs(G,{gap:t,...n,children:[C.jsx(fO,{style:{color:e==="asc"?ja.icon.accent:ja.icon.tertiary}}),C.jsx(dO,{style:{color:e==="desc"?ja.icon.accent:ja.icon.tertiary}})]}),iS=({children:e,tableProps:t,gap:n="10px",...r})=>{const o=t.column.getIsSorted();return C.jsxs(mg,{style:{cursor:"pointer",userSelect:"none"},gap:n,...r,children:[e,C.jsx(hO,{sortDirection:o})]})};iS.displayName="TableHeadCellContentSortable";const{color:v0}=j,sS=S.forwardRef(({children:e,className:t,showBorders:n=!1,...r},o)=>{const i=R.css({backgroundColor:v0.fill.bgSecondary,borderBottom:n?`1px solid ${v0.border.neutralAlphaLow}`:"none"});return C.jsx("tr",{ref:o,className:R.cx(i,t),...r,children:e})});sS.displayName="TableHeadRow";const gO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),pO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),mO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{d:"M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{d:"M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Wu=(e,t)=>{const n=t-e+1;return Array.from({length:n},(r,o)=>e+o)};function yO(e){const{count:t=1,page:n,maxVisiblePages:r=10}=e;let o=1,i=1;if(r<=2)return[n];r<=4?(o=0,i=0):r<=6?(o=1,i=0):r<=7?(o=1,i=Math.max(0,Math.floor((r-4)/2))):(o=1,i=Math.max(1,Math.floor((r-5)/2)));const s=Wu(1,Math.min(o,t)),a=Wu(Math.max(t-o+1,o+1),t),l=Math.max(Math.min(n-i,t-o-i*2-1),o+2),c=Math.min(Math.max(n+i,o+i*2+2),t-o-1);return[...s,...l>o+2?["start-dots"]:o+1<t-o?[o+1]:[],...Wu(l,c),...c<t-o-1?["end-dots"]:t-o>o?[t-o]:[],...a]}const{color:Yo,cornerRadius:vO,spacing:x0}=j,xO=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:r,onPageSizeChange:o,pageSizeOptions:i=[10,20,50,100],showPageSizeSelector:s=!0,renderPageSizeSelectorDropdownItem:a=c=>c.label,renderPageSizeSelectorInputItem:l})=>{const c=S.useRef(null),[u,f]=S.useState(0),d=Math.ceil(n/t),h=e>0,g=e<d-1;S.useEffect(()=>{const w=c.current;if(!w)return;const _=new ResizeObserver(E=>{for(const T of E)f(T.contentRect.width)});return _.observe(w),()=>{_.disconnect()}},[]);const m=(w=>{if(w<=0)return 1;const P=w-96;if(P<=40)return 1;const O=Math.floor((P+8)/48);return Math.max(1,Math.min(10,O))})(u),x=yO({page:e+1,count:d,maxVisiblePages:m}),y=()=>{h&&r(e-1)},v=()=>{g&&r(e+1)},b=w=>{o(Number(w))};return n===0?null:C.jsxs(G,{flex:1,row:!0,justifyContent:"space-between",children:[C.jsxs(G,{ref:c,flex:1,row:!0,overflow:"hidden",gap:x0.sm,children:[C.jsx(fr,{onClick:y,disabled:!h,color:"neutral",size:"sm",children:C.jsx(gO,{})}),C.jsx(G,{row:!0,gap:x0.sm,children:x.map(w=>C.jsx(bO,{isDots:w==="start-dots"||w==="end-dots",isCurrentPage:w===e+1,disabled:w==="start-dots"||w==="end-dots",onClick:()=>r(w-1),children:w},w))}),C.jsx(fr,{color:"neutral",size:"sm",onClick:v,disabled:!g,children:C.jsx(pO,{})})]}),s&&C.jsx(G,{alignItems:"flex-end",children:C.jsx(fg,{width:"fit-content",value:t.toString(),size:"sm",items:i.map(w=>({value:w.toString(),label:w.toString()})),returnedValue:w=>w.value,renderDropdownItem:a,renderSingleInputItem:l,onChange:w=>b(w)})})]})},bO=({children:e,isCurrentPage:t=!1,onClick:n,isDots:r=!1,disabled:o=!1})=>{const i=R.css({cursor:o?"not-allowed":"pointer",userSelect:"none",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t?Yo.fill.accentSecondary:Yo.fill.bgSecondary,borderRadius:vO.sm,border:t?`1px solid ${Yo.fill.accentSecondaryHover}`:`1px solid ${Yo.border.neutralAlphaBasic}`}),s=R.css({width:"24px",height:"24px",color:t?Yo.icon.secondary:Yo.icon.tertiary});return C.jsx(G,{className:i,onClick:o?void 0:n,children:r?C.jsx(mO,{className:s}):C.jsx(se,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},{color:vf,cornerRadius:wO}=j,CO=R.css({position:"relative",borderRadius:wO.md,overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:1,transition:"opacity 0.2s ease"},"&::before":{left:0,background:"linear-gradient(to left, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"},"&::after":{right:0,background:"linear-gradient(to right, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"}}),SO=R.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:`${vf.scrollbar.thumbPrimary} ${vf.scrollbar.trackPrimary}`}),aS=S.memo(({data:e,children:t,className:n,showBorders:r=!1,...o})=>{const[i,s]=S.useState(!1),[a,l]=S.useState(!1),c=S.useRef(null),u=S.useCallback(()=>{const d=c.current;if(!d)return;const{scrollLeft:h,scrollWidth:g,clientWidth:p}=d,m=g>p;s(m&&h>0),l(m&&h<g-p-1)},[]);S.useEffect(()=>{const d=c.current;if(!d)return;u();const h=new ResizeObserver(u);return h.observe(d),d.addEventListener("scroll",u),()=>{h.disconnect(),d.removeEventListener("scroll",u)}},[u,e]);const f=R.css({border:r?`1px solid ${vf.border.neutralAlphaLow}`:"transparent","&::before":{opacity:i?1:0},"&::after":{opacity:a?1:0}});return C.jsx(G,{className:R.cx(CO,f,n),...o,children:C.jsx(G,{ref:c,className:SO,children:t})})});aS.displayName="TableWrapper";const{spacing:mn,cornerRadius:b0,color:js}=j,_O=R.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:js.fill.bgPrimary}),TO=R.css({backgroundColor:js.fill.bgSecondary,color:js.text.tertiary}),Ui=({ref:e,data:t,columns:n,showBorders:r=!0,enableSorting:o=!1,enablePagination:i=!1,enableRowSelection:s=!1,enableMultiRowSelection:a=!1,sorting:l,onSortingChange:c,columnFilters:u,onColumnFiltersChange:f,columnVisibility:d,onColumnVisibilityChange:h,pagination:g,onPaginationChange:p,rowSelection:m,onRowSelectionChange:x,totalCount:y,loading:v=!1,emptyLabels:b={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:w={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:_,containerClassName:E,tableOptions:T={},onRowClick:k,getRowId:P,headCellComponent:O=uO,bodyCellComponent:D=nS,headRowComponent:I=sS,bodyRowComponent:$=oS,onReset:H,renderPageSizeSelectorDropdownItem:U,renderPageSizeSelectorInputItem:L})=>{const[N,V]=S.useState([]),[K,te]=S.useState([]),[J,Z]=S.useState({}),[ae,oe]=S.useState({pageIndex:0,pageSize:10}),[fe,Te]=S.useState({}),ne=l??N,ve=u??K,Ee=d??J,De=g??ae,st=m??fe,ee=xe=>{const Me=typeof xe=="function"?xe(ne):xe;c?c(Me):V(Me)},Ce=xe=>{const Me=typeof xe=="function"?xe(ve):xe;f?f(Me):te(Me)},ze=xe=>{const Me=typeof xe=="function"?xe(Ee):xe;h?h(Me):Z(Me)},Re=xe=>{const Me=typeof xe=="function"?xe(De):xe;p?p(Me):oe(Me)},Ft=iO({data:t,columns:n,state:{sorting:ne,columnFilters:ve,columnVisibility:Ee,pagination:De,rowSelection:st},onSortingChange:ee,onColumnFiltersChange:Ce,onColumnVisibilityChange:ze,onPaginationChange:Re,onRowSelectionChange:xe=>{const Me=typeof xe=="function"?xe(st):xe;x?x(Me):Te(Me)},getCoreRowModel:J$(),getSortedRowModel:o?tO():void 0,getPaginationRowModel:i?eO():void 0,enableRowSelection:s,enableMultiRowSelection:a,getRowId:P,manualPagination:!!y,pageCount:y?Math.ceil(y/De.pageSize):void 0,...T});S.useImperativeHandle(e,()=>Ft);const{rows:Yt}=Ft.getRowModel(),Xt=(xe,Me)=>{k&&k(xe.original,Me)};return v?C.jsxs(G,{w:"full",borderRadius:b0.md,py:mn["5xl"],px:mn["10xl"],alignItems:"center",className:R.cx(E),children:[C.jsx(sO,{width:32,height:32,style:{color:js.icon.tertiary,marginBottom:mn.sm}}),C.jsx(se,{mb:mn.xs,variant:"title-3",fontWeight:"semibold",children:w.title}),C.jsx(se,{mb:mn.md,colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:w.description}),typeof w.action=="string"?C.jsx(Si,{width:"auto",onClick:H,intensity:"secondary",color:"accent",children:w.action}):w.action]}):Yt.length?C.jsxs(G,{w:"full",gap:mn.xl,className:R.cx(E),children:[C.jsx(aS,{data:t,showBorders:r,children:C.jsxs("table",{className:R.cx(_O,lO.table,_),children:[C.jsx("thead",{className:TO,children:Ft.getHeaderGroups().map(xe=>C.jsx(I,{showBorders:r,children:xe.headers.map(Me=>C.jsx(O,{style:{width:Me.getSize()},onClick:Me.column.getToggleSortingHandler(),children:Me.isPlaceholder?null:p0(Me.column.columnDef.header,Me.getContext())},Me.id))},xe.id))}),C.jsx("tbody",{children:Yt.map((xe,Me)=>C.jsx($,{showBorders:r,isSelected:xe.getIsSelected(),onClick:()=>Xt(xe,Me),children:xe.getVisibleCells().map(Zt=>C.jsx(D,{children:p0(Zt.column.columnDef.cell,Zt.getContext())},Zt.id))},xe.id))})]})}),i&&!v&&C.jsx(xO,{pageIndex:De.pageIndex,pageSize:De.pageSize,totalCount:y||t.length,renderPageSizeSelectorDropdownItem:U,renderPageSizeSelectorInputItem:L,onPageChange:xe=>Re({...De,pageIndex:xe}),onPageSizeChange:xe=>Re({...De,pageSize:xe,pageIndex:0})})]}):C.jsxs(G,{w:"full",borderRadius:b0.md,py:mn["5xl"],px:mn["10xl"],alignItems:"center",className:R.cx(E),children:[C.jsx(aO,{width:24,height:24,style:{color:js.icon.tertiary,marginBottom:mn.sm}}),C.jsx(se,{mb:mn.xs,variant:"title-3",fontWeight:"semibold",children:b.title}),C.jsx(se,{mb:mn.md,colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:b.description}),typeof b.action=="string"?C.jsx(Si,{width:"auto",onClick:H,intensity:"secondary",color:"accent",children:b.action}):b.action]})};Ui.displayName="Table";Ui.HeadCellContent=mg;Ui.BodyCellContent=rS;Ui.HeadCellContentSortable=iS;Ui.createColumnHelper=UC;const{color:tn}=j,Ku={chart:{type:"areaspline",backgroundColor:"transparent",spacing:[0,0,0,0],margin:[0,0,0,0]},xAxis:{gridLineWidth:0,lineWidth:0,tickWidth:0,labels:{enabled:!1},title:{text:""}},yAxis:{gridLineWidth:0,lineWidth:0,tickWidth:0,labels:{enabled:!1},title:{text:""}},legend:{enabled:!1},credits:{enabled:!1}},EO={positive:{color:tn.fill.positivePrimary,fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,tn.fill.positiveTintHigh],[1,tn.fill.positiveTransparent]]}},negative:{color:tn.fill.negativePrimary,fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,tn.fill.negativeTintHigh],[1,tn.fill.negativeTransparent]]}},accent:{color:tn.fill.accentPrimary,fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,tn.fill.accentTintHigh],[1,tn.fill.accentTransparent]]}},warning:{color:tn.fill.warningPrimary,fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,tn.fill.warningTintHigh],[1,tn.fill.warningTransparent]]}},transfer:{color:"var(--fill-transfer-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-transfer-tint-high)"],[1,"var(--fill-transfer-transparent)"]]}}},{color:w0}=j,RO=(e,t,n,r,o)=>({...Ku,plotOptions:{areaspline:{marker:{enabled:!1,states:{hover:{enabled:o}}},allowPointSelect:!1}},xAxis:{...Ku.xAxis,...n},yAxis:{...Ku.yAxis,...r},series:[{type:"areaspline",data:t,...EO[e]}]}),kO=e=>({outside:!0,enabled:!!e,padding:0,position:{alignByTranslate:!0},shadow:{color:w0.effect.shadowM,offsetX:0,offsetY:0},borderRadius:8,backgroundColor:w0.fill.bgPrimary,useHTML:!0,...e}),lS=({color:e="positive",data:t=[],xAxis:n,yAxis:r,containerProps:o,highcharts:i,tooltip:s})=>{const a=S.useRef(null);S.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[]);const l=S.useMemo(()=>RO(e,t,n,r,!!s),[e,t,n,r,s]),c=S.useMemo(()=>s?kO(s):{enabled:!1},[s]);return C.jsx(rl.Chart,{highcharts:i,ref:a,options:l,containerProps:o,children:C.jsx(rl.Tooltip,{...c})})};lS.displayName="LineChart";const{color:nr}=j,AO={chart:{type:"pie",backgroundColor:"transparent",spacing:[0,0,0,0],margin:[0,0,0,0],events:{click:void 0}},title:{align:"center",verticalAlign:"middle",floating:!0,style:{fontSize:"24px",fontWeight:"600",color:nr.text.primary}},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},startAngle:90,endAngle:-90,innerSize:"90%",borderWidth:0,states:{hover:{enabled:!1},select:{enabled:!1},inactive:{enabled:!1}},enableMouseTracking:!1}},tooltip:{enabled:!1},legend:{enabled:!1},credits:{enabled:!1}},MO={positive:{colors:[nr.fill.positivePrimary,nr.fill.positiveTintHigh]},negative:{colors:[nr.fill.negativePrimary,nr.fill.negativeTintHigh]},accent:{colors:[nr.fill.accentPrimary,nr.fill.accentTintHigh]},warning:{colors:[nr.fill.warningPrimary,nr.fill.warningTintHigh]},transfer:{colors:["var(--fill-transfer-primary)","var(--fill-transfer-tint-high)"]}},NO=(e,t)=>({...AO,series:[{type:"pie",data:[{name:"",y:Math.min(e,100)},{name:"",y:Math.max(100-e,0)}],...MO[t]}]}),cS=S.forwardRef(({highcharts:e,color:t="positive",percentage:n,label:r=s=>`${s}%`,containerProps:o},i)=>{const s=S.useRef(null),a=i||s;S.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[a]);const l=S.useMemo(()=>NO(n,t),[n,t]);return C.jsx(rl.Chart,{highcharts:e,ref:a,options:l,containerProps:o,children:C.jsx(rl.Title,{children:r?.(n)})})});cS.displayName="PieProgressChart";const PO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),{color:C0}=j,tl={link:R.css({...me.body2,color:C0.text.tertiary,textDecoration:"none",transition:"color 0.2s ease","&:hover":{textDecoration:"underline"}}),separator:R.css({color:C0.icon.tertiary}),nav:R.css({display:"flex",alignItems:"center",flexWrap:"wrap"}),navItem:R.css({display:"inline-flex",alignItems:"center"})},yg=({children:e,separator:t=C.jsx(PO,{className:tl.separator})})=>{const n=S.Children.toArray(e).filter(r=>S.isValidElement(r));return C.jsx("nav",{"aria-label":"breadcrumb",className:tl.nav,children:n.map((r,o)=>{const i=o===n.length-1;return C.jsxs(se,{tag:"span",className:tl.navItem,children:[S.cloneElement(r,{active:r.props.active??i}),!i&&t]},o)})})},LO=({children:e,href:t,active:n,className:r,activeClassName:o,activeElement:i,onClick:s})=>n?i||C.jsx(se,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:R.cx(r,o),onClick:s,children:e}):C.jsx("a",{href:t,className:R.cx(tl.link,r),onClick:s,children:e});yg.Item=LO;yg.displayName="Breadcrumbs";const FO=yg,{color:Je,cornerRadius:Sr,height:xt,transition:S0}=j,$O={primary:{bg:Je.fill.accentTint,text:Je.text.accent,icon:Je.icon.accent},secondary:{bg:Je.fill.neutralTint,text:Je.text.secondary,icon:Je.icon.tertiary},negative:{bg:Je.fill.negativeTint,text:Je.text.negative,icon:Je.icon.negative},positive:{bg:Je.fill.positiveTint,text:Je.text.positive,icon:Je.icon.positive},warning:{bg:Je.fill.warningTint,text:Je.text.warning,icon:Je.icon.warning},neutral:{bg:Je.fill.neutralTint,text:Je.text.tertiary,icon:Je.icon.tertiary},transfer:{bg:"var(--fill-transfer-tint)",text:"var(--text-transfer)",icon:"var(--icon-transfer)"},custom:{bg:Je.fill.accentTint,text:Je.text.accent,icon:Je.icon.accent}},OO={"2xs":{size:xt.avatar["2xs"],borderRadius:Sr.xs,iconSize:xt.icon["2xs"],fontSize:10,fontWeight:500},xs:{size:xt.avatar.xs,borderRadius:Sr.sm,iconSize:xt.icon.xs,fontSize:12,fontWeight:500},sm:{size:xt.avatar.sm,borderRadius:Sr.sm,iconSize:xt.icon.xs,fontSize:14,fontWeight:500},md:{size:xt.avatar.md,borderRadius:Sr.sm,iconSize:xt.icon.sm,fontSize:14,fontWeight:500},lg:{size:xt.avatar.lg,borderRadius:Sr.md,iconSize:xt.icon.md,fontSize:16,fontWeight:600},xl:{size:xt.avatar.xl,borderRadius:Sr.md,iconSize:xt.icon.md,fontSize:16,fontWeight:600},"2xl":{size:xt.avatar["2xl"],borderRadius:Sr.md,iconSize:xt.icon.md,fontSize:18,fontWeight:500},custom:{size:xt.avatar.md,borderRadius:Sr.sm,iconSize:xt.icon.sm,fontSize:14,fontWeight:500}},uS=S.forwardRef(({children:e,color:t="primary",size:n="md",fullRound:r=!1,className:o},i)=>{const s=S.useMemo(()=>$O[t],[t]),a=S.useMemo(()=>OO[n],[n]),l=S.useMemo(()=>R.css({width:a.size,height:a.size,borderRadius:r?"var(--corner-full-round)":a.borderRadius,backgroundColor:s.bg,color:s.text,fontSize:a.fontSize,fontWeight:a.fontWeight,lineHeight:1,transition:S0.general,"& svg":{width:a.iconSize,height:a.iconSize,color:s.icon,transition:S0.general},"& img":{width:"100%",height:"100%",objectFit:"cover"},"&:has(img)":{backgroundColor:"transparent",border:`1px solid ${Je.border.neutralAlphaLow}`}}),[s,a,r]);return C.jsx(G,{ref:i,center:!0,overflow:"hidden",className:R.cx(l,o),children:e})});uS.displayName="Avatar";const{color:Tt,cornerRadius:Uu,spacing:nl}=j,xf={neutral:{border:Tt.border.neutralAlphaLow,bg:Tt.status.neutralTint,color:Tt.text.secondary,colorName:"secondary"},accent:{border:Tt.border.accentSecondary,bg:Tt.status.accentTintLow,color:Tt.text.accent,colorName:"accent"},warning:{border:Tt.border.warningSecondary,bg:Tt.status.warningTintLow,color:Tt.text.warning,colorName:"warning"},positive:{border:Tt.border.positiveSecondary,bg:Tt.status.positiveTintLow,color:Tt.text.positive,colorName:"positive"},negative:{border:Tt.border.negativeSecondary,bg:Tt.status.negativeTintLow,color:Tt.text.negative,colorName:"negative"},transfer:{border:"var(--border-transfer-secondary)",bg:"var(--status-transfer-tint-low)",color:"var(--text-transfer)",colorName:"transfer"}},Va={sm:{h:24,text:"caption-1",corner:Uu.xs,p:`6px ${nl.sm}`},md:{h:32,text:"body-2",corner:Uu.sm,p:`6px ${nl.md}`},lg:{h:40,text:"body-2",corner:Uu.md,p:`6px ${nl.lg}`}},IO=(e,t,n,r)=>{const o=xf[t];let i=o.bg,s="none";const a=o.color;switch(e){case"outline":i="transparent",s=`1px solid ${o.border}`;break;case"clear":i="transparent";break;default:i=o.bg;break}return R.css({cursor:n?"not-allowed":r?"pointer":"default",opacity:n?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s",backgroundColor:i,color:a,border:s})},DO=R.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}}),dS=({label:e,color:t="neutral",size:n="md",variant:r="filled",leftElement:o,rightElement:i,disabled:s,onClick:a,onDelete:l,className:c})=>{const u=IO(r,t,s,a);return C.jsxs(G,{row:!0,alignItems:"center",gap:nl.sm,p:Va[n].p,h:Va[n].h,overflow:"hidden",borderRadius:Va[n].corner,onClick:a,className:R.cx(u,c),children:[a&&C.jsx(Lo,{}),o,C.jsx(se,{variant:Va[n].text,colorName:xf[t].colorName,textOverflow:"ellipsis",children:e}),i,l&&!s&&C.jsx(se,{className:DO,colorName:xf[t].colorName,onClick:f=>{f.stopPropagation(),l(f)},children:C.jsx(IC,{})})]})};dS.displayName="Badge";const jO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),M.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Gu=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",fill:"currentColor",fillOpacity:.15}),M.createElement("path",{d:"M12 6C11.4477 6 11 6.44772 11 7V13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V7C13 6.44772 12.5523 6 12 6Z",fill:"currentColor"}),M.createElement("path",{d:"M12 15C11.4477 15 11 15.4477 11 16V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V16C13 15.4477 12.5523 15 12 15Z",fill:"currentColor"})),VO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),M.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),BO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},M.createElement("path",{d:"M12 2V22M19.0711 4.92893L4.92893 19.0711M22 12H2M19.0711 19.0711L4.92893 4.92893",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),{color:Ke,cornerRadius:zO,spacing:_s}=j,Xo={hint:R.css({display:"flex",alignItems:"flex-start",gap:_s.md,padding:_s.lg,minHeight:48,width:"100%",borderRadius:zO.md,transition:"background 0.2s, color 0.2s"}),icon:R.css({flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:24,height:24}}),content:R.css({display:"flex",flexDirection:"column",gap:_s.xs}),title:R.css({verticalAlign:"middle",color:"inherit"}),subtitle:R.css({verticalAlign:"middle",opacity:.8,color:"inherit"}),disabled:R.css({opacity:.5,pointerEvents:"none"})},HO={solid:{warning:R.css({background:Ke.status.warning,color:Ke.text.inverse}),negative:R.css({background:Ke.status.negative,color:Ke.text.inverse}),positive:R.css({background:Ke.status.positive,color:Ke.text.inverse}),accent:R.css({background:Ke.status.accent,color:Ke.text.inverse}),neutral:R.css({background:Ke.status.neutral,color:Ke.text.inverse}),transfer:R.css({background:Ke.status.transfer,color:Ke.text.inverse})},soft:{warning:R.css({background:Ke.status.warningTintLow,color:Ke.text.warning}),negative:R.css({background:Ke.status.negativeTintLow,color:Ke.text.negative}),positive:R.css({background:Ke.status.positiveTintLow,color:Ke.text.positive}),accent:R.css({background:Ke.status.accentTintLow,color:Ke.text.accent}),neutral:R.css({background:Ke.status.neutralTintLow,color:Ke.text.tertiary}),transfer:R.css({background:Ke.status.transferTintLow,color:Ke.text.transfer})}},WO={md:R.css({minHeight:48,padding:_s.lg}),sm:R.css({minHeight:32,padding:_s.md})},KO={negative:C.jsx(VO,{}),positive:C.jsx(jO,{}),accent:C.jsx(Gu,{}),warning:C.jsx(Gu,{}),transfer:C.jsx(Gu,{}),neutral:C.jsx(BO,{})},UO=({title:e,subtitle:t,color:n="warning",variant:r="soft",size:o="md",icon:i,disabled:s=!1,className:a,style:l})=>{const c=i||KO[n];return C.jsxs("div",{className:Sf(Xo.hint,WO[o],HO[r][n],s&&Xo.disabled,a),style:l,"aria-disabled":s,children:[c&&C.jsx("span",{className:Xo.icon,children:c}),C.jsxs("div",{className:Xo.content,children:[e&&C.jsx(se,{className:Xo.title,variant:o==="md"?"body-1":"caption-2",children:e}),t&&C.jsx(se,{className:Xo.subtitle,variant:o==="md"?"body-2":"caption-1",children:t})]})]})},{color:no,cornerRadius:GO,spacing:Ln}=j,qO=R.css({width:"100%",cursor:"default",userSelect:"text",outline:"none",...me.body2,color:no.text.primary,overflowWrap:"anywhere","p, ul, ol, pre, blockquote, table":{margin:`${Ln.sm} 0`},"h1, h2, h3, h4, h5, h6":{margin:`${Ln.md} 0 ${Ln.sm}`,fontWeight:600},h1:{fontSize:me.title1.fontSize,lineHeight:me.title1.lineHeight},h2:{fontSize:me.title2.fontSize,lineHeight:me.title2.lineHeight},h3:{fontSize:me.title3.fontSize,lineHeight:me.title3.lineHeight},h4:{fontSize:me.headline2.fontSize,lineHeight:me.headline2.lineHeight},h5:{fontSize:me.headline3.fontSize,lineHeight:me.headline3.lineHeight},h6:{fontSize:me.body1.fontSize,lineHeight:me.body1.lineHeight},ul:{paddingLeft:Ln.xl,listStyleType:"disc"},ol:{paddingLeft:Ln.xl,listStyleType:"decimal"},li:{margin:`${Ln.xs} 0`},a:{color:no.text.accent,textDecoration:"underline"},code:{padding:`0 ${Ln.xs}`,borderRadius:GO.xs,backgroundColor:no.fill.neutralSecondary,fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},"pre code":{display:"block",padding:Ln.md,overflowX:"auto"},blockquote:{marginLeft:0,paddingLeft:Ln.md,borderLeft:`3px solid ${no.border.neutralAlphaBasic}`,color:no.text.secondary},table:{width:"100%",borderCollapse:"collapse"},"th, td":{border:`1px solid ${no.border.neutralAlphaBasic}`,padding:Ln.sm,textAlign:"left"},th:{backgroundColor:no.fill.neutralSecondary}});function YO({markdown:e,className:t,emptyState:n=null}){const r=e.trim(),o=S.useMemo(()=>({isEditable:!1,isPreviewMode:!0,setPreviewMode:()=>{},markdownText:r}),[r]);return r?C.jsx(oh.Provider,{value:o,children:C.jsx(zw,{initialConfig:{...gC(),editable:!1,namespace:"ui-kit-markdown-text-viewer",editorState:()=>{Vw(r,Pl)}},children:C.jsx(hC,{contentEditable:C.jsx(dC,{className:R.cx(qO,t),"aria-placeholder":"markdown text",placeholder:()=>null}),placeholder:null,ErrorBoundary:fC})},r)}):typeof n=="string"?C.jsx(se,{variant:"body-2",colorName:"tertiary",children:n}):n}const{color:fS,cornerRadius:XO}=j,ZO=R.keyframes`
85
+ `),M.createElement("g",{className:"spinner"},M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0003 6.83317C13.5692 6.83317 11.2376 7.79894 9.51851 9.51803C7.79943 11.2371 6.83366 13.5687 6.83366 15.9998C6.83366 18.431 7.79943 20.7626 9.51851 22.4817C11.2376 24.2007 13.5692 25.1665 16.0003 25.1665C18.4315 25.1665 20.7631 24.2007 22.4821 22.4817C24.2012 20.7626 25.167 18.431 25.167 15.9998C25.167 13.5687 24.2012 11.2371 22.4821 9.51803C20.7631 7.79894 18.4315 6.83317 16.0003 6.83317ZM3.16699 15.9998C3.16699 8.91217 8.91266 3.1665 16.0003 3.1665C23.088 3.1665 28.8337 8.91217 28.8337 15.9998C28.8337 23.0875 23.088 28.8332 16.0003 28.8332C8.91266 28.8332 3.16699 23.0875 3.16699 15.9998Z",fill:"currentColor",fillOpacity:.12}),M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9997 6.83319C13.6363 6.82787 11.3633 7.74068 9.65999 9.37907C9.30711 9.70535 8.84021 9.88001 8.35982 9.86545C7.87943 9.85089 7.42396 9.64827 7.09149 9.30122C6.75902 8.95416 6.57612 8.49043 6.58218 8.00985C6.58823 7.52928 6.78276 7.07031 7.12388 6.73174C9.50956 4.43941 12.6912 3.16143 15.9997 3.16652C16.4859 3.16652 16.9522 3.35967 17.296 3.70349C17.6398 4.04731 17.833 4.51362 17.833 4.99985C17.833 5.48608 17.6398 5.9524 17.296 6.29621C16.9522 6.64003 16.4859 6.83319 15.9997 6.83319Z",fill:"currentColor"}))),aO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("g",{clipPath:"url(#clip0_2074_3858)"},M.createElement("path",{d:"M21 21L16.65 16.65M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),M.createElement("defs",null,M.createElement("clipPath",{id:"clip0_2074_3858"},M.createElement("rect",{width:24,height:24,fill:"white"})))),lO={table:R.css({...me.body2,fontWeight:500})},nS=S.forwardRef(({children:e,className:t,style:n,...r},o)=>C.jsx("td",{ref:o,className:R.cx(t),style:n,...r,children:e}));nS.displayName="TableBodyCell";const{spacing:m0}=j,rS=S.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:r="center",py:o=m0.sm,px:i=m0.md,minHeight:s="56px",...a},l)=>C.jsx(G,{row:t,justifyContent:n,alignItems:r,py:o,px:i,minHeight:s,ref:l,...a,children:e}));rS.displayName="TableBodyCellContent";const{color:cO}=j,oS=S.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:r=!1,...o},i)=>{const s=R.css({borderBottom:n?`1px solid ${cO.border.neutralAlphaLow}`:"none"});return C.jsx("tr",{ref:i,className:R.cx(s,t),...o,children:e})});oS.displayName="TableBodyRow";const uO=S.forwardRef(({children:e,className:t,style:n,justifyContent:r="flex-start",alignItems:o="flex-start",...i},s)=>{const a=R.css({justifyContent:r,alignItems:o,fontWeight:"inherit"});return C.jsx("th",{ref:s,className:R.cx(a,t),style:n,...i,children:e})}),{spacing:y0}=j,mg=S.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:r="center",py:o=y0.sm,px:i=y0.md,minHeight:s="56px",...a},l)=>C.jsx(G,{row:t,justifyContent:n,alignItems:r,py:o,px:i,minHeight:s,ref:l,...a,children:e}));mg.displayName="TableHeadCellContent";const dO=e=>M.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),fO=e=>M.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{color:ja}=j,hO=({sortDirection:e,gap:t="5px",...n})=>C.jsxs(G,{gap:t,...n,children:[C.jsx(fO,{style:{color:e==="asc"?ja.icon.accent:ja.icon.tertiary}}),C.jsx(dO,{style:{color:e==="desc"?ja.icon.accent:ja.icon.tertiary}})]}),iS=({children:e,tableProps:t,gap:n="10px",...r})=>{const o=t.column.getIsSorted();return C.jsxs(mg,{style:{cursor:"pointer",userSelect:"none"},gap:n,...r,children:[e,C.jsx(hO,{sortDirection:o})]})};iS.displayName="TableHeadCellContentSortable";const{color:v0}=j,sS=S.forwardRef(({children:e,className:t,showBorders:n=!1,...r},o)=>{const i=R.css({backgroundColor:v0.fill.bgSecondary,borderBottom:n?`1px solid ${v0.border.neutralAlphaLow}`:"none"});return C.jsx("tr",{ref:o,className:R.cx(i,t),...r,children:e})});sS.displayName="TableHeadRow";const gO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),pO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),mO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{d:"M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{d:"M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Wu=(e,t)=>{const n=t-e+1;return Array.from({length:n},(r,o)=>e+o)};function yO(e){const{count:t=1,page:n,maxVisiblePages:r=10}=e;let o=1,i=1;if(r<=2)return[n];r<=4?(o=0,i=0):r<=6?(o=1,i=0):r<=7?(o=1,i=Math.max(0,Math.floor((r-4)/2))):(o=1,i=Math.max(1,Math.floor((r-5)/2)));const s=Wu(1,Math.min(o,t)),a=Wu(Math.max(t-o+1,o+1),t),l=Math.max(Math.min(n-i,t-o-i*2-1),o+2),c=Math.min(Math.max(n+i,o+i*2+2),t-o-1);return[...s,...l>o+2?["start-dots"]:o+1<t-o?[o+1]:[],...Wu(l,c),...c<t-o-1?["end-dots"]:t-o>o?[t-o]:[],...a]}const{color:Yo,cornerRadius:vO,spacing:x0}=j,xO=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:r,onPageSizeChange:o,pageSizeOptions:i=[10,20,50,100],showPageSizeSelector:s=!0,renderPageSizeSelectorDropdownItem:a=c=>c.label,renderPageSizeSelectorInputItem:l})=>{const c=S.useRef(null),[u,f]=S.useState(0),d=Math.ceil(n/t),h=e>0,g=e<d-1;S.useEffect(()=>{const w=c.current;if(!w)return;const _=new ResizeObserver(E=>{for(const T of E)f(T.contentRect.width)});return _.observe(w),()=>{_.disconnect()}},[]);const m=(w=>{if(w<=0)return 1;const P=w-96;if(P<=40)return 1;const O=Math.floor((P+8)/48);return Math.max(1,Math.min(10,O))})(u),x=yO({page:e+1,count:d,maxVisiblePages:m}),y=()=>{h&&r(e-1)},v=()=>{g&&r(e+1)},b=w=>{o(Number(w))};return n===0?null:C.jsxs(G,{flex:1,row:!0,justifyContent:"space-between",children:[C.jsxs(G,{ref:c,flex:1,row:!0,overflow:"hidden",gap:x0.sm,children:[C.jsx(fr,{onClick:y,disabled:!h,color:"neutral",size:"sm",children:C.jsx(gO,{})}),C.jsx(G,{row:!0,gap:x0.sm,children:x.map(w=>C.jsx(bO,{isDots:w==="start-dots"||w==="end-dots",isCurrentPage:w===e+1,disabled:w==="start-dots"||w==="end-dots",onClick:()=>r(w-1),children:w},w))}),C.jsx(fr,{color:"neutral",size:"sm",onClick:v,disabled:!g,children:C.jsx(pO,{})})]}),s&&C.jsx(G,{alignItems:"flex-end",children:C.jsx(fg,{width:"fit-content",value:t.toString(),size:"sm",items:i.map(w=>({value:w.toString(),label:w.toString()})),returnedValue:w=>w.value,renderDropdownItem:a,renderSingleInputItem:l,onChange:w=>b(w)})})]})},bO=({children:e,isCurrentPage:t=!1,onClick:n,isDots:r=!1,disabled:o=!1})=>{const i=R.css({cursor:o?"not-allowed":"pointer",userSelect:"none",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t?Yo.fill.accentSecondary:Yo.fill.bgSecondary,borderRadius:vO.sm,border:t?`1px solid ${Yo.fill.accentSecondaryHover}`:`1px solid ${Yo.border.neutralAlphaBasic}`}),s=R.css({width:"24px",height:"24px",color:t?Yo.icon.secondary:Yo.icon.tertiary});return C.jsx(G,{className:i,onClick:o?void 0:n,children:r?C.jsx(mO,{className:s}):C.jsx(se,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},{color:vf,cornerRadius:wO}=j,CO=R.css({position:"relative",borderRadius:wO.md,overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:1,transition:"opacity 0.2s ease"},"&::before":{left:0,background:"linear-gradient(to left, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"},"&::after":{right:0,background:"linear-gradient(to right, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"}}),SO=R.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:`${vf.scrollbar.thumbPrimary} ${vf.scrollbar.trackPrimary}`}),aS=S.memo(({data:e,children:t,className:n,showBorders:r=!1,...o})=>{const[i,s]=S.useState(!1),[a,l]=S.useState(!1),c=S.useRef(null),u=S.useCallback(()=>{const d=c.current;if(!d)return;const{scrollLeft:h,scrollWidth:g,clientWidth:p}=d,m=g>p;s(m&&h>0),l(m&&h<g-p-1)},[]);S.useEffect(()=>{const d=c.current;if(!d)return;u();const h=new ResizeObserver(u);return h.observe(d),d.addEventListener("scroll",u),()=>{h.disconnect(),d.removeEventListener("scroll",u)}},[u,e]);const f=R.css({border:r?`1px solid ${vf.border.neutralAlphaLow}`:"transparent","&::before":{opacity:i?1:0},"&::after":{opacity:a?1:0}});return C.jsx(G,{className:R.cx(CO,f,n),...o,children:C.jsx(G,{ref:c,className:SO,children:t})})});aS.displayName="TableWrapper";const{spacing:mn,cornerRadius:b0,color:js}=j,_O=R.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:js.fill.bgPrimary}),TO=R.css({backgroundColor:js.fill.bgSecondary,color:js.text.tertiary}),Ui=({ref:e,data:t,columns:n,showBorders:r=!0,enableSorting:o=!1,enablePagination:i=!1,enableRowSelection:s=!1,enableMultiRowSelection:a=!1,sorting:l,onSortingChange:c,columnFilters:u,onColumnFiltersChange:f,columnVisibility:d,onColumnVisibilityChange:h,pagination:g,onPaginationChange:p,rowSelection:m,onRowSelectionChange:x,totalCount:y,loading:v=!1,emptyLabels:b={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:w={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:_,containerClassName:E,tableOptions:T={},onRowClick:k,getRowId:P,headCellComponent:O=uO,bodyCellComponent:D=nS,headRowComponent:I=sS,bodyRowComponent:$=oS,onReset:H,renderPageSizeSelectorDropdownItem:U,renderPageSizeSelectorInputItem:L})=>{const[N,V]=S.useState([]),[K,te]=S.useState([]),[J,Z]=S.useState({}),[ae,oe]=S.useState({pageIndex:0,pageSize:10}),[fe,Te]=S.useState({}),ne=l??N,ve=u??K,Ee=d??J,De=g??ae,st=m??fe,ee=xe=>{const Me=typeof xe=="function"?xe(ne):xe;c?c(Me):V(Me)},Ce=xe=>{const Me=typeof xe=="function"?xe(ve):xe;f?f(Me):te(Me)},ze=xe=>{const Me=typeof xe=="function"?xe(Ee):xe;h?h(Me):Z(Me)},Re=xe=>{const Me=typeof xe=="function"?xe(De):xe;p?p(Me):oe(Me)},Ft=iO({data:t,columns:n,state:{sorting:ne,columnFilters:ve,columnVisibility:Ee,pagination:De,rowSelection:st},onSortingChange:ee,onColumnFiltersChange:Ce,onColumnVisibilityChange:ze,onPaginationChange:Re,onRowSelectionChange:xe=>{const Me=typeof xe=="function"?xe(st):xe;x?x(Me):Te(Me)},getCoreRowModel:J$(),getSortedRowModel:o?tO():void 0,getPaginationRowModel:i?eO():void 0,enableRowSelection:s,enableMultiRowSelection:a,getRowId:P,manualPagination:!!y,pageCount:y?Math.ceil(y/De.pageSize):void 0,...T});S.useImperativeHandle(e,()=>Ft);const{rows:Yt}=Ft.getRowModel(),Xt=(xe,Me)=>{k&&k(xe.original,Me)};return v?C.jsxs(G,{w:"full",borderRadius:b0.md,py:mn["5xl"],px:mn["10xl"],alignItems:"center",className:R.cx(E),children:[C.jsx(sO,{width:32,height:32,style:{color:js.icon.tertiary,marginBottom:mn.sm}}),C.jsx(se,{mb:mn.xs,variant:"title-3",fontWeight:"semibold",children:w.title}),C.jsx(se,{mb:mn.md,colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:w.description}),typeof w.action=="string"?C.jsx(Si,{width:"auto",onClick:H,intensity:"secondary",color:"accent",children:w.action}):w.action]}):Yt.length?C.jsxs(G,{w:"full",gap:mn.xl,className:R.cx(E),children:[C.jsx(aS,{data:t,showBorders:r,children:C.jsxs("table",{className:R.cx(_O,lO.table,_),children:[C.jsx("thead",{className:TO,children:Ft.getHeaderGroups().map(xe=>C.jsx(I,{showBorders:r,children:xe.headers.map(Me=>C.jsx(O,{style:{width:Me.getSize()},onClick:Me.column.getToggleSortingHandler(),children:Me.isPlaceholder?null:p0(Me.column.columnDef.header,Me.getContext())},Me.id))},xe.id))}),C.jsx("tbody",{children:Yt.map((xe,Me)=>C.jsx($,{showBorders:r,isSelected:xe.getIsSelected(),onClick:()=>Xt(xe,Me),children:xe.getVisibleCells().map(Zt=>C.jsx(D,{children:p0(Zt.column.columnDef.cell,Zt.getContext())},Zt.id))},xe.id))})]})}),i&&!v&&C.jsx(xO,{pageIndex:De.pageIndex,pageSize:De.pageSize,totalCount:y||t.length,renderPageSizeSelectorDropdownItem:U,renderPageSizeSelectorInputItem:L,onPageChange:xe=>Re({...De,pageIndex:xe}),onPageSizeChange:xe=>Re({...De,pageSize:xe,pageIndex:0})})]}):C.jsxs(G,{w:"full",borderRadius:b0.md,py:mn["5xl"],px:mn["10xl"],alignItems:"center",className:R.cx(E),children:[C.jsx(aO,{width:24,height:24,style:{color:js.icon.tertiary,marginBottom:mn.sm}}),C.jsx(se,{mb:mn.xs,variant:"title-3",fontWeight:"semibold",children:b.title}),C.jsx(se,{mb:mn.md,colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:b.description}),typeof b.action=="string"?C.jsx(Si,{width:"auto",onClick:H,intensity:"secondary",color:"accent",children:b.action}):b.action]})};Ui.displayName="Table";Ui.HeadCellContent=mg;Ui.BodyCellContent=rS;Ui.HeadCellContentSortable=iS;Ui.createColumnHelper=UC;const{color:tn}=j,Ku={chart:{type:"areaspline",backgroundColor:"transparent",spacing:[0,0,0,0],margin:[0,0,0,0]},xAxis:{gridLineWidth:0,lineWidth:0,tickWidth:0,labels:{enabled:!1},title:{text:""}},yAxis:{gridLineWidth:0,lineWidth:0,tickWidth:0,labels:{enabled:!1},title:{text:""}},legend:{enabled:!1},credits:{enabled:!1}},EO={positive:{color:tn.fill.positivePrimary,fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,tn.fill.positiveTintHigh],[1,tn.fill.positiveTransparent]]}},negative:{color:tn.fill.negativePrimary,fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,tn.fill.negativeTintHigh],[1,tn.fill.negativeTransparent]]}},accent:{color:tn.fill.accentPrimary,fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,tn.fill.accentTintHigh],[1,tn.fill.accentTransparent]]}},warning:{color:tn.fill.warningPrimary,fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,tn.fill.warningTintHigh],[1,tn.fill.warningTransparent]]}},transfer:{color:"var(--fill-transfer-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-transfer-tint-high)"],[1,"var(--fill-transfer-transparent)"]]}}},{color:w0}=j,RO=(e,t,n,r,o)=>({...Ku,plotOptions:{areaspline:{marker:{enabled:!1,states:{hover:{enabled:o}}},allowPointSelect:!1}},xAxis:{...Ku.xAxis,...n},yAxis:{...Ku.yAxis,...r},series:[{type:"areaspline",data:t,...EO[e]}]}),kO=e=>({outside:!0,enabled:!!e,padding:0,position:{alignByTranslate:!0},shadow:{color:w0.effect.shadowM,offsetX:0,offsetY:0},borderRadius:8,backgroundColor:w0.fill.bgPrimary,useHTML:!0,...e}),lS=({color:e="positive",data:t=[],xAxis:n,yAxis:r,containerProps:o,highcharts:i,tooltip:s})=>{const a=S.useRef(null);S.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[]);const l=S.useMemo(()=>RO(e,t,n,r,!!s),[e,t,n,r,s]),c=S.useMemo(()=>s?kO(s):{enabled:!1},[s]);return C.jsx(rl.Chart,{highcharts:i,ref:a,options:l,containerProps:o,children:C.jsx(rl.Tooltip,{...c})})};lS.displayName="LineChart";const{color:nr}=j,AO={chart:{type:"pie",backgroundColor:"transparent",spacing:[0,0,0,0],margin:[0,0,0,0],events:{click:void 0}},title:{align:"center",verticalAlign:"middle",floating:!0,style:{fontSize:"24px",fontWeight:"600",color:nr.text.primary}},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},startAngle:90,endAngle:-90,innerSize:"90%",borderWidth:0,states:{hover:{enabled:!1},select:{enabled:!1},inactive:{enabled:!1}},enableMouseTracking:!1}},tooltip:{enabled:!1},legend:{enabled:!1},credits:{enabled:!1}},MO={positive:{colors:[nr.fill.positivePrimary,nr.fill.positiveTintHigh]},negative:{colors:[nr.fill.negativePrimary,nr.fill.negativeTintHigh]},accent:{colors:[nr.fill.accentPrimary,nr.fill.accentTintHigh]},warning:{colors:[nr.fill.warningPrimary,nr.fill.warningTintHigh]},transfer:{colors:["var(--fill-transfer-primary)","var(--fill-transfer-tint-high)"]}},NO=(e,t)=>({...AO,series:[{type:"pie",data:[{name:"",y:Math.min(e,100)},{name:"",y:Math.max(100-e,0)}],...MO[t]}]}),cS=S.forwardRef(({highcharts:e,color:t="positive",percentage:n,label:r=s=>`${s}%`,containerProps:o},i)=>{const s=S.useRef(null),a=i||s;S.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[a]);const l=S.useMemo(()=>NO(n,t),[n,t]);return C.jsx(rl.Chart,{highcharts:e,ref:a,options:l,containerProps:o,children:C.jsx(rl.Title,{children:r?.(n)})})});cS.displayName="PieProgressChart";const PO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),{color:C0}=j,tl={link:R.css({...me.body2,color:C0.text.tertiary,textDecoration:"none",transition:"color 0.2s ease","&:hover":{textDecoration:"underline"}}),separator:R.css({color:C0.icon.tertiary}),nav:R.css({display:"flex",alignItems:"center",flexWrap:"wrap"}),navItem:R.css({display:"inline-flex",alignItems:"center"})},yg=({children:e,separator:t=C.jsx(PO,{className:tl.separator})})=>{const n=S.Children.toArray(e).filter(r=>S.isValidElement(r));return C.jsx("nav",{"aria-label":"breadcrumb",className:tl.nav,children:n.map((r,o)=>{const i=o===n.length-1;return C.jsxs(se,{tag:"span",className:tl.navItem,children:[S.cloneElement(r,{active:r.props.active??i}),!i&&t]},o)})})},LO=({children:e,href:t,active:n,className:r,activeClassName:o,activeElement:i,onClick:s})=>n?i||C.jsx(se,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:R.cx(r,o),onClick:s,children:e}):C.jsx("a",{href:t,className:R.cx(tl.link,r),onClick:s,children:e});yg.Item=LO;yg.displayName="Breadcrumbs";const FO=yg,{color:Je,cornerRadius:Sr,height:xt,transition:S0}=j,$O={primary:{bg:Je.fill.accentTint,text:Je.text.accent,icon:Je.icon.accent},secondary:{bg:Je.fill.neutralTint,text:Je.text.secondary,icon:Je.icon.tertiary},negative:{bg:Je.fill.negativeTint,text:Je.text.negative,icon:Je.icon.negative},positive:{bg:Je.fill.positiveTint,text:Je.text.positive,icon:Je.icon.positive},warning:{bg:Je.fill.warningTint,text:Je.text.warning,icon:Je.icon.warning},neutral:{bg:Je.fill.neutralTint,text:Je.text.tertiary,icon:Je.icon.tertiary},transfer:{bg:"var(--fill-transfer-tint)",text:"var(--text-transfer)",icon:"var(--icon-transfer)"},custom:{bg:Je.fill.accentTint,text:Je.text.accent,icon:Je.icon.accent}},OO={"2xs":{size:xt.avatar["2xs"],borderRadius:Sr.xs,iconSize:xt.icon["2xs"],fontSize:10,fontWeight:"var(--fw-medium)"},xs:{size:xt.avatar.xs,borderRadius:Sr.sm,iconSize:xt.icon.xs,fontSize:12,fontWeight:"var(--fw-medium)"},sm:{size:xt.avatar.sm,borderRadius:Sr.sm,iconSize:xt.icon.xs,fontSize:14,fontWeight:"var(--fw-medium)"},md:{size:xt.avatar.md,borderRadius:Sr.sm,iconSize:xt.icon.sm,fontSize:14,fontWeight:"var(--fw-medium)"},lg:{size:xt.avatar.lg,borderRadius:Sr.md,iconSize:xt.icon.md,fontSize:16,fontWeight:"var(--fw-semibold)"},xl:{size:xt.avatar.xl,borderRadius:Sr.md,iconSize:xt.icon.md,fontSize:16,fontWeight:"var(--fw-semibold)"},"2xl":{size:xt.avatar["2xl"],borderRadius:Sr.md,iconSize:xt.icon.md,fontSize:18,fontWeight:"var(--fw-semibold)"},custom:{size:xt.avatar.md,borderRadius:Sr.sm,iconSize:xt.icon.sm,fontSize:14,fontWeight:"var(--fw-medium)"}},uS=S.forwardRef(({children:e,color:t="primary",size:n="md",fullRound:r=!1,className:o},i)=>{const s=S.useMemo(()=>$O[t],[t]),a=S.useMemo(()=>OO[n],[n]),l=S.useMemo(()=>R.css({width:a.size,height:a.size,borderRadius:r?"var(--corner-full-round)":a.borderRadius,backgroundColor:s.bg,color:s.text,fontSize:a.fontSize,fontWeight:a.fontWeight,lineHeight:1,transition:S0.general,"& svg":{width:a.iconSize,height:a.iconSize,color:s.icon,transition:S0.general},"& img":{width:"100%",height:"100%",objectFit:"cover"},"&:has(img)":{backgroundColor:"transparent",border:`1px solid ${Je.border.neutralAlphaLow}`}}),[s,a,r]);return C.jsx(G,{ref:i,center:!0,overflow:"hidden",className:R.cx(l,o),children:e})});uS.displayName="Avatar";const{color:Tt,cornerRadius:Uu,spacing:nl}=j,xf={neutral:{border:Tt.border.neutralAlphaLow,bg:Tt.status.neutralTint,color:Tt.text.secondary,colorName:"secondary"},accent:{border:Tt.border.accentSecondary,bg:Tt.status.accentTintLow,color:Tt.text.accent,colorName:"accent"},warning:{border:Tt.border.warningSecondary,bg:Tt.status.warningTintLow,color:Tt.text.warning,colorName:"warning"},positive:{border:Tt.border.positiveSecondary,bg:Tt.status.positiveTintLow,color:Tt.text.positive,colorName:"positive"},negative:{border:Tt.border.negativeSecondary,bg:Tt.status.negativeTintLow,color:Tt.text.negative,colorName:"negative"},transfer:{border:"var(--border-transfer-secondary)",bg:"var(--status-transfer-tint-low)",color:"var(--text-transfer)",colorName:"transfer"}},Va={sm:{h:24,text:"caption-1",corner:Uu.xs,p:`6px ${nl.sm}`},md:{h:32,text:"body-2",corner:Uu.sm,p:`6px ${nl.md}`},lg:{h:40,text:"body-2",corner:Uu.md,p:`6px ${nl.lg}`}},IO=(e,t,n,r)=>{const o=xf[t];let i=o.bg,s="none";const a=o.color;switch(e){case"outline":i="transparent",s=`1px solid ${o.border}`;break;case"clear":i="transparent";break;default:i=o.bg;break}return R.css({cursor:n?"not-allowed":r?"pointer":"default",opacity:n?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s",backgroundColor:i,color:a,border:s})},DO=R.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}}),dS=({label:e,color:t="neutral",size:n="md",variant:r="filled",leftElement:o,rightElement:i,disabled:s,onClick:a,onDelete:l,className:c})=>{const u=IO(r,t,s,a);return C.jsxs(G,{row:!0,alignItems:"center",gap:nl.sm,p:Va[n].p,h:Va[n].h,overflow:"hidden",borderRadius:Va[n].corner,onClick:a,className:R.cx(u,c),children:[a&&C.jsx(Lo,{}),o,C.jsx(se,{variant:Va[n].text,colorName:xf[t].colorName,textOverflow:"ellipsis",children:e}),i,l&&!s&&C.jsx(se,{className:DO,colorName:xf[t].colorName,onClick:f=>{f.stopPropagation(),l(f)},children:C.jsx(IC,{})})]})};dS.displayName="Badge";const jO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),M.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Gu=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",fill:"currentColor",fillOpacity:.15}),M.createElement("path",{d:"M12 6C11.4477 6 11 6.44772 11 7V13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V7C13 6.44772 12.5523 6 12 6Z",fill:"currentColor"}),M.createElement("path",{d:"M12 15C11.4477 15 11 15.4477 11 16V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V16C13 15.4477 12.5523 15 12 15Z",fill:"currentColor"})),VO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),M.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),BO=e=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",...e},M.createElement("path",{d:"M12 2V22M19.0711 4.92893L4.92893 19.0711M22 12H2M19.0711 19.0711L4.92893 4.92893",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),{color:Ke,cornerRadius:zO,spacing:_s}=j,Xo={hint:R.css({display:"flex",alignItems:"flex-start",gap:_s.md,padding:_s.lg,minHeight:48,width:"100%",borderRadius:zO.md,transition:"background 0.2s, color 0.2s"}),icon:R.css({flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:24,height:24}}),content:R.css({display:"flex",flexDirection:"column",gap:_s.xs}),title:R.css({verticalAlign:"middle",color:"inherit"}),subtitle:R.css({verticalAlign:"middle",opacity:.8,color:"inherit"}),disabled:R.css({opacity:.5,pointerEvents:"none"})},HO={solid:{warning:R.css({background:Ke.status.warning,color:Ke.text.inverse}),negative:R.css({background:Ke.status.negative,color:Ke.text.inverse}),positive:R.css({background:Ke.status.positive,color:Ke.text.inverse}),accent:R.css({background:Ke.status.accent,color:Ke.text.inverse}),neutral:R.css({background:Ke.status.neutral,color:Ke.text.inverse}),transfer:R.css({background:Ke.status.transfer,color:Ke.text.inverse})},soft:{warning:R.css({background:Ke.status.warningTintLow,color:Ke.text.warning}),negative:R.css({background:Ke.status.negativeTintLow,color:Ke.text.negative}),positive:R.css({background:Ke.status.positiveTintLow,color:Ke.text.positive}),accent:R.css({background:Ke.status.accentTintLow,color:Ke.text.accent}),neutral:R.css({background:Ke.status.neutralTintLow,color:Ke.text.tertiary}),transfer:R.css({background:Ke.status.transferTintLow,color:Ke.text.transfer})}},WO={md:R.css({minHeight:48,padding:_s.lg}),sm:R.css({minHeight:32,padding:_s.md})},KO={negative:C.jsx(VO,{}),positive:C.jsx(jO,{}),accent:C.jsx(Gu,{}),warning:C.jsx(Gu,{}),transfer:C.jsx(Gu,{}),neutral:C.jsx(BO,{})},UO=({title:e,subtitle:t,color:n="warning",variant:r="soft",size:o="md",icon:i,disabled:s=!1,className:a,style:l})=>{const c=i||KO[n];return C.jsxs("div",{className:Sf(Xo.hint,WO[o],HO[r][n],s&&Xo.disabled,a),style:l,"aria-disabled":s,children:[c&&C.jsx("span",{className:Xo.icon,children:c}),C.jsxs("div",{className:Xo.content,children:[e&&C.jsx(se,{className:Xo.title,variant:o==="md"?"body-1":"caption-2",children:e}),t&&C.jsx(se,{className:Xo.subtitle,variant:o==="md"?"body-2":"caption-1",children:t})]})]})},{color:no,cornerRadius:GO,spacing:Ln}=j,qO=R.css({width:"100%",cursor:"default",userSelect:"text",outline:"none",...me.body2,color:no.text.primary,overflowWrap:"anywhere","p, ul, ol, pre, blockquote, table":{margin:`${Ln.sm} 0`},"h1, h2, h3, h4, h5, h6":{margin:`${Ln.md} 0 ${Ln.sm}`,fontWeight:600},h1:{fontSize:me.title1.fontSize,lineHeight:me.title1.lineHeight},h2:{fontSize:me.title2.fontSize,lineHeight:me.title2.lineHeight},h3:{fontSize:me.title3.fontSize,lineHeight:me.title3.lineHeight},h4:{fontSize:me.headline2.fontSize,lineHeight:me.headline2.lineHeight},h5:{fontSize:me.headline3.fontSize,lineHeight:me.headline3.lineHeight},h6:{fontSize:me.body1.fontSize,lineHeight:me.body1.lineHeight},ul:{paddingLeft:Ln.xl,listStyleType:"disc"},ol:{paddingLeft:Ln.xl,listStyleType:"decimal"},li:{margin:`${Ln.xs} 0`},a:{color:no.text.accent,textDecoration:"underline"},code:{padding:`0 ${Ln.xs}`,borderRadius:GO.xs,backgroundColor:no.fill.neutralSecondary,fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},"pre code":{display:"block",padding:Ln.md,overflowX:"auto"},blockquote:{marginLeft:0,paddingLeft:Ln.md,borderLeft:`3px solid ${no.border.neutralAlphaBasic}`,color:no.text.secondary},table:{width:"100%",borderCollapse:"collapse"},"th, td":{border:`1px solid ${no.border.neutralAlphaBasic}`,padding:Ln.sm,textAlign:"left"},th:{backgroundColor:no.fill.neutralSecondary}});function YO({markdown:e,className:t,emptyState:n=null}){const r=e.trim(),o=S.useMemo(()=>({isEditable:!1,isPreviewMode:!0,setPreviewMode:()=>{},markdownText:r}),[r]);return r?C.jsx(oh.Provider,{value:o,children:C.jsx(zw,{initialConfig:{...gC(),editable:!1,namespace:"ui-kit-markdown-text-viewer",editorState:()=>{Vw(r,Pl)}},children:C.jsx(hC,{contentEditable:C.jsx(dC,{className:R.cx(qO,t),"aria-placeholder":"markdown text",placeholder:()=>null}),placeholder:null,ErrorBoundary:fC})},r)}):typeof n=="string"?C.jsx(se,{variant:"body-2",colorName:"tertiary",children:n}):n}const{color:fS,cornerRadius:XO}=j,ZO=R.keyframes`
86
86
  from {
87
87
  opacity: 0;
88
88
  }