@dss-kit/ui-kit 0.2.23 → 0.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -21
- package/dist/components/controls/Button/Button.d.ts.map +1 -1
- package/dist/styles/utils/breakpoints/base.scss +11 -11
- package/dist/styles/utils/breakpoints/index.scss +3 -3
- package/dist/styles/utils/breakpoints/screen.scss +61 -61
- package/dist/styles/utils/breakpoints/semantic.scss +31 -31
- package/dist/styles/utils/fonts/font-family.scss +3 -3
- package/dist/styles/utils/fonts/index.scss +1 -1
- package/dist/styles/utils/index.scss +5 -5
- package/dist/styles/utils/size/index.scss +1 -1
- package/dist/styles/utils/size/modifiers.scss +40 -40
- package/dist/styles/utils/style/index.scss +1 -1
- package/dist/styles/utils/style/variants.scss +34 -34
- package/dist/styles/utils/typography/_font-weight.scss +33 -33
- package/dist/styles/utils/typography/_variants.scss +85 -85
- package/dist/styles/utils/typography/index.scss +2 -2
- package/dist/ui-kit.cjs.js +14 -14
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.es.js +14 -13
- package/dist/ui-kit.es.js.map +1 -1
- package/package.json +92 -92
package/dist/ui-kit.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
${g}px !important;
|
|
7
7
|
top: ${f}px !important;
|
|
8
8
|
}
|
|
9
|
-
`),()=>{m.contains(p)&&m.removeChild(p)}},[t]),S.jsx(iE,{isPresent:t,childRef:i,sizeRef:s,children:N.cloneElement(e,{ref:l})})}const aE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s,anchorX:a,root:l})=>{const c=Cd(lE),u=C.useId();let f=!0,d=C.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}),C.useMemo(()=>{c.forEach((h,g)=>c.set(g,!1))},[n]),N.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),s==="popLayout"&&(e=S.jsx(sE,{isPresent:n,anchorX:a,root:l,children:e})),S.jsx(Ka.Provider,{value:d,children:e})};function lE(){return new Map}function Jv(e=!0){const t=C.useContext(Ka);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=C.useId();C.useEffect(()=>{if(e)return o(i)},[e]);const s=C.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const As=e=>e.key||"";function rg(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const cE=({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]=Jv(s),f=C.useMemo(()=>rg(e),[e]),d=s&&!c?[]:f.map(As),h=C.useRef(!0),g=C.useRef(f),p=Cd(()=>new Map),[m,_]=C.useState(f),[y,v]=C.useState(f);iv(()=>{h.current=!1,g.current=f;for(let w=0;w<y.length;w++){const T=As(y[w]);d.includes(T)?p.delete(T):p.get(T)!==!0&&p.set(T,!1)}},[y,d.length,d.join("-")]);const x=[];if(f!==m){let w=[...f];for(let T=0;T<y.length;T++){const E=y[T],R=As(E);d.includes(R)||(w.splice(T,0,E),x.push(E))}return i==="wait"&&x.length&&(w=x),v(rg(w)),_(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:b}=C.useContext(bd);return S.jsx(S.Fragment,{children:y.map(w=>{const T=As(w),E=s&&!c?!1:f===y||d.includes(T),R=()=>{if(p.has(T))p.set(T,!0);else return;let M=!0;p.forEach(O=>{O||(M=!1)}),M&&(b?.(),v(g.current),s&&u?.(),r&&r())};return S.jsx(aE,{isPresent:E,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:l,onExitComplete:E?void 0:R,anchorX:a,children:w},T)})})},Zv=C.createContext({strict:!1}),og={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"]},Uo={};for(const e in og)Uo[e]={isEnabled:t=>og[e].some(n=>!!t[n])};function uE(e){for(const t in e)Uo[t]={...Uo[t],...e[t]}}const dE=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 ma(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||dE.has(e)}let Qv=e=>!ma(e);function fE(e){typeof e=="function"&&(Qv=t=>t.startsWith("on")?!ma(t):e(t))}try{fE(require("@emotion/is-prop-valid").default)}catch{}function hE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Qv(o)||n===!0&&ma(o)||!t&&!ma(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Ua=C.createContext({});function Ga(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ui(e){return typeof e=="string"||Array.isArray(e)}const Kd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ud=["initial",...Kd];function qa(e){return Ga(e.animate)||Ud.some(t=>Ui(e[t]))}function e0(e){return!!(qa(e)||e.variants)}function gE(e,t){if(qa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ui(n)?n:void 0,animate:Ui(r)?r:void 0}}return e.inherit!==!1?t:{}}function pE(e){const{initial:t,animate:n}=gE(e,C.useContext(Ua));return C.useMemo(()=>({initial:t,animate:n}),[ig(t),ig(n)])}function ig(e){return Array.isArray(e)?e.join(" "):e}function sg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(de.test(e))e=parseFloat(e);else return e;const n=sg(e,t.target.x),r=sg(e,t.target.y);return`${n}% ${r}%`}},mE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=fr.parse(e);if(o.length>5)return r;const i=fr.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=qe(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}},du={borderRadius:{...vi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vi,borderTopRightRadius:vi,borderBottomLeftRadius:vi,borderBottomRightRadius:vi,boxShadow:mE};function t0(e,{layout:t,layoutId:n}){return ri.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!du[e]||e==="opacity")}const yE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},vE=ni.length;function _E(e,t,n){let r="",o=!0;for(let i=0;i<vE;i++){const s=ni[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=Kv(a,Bd[s]);if(!l){o=!1;const u=yE[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Gd(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(ri.has(l)){s=!0;continue}else if(Cv(l)){o[l]=c;continue}else{const u=Kv(c,Bd[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=_E(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 qd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function n0(e,t,n){for(const r in t)!pt(t[r])&&!t0(r,n)&&(e[r]=t[r])}function xE({transformTemplate:e},t){return C.useMemo(()=>{const n=qd();return Gd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function bE(e,t){const n=e.style||{},r={};return n0(r,n,e),Object.assign(r,xE(e,t)),r}function CE(e,t){const n={},r=bE(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 wE={offset:"stroke-dashoffset",array:"stroke-dasharray"},SE={offset:"strokeDashoffset",array:"strokeDasharray"};function EE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?wE:SE;e[i.offset]=de.transform(-r);const s=de.transform(t),a=de.transform(n);e[i.array]=`${s} ${a}`}function r0(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:s=0,...a},l,c,u){if(Gd(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&&EE(f,o,i,s,!1)}const o0=()=>({...qd(),attrs:{}}),i0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function TE(e,t,n,r){const o=C.useMemo(()=>{const i=o0();return r0(i,t,i0(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};n0(i,e.style,e),o.style={...i,...o.style}}return o}const RE=["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 Yd(e){return typeof e!="string"||e.includes("-")?!1:!!(RE.indexOf(e)>-1||/[A-Z]/u.test(e))}function kE(e,t,n,{latestValues:r},o,i=!1){const a=(Yd(e)?TE:CE)(t,r,o,e),l=hE(t,typeof e=="string",i),c=e!==C.Fragment?{...l,...a,ref:n}:{},{children:u}=t,f=C.useMemo(()=>pt(u)?u.get():u,[u]);return C.createElement(e,{...c,children:f})}function ag(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Xd(e,t,n,r){if(typeof t=="function"){const[o,i]=ag(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]=ag(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function ea(e){return pt(e)?e.get():e}function AE({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:ME(n,r,o,e),renderState:t()}}function ME(e,t,n,r){const o={},i=r(e,{});for(const d in i)o[d]=ea(i[d]);let{initial:s,animate:a}=e;const l=qa(e),c=e0(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"&&!Ga(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const g=Xd(e,d[h]);if(g){const{transitionEnd:p,transition:m,..._}=g;for(const y in _){let v=_[y];if(Array.isArray(v)){const x=u?v.length-1:0;v=v[x]}v!==null&&(o[y]=v)}for(const y in p)o[y]=p[y]}}}return o}const s0=e=>(t,n)=>{const r=C.useContext(Ua),o=C.useContext(Ka),i=()=>AE(e,t,r,o);return n?i():Cd(i)};function Jd(e,t,n){const{style:r}=e,o={};for(const i in r)(pt(r[i])||t.style&&pt(t.style[i])||t0(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(o[i]=r[i]);return o}const NE=s0({scrapeMotionValuesFromProps:Jd,createRenderState:qd});function a0(e,t,n){const r=Jd(e,t,n);for(const o in e)if(pt(e[o])||pt(t[o])){const i=ni.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const PE=s0({scrapeMotionValuesFromProps:a0,createRenderState:o0}),FE=Symbol.for("motionComponentSymbol");function Mo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function LE(e,t,n){return C.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Mo(n)&&(n.current=r))},[t])}const Zd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),OE="framerAppearId",l0="data-"+Zd(OE),c0=C.createContext({});function IE(e,t,n,r,o){const{visualElement:i}=C.useContext(Ua),s=C.useContext(Zv),a=C.useContext(Ka),l=C.useContext(Hd).reducedMotion,c=C.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=C.useContext(c0);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&$E(c.current,n,o,f);const d=C.useRef(!1);C.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const h=n[l0],g=C.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return iv(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),g.current&&u.animationState&&u.animationState.animateChanges())}),C.useEffect(()=>{u&&(!g.current&&u.animationState&&u.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),g.current=!1),u.enteringChildren=void 0)}),u}function $E(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:u0(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Mo(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function u0(e){if(e)return e.options.allowProjection!==!1?e.projection:u0(e.parent)}function Wl(e,{forwardMotionProps:t=!1}={},n,r){n&&uE(n);const o=Yd(e)?PE:NE;function i(a,l){let c;const u={...C.useContext(Hd),...a,layoutId:DE(a)},{isStatic:f}=u,d=pE(a),h=o(a,f);if(!f&&wd){VE(u,n);const g=jE(u);c=g.MeasureLayout,d.visualElement=IE(e,h,u,r,g.ProjectionNode)}return S.jsxs(Ua.Provider,{value:d,children:[c&&d.visualElement?S.jsx(c,{visualElement:d.visualElement,...u}):null,kE(e,a,LE(h,d.visualElement,l),h,f,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const s=C.forwardRef(i);return s[FE]=e,s}function DE({layoutId:e}){const t=C.useContext(bd).id;return t&&e!==void 0?t+"-"+e:e}function VE(e,t){const n=C.useContext(Zv).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?ei(!1,r,"lazy-strict-mode"):qn(!1,r,"lazy-strict-mode")}}function jE(e){const{drag:t,layout:n}=Uo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function BE(e,t){if(typeof Proxy>"u")return Wl;const n=new Map,r=(i,s)=>Wl(i,s,e,t),o=(i,s)=>(process.env.NODE_ENV!=="production"&&kd(!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,Wl(s,void 0,e,t)),n.get(s))})}function d0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function zE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function WE(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 Hl(e){return e===void 0||e===1}function fu({scale:e,scaleX:t,scaleY:n}){return!Hl(e)||!Hl(t)||!Hl(n)}function Nr(e){return fu(e)||f0(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function f0(e){return lg(e.x)||lg(e.y)}function lg(e){return e&&e!=="0%"}function ya(e,t,n){const r=e-n,o=t*r;return n+o}function cg(e,t,n,r,o){return o!==void 0&&(e=ya(e,o,r)),ya(e,n,r)+t}function hu(e,t=0,n=1,r,o){e.min=cg(e.min,t,n,r,o),e.max=cg(e.max,t,n,r,o)}function h0(e,{x:t,y:n}){hu(e.x,t.translate,t.scale,t.originPoint),hu(e.y,n.translate,n.scale,n.originPoint)}const ug=.999999999999,dg=1.0000000000001;function HE(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&&Po(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,h0(e,s)),r&&Nr(i.latestValues)&&Po(e,i.latestValues))}t.x<dg&&t.x>ug&&(t.x=1),t.y<dg&&t.y>ug&&(t.y=1)}function No(e,t){e.min=e.min+t,e.max=e.max+t}function fg(e,t,n,r,o=.5){const i=qe(e.min,e.max,o);hu(e,t,n,i,r)}function Po(e,t){fg(e.x,t.x,t.scaleX,t.scale,t.originX),fg(e.y,t.y,t.scaleY,t.scale,t.originY)}function g0(e,t){return d0(WE(e.getBoundingClientRect(),t))}function KE(e,t,n){const r=g0(e,n),{scroll:o}=t;return o&&(No(r.x,o.offset.x),No(r.y,o.offset.y)),r}const hg=()=>({translate:0,scale:1,origin:0,originPoint:0}),Fo=()=>({x:hg(),y:hg()}),gg=()=>({min:0,max:0}),ot=()=>({x:gg(),y:gg()}),gu={current:null},p0={current:!1};function UE(){if(p0.current=!0,!!wd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gu.current=e.matches;e.addEventListener("change",t),t()}else gu.current=!1}const GE=new WeakMap;function qE(e,t,n){for(const r in t){const o=t[r],i=n[r];if(pt(o))e.addValue(r,o);else if(pt(i))e.addValue(r,Ko(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,Ko(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const pg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class YE{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=Vd,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=Tt.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,We.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=qa(n),this.isVariantNode=e0(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&&pt(h)&&h.set(l[d])}}mount(t){this.current=t,GE.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)),p0.current||UE(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gu.current,process.env.NODE_ENV!=="production"&&kd(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(),dr(this.notifyUpdate),dr(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=ri.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&We.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 Uo){const n=Uo[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):ot()}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<pg.length;r++){const o=pg[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=qE(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=Ko(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"&&(sv(r)||lv(r))?r=parseFloat(r):!nE(r)&&fr.test(n)&&(r=Hv(t,n)),this.setBaseTarget(t,pt(r)?r.get():r)),pt(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=Xd(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&&!pt(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 Rd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){zd.render(this.render)}}class m0 extends YE{constructor(){super(...arguments),this.KeyframeResolver=HS}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;pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function y0(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 XE(e){return window.getComputedStyle(e)}class JE extends m0{constructor(){super(...arguments),this.type="html",this.renderInstance=y0}readValueFromInstance(t,n){if(ri.has(n))return this.projection?.isProjecting?ou(n):lS(t,n);{const r=XE(t),o=(Cv(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return g0(t,n)}build(t,n,r){Gd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Jd(t,n,r)}}const v0=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 ZE(e,t,n,r){y0(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(v0.has(o)?o:Zd(o),t.attrs[o])}class QE extends m0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ot}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ri.has(n)){const r=Wv(n);return r&&r.default||0}return n=v0.has(n)?n:Zd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return a0(t,n,r)}build(t,n,r){r0(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){ZE(t,n,r,o)}mount(t){this.isSVGTag=i0(t.tagName),super.mount(t)}}const eT=(e,t)=>Yd(e)?new QE(t):new JE(t,{allowProjection:e!==C.Fragment});function Oo(e,t,n){const r=e.getProps();return Xd(r,t,n!==void 0?n:r.custom,e)}const pu=e=>Array.isArray(e);function tT(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ko(n))}function nT(e){return pu(e)?e[e.length-1]||0:e}function rT(e,t){const n=Oo(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=nT(i[s]);tT(e,s,a)}}function oT(e){return!!(pt(e)&&e.add)}function mu(e,t){const n=e.getValue("willChange");if(oT(n))return n.add(t);if(!n&&Yn.WillChange){const r=new Yn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function _0(e){return e.props[l0]}const iT=e=>e!==null;function sT(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(iT),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}const aT={type:"spring",stiffness:500,damping:25,restSpeed:10},lT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),cT={type:"keyframes",duration:.8},uT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dT=(e,{keyframes:t})=>t.length>2?cT:ri.has(e)?e.startsWith("scale")?lT(t[1]):aT:uT;function fT({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 Qd=(e,t,n,r={},o,i)=>s=>{const a=jd(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-rn(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};fT(a)||Object.assign(u,dT(e,u)),u.duration&&(u.duration=rn(u.duration)),u.repeatDelay&&(u.repeatDelay=rn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(cu(u),u.delay===0&&(f=!0)),(Yn.instantAnimations||Yn.skipAnimations)&&(f=!0,cu(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!i&&t.get()!==void 0){const d=sT(u.keyframes,a);if(d!==void 0){We.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Dd(u):new NS(u)};function hT({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function x0(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&&hT(c,u))continue;const h={delay:n,...jd(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 _=_0(e);if(_){const y=window.MotionHandoffAnimation(_,u,We);y!==null&&(h.startTime=y,p=!0)}}mu(e,u),f.start(Qd(u,f,d,e.shouldReduceMotion&&jv.has(u)?{type:!1}:h,e,p));const m=f.animation;m&&l.push(m)}return s&&Promise.all(l).then(()=>{We.update(()=>{s&&rT(e,s)})}),l}function b0(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 yu(e,t,n={}){const r=Oo(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(x0(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=o;return gT(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 gT(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(yu(l,t,{...s,delay:n+(typeof r=="function"?0:r)+b0(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function pT(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>yu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=yu(e,t,n);else{const o=typeof t=="function"?Oo(e,t,n.custom):t;r=Promise.all(x0(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function C0(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 mT=Ud.length;function w0(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?w0(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<mT;n++){const r=Ud[n],o=e.props[r];(Ui(o)||o===!1)&&(t[r]=o)}return t}const yT=[...Kd].reverse(),vT=Kd.length;function _T(e){return t=>Promise.all(t.map(({animation:n,options:r})=>pT(e,n,r)))}function xT(e){let t=_T(e),n=mg(),r=!0;const o=l=>(c,u)=>{const f=Oo(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=w0(e.parent)||{},f=[],d=new Set;let h={},g=1/0;for(let m=0;m<vT;m++){const _=yT[m],y=n[_],v=c[_]!==void 0?c[_]:u[_],x=Ui(v),b=_===l?y.isActive:null;b===!1&&(g=m);let w=v===u[_]&&v!==c[_]&&x;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),y.protectedKeys={...h},!y.isActive&&b===null||!v&&!y.prevProp||Ga(v)||typeof v=="boolean")continue;const T=bT(y.prevProp,v);let E=T||_===l&&y.isActive&&!w&&x||m>g&&x,R=!1;const M=Array.isArray(v)?v:[v];let O=M.reduce(o(_),{});b===!1&&(O={});const{prevResolvedValues:D={}}=y,I={...D,...O},L=P=>{E=!0,d.has(P)&&(R=!0,d.delete(P)),y.needsAnimating[P]=!0;const A=e.getValue(P);A&&(A.liveStyle=!1)};for(const P in I){const A=O[P],$=D[P];if(h.hasOwnProperty(P))continue;let H=!1;pu(A)&&pu($)?H=!C0(A,$):H=A!==$,H?A!=null?L(P):d.add(P):A!==void 0&&d.has(P)?L(P):y.protectedKeys[P]=!0}y.prevProp=v,y.prevResolvedValues=O,y.isActive&&(h={...h,...O}),r&&e.blockInitialAnimation&&(E=!1);const B=w&&T;E&&(!B||R)&&f.push(...M.map(P=>{const A={type:_};if(typeof P=="string"&&r&&!B&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,H=Oo($,P);if($.enteringChildren&&H){const{delayChildren:Q}=H.transition||{};A.delay=b0($.enteringChildren,e,Q)}}return{animation:P,options:A}}))}if(d.size){const m={};if(typeof c.initial!="boolean"){const _=Oo(e,Array.isArray(c.initial)?c.initial[0]:c.initial);_&&_.transition&&(m.transition=_.transition)}d.forEach(_=>{const y=e.getBaseTarget(_),v=e.getValue(_);v&&(v.liveStyle=!0),m[_]=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=mg()}}}function bT(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!C0(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mg(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}class Cr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class CT extends Cr{constructor(t){super(t),t.animationState||(t.animationState=xT(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ga(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 wT=0;class ST extends Cr{constructor(){super(...arguments),this.id=wT++}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 ET={animation:{Feature:CT},exit:{Feature:ST}};function Gi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function is(e){return{point:{x:e.pageX,y:e.pageY}}}const TT=e=>t=>Wd(t)&&e(t,is(t));function Li(e,t,n,r){return Gi(e,t,TT(n),r)}const S0=1e-4,RT=1-S0,kT=1+S0,E0=.01,AT=0-E0,MT=0+E0;function xt(e){return e.max-e.min}function NT(e,t,n){return Math.abs(e-t)<=n}function yg(e,t,n,r=.5){e.origin=r,e.originPoint=qe(t.min,t.max,e.origin),e.scale=xt(n)/xt(t),e.translate=qe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=RT&&e.scale<=kT||isNaN(e.scale))&&(e.scale=1),(e.translate>=AT&&e.translate<=MT||isNaN(e.translate))&&(e.translate=0)}function Oi(e,t,n,r){yg(e.x,t.x,n.x,r?r.originX:void 0),yg(e.y,t.y,n.y,r?r.originY:void 0)}function vg(e,t,n){e.min=n.min+t.min,e.max=e.min+xt(t)}function PT(e,t,n){vg(e.x,t.x,n.x),vg(e.y,t.y,n.y)}function _g(e,t,n){e.min=t.min-n.min,e.max=e.min+xt(t)}function va(e,t,n){_g(e.x,t.x,n.x),_g(e.y,t.y,n.y)}function Bt(e){return[e("x"),e("y")]}const T0=({current:e})=>e?e.ownerDocument.defaultView:null,xg=(e,t)=>Math.abs(e-t);function FT(e,t){const n=xg(e.x,t.x),r=xg(e.y,t.y);return Math.sqrt(n**2+r**2)}class R0{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=Ul(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=FT(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!g)return;const{point:p}=d,{timestamp:m}=ct;this.history.push({...p,timestamp:m});const{onStart:_,onMove:y}=this.handlers;h||(_&&_(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Kl(h,this.transformPagePoint),We.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 _=Ul(d.type==="pointercancel"?this.lastMoveEventInfo:Kl(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,_),p&&p(d,_)},!Wd(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const a=is(t),l=Kl(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=ct;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,Ul(l,this.history)),this.removeListeners=ns(Li(this.contextWindow,"pointermove",this.handlePointerMove),Li(this.contextWindow,"pointerup",this.handlePointerUp),Li(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),dr(this.updatePoint)}}function Kl(e,t){return t?{point:t(e.point)}:e}function bg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ul({point:e},t){return{point:e,delta:bg(e,k0(t)),offset:bg(e,LT(t)),velocity:OT(t,.1)}}function LT(e){return e[0]}function k0(e){return e[e.length-1]}function OT(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=k0(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>rn(t)));)n--;if(!r)return{x:0,y:0};const i=Wt(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 IT(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?qe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?qe(n,e,r.max):Math.min(e,n)),e}function Cg(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 $T(e,{top:t,left:n,bottom:r,right:o}){return{x:Cg(e.x,n,o),y:Cg(e.y,t,r)}}function wg(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 DT(e,t){return{x:wg(e.x,t.x),y:wg(e.y,t.y)}}function VT(e,t){let n=.5;const r=xt(e),o=xt(t);return o>r?n=Wi(t.min,t.max-r,e.min):r>o&&(n=Wi(e.min,e.max-o,t.min)),Gn(0,1,n)}function jT(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 vu=.35;function BT(e=vu){return e===!1?e=0:e===!0&&(e=vu),{x:Sg(e,"left","right"),y:Sg(e,"top","bottom")}}function Sg(e,t,n){return{min:Eg(e,t),max:Eg(e,n)}}function Eg(e,t){return typeof e=="number"?e:e[t]||0}const zT=new WeakMap;class WT{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=ot(),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(is(f).point)},s=(f,d)=>{const{drag:h,dragPropagation:g,onDragStart:p}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=qS(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),Bt(_=>{let y=this.getAxisMotionValue(_).get()||0;if(bn.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[_];x&&(y=xt(x)*(parseFloat(y)/100))}}this.originPoint[_]=y}),p&&We.postRender(()=>p(f,d)),mu(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:_}=d;if(g&&this.currentDirection===null){this.currentDirection=HT(_),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,_),this.updateAxis("y",d.point,_),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=()=>Bt(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new R0(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:T0(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&&We.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||!Ms(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=IT(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&&Mo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=$T(r.layoutBox,t):this.constraints=!1,this.elastic=BT(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Bt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=jT(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Mo(t))return!1;const r=t.current;qn(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=KE(r,o.root,this.visualElement.getTransformPagePoint());let s=DT(o.layout.layoutBox,i);if(n){const a=n(zE(s));this.hasMutatedConstraints=!!a,a&&(s=d0(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Bt(u=>{if(!Ms(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 mu(this.visualElement,t),r.start(Qd(t,r,0,n,this.visualElement,!1))}stopAnimation(){Bt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Bt(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){Bt(n=>{const{drag:r}=this.getProps();if(!Ms(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]-qe(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Mo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Bt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=VT({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(),Bt(s=>{if(!Ms(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(qe(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;zT.set(this.visualElement,this);const t=this.visualElement.current,n=Li(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Mo(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()),We.read(r);const s=Gi(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Bt(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=vu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Ms(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function HT(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class KT extends Cr{constructor(t){super(t),this.removeGroupControls=Ht,this.removeListeners=Ht,this.controls=new WT(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ht}unmount(){this.removeGroupControls(),this.removeListeners()}}const Tg=e=>(t,n)=>{e&&We.postRender(()=>e(t,n))};class UT extends Cr{constructor(){super(...arguments),this.removePointerDownListener=Ht}onPointerDown(t){this.session=new R0(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:T0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Tg(t),onStart:Tg(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&We.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=Li(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 ta={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Gl=!1;class GT extends C.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),Gl&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ta.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:s}=r;return s&&(s.isPresent=i,Gl=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||We.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),zd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Gl=!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 A0(e){const[t,n]=Jv(),r=C.useContext(bd);return S.jsx(GT,{...e,layoutGroup:r,switchLayoutGroup:C.useContext(c0),isPresent:t,safeToRemove:n})}function qT(e,t,n){const r=pt(e)?e:Ko(e);return r.start(Qd("",r,t,n)),r.animation}const YT=(e,t)=>e.depth-t.depth;class XT{constructor(){this.children=[],this.isDirty=!1}add(t){Sd(this.children,t),this.isDirty=!0}remove(t){Ed(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(YT),this.isDirty=!1,this.children.forEach(t)}}function JT(e,t){const n=Tt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(dr(r),e(i-t))};return We.setup(r,!0),()=>dr(r)}const M0=["TopLeft","TopRight","BottomLeft","BottomRight"],ZT=M0.length,Rg=e=>typeof e=="string"?parseFloat(e):e,kg=e=>typeof e=="number"||de.test(e);function QT(e,t,n,r,o,i){o?(e.opacity=qe(0,n.opacity??1,e2(r)),e.opacityExit=qe(t.opacity??1,0,t2(r))):i&&(e.opacity=qe(t.opacity??1,n.opacity??1,r));for(let s=0;s<ZT;s++){const a=`border${M0[s]}Radius`;let l=Ag(t,a),c=Ag(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||kg(l)===kg(c)?(e[a]=Math.max(qe(Rg(l),Rg(c),r),0),(bn.test(c)||bn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=qe(t.rotate||0,n.rotate||0,r))}function Ag(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const e2=N0(0,.5,mv),t2=N0(.5,.95,Ht);function N0(e,t,n){return r=>r<e?0:r>t?1:n(Wi(e,t,r))}function Mg(e,t){e.min=t.min,e.max=t.max}function Xt(e,t){Mg(e.x,t.x),Mg(e.y,t.y)}function Ng(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Pg(e,t,n,r,o){return e-=t,e=ya(e,1/n,r),o!==void 0&&(e=ya(e,1/o,r)),e}function n2(e,t=0,n=1,r=.5,o,i=e,s=e){if(bn.test(t)&&(t=parseFloat(t),t=qe(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=qe(i.min,i.max,r);e===i&&(a-=t),e.min=Pg(e.min,t,n,a,o),e.max=Pg(e.max,t,n,a,o)}function Fg(e,t,[n,r,o],i,s){n2(e,t[n],t[r],t[o],t.scale,i,s)}const r2=["x","scaleX","originX"],o2=["y","scaleY","originY"];function Lg(e,t,n,r){Fg(e.x,t,r2,n?n.x:void 0,r?r.x:void 0),Fg(e.y,t,o2,n?n.y:void 0,r?r.y:void 0)}function Og(e){return e.translate===0&&e.scale===1}function P0(e){return Og(e.x)&&Og(e.y)}function Ig(e,t){return e.min===t.min&&e.max===t.max}function i2(e,t){return Ig(e.x,t.x)&&Ig(e.y,t.y)}function $g(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function F0(e,t){return $g(e.x,t.x)&&$g(e.y,t.y)}function Dg(e){return xt(e.x)/xt(e.y)}function Vg(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class s2{constructor(){this.members=[]}add(t){Sd(this.members,t),t.scheduleRender()}remove(t){if(Ed(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 a2(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 ql=["","X","Y","Z"],l2=1e3;let c2=0;function Yl(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function L0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=_0(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",We,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&L0(r)}function O0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=c2++,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(f2),this.nodes.forEach(m2),this.nodes.forEach(y2),this.nodes.forEach(h2)},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 XT)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Rd),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=Xv(s)&&!eE(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;We.read(()=>{f=window.innerWidth}),e(s,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=JT(d,250),ta.hasAnimatedSinceResize&&(ta.hasAnimatedSinceResize=!1,this.nodes.forEach(zg)))})}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()||C2,{onLayoutAnimationStart:p,onLayoutAnimationComplete:m}=c.getProps(),_=!this.targetLayout||!F0(this.targetLayout,h),y=!f&&d;if(this.options.layoutRoot||this.resumeFrom||y||f&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...jd(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||zg(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(),dr(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(v2),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&&L0(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(jg);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Bg);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(p2),this.nodes.forEach(u2),this.nodes.forEach(d2)):this.nodes.forEach(Bg),this.clearAllSnapshots();const a=Tt.now();ct.delta=Gn(0,1e3/60,a-ct.timestamp),ct.timestamp=a,ct.isProcessing=!0,$l.update.process(ct),$l.preRender.process(ct),$l.render.process(ct),ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,zd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(g2),this.sharedNodes.forEach(_2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,We.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){We.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xt(this.snapshot.measuredBox.x)&&!xt(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=ot(),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&&!P0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||Nr(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)),w2(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return ot();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(S2))){const{scroll:c}=this.root;c&&(No(a.x,c.offset.x),No(a.y,c.offset.y))}return a}removeElementScroll(s){const a=ot();if(Xt(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&&Xt(a,s),No(a.x,u.offset.x),No(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=ot();Xt(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&&Po(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Nr(u.latestValues)&&Po(l,u.latestValues)}return Nr(this.latestValues)&&Po(l,this.latestValues),l}removeTransform(s){const a=ot();Xt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Nr(c.latestValues))continue;fu(c.latestValues)&&c.updateSnapshot();const u=ot(),f=c.measurePageBox();Xt(u,f),Lg(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Nr(this.latestValues)&&Lg(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!==ct.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=ct.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=ot(),this.targetWithTransforms=ot()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),PT(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xt(this.target,this.layout.layoutBox),h0(this.target,this.targetDelta)):Xt(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||fu(this.parent.latestValues)||f0(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=ot(),this.relativeTargetOrigin=ot(),va(this.relativeTargetOrigin,a,l),Xt(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===ct.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;Xt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;HE(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=ot());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ng(this.prevProjectionDelta.x,this.projectionDelta.x),Ng(this.prevProjectionDelta.y,this.projectionDelta.y)),Oi(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Vg(this.projectionDelta.x,this.prevProjectionDelta.x)||!Vg(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=Fo(),this.projectionDelta=Fo(),this.projectionDeltaWithTransform=Fo()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Fo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=ot(),h=l?l.source:void 0,g=this.layout?this.layout.source:void 0,p=h!==g,m=this.getStack(),_=!m||m.members.length<=1,y=!!(p&&!_&&this.options.crossfade===!0&&!this.path.some(b2));this.animationProgress=0;let v;this.mixTargetDelta=x=>{const b=x/1e3;Wg(f.x,s.x,b),Wg(f.y,s.y,b),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(va(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),x2(this.relativeTarget,this.relativeTargetOrigin,d,b),v&&i2(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=ot()),Xt(v,this.relativeTarget)),p&&(this.animationValues=u,QT(u,c,this.latestValues,b,y,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(dr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=We.update(()=>{ta.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ko(0)),this.currentAnimation=qT(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(l2),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&&I0(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ot();const f=xt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=xt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}Xt(a,l),Po(a,u),Oi(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new s2),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&&Yl("z",s,c,this.animationValues);for(let u=0;u<ql.length;u++)Yl(`rotate${ql[u]}`,s,c,this.animationValues),Yl(`skew${ql[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=ea(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=ea(a?.pointerEvents)||""),this.hasProjected&&!Nr(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=a2(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 du){if(u[g]===void 0)continue;const{correct:p,applyTo:m,isCSSVariable:_}=du[g],y=f==="none"?u[g]:p(u[g],c);if(m){const v=m.length;for(let x=0;x<v;x++)s[m[x]]=y}else _?this.options.visualElement.renderState.vars[g]=y:s[g]=y}this.options.layoutId&&(s.pointerEvents=c===this?ea(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(jg),this.root.sharedNodes.clear()}}}function u2(e){e.updateLayout()}function d2(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"?Bt(u=>{const f=i?t.measuredBox[u]:t.layoutBox[u],d=xt(f);f.min=n[u].min,f.max=f.min+d}):I0(o,t.layoutBox,n)&&Bt(u=>{const f=i?t.measuredBox[u]:t.layoutBox[u],d=xt(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=Fo();Oi(s,n,t.layoutBox);const a=Fo();i?Oi(a,e.applyTransform(r,!0),t.measuredBox):Oi(a,n,t.layoutBox);const l=!P0(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=ot();va(h,t.layoutBox,f.layoutBox);const g=ot();va(g,n,d.layoutBox),F0(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 f2(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 h2(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function g2(e){e.clearSnapshot()}function jg(e){e.clearMeasurements()}function Bg(e){e.isLayoutDirty=!1}function p2(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zg(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function m2(e){e.resolveTargetDelta()}function y2(e){e.calcProjection()}function v2(e){e.resetSkewAndRotation()}function _2(e){e.removeLeadSnapshot()}function Wg(e,t,n){e.translate=qe(t.translate,0,n),e.scale=qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hg(e,t,n,r){e.min=qe(t.min,n.min,r),e.max=qe(t.max,n.max,r)}function x2(e,t,n,r){Hg(e.x,t.x,n.x,r),Hg(e.y,t.y,n.y,r)}function b2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const C2={duration:.45,ease:[.4,0,.1,1]},Kg=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ug=Kg("applewebkit/")&&!Kg("chrome/")?Math.round:Ht;function Gg(e){e.min=Ug(e.min),e.max=Ug(e.max)}function w2(e){Gg(e.x),Gg(e.y)}function I0(e,t,n){return e==="position"||e==="preserve-aspect"&&!NT(Dg(t),Dg(n),.2)}function S2(e){return e!==e.root&&e.scroll?.wasRoot}const E2=O0({attachResizeListener:(e,t)=>Gi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xl={current:void 0},$0=O0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xl.current){const e=new E2({});e.mount(window),e.setOptions({layoutScroll:!0}),Xl.current=e}return Xl.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),T2={pan:{Feature:UT},drag:{Feature:KT,ProjectionNode:$0,MeasureLayout:A0}};function qg(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&&We.postRender(()=>i(t,is(t)))}class R2 extends Cr{mount(){const{current:t}=this.node;t&&(this.unmount=YS(t,(n,r)=>(qg(this.node,r,"Start"),o=>qg(this.node,o,"End"))))}unmount(){}}class k2 extends Cr{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=ns(Gi(this.node.current,"focus",()=>this.onFocus()),Gi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Yg(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&&We.postRender(()=>i(t,is(t)))}class A2 extends Cr{mount(){const{current:t}=this.node;t&&(this.unmount=QS(t,(n,r)=>(Yg(this.node,r,"Start"),(o,{success:i})=>Yg(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const _u=new WeakMap,Jl=new WeakMap,M2=e=>{const t=_u.get(e.target);t&&t(e)},N2=e=>{e.forEach(M2)};function P2({root:e,...t}){const n=e||document;Jl.has(n)||Jl.set(n,{});const r=Jl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(N2,{root:e,...t})),r[o]}function F2(e,t,n){const r=P2(t);return _u.set(e,n),r.observe(e),()=>{_u.delete(e),r.unobserve(e)}}const L2={some:0,all:1};class O2 extends Cr{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:L2[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 F2(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(I2(t,n))&&this.startObserver()}unmount(){}}function I2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $2={inView:{Feature:O2},tap:{Feature:A2},focus:{Feature:k2},hover:{Feature:R2}},D2={layout:{ProjectionNode:$0,MeasureLayout:A0}},V2={...ET,...$2,...T2,...D2},Ya=BE(V2,eT),j2="_primary_13825_8",B2="_secondary_13825_12",z2="_tertiary_13825_16",W2="_positive_13825_20",H2="_negative_13825_24",K2="_warning_13825_28",U2="_accent_13825_32",G2="_inverse_13825_36",q2="_text_13825_111",Y2="_regular_13825_117",X2="_medium_13825_121",J2="_semibold_13825_125",Z2="_bold_13825_129",Ns={primary:j2,secondary:B2,tertiary:z2,positive:W2,negative:H2,warning:K2,accent:U2,inverse:G2,"title-1":"_title-1_13825_41","title-2":"_title-2_13825_51","title-3":"_title-3_13825_61","headline-1":"_headline-1_13825_76","headline-2":"_headline-2_13825_81","headline-3":"_headline-3_13825_86","body-1":"_body-1_13825_91","body-2":"_body-2_13825_96","caption-1":"_caption-1_13825_101","caption-2":"_caption-2_13825_106",text:q2,regular:Y2,medium:X2,semibold:J2,bold:Z2},Q2=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"),z.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})},ce=C.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:_,whiteSpace:y,textOverflow:v,decoration:x,color:b,center:w,left:T,right:E,uppercase:R,lowercase:M,capitalize:O,overflow:D,...I},L)=>{const[B,K]=C.useState(!1),P=!!c,A=()=>P&&K(!0),$=()=>P&&K(!1),H=Q2({mt:f,mb:d,ml:h,mr:g,flex:p,cursor:m,wordBreak:_,whiteSpace:y,textOverflow:v,decoration:x,color:b,center:w,left:T,right:E,uppercase:R,lowercase:M,capitalize:O,overflow:D}),Q=o,J=P?z.css({opacity:B?a:1,transition:`opacity ${l}ms ease`}):"";return S.jsx(Q,{ref:L,...I,className:z.cx(Ns.text,Ns[n],Ns[i],Ns[r],J,t,H),style:s,onClick:c,onMouseDown:A,onMouseUp:$,onMouseLeave:$,onTouchStart:A,onTouchEnd:$,role:P?"button":void 0,tabIndex:P?0:void 0,children:e})});ce.displayName="Text";const D0=Ya(ce),eR=z.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}),_i={zero:"var(--corner-zero)",xs:"var(--corner-xs)",sm:"var(--corner-sm)",md:"var(--corner-md)",lg:"var(--corner-lg)",xl:"var(--corner-xl)","2xl":"var(--corner-2xl)","3xl":"var(--corner-3xl)","4xl":"var(--corner-4xl)","5xl":"var(--corner-5xl)","6xl":"var(--corner-6xl)","full-round":"var(--corner-full-round)"},tR={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},nR={clear:z.css({backgroundColor:"transparent",border:"none"}),filled:z.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:z.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},rR=(e,t,n,r)=>{if(r)return z.css({cursor:"not-allowed",opacity:.7});const o={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:e==="filled"?"var(--text-inverse)":`var(--text-${t})`};switch(e){case"filled":return z.css({...o,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return z.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 z.css({...o,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return z.css(o)}},Go=({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:_,iconRight:y,intensity:v="primary",flex:x,type:b="button",...w})=>{const T=C.useMemo(()=>{switch(p){case"full":return"100%";case"auto":return"auto";default:return p}},[p]),E=C.useMemo(()=>l||(a==="filled"?d==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${d}-${v})`:"transparent"),[a,l,d,v]),R=C.useMemo(()=>{if(v==="primary"){if(d==="neutral")return"var(--text-secondary)";if(a==="filled")return"var(--text-inverse)"}else if(d==="neutral")return"var(--text-secondary)";return`var(--text-${d})`},[v,d,a]),M=C.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=C.useMemo(()=>f||(a==="outline"?`var(--border-${d}-${v})`:"transparent"),[a,f,d,v]),D=C.useMemo(()=>{switch(m){case"lg":return _i.lg;case"md":case"sm":return _i.md;case"xs":return _i.sm;default:return _i.md}},[m]),I=z.cx(eR,rR(a,d,v,e),nR[a],e?o:void 0,z.css({borderRadius:g?_i[g]:D,backgroundColor:E,borderColor:O,color:c,width:"100%",height:tR[m],opacity:h||(e?.7:1)}),r),L=C.useMemo(()=>{switch(m){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[m]);return S.jsx(q,{className:z.cx(n),w:T,flex:x,relative:!0,overflow:"hidden",children:S.jsxs(Ya.button,{...w,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,children:[t?S.jsx(ev,{color:R}):S.jsxs(S.Fragment,{children:[_,S.jsx(D0,{style:{color:c},colorName:M,variant:L,className:i,textOverflow:"ellipsis",overflow:"hidden",children:s}),y]}),S.jsx(io,{})]})})},oR=e=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},N.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),iR=e=>N.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},N.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),sR="_checkbox_22ifd_8",aR="_disabled_22ifd_14",lR="_checkbox__ripple_22ifd_14",cR="_checkbox__input_22ifd_26",uR="_checkbox__box_22ifd_33",dR="_secondary_22ifd_46",fR="_checked_22ifd_52",hR="_error_22ifd_61",Pn={checkbox:sR,disabled:aR,checkbox__ripple:lR,checkbox__input:cR,checkbox__box:uR,secondary:dR,checked:fR,error:hR},gR={sm:20,md:24},ef=C.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,_]=C.useState(!1),y=e!==void 0,v=y?e:m,x=R=>{y||_(R.target.checked),t?.(R)},b=gR[i],w=v||o,T=!!g&&!n,E=n?"not-allowed":T?"auto":"pointer";return S.jsxs("label",{className:z.cx(Pn.checkbox,z.css({flex:h,cursor:E}),{[Pn.disabled]:n}),children:[S.jsxs(q,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${b}px`,"--checkbox-size-double":`${b*2}px`},children:[S.jsx("input",{ref:p,type:"checkbox",checked:v,onChange:T?void 0:x,onClick:R=>R.stopPropagation(),disabled:n,readOnly:T,name:u,required:f,className:z.cx(Pn.checkbox__input,{[Pn.disabled]:n},z.css({cursor:E}))}),S.jsx("div",{className:z.cx(Pn.checkbox__box,Pn[d],{[Pn.disabled]:n,[Pn.error]:r,[Pn.checked]:w}),children:w&&(o?S.jsx(iR,{width:b*.75,height:b*.75}):S.jsx(oR,{width:b*.75,height:b*.75}))})]}),(s||l)&&S.jsxs(q,{gap:4,children:[s&&S.jsx(ce,{colorName:a,variant:i==="sm"?"body-2":"body-1",children:s}),l&&S.jsx(ce,{variant:"body-2",colorName:c,children:l})]})]})});ef.displayName="Checkbox";const pR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("g",{opacity:.5},N.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"}))),mR="_disabled_1kvy1_20",yR="_multiline_1kvy1_24",vR="_input_1kvy1_8",_R="_sm_1kvy1_74",xR="_md_1kvy1_79",bR="_error_1kvy1_84",CR="_primary_1kvy1_88",wR="_secondary_1kvy1_92",ft={"input-container":"_input-container_1kvy1_8",disabled:mR,multiline:yR,input:vR,"input-text-size_sm":"_input-text-size_sm_1kvy1_55","input-text-size_md":"_input-text-size_md_1kvy1_59","input-text-align_left":"_input-text-align_left_1kvy1_64","input-text-align_center":"_input-text-align_center_1kvy1_67","input-text-align_right":"_input-text-align_right_1kvy1_70",sm:_R,md:xR,error:bR,primary:CR,secondary:wR,"clear-button":"_clear-button_1kvy1_96"};function Xg(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const qo=C.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,_=e.multiline===!0,y=C.useRef(null),v=C.useRef(null),[x,b]=so(typeof d=="string"||typeof d=="number"?String(d):void 0,typeof h=="string"||typeof h=="number"?String(h):"");C.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(M){b(M),y.current&&(y.current.value=M),v.current&&(v.current.value=M)}}));const w=M=>{if(b(M.target.value),_){const O=e.onChange;O?.(M)}else{const O=e.onChange;O?.(M)}};C.useEffect(()=>{_&&e.autoResize&&v.current&&(v.current.style.height="auto",v.current.style.height=`${v.current.scrollHeight}px`)},[x,_,e.autoResize]);const T=()=>{if(b(""),!_){const O=y.current;if(O){O.value="";const D=Xg(O),I=e.onChange;I?.(D)}return}const M=v.current;if(M){M.value="";const O=Xg(M),D=e.onChange;D?.(O)}},E=()=>{if(_){const{rows:I,autoResize:L,onChange:B,multiline:K,...P}=m;return S.jsx("textarea",{ref:v,rows:e.rows??3,className:z.cx(ft.input,g,{[ft.disabled]:f,[ft[`input-text-align_${p}`]]:!!p}),disabled:f,maxLength:e.maxLength,...P,value:x,onChange:w})}const{onChange:M,multiline:O,...D}=m;return S.jsx("input",{...D,ref:y,className:z.cx(ft.input,ft[`input-text-size_${s}`],g,{[ft.disabled]:f,[ft[`input-text-align_${p}`]]:!!p}),disabled:f,type:e.type??"text",value:x,onChange:w})},R=C.useMemo(()=>c==="white"?ft.primary:c==="gray"?ft.secondary:ft[c],[c]);return S.jsxs(q,{w:"full",gap:"var(--spacing-sm)",children:[typeof n=="string"?S.jsx(ce,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}):n,S.jsxs(q,{row:!0,alignItems:_?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:z.cx(ft["input-container"],R,ft[s],{[ft.error]:o,[ft.disabled]:f,[ft.multiline]:_}),children:[a&&S.jsx(q,{flex:"none",children:a}),S.jsx(q,{flex:"1",children:E()}),u&&x&&!f&&S.jsx(q,{flex:"none",children:S.jsx("span",{className:ft["clear-button"],onClick:T,children:S.jsx(pR,{})})}),l&&S.jsx(q,{flex:"none",children:l})]}),(r||_)&&S.jsxs(q,{row:!0,gap:10,w:"full",children:[typeof r=="string"?S.jsx(ce,{variant:"caption-1",colorName:"tertiary",children:r}):r,_&&e.maxLength&&S.jsx(ce,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${x.length}/${e.maxLength}`})]}),i&&o&&S.jsx(ce,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:i})]})});qo.displayName="Input";const SR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("path",{d:"M15 8.33333H5M17.5 5H2.5M17.5 11.6667H2.5M15 15H5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),ER=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),TR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),RR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),kR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),AR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),MR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("g",{clipPath:"url(#clip0_1571_1710)"},N.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"})),N.createElement("defs",null,N.createElement("clipPath",{id:"clip0_1571_1710"},N.createElement("rect",{width:20,height:20,fill:"white"})))),NR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),PR=e=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),FR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),LR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),OR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),V0=C.createContext(null);function tf(){const e=C.useContext(V0);if(!e)throw new Error("useEditorStates must be used within EditorState Provider");return e}const j0=C.createContext(null);function IR(){const e=C.useContext(j0);if(!e)throw new Error("useToolbarContext must be used within ToolbarContext provider");return e}var Ri={exports:{}};Ri.exports;var Jg;function $R(){return Jg||(Jg=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]",_="[object Null]",y="[object Object]",v="[object Proxy]",x="[object RegExp]",b="[object Set]",w="[object String]",T="[object Undefined]",E="[object WeakMap]",R="[object ArrayBuffer]",M="[object DataView]",O="[object Float32Array]",D="[object Float64Array]",I="[object Int8Array]",L="[object Int16Array]",B="[object Int32Array]",K="[object Uint8Array]",P="[object Uint8ClampedArray]",A="[object Uint16Array]",$="[object Uint32Array]",H=/[\\^$.*+?()[\]{}|]/g,Q=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,X={};X[O]=X[D]=X[I]=X[L]=X[B]=X[K]=X[P]=X[A]=X[$]=!0,X[a]=X[l]=X[R]=X[u]=X[M]=X[f]=X[d]=X[h]=X[p]=X[m]=X[y]=X[x]=X[b]=X[w]=X[E]=!1;var se=typeof _n=="object"&&_n&&_n.Object===Object&&_n,re=typeof self=="object"&&self&&self.Object===Object&&self,he=se||re||Function("return this")(),we=t&&!t.nodeType&&t,te=we&&!0&&e&&!e.nodeType&&e,ye=te&&te.exports===we,Se=ye&&se.process,$e=(function(){try{var k=te&&te.require&&te.require("util").types;return k||Se&&Se.binding&&Se.binding("util")}catch{}})(),ee=$e&&$e.isTypedArray;function pe(k,F,j){switch(j.length){case 0:return k.call(F);case 1:return k.call(F,j[0]);case 2:return k.call(F,j[0],j[1]);case 3:return k.call(F,j[0],j[1],j[2])}return k.apply(F,j)}function Ne(k,F){for(var j=-1,ne=Array(k);++j<k;)ne[j]=F(j);return ne}function Ze(k){return function(F){return k(F)}}function Le(k,F){return k?.[F]}function Qn(k,F){return function(j){return k(F(j))}}var hn=Array.prototype,gn=Function.prototype,Dt=Object.prototype,ve=he["__core-js_shared__"],Re=gn.toString,Vt=Dt.hasOwnProperty,ph=(function(){var k=/[^.]+$/.exec(ve&&ve.keys&&ve.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""})(),mh=Dt.toString,Tb=Re.call(Object),Rb=RegExp("^"+Re.call(Vt).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xs=ye?he.Buffer:void 0,yh=he.Symbol,vh=he.Uint8Array;xs&&xs.allocUnsafe;var _h=Qn(Object.getPrototypeOf,Object),xh=Object.create,kb=Dt.propertyIsEnumerable,Ab=hn.splice,Tr=yh?yh.toStringTag:void 0,bs=(function(){try{var k=Tl(Object,"defineProperty");return k({},"",{}),k}catch{}})(),Mb=xs?xs.isBuffer:void 0,bh=Math.max,Nb=Date.now,Ch=Tl(he,"Map"),pi=Tl(Object,"create"),Pb=(function(){function k(){}return function(F){if(!kr(F))return{};if(xh)return xh(F);k.prototype=F;var j=new k;return k.prototype=void 0,j}})();function Rr(k){var F=-1,j=k==null?0:k.length;for(this.clear();++F<j;){var ne=k[F];this.set(ne[0],ne[1])}}function Fb(){this.__data__=pi?pi(null):{},this.size=0}function Lb(k){var F=this.has(k)&&delete this.__data__[k];return this.size-=F?1:0,F}function Ob(k){var F=this.__data__;if(pi){var j=F[k];return j===r?void 0:j}return Vt.call(F,k)?F[k]:void 0}function Ib(k){var F=this.__data__;return pi?F[k]!==void 0:Vt.call(F,k)}function $b(k,F){var j=this.__data__;return this.size+=this.has(k)?0:1,j[k]=pi&&F===void 0?r:F,this}Rr.prototype.clear=Fb,Rr.prototype.delete=Lb,Rr.prototype.get=Ob,Rr.prototype.has=Ib,Rr.prototype.set=$b;function Nn(k){var F=-1,j=k==null?0:k.length;for(this.clear();++F<j;){var ne=k[F];this.set(ne[0],ne[1])}}function Db(){this.__data__=[],this.size=0}function Vb(k){var F=this.__data__,j=Cs(F,k);if(j<0)return!1;var ne=F.length-1;return j==ne?F.pop():Ab.call(F,j,1),--this.size,!0}function jb(k){var F=this.__data__,j=Cs(F,k);return j<0?void 0:F[j][1]}function Bb(k){return Cs(this.__data__,k)>-1}function zb(k,F){var j=this.__data__,ne=Cs(j,k);return ne<0?(++this.size,j.push([k,F])):j[ne][1]=F,this}Nn.prototype.clear=Db,Nn.prototype.delete=Vb,Nn.prototype.get=jb,Nn.prototype.has=Bb,Nn.prototype.set=zb;function ho(k){var F=-1,j=k==null?0:k.length;for(this.clear();++F<j;){var ne=k[F];this.set(ne[0],ne[1])}}function Wb(){this.size=0,this.__data__={hash:new Rr,map:new(Ch||Nn),string:new Rr}}function Hb(k){var F=Ss(this,k).delete(k);return this.size-=F?1:0,F}function Kb(k){return Ss(this,k).get(k)}function Ub(k){return Ss(this,k).has(k)}function Gb(k,F){var j=Ss(this,k),ne=j.size;return j.set(k,F),this.size+=j.size==ne?0:1,this}ho.prototype.clear=Wb,ho.prototype.delete=Hb,ho.prototype.get=Kb,ho.prototype.has=Ub,ho.prototype.set=Gb;function go(k){var F=this.__data__=new Nn(k);this.size=F.size}function qb(){this.__data__=new Nn,this.size=0}function Yb(k){var F=this.__data__,j=F.delete(k);return this.size=F.size,j}function Xb(k){return this.__data__.get(k)}function Jb(k){return this.__data__.has(k)}function Zb(k,F){var j=this.__data__;if(j instanceof Nn){var ne=j.__data__;if(!Ch||ne.length<n-1)return ne.push([k,F]),this.size=++j.size,this;j=this.__data__=new ho(ne)}return j.set(k,F),this.size=j.size,this}go.prototype.clear=qb,go.prototype.delete=Yb,go.prototype.get=Xb,go.prototype.has=Jb,go.prototype.set=Zb;function Qb(k,F){var j=Al(k),ne=!j&&kl(k),be=!j&&!ne&&Rh(k),Oe=!j&&!ne&&!be&&Ah(k),Be=j||ne||be||Oe,Te=Be?Ne(k.length,String):[],ze=Te.length;for(var Yt in k)Be&&(Yt=="length"||be&&(Yt=="offset"||Yt=="parent")||Oe&&(Yt=="buffer"||Yt=="byteLength"||Yt=="byteOffset")||Eh(Yt,ze))||Te.push(Yt);return Te}function Sl(k,F,j){(j!==void 0&&!Es(k[F],j)||j===void 0&&!(F in k))&&El(k,F,j)}function eC(k,F,j){var ne=k[F];(!(Vt.call(k,F)&&Es(ne,j))||j===void 0&&!(F in k))&&El(k,F,j)}function Cs(k,F){for(var j=k.length;j--;)if(Es(k[j][0],F))return j;return-1}function El(k,F,j){F=="__proto__"&&bs?bs(k,F,{configurable:!0,enumerable:!0,value:j,writable:!0}):k[F]=j}var tC=gC();function ws(k){return k==null?k===void 0?T:_:Tr&&Tr in Object(k)?pC(k):bC(k)}function wh(k){return mi(k)&&ws(k)==a}function nC(k){if(!kr(k)||_C(k))return!1;var F=Nl(k)?Rb:Q;return F.test(EC(k))}function rC(k){return mi(k)&&kh(k.length)&&!!X[ws(k)]}function oC(k){if(!kr(k))return xC(k);var F=Th(k),j=[];for(var ne in k)ne=="constructor"&&(F||!Vt.call(k,ne))||j.push(ne);return j}function Sh(k,F,j,ne,be){k!==F&&tC(F,function(Oe,Be){if(be||(be=new go),kr(Oe))iC(k,F,Be,j,Sh,ne,be);else{var Te=ne?ne(Rl(k,Be),Oe,Be+"",k,F,be):void 0;Te===void 0&&(Te=Oe),Sl(k,Be,Te)}},Mh)}function iC(k,F,j,ne,be,Oe,Be){var Te=Rl(k,j),ze=Rl(F,j),Yt=Be.get(ze);if(Yt){Sl(k,j,Yt);return}var Lt=Oe?Oe(Te,ze,j+"",k,F,Be):void 0,yi=Lt===void 0;if(yi){var Pl=Al(ze),Fl=!Pl&&Rh(ze),Ph=!Pl&&!Fl&&Ah(ze);Lt=ze,Pl||Fl||Ph?Al(Te)?Lt=Te:TC(Te)?Lt=dC(Te):Fl?(yi=!1,Lt=lC(ze)):Ph?(yi=!1,Lt=uC(ze)):Lt=[]:RC(ze)||kl(ze)?(Lt=Te,kl(Te)?Lt=kC(Te):(!kr(Te)||Nl(Te))&&(Lt=mC(ze))):yi=!1}yi&&(Be.set(ze,Lt),be(Lt,ze,ne,Oe,Be),Be.delete(ze)),Sl(k,j,Lt)}function sC(k,F){return wC(CC(k,F,Nh),k+"")}var aC=bs?function(k,F){return bs(k,"toString",{configurable:!0,enumerable:!1,value:MC(F),writable:!0})}:Nh;function lC(k,F){return k.slice()}function cC(k){var F=new k.constructor(k.byteLength);return new vh(F).set(new vh(k)),F}function uC(k,F){var j=cC(k.buffer);return new k.constructor(j,k.byteOffset,k.length)}function dC(k,F){var j=-1,ne=k.length;for(F||(F=Array(ne));++j<ne;)F[j]=k[j];return F}function fC(k,F,j,ne){var be=!j;j||(j={});for(var Oe=-1,Be=F.length;++Oe<Be;){var Te=F[Oe],ze=void 0;ze===void 0&&(ze=k[Te]),be?El(j,Te,ze):eC(j,Te,ze)}return j}function hC(k){return sC(function(F,j){var ne=-1,be=j.length,Oe=be>1?j[be-1]:void 0,Be=be>2?j[2]:void 0;for(Oe=k.length>3&&typeof Oe=="function"?(be--,Oe):void 0,Be&&yC(j[0],j[1],Be)&&(Oe=be<3?void 0:Oe,be=1),F=Object(F);++ne<be;){var Te=j[ne];Te&&k(F,Te,ne,Oe)}return F})}function gC(k){return function(F,j,ne){for(var be=-1,Oe=Object(F),Be=ne(F),Te=Be.length;Te--;){var ze=Be[++be];if(j(Oe[ze],ze,Oe)===!1)break}return F}}function Ss(k,F){var j=k.__data__;return vC(F)?j[typeof F=="string"?"string":"hash"]:j.map}function Tl(k,F){var j=Le(k,F);return nC(j)?j:void 0}function pC(k){var F=Vt.call(k,Tr),j=k[Tr];try{k[Tr]=void 0;var ne=!0}catch{}var be=mh.call(k);return ne&&(F?k[Tr]=j:delete k[Tr]),be}function mC(k){return typeof k.constructor=="function"&&!Th(k)?Pb(_h(k)):{}}function Eh(k,F){var j=typeof k;return F=F??s,!!F&&(j=="number"||j!="symbol"&&J.test(k))&&k>-1&&k%1==0&&k<F}function yC(k,F,j){if(!kr(j))return!1;var ne=typeof F;return(ne=="number"?Ml(j)&&Eh(F,j.length):ne=="string"&&F in j)?Es(j[F],k):!1}function vC(k){var F=typeof k;return F=="string"||F=="number"||F=="symbol"||F=="boolean"?k!=="__proto__":k===null}function _C(k){return!!ph&&ph in k}function Th(k){var F=k&&k.constructor,j=typeof F=="function"&&F.prototype||Dt;return k===j}function xC(k){var F=[];if(k!=null)for(var j in Object(k))F.push(j);return F}function bC(k){return mh.call(k)}function CC(k,F,j){return F=bh(F===void 0?k.length-1:F,0),function(){for(var ne=arguments,be=-1,Oe=bh(ne.length-F,0),Be=Array(Oe);++be<Oe;)Be[be]=ne[F+be];be=-1;for(var Te=Array(F+1);++be<F;)Te[be]=ne[be];return Te[F]=j(Be),pe(k,this,Te)}}function Rl(k,F){if(!(F==="constructor"&&typeof k[F]=="function")&&F!="__proto__")return k[F]}var wC=SC(aC);function SC(k){var F=0,j=0;return function(){var ne=Nb(),be=i-(ne-j);if(j=ne,be>0){if(++F>=o)return arguments[0]}else F=0;return k.apply(void 0,arguments)}}function EC(k){if(k!=null){try{return Re.call(k)}catch{}try{return k+""}catch{}}return""}function Es(k,F){return k===F||k!==k&&F!==F}var kl=wh((function(){return arguments})())?wh:function(k){return mi(k)&&Vt.call(k,"callee")&&!kb.call(k,"callee")},Al=Array.isArray;function Ml(k){return k!=null&&kh(k.length)&&!Nl(k)}function TC(k){return mi(k)&&Ml(k)}var Rh=Mb||NC;function Nl(k){if(!kr(k))return!1;var F=ws(k);return F==h||F==g||F==c||F==v}function kh(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=s}function kr(k){var F=typeof k;return k!=null&&(F=="object"||F=="function")}function mi(k){return k!=null&&typeof k=="object"}function RC(k){if(!mi(k)||ws(k)!=y)return!1;var F=_h(k);if(F===null)return!0;var j=Vt.call(F,"constructor")&&F.constructor;return typeof j=="function"&&j instanceof j&&Re.call(j)==Tb}var Ah=ee?Ze(ee):rC;function kC(k){return fC(k,Mh(k))}function Mh(k){return Ml(k)?Qb(k):oC(k)}var AC=hC(function(k,F,j){Sh(k,F,j)});function MC(k){return function(){return k}}function Nh(k){return k}function NC(){return!1}e.exports=AC})(Ri,Ri.exports)),Ri.exports}var DR=$R();const VR=_d(DR),B0=C.createContext(null);function jR(){return C.useContext(B0)}function BR({children:e,locale:t}){return S.jsx(B0.Provider,{value:t||null,children:e})}function zR({localeKey:e,defaultLocale:t}){const n=C.createContext(t);function r(s){const{extraLocale:a}=s||{},l=jR();return{value:C.useMemo(()=>{const u=l?l[e]:null,f=[{},t];return u&&f.push(u),a&&f.push(a),VR(...f)},[t,a,e,l])}}function o(){return C.useContext(n)}function i({children:s,locale:a}){const{value:l}=r({extraLocale:a});return S.jsx(n.Provider,{value:l,children:s})}return{Context:n,useComposeLocaleProviderValue:r,useLocale:o,Provider:i}}const z0="MarkdownTextEditor",WR={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:HR,useLocale:ss}=zR({localeKey:z0,defaultLocale:WR}),W0=C.createContext(null);function KR(e,t){return{getTheme:function(){return t??null}}}function nt(){const e=C.useContext(W0);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 U(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 H0(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 fn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,UR=fn&&"documentMode"in document?document.documentMode:null,en=fn&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Ur=fn&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),_a=!(!fn||!("InputEvent"in window)||UR)&&"getTargetRanges"in new window.InputEvent("input"),as=fn&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),oi=fn&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,GR=fn&&/Android/.test(navigator.userAgent),K0=fn&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Zg=fn&&GR&&K0,ls=fn&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&en&&!K0;function U0(...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 qR=0,YR=1,XR=2,G0=128,JR=1,ZR=2,QR=3,ek=4,tk=5,nk=6,Xa=as||oi||ls?" ":"",hr=`
|
|
9
|
+
`),()=>{m.contains(p)&&m.removeChild(p)}},[t]),S.jsx(iE,{isPresent:t,childRef:i,sizeRef:s,children:N.cloneElement(e,{ref:l})})}const aE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s,anchorX:a,root:l})=>{const c=Cd(lE),u=C.useId();let f=!0,d=C.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}),C.useMemo(()=>{c.forEach((h,g)=>c.set(g,!1))},[n]),N.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),s==="popLayout"&&(e=S.jsx(sE,{isPresent:n,anchorX:a,root:l,children:e})),S.jsx(Ka.Provider,{value:d,children:e})};function lE(){return new Map}function Jv(e=!0){const t=C.useContext(Ka);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=C.useId();C.useEffect(()=>{if(e)return o(i)},[e]);const s=C.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const As=e=>e.key||"";function rg(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const cE=({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]=Jv(s),f=C.useMemo(()=>rg(e),[e]),d=s&&!c?[]:f.map(As),h=C.useRef(!0),g=C.useRef(f),p=Cd(()=>new Map),[m,_]=C.useState(f),[y,v]=C.useState(f);iv(()=>{h.current=!1,g.current=f;for(let w=0;w<y.length;w++){const T=As(y[w]);d.includes(T)?p.delete(T):p.get(T)!==!0&&p.set(T,!1)}},[y,d.length,d.join("-")]);const x=[];if(f!==m){let w=[...f];for(let T=0;T<y.length;T++){const E=y[T],R=As(E);d.includes(R)||(w.splice(T,0,E),x.push(E))}return i==="wait"&&x.length&&(w=x),v(rg(w)),_(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:b}=C.useContext(bd);return S.jsx(S.Fragment,{children:y.map(w=>{const T=As(w),E=s&&!c?!1:f===y||d.includes(T),R=()=>{if(p.has(T))p.set(T,!0);else return;let M=!0;p.forEach(O=>{O||(M=!1)}),M&&(b?.(),v(g.current),s&&u?.(),r&&r())};return S.jsx(aE,{isPresent:E,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:l,onExitComplete:E?void 0:R,anchorX:a,children:w},T)})})},Zv=C.createContext({strict:!1}),og={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"]},Uo={};for(const e in og)Uo[e]={isEnabled:t=>og[e].some(n=>!!t[n])};function uE(e){for(const t in e)Uo[t]={...Uo[t],...e[t]}}const dE=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 ma(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||dE.has(e)}let Qv=e=>!ma(e);function fE(e){typeof e=="function"&&(Qv=t=>t.startsWith("on")?!ma(t):e(t))}try{fE(require("@emotion/is-prop-valid").default)}catch{}function hE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Qv(o)||n===!0&&ma(o)||!t&&!ma(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Ua=C.createContext({});function Ga(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ui(e){return typeof e=="string"||Array.isArray(e)}const Kd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ud=["initial",...Kd];function qa(e){return Ga(e.animate)||Ud.some(t=>Ui(e[t]))}function e0(e){return!!(qa(e)||e.variants)}function gE(e,t){if(qa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ui(n)?n:void 0,animate:Ui(r)?r:void 0}}return e.inherit!==!1?t:{}}function pE(e){const{initial:t,animate:n}=gE(e,C.useContext(Ua));return C.useMemo(()=>({initial:t,animate:n}),[ig(t),ig(n)])}function ig(e){return Array.isArray(e)?e.join(" "):e}function sg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(de.test(e))e=parseFloat(e);else return e;const n=sg(e,t.target.x),r=sg(e,t.target.y);return`${n}% ${r}%`}},mE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=fr.parse(e);if(o.length>5)return r;const i=fr.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=qe(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}},du={borderRadius:{...vi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vi,borderTopRightRadius:vi,borderBottomLeftRadius:vi,borderBottomRightRadius:vi,boxShadow:mE};function t0(e,{layout:t,layoutId:n}){return ri.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!du[e]||e==="opacity")}const yE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},vE=ni.length;function _E(e,t,n){let r="",o=!0;for(let i=0;i<vE;i++){const s=ni[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=Kv(a,Bd[s]);if(!l){o=!1;const u=yE[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Gd(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(ri.has(l)){s=!0;continue}else if(Cv(l)){o[l]=c;continue}else{const u=Kv(c,Bd[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=_E(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 qd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function n0(e,t,n){for(const r in t)!pt(t[r])&&!t0(r,n)&&(e[r]=t[r])}function xE({transformTemplate:e},t){return C.useMemo(()=>{const n=qd();return Gd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function bE(e,t){const n=e.style||{},r={};return n0(r,n,e),Object.assign(r,xE(e,t)),r}function CE(e,t){const n={},r=bE(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 wE={offset:"stroke-dashoffset",array:"stroke-dasharray"},SE={offset:"strokeDashoffset",array:"strokeDasharray"};function EE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?wE:SE;e[i.offset]=de.transform(-r);const s=de.transform(t),a=de.transform(n);e[i.array]=`${s} ${a}`}function r0(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:s=0,...a},l,c,u){if(Gd(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&&EE(f,o,i,s,!1)}const o0=()=>({...qd(),attrs:{}}),i0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function TE(e,t,n,r){const o=C.useMemo(()=>{const i=o0();return r0(i,t,i0(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};n0(i,e.style,e),o.style={...i,...o.style}}return o}const RE=["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 Yd(e){return typeof e!="string"||e.includes("-")?!1:!!(RE.indexOf(e)>-1||/[A-Z]/u.test(e))}function kE(e,t,n,{latestValues:r},o,i=!1){const a=(Yd(e)?TE:CE)(t,r,o,e),l=hE(t,typeof e=="string",i),c=e!==C.Fragment?{...l,...a,ref:n}:{},{children:u}=t,f=C.useMemo(()=>pt(u)?u.get():u,[u]);return C.createElement(e,{...c,children:f})}function ag(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Xd(e,t,n,r){if(typeof t=="function"){const[o,i]=ag(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]=ag(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function ea(e){return pt(e)?e.get():e}function AE({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:ME(n,r,o,e),renderState:t()}}function ME(e,t,n,r){const o={},i=r(e,{});for(const d in i)o[d]=ea(i[d]);let{initial:s,animate:a}=e;const l=qa(e),c=e0(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"&&!Ga(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const g=Xd(e,d[h]);if(g){const{transitionEnd:p,transition:m,..._}=g;for(const y in _){let v=_[y];if(Array.isArray(v)){const x=u?v.length-1:0;v=v[x]}v!==null&&(o[y]=v)}for(const y in p)o[y]=p[y]}}}return o}const s0=e=>(t,n)=>{const r=C.useContext(Ua),o=C.useContext(Ka),i=()=>AE(e,t,r,o);return n?i():Cd(i)};function Jd(e,t,n){const{style:r}=e,o={};for(const i in r)(pt(r[i])||t.style&&pt(t.style[i])||t0(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(o[i]=r[i]);return o}const NE=s0({scrapeMotionValuesFromProps:Jd,createRenderState:qd});function a0(e,t,n){const r=Jd(e,t,n);for(const o in e)if(pt(e[o])||pt(t[o])){const i=ni.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const PE=s0({scrapeMotionValuesFromProps:a0,createRenderState:o0}),FE=Symbol.for("motionComponentSymbol");function Mo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function LE(e,t,n){return C.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Mo(n)&&(n.current=r))},[t])}const Zd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),OE="framerAppearId",l0="data-"+Zd(OE),c0=C.createContext({});function IE(e,t,n,r,o){const{visualElement:i}=C.useContext(Ua),s=C.useContext(Zv),a=C.useContext(Ka),l=C.useContext(Hd).reducedMotion,c=C.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=C.useContext(c0);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&$E(c.current,n,o,f);const d=C.useRef(!1);C.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const h=n[l0],g=C.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return iv(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),g.current&&u.animationState&&u.animationState.animateChanges())}),C.useEffect(()=>{u&&(!g.current&&u.animationState&&u.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),g.current=!1),u.enteringChildren=void 0)}),u}function $E(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:u0(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Mo(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function u0(e){if(e)return e.options.allowProjection!==!1?e.projection:u0(e.parent)}function Wl(e,{forwardMotionProps:t=!1}={},n,r){n&&uE(n);const o=Yd(e)?PE:NE;function i(a,l){let c;const u={...C.useContext(Hd),...a,layoutId:DE(a)},{isStatic:f}=u,d=pE(a),h=o(a,f);if(!f&&wd){VE(u,n);const g=jE(u);c=g.MeasureLayout,d.visualElement=IE(e,h,u,r,g.ProjectionNode)}return S.jsxs(Ua.Provider,{value:d,children:[c&&d.visualElement?S.jsx(c,{visualElement:d.visualElement,...u}):null,kE(e,a,LE(h,d.visualElement,l),h,f,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const s=C.forwardRef(i);return s[FE]=e,s}function DE({layoutId:e}){const t=C.useContext(bd).id;return t&&e!==void 0?t+"-"+e:e}function VE(e,t){const n=C.useContext(Zv).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?ei(!1,r,"lazy-strict-mode"):qn(!1,r,"lazy-strict-mode")}}function jE(e){const{drag:t,layout:n}=Uo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function BE(e,t){if(typeof Proxy>"u")return Wl;const n=new Map,r=(i,s)=>Wl(i,s,e,t),o=(i,s)=>(process.env.NODE_ENV!=="production"&&kd(!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,Wl(s,void 0,e,t)),n.get(s))})}function d0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function zE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function WE(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 Hl(e){return e===void 0||e===1}function fu({scale:e,scaleX:t,scaleY:n}){return!Hl(e)||!Hl(t)||!Hl(n)}function Nr(e){return fu(e)||f0(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function f0(e){return lg(e.x)||lg(e.y)}function lg(e){return e&&e!=="0%"}function ya(e,t,n){const r=e-n,o=t*r;return n+o}function cg(e,t,n,r,o){return o!==void 0&&(e=ya(e,o,r)),ya(e,n,r)+t}function hu(e,t=0,n=1,r,o){e.min=cg(e.min,t,n,r,o),e.max=cg(e.max,t,n,r,o)}function h0(e,{x:t,y:n}){hu(e.x,t.translate,t.scale,t.originPoint),hu(e.y,n.translate,n.scale,n.originPoint)}const ug=.999999999999,dg=1.0000000000001;function HE(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&&Po(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,h0(e,s)),r&&Nr(i.latestValues)&&Po(e,i.latestValues))}t.x<dg&&t.x>ug&&(t.x=1),t.y<dg&&t.y>ug&&(t.y=1)}function No(e,t){e.min=e.min+t,e.max=e.max+t}function fg(e,t,n,r,o=.5){const i=qe(e.min,e.max,o);hu(e,t,n,i,r)}function Po(e,t){fg(e.x,t.x,t.scaleX,t.scale,t.originX),fg(e.y,t.y,t.scaleY,t.scale,t.originY)}function g0(e,t){return d0(WE(e.getBoundingClientRect(),t))}function KE(e,t,n){const r=g0(e,n),{scroll:o}=t;return o&&(No(r.x,o.offset.x),No(r.y,o.offset.y)),r}const hg=()=>({translate:0,scale:1,origin:0,originPoint:0}),Fo=()=>({x:hg(),y:hg()}),gg=()=>({min:0,max:0}),ot=()=>({x:gg(),y:gg()}),gu={current:null},p0={current:!1};function UE(){if(p0.current=!0,!!wd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gu.current=e.matches;e.addEventListener("change",t),t()}else gu.current=!1}const GE=new WeakMap;function qE(e,t,n){for(const r in t){const o=t[r],i=n[r];if(pt(o))e.addValue(r,o);else if(pt(i))e.addValue(r,Ko(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,Ko(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const pg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class YE{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=Vd,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=Tt.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,We.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=qa(n),this.isVariantNode=e0(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&&pt(h)&&h.set(l[d])}}mount(t){this.current=t,GE.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)),p0.current||UE(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gu.current,process.env.NODE_ENV!=="production"&&kd(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(),dr(this.notifyUpdate),dr(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=ri.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&We.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 Uo){const n=Uo[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):ot()}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<pg.length;r++){const o=pg[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=qE(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=Ko(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"&&(sv(r)||lv(r))?r=parseFloat(r):!nE(r)&&fr.test(n)&&(r=Hv(t,n)),this.setBaseTarget(t,pt(r)?r.get():r)),pt(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=Xd(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&&!pt(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 Rd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){zd.render(this.render)}}class m0 extends YE{constructor(){super(...arguments),this.KeyframeResolver=HS}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;pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function y0(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 XE(e){return window.getComputedStyle(e)}class JE extends m0{constructor(){super(...arguments),this.type="html",this.renderInstance=y0}readValueFromInstance(t,n){if(ri.has(n))return this.projection?.isProjecting?ou(n):lS(t,n);{const r=XE(t),o=(Cv(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return g0(t,n)}build(t,n,r){Gd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Jd(t,n,r)}}const v0=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 ZE(e,t,n,r){y0(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(v0.has(o)?o:Zd(o),t.attrs[o])}class QE extends m0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ot}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ri.has(n)){const r=Wv(n);return r&&r.default||0}return n=v0.has(n)?n:Zd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return a0(t,n,r)}build(t,n,r){r0(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){ZE(t,n,r,o)}mount(t){this.isSVGTag=i0(t.tagName),super.mount(t)}}const eT=(e,t)=>Yd(e)?new QE(t):new JE(t,{allowProjection:e!==C.Fragment});function Oo(e,t,n){const r=e.getProps();return Xd(r,t,n!==void 0?n:r.custom,e)}const pu=e=>Array.isArray(e);function tT(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ko(n))}function nT(e){return pu(e)?e[e.length-1]||0:e}function rT(e,t){const n=Oo(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=nT(i[s]);tT(e,s,a)}}function oT(e){return!!(pt(e)&&e.add)}function mu(e,t){const n=e.getValue("willChange");if(oT(n))return n.add(t);if(!n&&Yn.WillChange){const r=new Yn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function _0(e){return e.props[l0]}const iT=e=>e!==null;function sT(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(iT),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}const aT={type:"spring",stiffness:500,damping:25,restSpeed:10},lT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),cT={type:"keyframes",duration:.8},uT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dT=(e,{keyframes:t})=>t.length>2?cT:ri.has(e)?e.startsWith("scale")?lT(t[1]):aT:uT;function fT({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 Qd=(e,t,n,r={},o,i)=>s=>{const a=jd(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-rn(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};fT(a)||Object.assign(u,dT(e,u)),u.duration&&(u.duration=rn(u.duration)),u.repeatDelay&&(u.repeatDelay=rn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(cu(u),u.delay===0&&(f=!0)),(Yn.instantAnimations||Yn.skipAnimations)&&(f=!0,cu(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!i&&t.get()!==void 0){const d=sT(u.keyframes,a);if(d!==void 0){We.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Dd(u):new NS(u)};function hT({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function x0(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&&hT(c,u))continue;const h={delay:n,...jd(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 _=_0(e);if(_){const y=window.MotionHandoffAnimation(_,u,We);y!==null&&(h.startTime=y,p=!0)}}mu(e,u),f.start(Qd(u,f,d,e.shouldReduceMotion&&jv.has(u)?{type:!1}:h,e,p));const m=f.animation;m&&l.push(m)}return s&&Promise.all(l).then(()=>{We.update(()=>{s&&rT(e,s)})}),l}function b0(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 yu(e,t,n={}){const r=Oo(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(x0(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=o;return gT(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 gT(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(yu(l,t,{...s,delay:n+(typeof r=="function"?0:r)+b0(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function pT(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>yu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=yu(e,t,n);else{const o=typeof t=="function"?Oo(e,t,n.custom):t;r=Promise.all(x0(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function C0(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 mT=Ud.length;function w0(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?w0(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<mT;n++){const r=Ud[n],o=e.props[r];(Ui(o)||o===!1)&&(t[r]=o)}return t}const yT=[...Kd].reverse(),vT=Kd.length;function _T(e){return t=>Promise.all(t.map(({animation:n,options:r})=>pT(e,n,r)))}function xT(e){let t=_T(e),n=mg(),r=!0;const o=l=>(c,u)=>{const f=Oo(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=w0(e.parent)||{},f=[],d=new Set;let h={},g=1/0;for(let m=0;m<vT;m++){const _=yT[m],y=n[_],v=c[_]!==void 0?c[_]:u[_],x=Ui(v),b=_===l?y.isActive:null;b===!1&&(g=m);let w=v===u[_]&&v!==c[_]&&x;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),y.protectedKeys={...h},!y.isActive&&b===null||!v&&!y.prevProp||Ga(v)||typeof v=="boolean")continue;const T=bT(y.prevProp,v);let E=T||_===l&&y.isActive&&!w&&x||m>g&&x,R=!1;const M=Array.isArray(v)?v:[v];let O=M.reduce(o(_),{});b===!1&&(O={});const{prevResolvedValues:D={}}=y,I={...D,...O},L=P=>{E=!0,d.has(P)&&(R=!0,d.delete(P)),y.needsAnimating[P]=!0;const A=e.getValue(P);A&&(A.liveStyle=!1)};for(const P in I){const A=O[P],$=D[P];if(h.hasOwnProperty(P))continue;let H=!1;pu(A)&&pu($)?H=!C0(A,$):H=A!==$,H?A!=null?L(P):d.add(P):A!==void 0&&d.has(P)?L(P):y.protectedKeys[P]=!0}y.prevProp=v,y.prevResolvedValues=O,y.isActive&&(h={...h,...O}),r&&e.blockInitialAnimation&&(E=!1);const B=w&&T;E&&(!B||R)&&f.push(...M.map(P=>{const A={type:_};if(typeof P=="string"&&r&&!B&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,H=Oo($,P);if($.enteringChildren&&H){const{delayChildren:Q}=H.transition||{};A.delay=b0($.enteringChildren,e,Q)}}return{animation:P,options:A}}))}if(d.size){const m={};if(typeof c.initial!="boolean"){const _=Oo(e,Array.isArray(c.initial)?c.initial[0]:c.initial);_&&_.transition&&(m.transition=_.transition)}d.forEach(_=>{const y=e.getBaseTarget(_),v=e.getValue(_);v&&(v.liveStyle=!0),m[_]=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=mg()}}}function bT(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!C0(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mg(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}class Cr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class CT extends Cr{constructor(t){super(t),t.animationState||(t.animationState=xT(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ga(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 wT=0;class ST extends Cr{constructor(){super(...arguments),this.id=wT++}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 ET={animation:{Feature:CT},exit:{Feature:ST}};function Gi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function is(e){return{point:{x:e.pageX,y:e.pageY}}}const TT=e=>t=>Wd(t)&&e(t,is(t));function Li(e,t,n,r){return Gi(e,t,TT(n),r)}const S0=1e-4,RT=1-S0,kT=1+S0,E0=.01,AT=0-E0,MT=0+E0;function xt(e){return e.max-e.min}function NT(e,t,n){return Math.abs(e-t)<=n}function yg(e,t,n,r=.5){e.origin=r,e.originPoint=qe(t.min,t.max,e.origin),e.scale=xt(n)/xt(t),e.translate=qe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=RT&&e.scale<=kT||isNaN(e.scale))&&(e.scale=1),(e.translate>=AT&&e.translate<=MT||isNaN(e.translate))&&(e.translate=0)}function Oi(e,t,n,r){yg(e.x,t.x,n.x,r?r.originX:void 0),yg(e.y,t.y,n.y,r?r.originY:void 0)}function vg(e,t,n){e.min=n.min+t.min,e.max=e.min+xt(t)}function PT(e,t,n){vg(e.x,t.x,n.x),vg(e.y,t.y,n.y)}function _g(e,t,n){e.min=t.min-n.min,e.max=e.min+xt(t)}function va(e,t,n){_g(e.x,t.x,n.x),_g(e.y,t.y,n.y)}function Bt(e){return[e("x"),e("y")]}const T0=({current:e})=>e?e.ownerDocument.defaultView:null,xg=(e,t)=>Math.abs(e-t);function FT(e,t){const n=xg(e.x,t.x),r=xg(e.y,t.y);return Math.sqrt(n**2+r**2)}class R0{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=Ul(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=FT(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!g)return;const{point:p}=d,{timestamp:m}=ct;this.history.push({...p,timestamp:m});const{onStart:_,onMove:y}=this.handlers;h||(_&&_(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Kl(h,this.transformPagePoint),We.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 _=Ul(d.type==="pointercancel"?this.lastMoveEventInfo:Kl(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,_),p&&p(d,_)},!Wd(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const a=is(t),l=Kl(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=ct;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,Ul(l,this.history)),this.removeListeners=ns(Li(this.contextWindow,"pointermove",this.handlePointerMove),Li(this.contextWindow,"pointerup",this.handlePointerUp),Li(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),dr(this.updatePoint)}}function Kl(e,t){return t?{point:t(e.point)}:e}function bg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ul({point:e},t){return{point:e,delta:bg(e,k0(t)),offset:bg(e,LT(t)),velocity:OT(t,.1)}}function LT(e){return e[0]}function k0(e){return e[e.length-1]}function OT(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=k0(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>rn(t)));)n--;if(!r)return{x:0,y:0};const i=Wt(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 IT(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?qe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?qe(n,e,r.max):Math.min(e,n)),e}function Cg(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 $T(e,{top:t,left:n,bottom:r,right:o}){return{x:Cg(e.x,n,o),y:Cg(e.y,t,r)}}function wg(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 DT(e,t){return{x:wg(e.x,t.x),y:wg(e.y,t.y)}}function VT(e,t){let n=.5;const r=xt(e),o=xt(t);return o>r?n=Wi(t.min,t.max-r,e.min):r>o&&(n=Wi(e.min,e.max-o,t.min)),Gn(0,1,n)}function jT(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 vu=.35;function BT(e=vu){return e===!1?e=0:e===!0&&(e=vu),{x:Sg(e,"left","right"),y:Sg(e,"top","bottom")}}function Sg(e,t,n){return{min:Eg(e,t),max:Eg(e,n)}}function Eg(e,t){return typeof e=="number"?e:e[t]||0}const zT=new WeakMap;class WT{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=ot(),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(is(f).point)},s=(f,d)=>{const{drag:h,dragPropagation:g,onDragStart:p}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=qS(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),Bt(_=>{let y=this.getAxisMotionValue(_).get()||0;if(bn.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[_];x&&(y=xt(x)*(parseFloat(y)/100))}}this.originPoint[_]=y}),p&&We.postRender(()=>p(f,d)),mu(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:_}=d;if(g&&this.currentDirection===null){this.currentDirection=HT(_),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,_),this.updateAxis("y",d.point,_),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=()=>Bt(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new R0(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:T0(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&&We.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||!Ms(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=IT(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&&Mo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=$T(r.layoutBox,t):this.constraints=!1,this.elastic=BT(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Bt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=jT(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Mo(t))return!1;const r=t.current;qn(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=KE(r,o.root,this.visualElement.getTransformPagePoint());let s=DT(o.layout.layoutBox,i);if(n){const a=n(zE(s));this.hasMutatedConstraints=!!a,a&&(s=d0(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Bt(u=>{if(!Ms(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 mu(this.visualElement,t),r.start(Qd(t,r,0,n,this.visualElement,!1))}stopAnimation(){Bt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Bt(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){Bt(n=>{const{drag:r}=this.getProps();if(!Ms(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]-qe(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Mo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Bt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=VT({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(),Bt(s=>{if(!Ms(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(qe(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;zT.set(this.visualElement,this);const t=this.visualElement.current,n=Li(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Mo(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()),We.read(r);const s=Gi(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Bt(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=vu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Ms(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function HT(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class KT extends Cr{constructor(t){super(t),this.removeGroupControls=Ht,this.removeListeners=Ht,this.controls=new WT(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ht}unmount(){this.removeGroupControls(),this.removeListeners()}}const Tg=e=>(t,n)=>{e&&We.postRender(()=>e(t,n))};class UT extends Cr{constructor(){super(...arguments),this.removePointerDownListener=Ht}onPointerDown(t){this.session=new R0(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:T0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Tg(t),onStart:Tg(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&We.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=Li(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 ta={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Gl=!1;class GT extends C.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),Gl&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ta.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:s}=r;return s&&(s.isPresent=i,Gl=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||We.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),zd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Gl=!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 A0(e){const[t,n]=Jv(),r=C.useContext(bd);return S.jsx(GT,{...e,layoutGroup:r,switchLayoutGroup:C.useContext(c0),isPresent:t,safeToRemove:n})}function qT(e,t,n){const r=pt(e)?e:Ko(e);return r.start(Qd("",r,t,n)),r.animation}const YT=(e,t)=>e.depth-t.depth;class XT{constructor(){this.children=[],this.isDirty=!1}add(t){Sd(this.children,t),this.isDirty=!0}remove(t){Ed(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(YT),this.isDirty=!1,this.children.forEach(t)}}function JT(e,t){const n=Tt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(dr(r),e(i-t))};return We.setup(r,!0),()=>dr(r)}const M0=["TopLeft","TopRight","BottomLeft","BottomRight"],ZT=M0.length,Rg=e=>typeof e=="string"?parseFloat(e):e,kg=e=>typeof e=="number"||de.test(e);function QT(e,t,n,r,o,i){o?(e.opacity=qe(0,n.opacity??1,e2(r)),e.opacityExit=qe(t.opacity??1,0,t2(r))):i&&(e.opacity=qe(t.opacity??1,n.opacity??1,r));for(let s=0;s<ZT;s++){const a=`border${M0[s]}Radius`;let l=Ag(t,a),c=Ag(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||kg(l)===kg(c)?(e[a]=Math.max(qe(Rg(l),Rg(c),r),0),(bn.test(c)||bn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=qe(t.rotate||0,n.rotate||0,r))}function Ag(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const e2=N0(0,.5,mv),t2=N0(.5,.95,Ht);function N0(e,t,n){return r=>r<e?0:r>t?1:n(Wi(e,t,r))}function Mg(e,t){e.min=t.min,e.max=t.max}function Xt(e,t){Mg(e.x,t.x),Mg(e.y,t.y)}function Ng(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Pg(e,t,n,r,o){return e-=t,e=ya(e,1/n,r),o!==void 0&&(e=ya(e,1/o,r)),e}function n2(e,t=0,n=1,r=.5,o,i=e,s=e){if(bn.test(t)&&(t=parseFloat(t),t=qe(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=qe(i.min,i.max,r);e===i&&(a-=t),e.min=Pg(e.min,t,n,a,o),e.max=Pg(e.max,t,n,a,o)}function Fg(e,t,[n,r,o],i,s){n2(e,t[n],t[r],t[o],t.scale,i,s)}const r2=["x","scaleX","originX"],o2=["y","scaleY","originY"];function Lg(e,t,n,r){Fg(e.x,t,r2,n?n.x:void 0,r?r.x:void 0),Fg(e.y,t,o2,n?n.y:void 0,r?r.y:void 0)}function Og(e){return e.translate===0&&e.scale===1}function P0(e){return Og(e.x)&&Og(e.y)}function Ig(e,t){return e.min===t.min&&e.max===t.max}function i2(e,t){return Ig(e.x,t.x)&&Ig(e.y,t.y)}function $g(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function F0(e,t){return $g(e.x,t.x)&&$g(e.y,t.y)}function Dg(e){return xt(e.x)/xt(e.y)}function Vg(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class s2{constructor(){this.members=[]}add(t){Sd(this.members,t),t.scheduleRender()}remove(t){if(Ed(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 a2(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 ql=["","X","Y","Z"],l2=1e3;let c2=0;function Yl(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function L0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=_0(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",We,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&L0(r)}function O0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=c2++,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(f2),this.nodes.forEach(m2),this.nodes.forEach(y2),this.nodes.forEach(h2)},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 XT)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Rd),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=Xv(s)&&!eE(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;We.read(()=>{f=window.innerWidth}),e(s,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=JT(d,250),ta.hasAnimatedSinceResize&&(ta.hasAnimatedSinceResize=!1,this.nodes.forEach(zg)))})}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()||C2,{onLayoutAnimationStart:p,onLayoutAnimationComplete:m}=c.getProps(),_=!this.targetLayout||!F0(this.targetLayout,h),y=!f&&d;if(this.options.layoutRoot||this.resumeFrom||y||f&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...jd(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||zg(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(),dr(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(v2),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&&L0(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(jg);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Bg);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(p2),this.nodes.forEach(u2),this.nodes.forEach(d2)):this.nodes.forEach(Bg),this.clearAllSnapshots();const a=Tt.now();ct.delta=Gn(0,1e3/60,a-ct.timestamp),ct.timestamp=a,ct.isProcessing=!0,$l.update.process(ct),$l.preRender.process(ct),$l.render.process(ct),ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,zd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(g2),this.sharedNodes.forEach(_2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,We.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){We.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xt(this.snapshot.measuredBox.x)&&!xt(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=ot(),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&&!P0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||Nr(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)),w2(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return ot();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(S2))){const{scroll:c}=this.root;c&&(No(a.x,c.offset.x),No(a.y,c.offset.y))}return a}removeElementScroll(s){const a=ot();if(Xt(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&&Xt(a,s),No(a.x,u.offset.x),No(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=ot();Xt(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&&Po(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Nr(u.latestValues)&&Po(l,u.latestValues)}return Nr(this.latestValues)&&Po(l,this.latestValues),l}removeTransform(s){const a=ot();Xt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Nr(c.latestValues))continue;fu(c.latestValues)&&c.updateSnapshot();const u=ot(),f=c.measurePageBox();Xt(u,f),Lg(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Nr(this.latestValues)&&Lg(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!==ct.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=ct.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=ot(),this.targetWithTransforms=ot()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),PT(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xt(this.target,this.layout.layoutBox),h0(this.target,this.targetDelta)):Xt(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||fu(this.parent.latestValues)||f0(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=ot(),this.relativeTargetOrigin=ot(),va(this.relativeTargetOrigin,a,l),Xt(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===ct.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;Xt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;HE(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=ot());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ng(this.prevProjectionDelta.x,this.projectionDelta.x),Ng(this.prevProjectionDelta.y,this.projectionDelta.y)),Oi(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Vg(this.projectionDelta.x,this.prevProjectionDelta.x)||!Vg(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=Fo(),this.projectionDelta=Fo(),this.projectionDeltaWithTransform=Fo()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Fo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=ot(),h=l?l.source:void 0,g=this.layout?this.layout.source:void 0,p=h!==g,m=this.getStack(),_=!m||m.members.length<=1,y=!!(p&&!_&&this.options.crossfade===!0&&!this.path.some(b2));this.animationProgress=0;let v;this.mixTargetDelta=x=>{const b=x/1e3;Wg(f.x,s.x,b),Wg(f.y,s.y,b),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(va(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),x2(this.relativeTarget,this.relativeTargetOrigin,d,b),v&&i2(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=ot()),Xt(v,this.relativeTarget)),p&&(this.animationValues=u,QT(u,c,this.latestValues,b,y,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(dr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=We.update(()=>{ta.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ko(0)),this.currentAnimation=qT(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(l2),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&&I0(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ot();const f=xt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=xt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}Xt(a,l),Po(a,u),Oi(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new s2),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&&Yl("z",s,c,this.animationValues);for(let u=0;u<ql.length;u++)Yl(`rotate${ql[u]}`,s,c,this.animationValues),Yl(`skew${ql[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=ea(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=ea(a?.pointerEvents)||""),this.hasProjected&&!Nr(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=a2(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 du){if(u[g]===void 0)continue;const{correct:p,applyTo:m,isCSSVariable:_}=du[g],y=f==="none"?u[g]:p(u[g],c);if(m){const v=m.length;for(let x=0;x<v;x++)s[m[x]]=y}else _?this.options.visualElement.renderState.vars[g]=y:s[g]=y}this.options.layoutId&&(s.pointerEvents=c===this?ea(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(jg),this.root.sharedNodes.clear()}}}function u2(e){e.updateLayout()}function d2(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"?Bt(u=>{const f=i?t.measuredBox[u]:t.layoutBox[u],d=xt(f);f.min=n[u].min,f.max=f.min+d}):I0(o,t.layoutBox,n)&&Bt(u=>{const f=i?t.measuredBox[u]:t.layoutBox[u],d=xt(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=Fo();Oi(s,n,t.layoutBox);const a=Fo();i?Oi(a,e.applyTransform(r,!0),t.measuredBox):Oi(a,n,t.layoutBox);const l=!P0(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=ot();va(h,t.layoutBox,f.layoutBox);const g=ot();va(g,n,d.layoutBox),F0(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 f2(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 h2(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function g2(e){e.clearSnapshot()}function jg(e){e.clearMeasurements()}function Bg(e){e.isLayoutDirty=!1}function p2(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zg(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function m2(e){e.resolveTargetDelta()}function y2(e){e.calcProjection()}function v2(e){e.resetSkewAndRotation()}function _2(e){e.removeLeadSnapshot()}function Wg(e,t,n){e.translate=qe(t.translate,0,n),e.scale=qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hg(e,t,n,r){e.min=qe(t.min,n.min,r),e.max=qe(t.max,n.max,r)}function x2(e,t,n,r){Hg(e.x,t.x,n.x,r),Hg(e.y,t.y,n.y,r)}function b2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const C2={duration:.45,ease:[.4,0,.1,1]},Kg=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ug=Kg("applewebkit/")&&!Kg("chrome/")?Math.round:Ht;function Gg(e){e.min=Ug(e.min),e.max=Ug(e.max)}function w2(e){Gg(e.x),Gg(e.y)}function I0(e,t,n){return e==="position"||e==="preserve-aspect"&&!NT(Dg(t),Dg(n),.2)}function S2(e){return e!==e.root&&e.scroll?.wasRoot}const E2=O0({attachResizeListener:(e,t)=>Gi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xl={current:void 0},$0=O0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xl.current){const e=new E2({});e.mount(window),e.setOptions({layoutScroll:!0}),Xl.current=e}return Xl.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),T2={pan:{Feature:UT},drag:{Feature:KT,ProjectionNode:$0,MeasureLayout:A0}};function qg(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&&We.postRender(()=>i(t,is(t)))}class R2 extends Cr{mount(){const{current:t}=this.node;t&&(this.unmount=YS(t,(n,r)=>(qg(this.node,r,"Start"),o=>qg(this.node,o,"End"))))}unmount(){}}class k2 extends Cr{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=ns(Gi(this.node.current,"focus",()=>this.onFocus()),Gi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Yg(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&&We.postRender(()=>i(t,is(t)))}class A2 extends Cr{mount(){const{current:t}=this.node;t&&(this.unmount=QS(t,(n,r)=>(Yg(this.node,r,"Start"),(o,{success:i})=>Yg(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const _u=new WeakMap,Jl=new WeakMap,M2=e=>{const t=_u.get(e.target);t&&t(e)},N2=e=>{e.forEach(M2)};function P2({root:e,...t}){const n=e||document;Jl.has(n)||Jl.set(n,{});const r=Jl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(N2,{root:e,...t})),r[o]}function F2(e,t,n){const r=P2(t);return _u.set(e,n),r.observe(e),()=>{_u.delete(e),r.unobserve(e)}}const L2={some:0,all:1};class O2 extends Cr{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:L2[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 F2(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(I2(t,n))&&this.startObserver()}unmount(){}}function I2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $2={inView:{Feature:O2},tap:{Feature:A2},focus:{Feature:k2},hover:{Feature:R2}},D2={layout:{ProjectionNode:$0,MeasureLayout:A0}},V2={...ET,...$2,...T2,...D2},Ya=BE(V2,eT),j2="_primary_13825_8",B2="_secondary_13825_12",z2="_tertiary_13825_16",W2="_positive_13825_20",H2="_negative_13825_24",K2="_warning_13825_28",U2="_accent_13825_32",G2="_inverse_13825_36",q2="_text_13825_111",Y2="_regular_13825_117",X2="_medium_13825_121",J2="_semibold_13825_125",Z2="_bold_13825_129",Ns={primary:j2,secondary:B2,tertiary:z2,positive:W2,negative:H2,warning:K2,accent:U2,inverse:G2,"title-1":"_title-1_13825_41","title-2":"_title-2_13825_51","title-3":"_title-3_13825_61","headline-1":"_headline-1_13825_76","headline-2":"_headline-2_13825_81","headline-3":"_headline-3_13825_86","body-1":"_body-1_13825_91","body-2":"_body-2_13825_96","caption-1":"_caption-1_13825_101","caption-2":"_caption-2_13825_106",text:q2,regular:Y2,medium:X2,semibold:J2,bold:Z2},Q2=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"),z.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})},ce=C.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:_,whiteSpace:y,textOverflow:v,decoration:x,color:b,center:w,left:T,right:E,uppercase:R,lowercase:M,capitalize:O,overflow:D,...I},L)=>{const[B,K]=C.useState(!1),P=!!c,A=()=>P&&K(!0),$=()=>P&&K(!1),H=Q2({mt:f,mb:d,ml:h,mr:g,flex:p,cursor:m,wordBreak:_,whiteSpace:y,textOverflow:v,decoration:x,color:b,center:w,left:T,right:E,uppercase:R,lowercase:M,capitalize:O,overflow:D}),Q=o,J=P?z.css({opacity:B?a:1,transition:`opacity ${l}ms ease`}):"";return S.jsx(Q,{ref:L,...I,className:z.cx(Ns.text,Ns[n],Ns[i],Ns[r],J,t,H),style:s,onClick:c,onMouseDown:A,onMouseUp:$,onMouseLeave:$,onTouchStart:A,onTouchEnd:$,role:P?"button":void 0,tabIndex:P?0:void 0,children:e})});ce.displayName="Text";const D0=Ya(ce),eR=z.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}),_i={zero:"var(--corner-zero)",xs:"var(--corner-xs)",sm:"var(--corner-sm)",md:"var(--corner-md)",lg:"var(--corner-lg)",xl:"var(--corner-xl)","2xl":"var(--corner-2xl)","3xl":"var(--corner-3xl)","4xl":"var(--corner-4xl)","5xl":"var(--corner-5xl)","6xl":"var(--corner-6xl)","full-round":"var(--corner-full-round)"},tR={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},nR={clear:z.css({backgroundColor:"transparent",border:"none"}),filled:z.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:z.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},rR=(e,t,n,r)=>{if(r)return z.css({cursor:"not-allowed",opacity:.7});const o={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:e==="filled"?"var(--text-inverse)":`var(--text-${t})`};switch(e){case"filled":return z.css({...o,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return z.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 z.css({...o,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return z.css(o)}},Go=({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:_,iconRight:y,intensity:v="primary",flex:x,type:b="button",...w})=>{const T=C.useMemo(()=>{switch(p){case"full":return"100%";case"auto":return"auto";default:return p}},[p]),E=C.useMemo(()=>l||(a==="filled"?d==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${d}-${v})`:"transparent"),[a,l,d,v]),R=C.useMemo(()=>{if(v==="primary"){if(d==="neutral")return"var(--text-secondary)";if(a==="filled")return"var(--text-inverse)"}else if(d==="neutral")return"var(--text-secondary)";return`var(--text-${d})`},[v,d,a]),M=C.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=C.useMemo(()=>f||(a==="outline"?`var(--border-${d}-${v})`:"transparent"),[a,f,d,v]),D=C.useMemo(()=>{switch(m){case"lg":return _i.lg;case"md":case"sm":return _i.md;case"xs":return _i.sm;default:return _i.md}},[m]),I=z.cx(eR,rR(a,d,v,e),nR[a],e?o:void 0,z.css({borderRadius:g?_i[g]:D,backgroundColor:E,borderColor:O,color:c,width:"100%",height:tR[m],opacity:h||(e?.7:1)}),r),L=C.useMemo(()=>{switch(m){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[m]);return S.jsx(q,{className:z.cx(n),w:T,flex:x,relative:!0,overflow:"hidden",children:S.jsxs(Ya.button,{...w,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:b,children:[t?S.jsx(ev,{color:R}):S.jsxs(S.Fragment,{children:[_,S.jsx(D0,{style:{color:c},colorName:M,variant:L,className:i,textOverflow:"ellipsis",overflow:"hidden",children:s}),y]}),S.jsx(io,{})]})})},oR=e=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},N.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),iR=e=>N.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},N.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),sR="_checkbox_22ifd_8",aR="_disabled_22ifd_14",lR="_checkbox__ripple_22ifd_14",cR="_checkbox__input_22ifd_26",uR="_checkbox__box_22ifd_33",dR="_secondary_22ifd_46",fR="_checked_22ifd_52",hR="_error_22ifd_61",Pn={checkbox:sR,disabled:aR,checkbox__ripple:lR,checkbox__input:cR,checkbox__box:uR,secondary:dR,checked:fR,error:hR},gR={sm:20,md:24},ef=C.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,_]=C.useState(!1),y=e!==void 0,v=y?e:m,x=R=>{y||_(R.target.checked),t?.(R)},b=gR[i],w=v||o,T=!!g&&!n,E=n?"not-allowed":T?"auto":"pointer";return S.jsxs("label",{className:z.cx(Pn.checkbox,z.css({flex:h,cursor:E}),{[Pn.disabled]:n}),children:[S.jsxs(q,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${b}px`,"--checkbox-size-double":`${b*2}px`},children:[S.jsx("input",{ref:p,type:"checkbox",checked:v,onChange:T?void 0:x,onClick:R=>R.stopPropagation(),disabled:n,readOnly:T,name:u,required:f,className:z.cx(Pn.checkbox__input,{[Pn.disabled]:n},z.css({cursor:E}))}),S.jsx("div",{className:z.cx(Pn.checkbox__box,Pn[d],{[Pn.disabled]:n,[Pn.error]:r,[Pn.checked]:w}),children:w&&(o?S.jsx(iR,{width:b*.75,height:b*.75}):S.jsx(oR,{width:b*.75,height:b*.75}))})]}),(s||l)&&S.jsxs(q,{gap:4,children:[s&&S.jsx(ce,{colorName:a,variant:i==="sm"?"body-2":"body-1",children:s}),l&&S.jsx(ce,{variant:"body-2",colorName:c,children:l})]})]})});ef.displayName="Checkbox";const pR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("g",{opacity:.5},N.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"}))),mR="_disabled_1kvy1_20",yR="_multiline_1kvy1_24",vR="_input_1kvy1_8",_R="_sm_1kvy1_74",xR="_md_1kvy1_79",bR="_error_1kvy1_84",CR="_primary_1kvy1_88",wR="_secondary_1kvy1_92",ft={"input-container":"_input-container_1kvy1_8",disabled:mR,multiline:yR,input:vR,"input-text-size_sm":"_input-text-size_sm_1kvy1_55","input-text-size_md":"_input-text-size_md_1kvy1_59","input-text-align_left":"_input-text-align_left_1kvy1_64","input-text-align_center":"_input-text-align_center_1kvy1_67","input-text-align_right":"_input-text-align_right_1kvy1_70",sm:_R,md:xR,error:bR,primary:CR,secondary:wR,"clear-button":"_clear-button_1kvy1_96"};function Xg(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const qo=C.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,_=e.multiline===!0,y=C.useRef(null),v=C.useRef(null),[x,b]=so(typeof d=="string"||typeof d=="number"?String(d):void 0,typeof h=="string"||typeof h=="number"?String(h):"");C.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(M){b(M),y.current&&(y.current.value=M),v.current&&(v.current.value=M)}}));const w=M=>{if(b(M.target.value),_){const O=e.onChange;O?.(M)}else{const O=e.onChange;O?.(M)}};C.useEffect(()=>{_&&e.autoResize&&v.current&&(v.current.style.height="auto",v.current.style.height=`${v.current.scrollHeight}px`)},[x,_,e.autoResize]);const T=()=>{if(b(""),!_){const O=y.current;if(O){O.value="";const D=Xg(O),I=e.onChange;I?.(D)}return}const M=v.current;if(M){M.value="";const O=Xg(M),D=e.onChange;D?.(O)}},E=()=>{if(_){const{rows:I,autoResize:L,onChange:B,multiline:K,...P}=m;return S.jsx("textarea",{ref:v,rows:e.rows??3,className:z.cx(ft.input,g,{[ft.disabled]:f,[ft[`input-text-align_${p}`]]:!!p}),disabled:f,maxLength:e.maxLength,...P,value:x,onChange:w})}const{onChange:M,multiline:O,...D}=m;return S.jsx("input",{...D,ref:y,className:z.cx(ft.input,ft[`input-text-size_${s}`],g,{[ft.disabled]:f,[ft[`input-text-align_${p}`]]:!!p}),disabled:f,type:e.type??"text",value:x,onChange:w})},R=C.useMemo(()=>c==="white"?ft.primary:c==="gray"?ft.secondary:ft[c],[c]);return S.jsxs(q,{w:"full",gap:"var(--spacing-sm)",children:[typeof n=="string"?S.jsx(ce,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}):n,S.jsxs(q,{row:!0,alignItems:_?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:z.cx(ft["input-container"],R,ft[s],{[ft.error]:o,[ft.disabled]:f,[ft.multiline]:_}),children:[a&&S.jsx(q,{flex:"none",children:a}),S.jsx(q,{flex:"1",children:E()}),u&&x&&!f&&S.jsx(q,{flex:"none",children:S.jsx("span",{className:ft["clear-button"],onClick:T,children:S.jsx(pR,{})})}),l&&S.jsx(q,{flex:"none",children:l})]}),(r||_)&&S.jsxs(q,{row:!0,gap:10,w:"full",children:[typeof r=="string"?S.jsx(ce,{variant:"caption-1",colorName:"tertiary",children:r}):r,_&&e.maxLength&&S.jsx(ce,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${x.length}/${e.maxLength}`})]}),i&&o&&S.jsx(ce,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:i})]})});qo.displayName="Input";const SR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("path",{d:"M15 8.33333H5M17.5 5H2.5M17.5 11.6667H2.5M15 15H5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),ER=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),TR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),RR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),kR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),AR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),MR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("g",{clipPath:"url(#clip0_1571_1710)"},N.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"})),N.createElement("defs",null,N.createElement("clipPath",{id:"clip0_1571_1710"},N.createElement("rect",{width:20,height:20,fill:"white"})))),NR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),PR=e=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),FR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),LR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),OR=e=>N.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"})),V0=C.createContext(null);function tf(){const e=C.useContext(V0);if(!e)throw new Error("useEditorStates must be used within EditorState Provider");return e}const j0=C.createContext(null);function IR(){const e=C.useContext(j0);if(!e)throw new Error("useToolbarContext must be used within ToolbarContext provider");return e}var Ri={exports:{}};Ri.exports;var Jg;function $R(){return Jg||(Jg=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]",_="[object Null]",y="[object Object]",v="[object Proxy]",x="[object RegExp]",b="[object Set]",w="[object String]",T="[object Undefined]",E="[object WeakMap]",R="[object ArrayBuffer]",M="[object DataView]",O="[object Float32Array]",D="[object Float64Array]",I="[object Int8Array]",L="[object Int16Array]",B="[object Int32Array]",K="[object Uint8Array]",P="[object Uint8ClampedArray]",A="[object Uint16Array]",$="[object Uint32Array]",H=/[\\^$.*+?()[\]{}|]/g,Q=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,X={};X[O]=X[D]=X[I]=X[L]=X[B]=X[K]=X[P]=X[A]=X[$]=!0,X[a]=X[l]=X[R]=X[u]=X[M]=X[f]=X[d]=X[h]=X[p]=X[m]=X[y]=X[x]=X[b]=X[w]=X[E]=!1;var se=typeof _n=="object"&&_n&&_n.Object===Object&&_n,re=typeof self=="object"&&self&&self.Object===Object&&self,he=se||re||Function("return this")(),we=t&&!t.nodeType&&t,te=we&&!0&&e&&!e.nodeType&&e,ye=te&&te.exports===we,Se=ye&&se.process,$e=(function(){try{var k=te&&te.require&&te.require("util").types;return k||Se&&Se.binding&&Se.binding("util")}catch{}})(),ee=$e&&$e.isTypedArray;function pe(k,F,j){switch(j.length){case 0:return k.call(F);case 1:return k.call(F,j[0]);case 2:return k.call(F,j[0],j[1]);case 3:return k.call(F,j[0],j[1],j[2])}return k.apply(F,j)}function Ne(k,F){for(var j=-1,ne=Array(k);++j<k;)ne[j]=F(j);return ne}function Ze(k){return function(F){return k(F)}}function Le(k,F){return k?.[F]}function Qn(k,F){return function(j){return k(F(j))}}var hn=Array.prototype,gn=Function.prototype,Dt=Object.prototype,ve=he["__core-js_shared__"],Re=gn.toString,Vt=Dt.hasOwnProperty,ph=(function(){var k=/[^.]+$/.exec(ve&&ve.keys&&ve.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""})(),mh=Dt.toString,Tb=Re.call(Object),Rb=RegExp("^"+Re.call(Vt).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xs=ye?he.Buffer:void 0,yh=he.Symbol,vh=he.Uint8Array;xs&&xs.allocUnsafe;var _h=Qn(Object.getPrototypeOf,Object),xh=Object.create,kb=Dt.propertyIsEnumerable,Ab=hn.splice,Tr=yh?yh.toStringTag:void 0,bs=(function(){try{var k=Tl(Object,"defineProperty");return k({},"",{}),k}catch{}})(),Mb=xs?xs.isBuffer:void 0,bh=Math.max,Nb=Date.now,Ch=Tl(he,"Map"),pi=Tl(Object,"create"),Pb=(function(){function k(){}return function(F){if(!kr(F))return{};if(xh)return xh(F);k.prototype=F;var j=new k;return k.prototype=void 0,j}})();function Rr(k){var F=-1,j=k==null?0:k.length;for(this.clear();++F<j;){var ne=k[F];this.set(ne[0],ne[1])}}function Fb(){this.__data__=pi?pi(null):{},this.size=0}function Lb(k){var F=this.has(k)&&delete this.__data__[k];return this.size-=F?1:0,F}function Ob(k){var F=this.__data__;if(pi){var j=F[k];return j===r?void 0:j}return Vt.call(F,k)?F[k]:void 0}function Ib(k){var F=this.__data__;return pi?F[k]!==void 0:Vt.call(F,k)}function $b(k,F){var j=this.__data__;return this.size+=this.has(k)?0:1,j[k]=pi&&F===void 0?r:F,this}Rr.prototype.clear=Fb,Rr.prototype.delete=Lb,Rr.prototype.get=Ob,Rr.prototype.has=Ib,Rr.prototype.set=$b;function Nn(k){var F=-1,j=k==null?0:k.length;for(this.clear();++F<j;){var ne=k[F];this.set(ne[0],ne[1])}}function Db(){this.__data__=[],this.size=0}function Vb(k){var F=this.__data__,j=Cs(F,k);if(j<0)return!1;var ne=F.length-1;return j==ne?F.pop():Ab.call(F,j,1),--this.size,!0}function jb(k){var F=this.__data__,j=Cs(F,k);return j<0?void 0:F[j][1]}function Bb(k){return Cs(this.__data__,k)>-1}function zb(k,F){var j=this.__data__,ne=Cs(j,k);return ne<0?(++this.size,j.push([k,F])):j[ne][1]=F,this}Nn.prototype.clear=Db,Nn.prototype.delete=Vb,Nn.prototype.get=jb,Nn.prototype.has=Bb,Nn.prototype.set=zb;function ho(k){var F=-1,j=k==null?0:k.length;for(this.clear();++F<j;){var ne=k[F];this.set(ne[0],ne[1])}}function Wb(){this.size=0,this.__data__={hash:new Rr,map:new(Ch||Nn),string:new Rr}}function Hb(k){var F=Ss(this,k).delete(k);return this.size-=F?1:0,F}function Kb(k){return Ss(this,k).get(k)}function Ub(k){return Ss(this,k).has(k)}function Gb(k,F){var j=Ss(this,k),ne=j.size;return j.set(k,F),this.size+=j.size==ne?0:1,this}ho.prototype.clear=Wb,ho.prototype.delete=Hb,ho.prototype.get=Kb,ho.prototype.has=Ub,ho.prototype.set=Gb;function go(k){var F=this.__data__=new Nn(k);this.size=F.size}function qb(){this.__data__=new Nn,this.size=0}function Yb(k){var F=this.__data__,j=F.delete(k);return this.size=F.size,j}function Xb(k){return this.__data__.get(k)}function Jb(k){return this.__data__.has(k)}function Zb(k,F){var j=this.__data__;if(j instanceof Nn){var ne=j.__data__;if(!Ch||ne.length<n-1)return ne.push([k,F]),this.size=++j.size,this;j=this.__data__=new ho(ne)}return j.set(k,F),this.size=j.size,this}go.prototype.clear=qb,go.prototype.delete=Yb,go.prototype.get=Xb,go.prototype.has=Jb,go.prototype.set=Zb;function Qb(k,F){var j=Al(k),ne=!j&&kl(k),be=!j&&!ne&&Rh(k),Oe=!j&&!ne&&!be&&Ah(k),Be=j||ne||be||Oe,Te=Be?Ne(k.length,String):[],ze=Te.length;for(var Yt in k)Be&&(Yt=="length"||be&&(Yt=="offset"||Yt=="parent")||Oe&&(Yt=="buffer"||Yt=="byteLength"||Yt=="byteOffset")||Eh(Yt,ze))||Te.push(Yt);return Te}function Sl(k,F,j){(j!==void 0&&!Es(k[F],j)||j===void 0&&!(F in k))&&El(k,F,j)}function eC(k,F,j){var ne=k[F];(!(Vt.call(k,F)&&Es(ne,j))||j===void 0&&!(F in k))&&El(k,F,j)}function Cs(k,F){for(var j=k.length;j--;)if(Es(k[j][0],F))return j;return-1}function El(k,F,j){F=="__proto__"&&bs?bs(k,F,{configurable:!0,enumerable:!0,value:j,writable:!0}):k[F]=j}var tC=gC();function ws(k){return k==null?k===void 0?T:_:Tr&&Tr in Object(k)?pC(k):bC(k)}function wh(k){return mi(k)&&ws(k)==a}function nC(k){if(!kr(k)||_C(k))return!1;var F=Nl(k)?Rb:Q;return F.test(EC(k))}function rC(k){return mi(k)&&kh(k.length)&&!!X[ws(k)]}function oC(k){if(!kr(k))return xC(k);var F=Th(k),j=[];for(var ne in k)ne=="constructor"&&(F||!Vt.call(k,ne))||j.push(ne);return j}function Sh(k,F,j,ne,be){k!==F&&tC(F,function(Oe,Be){if(be||(be=new go),kr(Oe))iC(k,F,Be,j,Sh,ne,be);else{var Te=ne?ne(Rl(k,Be),Oe,Be+"",k,F,be):void 0;Te===void 0&&(Te=Oe),Sl(k,Be,Te)}},Mh)}function iC(k,F,j,ne,be,Oe,Be){var Te=Rl(k,j),ze=Rl(F,j),Yt=Be.get(ze);if(Yt){Sl(k,j,Yt);return}var Lt=Oe?Oe(Te,ze,j+"",k,F,Be):void 0,yi=Lt===void 0;if(yi){var Pl=Al(ze),Fl=!Pl&&Rh(ze),Ph=!Pl&&!Fl&&Ah(ze);Lt=ze,Pl||Fl||Ph?Al(Te)?Lt=Te:TC(Te)?Lt=dC(Te):Fl?(yi=!1,Lt=lC(ze)):Ph?(yi=!1,Lt=uC(ze)):Lt=[]:RC(ze)||kl(ze)?(Lt=Te,kl(Te)?Lt=kC(Te):(!kr(Te)||Nl(Te))&&(Lt=mC(ze))):yi=!1}yi&&(Be.set(ze,Lt),be(Lt,ze,ne,Oe,Be),Be.delete(ze)),Sl(k,j,Lt)}function sC(k,F){return wC(CC(k,F,Nh),k+"")}var aC=bs?function(k,F){return bs(k,"toString",{configurable:!0,enumerable:!1,value:MC(F),writable:!0})}:Nh;function lC(k,F){return k.slice()}function cC(k){var F=new k.constructor(k.byteLength);return new vh(F).set(new vh(k)),F}function uC(k,F){var j=cC(k.buffer);return new k.constructor(j,k.byteOffset,k.length)}function dC(k,F){var j=-1,ne=k.length;for(F||(F=Array(ne));++j<ne;)F[j]=k[j];return F}function fC(k,F,j,ne){var be=!j;j||(j={});for(var Oe=-1,Be=F.length;++Oe<Be;){var Te=F[Oe],ze=void 0;ze===void 0&&(ze=k[Te]),be?El(j,Te,ze):eC(j,Te,ze)}return j}function hC(k){return sC(function(F,j){var ne=-1,be=j.length,Oe=be>1?j[be-1]:void 0,Be=be>2?j[2]:void 0;for(Oe=k.length>3&&typeof Oe=="function"?(be--,Oe):void 0,Be&&yC(j[0],j[1],Be)&&(Oe=be<3?void 0:Oe,be=1),F=Object(F);++ne<be;){var Te=j[ne];Te&&k(F,Te,ne,Oe)}return F})}function gC(k){return function(F,j,ne){for(var be=-1,Oe=Object(F),Be=ne(F),Te=Be.length;Te--;){var ze=Be[++be];if(j(Oe[ze],ze,Oe)===!1)break}return F}}function Ss(k,F){var j=k.__data__;return vC(F)?j[typeof F=="string"?"string":"hash"]:j.map}function Tl(k,F){var j=Le(k,F);return nC(j)?j:void 0}function pC(k){var F=Vt.call(k,Tr),j=k[Tr];try{k[Tr]=void 0;var ne=!0}catch{}var be=mh.call(k);return ne&&(F?k[Tr]=j:delete k[Tr]),be}function mC(k){return typeof k.constructor=="function"&&!Th(k)?Pb(_h(k)):{}}function Eh(k,F){var j=typeof k;return F=F??s,!!F&&(j=="number"||j!="symbol"&&J.test(k))&&k>-1&&k%1==0&&k<F}function yC(k,F,j){if(!kr(j))return!1;var ne=typeof F;return(ne=="number"?Ml(j)&&Eh(F,j.length):ne=="string"&&F in j)?Es(j[F],k):!1}function vC(k){var F=typeof k;return F=="string"||F=="number"||F=="symbol"||F=="boolean"?k!=="__proto__":k===null}function _C(k){return!!ph&&ph in k}function Th(k){var F=k&&k.constructor,j=typeof F=="function"&&F.prototype||Dt;return k===j}function xC(k){var F=[];if(k!=null)for(var j in Object(k))F.push(j);return F}function bC(k){return mh.call(k)}function CC(k,F,j){return F=bh(F===void 0?k.length-1:F,0),function(){for(var ne=arguments,be=-1,Oe=bh(ne.length-F,0),Be=Array(Oe);++be<Oe;)Be[be]=ne[F+be];be=-1;for(var Te=Array(F+1);++be<F;)Te[be]=ne[be];return Te[F]=j(Be),pe(k,this,Te)}}function Rl(k,F){if(!(F==="constructor"&&typeof k[F]=="function")&&F!="__proto__")return k[F]}var wC=SC(aC);function SC(k){var F=0,j=0;return function(){var ne=Nb(),be=i-(ne-j);if(j=ne,be>0){if(++F>=o)return arguments[0]}else F=0;return k.apply(void 0,arguments)}}function EC(k){if(k!=null){try{return Re.call(k)}catch{}try{return k+""}catch{}}return""}function Es(k,F){return k===F||k!==k&&F!==F}var kl=wh((function(){return arguments})())?wh:function(k){return mi(k)&&Vt.call(k,"callee")&&!kb.call(k,"callee")},Al=Array.isArray;function Ml(k){return k!=null&&kh(k.length)&&!Nl(k)}function TC(k){return mi(k)&&Ml(k)}var Rh=Mb||NC;function Nl(k){if(!kr(k))return!1;var F=ws(k);return F==h||F==g||F==c||F==v}function kh(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=s}function kr(k){var F=typeof k;return k!=null&&(F=="object"||F=="function")}function mi(k){return k!=null&&typeof k=="object"}function RC(k){if(!mi(k)||ws(k)!=y)return!1;var F=_h(k);if(F===null)return!0;var j=Vt.call(F,"constructor")&&F.constructor;return typeof j=="function"&&j instanceof j&&Re.call(j)==Tb}var Ah=ee?Ze(ee):rC;function kC(k){return fC(k,Mh(k))}function Mh(k){return Ml(k)?Qb(k):oC(k)}var AC=hC(function(k,F,j){Sh(k,F,j)});function MC(k){return function(){return k}}function Nh(k){return k}function NC(){return!1}e.exports=AC})(Ri,Ri.exports)),Ri.exports}var DR=$R();const VR=_d(DR),B0=C.createContext(null);function jR(){return C.useContext(B0)}function BR({children:e,locale:t}){return S.jsx(B0.Provider,{value:t||null,children:e})}function zR({localeKey:e,defaultLocale:t}){const n=C.createContext(t);function r(s){const{extraLocale:a}=s||{},l=jR();return{value:C.useMemo(()=>{const u=l?l[e]:null,f=[{},t];return u&&f.push(u),a&&f.push(a),VR(...f)},[t,a,e,l])}}function o(){return C.useContext(n)}function i({children:s,locale:a}){const{value:l}=r({extraLocale:a});return S.jsx(n.Provider,{value:l,children:s})}return{Context:n,useComposeLocaleProviderValue:r,useLocale:o,Provider:i}}const z0="MarkdownTextEditor",WR={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:HR,useLocale:ss}=zR({localeKey:z0,defaultLocale:WR}),W0=C.createContext(null);function KR(e,t){return{getTheme:function(){return t??null}}}function nt(){const e=C.useContext(W0);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 U(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 H0(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 fn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,UR=fn&&"documentMode"in document?document.documentMode:null,en=fn&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Ur=fn&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),_a=!(!fn||!("InputEvent"in window)||UR)&&"getTargetRanges"in new window.InputEvent("input"),as=fn&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),oi=fn&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,GR=fn&&/Android/.test(navigator.userAgent),K0=fn&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Zg=fn&&GR&&K0,ls=fn&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&en&&!K0;function U0(...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 qR=0,YR=1,XR=2,G0=128,JR=1,ZR=2,QR=3,ek=4,tk=5,nk=6,Xa=as||oi||ls?" ":"",hr=`
|
|
10
10
|
|
|
11
11
|
`,rk=Ur?" ":Xa,gr={bold:1,capitalize:1024,code:16,highlight:G0,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},ok={directionless:1,unmergeable:2},Qg={center:2,end:6,justify:4,left:1,right:3,start:5},ik={[ZR]:"center",[nk]:"end",[ek]:"justify",[JR]:"left",[QR]:"right",[tk]:"start"},sk={normal:0,segmented:2,token:1},ak={[qR]:"normal",[XR]:"segmented",[YR]:"token"},ep="$config";function q0(e,t,n,r,o,i){let s=e.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===t&&(V(s)&&q0(s,a,n,r,o,i),n.has(a)||i.delete(a),o.push(a)),s=s.getNextSibling()}}let xu=!1,nf=0;function lk(e){nf=e.timeStamp}function Zl(e,t,n){const r=e.nodeName==="BR",o=t.__lexicalLineBreak;return o&&(e===o||r&&e.previousSibling===o)||r&&ll(e,n)!==void 0}function ck(e,t,n){const r=St(qt(n));let o=null,i=null;r!==null&&r.anchorNode===e&&(o=r.anchorOffset,i=r.focusOffset);const s=e.nodeValue;s!==null&&Ef(t,s,o,i,!1)}function uk(e,t,n){if(W(e)){const r=e.anchor.getNode();if(r.is(n)&&e.format!==r.getFormat())return!1}return Zn(t)&&n.isAttached()}function dk(e,t,n,r){for(let o=e;o&&!p3(o);o=fs(o)){const i=ll(o,t);if(i!==void 0){const s=Me(i,n);if(s)return Ce(s)||!je(o)?void 0:[o,s]}else if(o===r)return[r,Y_(n)]}}function Y0(e,t,n){xu=!0;const r=performance.now()-nf>100;try{Sn(e,()=>{const o=G()||(function(d){return d.getEditorState().read(()=>{const h=G();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=dk(p,e,a,s);if(!m)continue;const[_,y]=m;if(g==="characterData")r&&Y(y)&&Zn(p)&&uk(o,p,y)&&ck(p,y,e);else if(g==="childList"){c=!0;const v=h.addedNodes;for(let w=0;w<v.length;w++){const T=v[w],E=G_(T),R=T.parentNode;if(R!=null&&T!==l&&E===null&&!Zl(T,R,e)){if(Ur){const M=(je(T)?T.innerText:null)||T.nodeValue;M&&(u+=M)}R.removeChild(T)}}const x=h.removedNodes,b=x.length;if(b>0){let w=0;for(let T=0;T<b;T++){const E=x[T];(Zl(E,p,e)||l===E)&&(p.appendChild(E),w++)}b!==w&&i.set(_,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 _=g[m],y=_.parentNode;y==null||_.nodeName!=="BR"||Zl(_,p,e)||y.removeChild(_)}}n.takeRecords()}o!==null&&(c&&He(o),Ur&&Q_(e)&&o.insertRawText(u))})}finally{xu=!1}}function X0(e){const t=e._observer;t!==null&&Y0(e,t.takeRecords(),t)}function J0(e){(function(t){nf===0&&qt(t).addEventListener("textInput",lk,!0)})(e),e._observer=new MutationObserver((t,n)=>{Y0(e,t,n)})}let fk=class{key;parse;unparse;isEqual;defaultValue;constructor(t,n){this.key=t,this.parse=n.parse.bind(n),this.unparse=(n.unparse||mk).bind(n),this.isEqual=(n.isEqual||Object.is).bind(n),this.defaultValue=this.parse(void 0)}};function hk(e,t){return new fk(e,t)}function Z0(e,t,n="latest"){const r=(n==="latest"?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function Ql(e,t,n){let r;if(st(),typeof n=="function"){const i=e.getLatest(),s=Z0(i,t);if(r=n(s),t.isEqual(s,r))return i}else r=n;const o=e.getWritable();return e_(o).updateFromKnown(t,r),o}function gk(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}=ul(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 pk=class Q0{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 tp(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 Q0(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=tp(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 e_(e){const t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new pk(t,t_(t));return t.__state=n,n}function t_(e){return e.__state?e.__state.sharedNodeState:B_(ui(),e.getType()).sharedNodeState}function tp(e){if(e)for(const t in e)return e}function mk(e){return e}function np(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 rp(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 op(e,t){const n=e.__state;return n&&n.node===e?n.getWritable(t):n}function ip(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&&np(d,u,f)||f&&np(d,f,u)||u&&rp(d,u,f)||f&&rp(d,f,u))})(l,c))}function sp(e,t){const n=e.mergeWithSibling(t),r=Fe()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function ap(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&Y(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(ip(t,r)){r=sp(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&Y(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(ip(r,n)){r=sp(r,n);break}break}n.remove()}}else r.remove()}function qi(e){return lp(e.anchor),lp(e.focus),e}function lp(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),Y(r)){e.set(r.__key,o?r.getTextContentSize():0,"text",!0);break}if(!V(r))break;e.set(r.__key,o?r.getChildrenSize():0,"element",!0)}}let Gr,mt,Yi,Ja,bu,Cu,qr,on,wu,Xi,it="",mn=null,Pr=null,Dn="",wo=!1,xa=!1;function ba(e,t){const n=qr.get(e);if(t!==null){const r=Ru(e);r.parentNode===t&&t.removeChild(r)}if(on.has(e)||mt._keyToDOMMap.delete(e),V(n)){const r=wa(n,qr);Su(r,0,r.length-1,null)}n!==void 0&&Tf(Xi,Yi,Ja,n,"destroyed")}function Su(e,t,n,r){let o=t;for(;o<=n;++o){const i=e[o];i!==void 0&&ba(i,r)}}function Mr(e,t){e.setProperty("text-align",t)}const yk="40px";function n_(e,t){const n=Gr.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")||yk;e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${r})`)}function r_(e,t){const n=e.style;t===0?Mr(n,""):t===1?Mr(n,"left"):t===2?Mr(n,"center"):t===3?Mr(n,"right"):t===4?Mr(n,"justify"):t===5?Mr(n,"start"):t===6&&Mr(n,"end")}function Eu(e,t){const n=(function(r){const o=r.__dir;if(o!==null)return o;if(tt(r))return null;const i=r.getParentOrThrow();return tt(i)&&i.__dir===null?"auto":null})(t);n!==null?e.dir=n:e.removeAttribute("dir")}function Ca(e,t){const n=on.get(e);n===void 0&&U(60);const r=n.createDOM(Gr,mt);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,mt),Y(n)?r.setAttribute("data-lexical-text","true"):Ce(n)&&r.setAttribute("data-lexical-decorator","true"),V(n)){const o=n.__indent,i=n.__size;if(Eu(r,n),o!==0&&n_(r,o),i!==0){const a=i-1;Tu(wa(n,on),n,0,a,n.getDOMSlot(r))}const s=n.__format;s!==0&&r_(r,s),n.isInline()||o_(null,n,r),cl(n)&&(it+=hr,Dn+=hr)}else{const o=n.getTextContent();if(Ce(n)){const i=n.decorate(mt,Gr);i!==null&&i_(e,i),r.contentEditable="false"}it+=o,Dn+=o}return t!==null&&t.insertChild(r),Tf(Xi,Yi,Ja,n,"created"),r}function Tu(e,t,n,r,o){const i=it;it="";let s=n;for(;s<=r;++s){Ca(e[s],o);const a=on.get(e[s]);a!==null&&Y(a)&&mn===null&&(mn=a.getFormat(),Pr=a.getStyle())}cl(t)&&(it+=hr),o.element.__lexicalTextContent=it,it=i+it}function cp(e,t){if(e){const n=e.__last;if(n){const r=t.get(n);if(r)return wn(r)?"line-break":Ce(r)&&r.isInline()?"decorator":null}return"empty"}return null}function o_(e,t,n){const r=cp(e,qr),o=cp(t,on);r!==o&&t.getDOMSlot(n).setManagedLineBreak(o)}function vk(e,t,n){var r;mn=null,Pr=null,(function(o,i,s){const a=it,l=o.__size,c=i.__size;it="";const u=s.element;if(l===1&&c===1){const f=o.__first,d=i.__first;if(f===d)ki(f,u);else{const g=Ru(f),p=Ca(d,null);try{u.replaceChild(p,g)}catch(m){if(typeof m=="object"&&m!=null){const _=`${m.toString()} Parent: ${u.tagName}, new child: {tag: ${p.tagName} key: ${d}}, old child: {tag: ${g.tagName}, key: ${f}}.`;throw new Error(_)}throw m}ba(f,null)}const h=on.get(d);Y(h)&&mn===null&&(mn=h.getFormat(),Pr=h.getStyle())}else{const f=wa(o,qr),d=wa(i,on);if(f.length!==l&&U(227),d.length!==c&&U(228),l===0)c!==0&&Tu(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;Su(f,0,l-1,h?null:u),h&&(u.textContent="")}}else(function(h,g,p,m,_,y){const v=m-1,x=_-1;let b,w,T=y.getFirstChild(),E=0,R=0;for(;E<=v&&R<=x;){const D=g[E],I=p[R];if(D===I)T=ec(ki(I,y.element)),E++,R++;else{b===void 0&&(b=new Set(g)),w===void 0&&(w=new Set(p));const B=w.has(D),K=b.has(I);if(B)if(K){const P=Jr(mt,I);P===T?T=ec(ki(I,y.element)):(y.withBefore(T).insertChild(P),ki(I,y.element)),E++,R++}else Ca(I,y.withBefore(T)),R++;else T=ec(Ru(D)),ba(D,y.element),E++}const L=on.get(I);L!==null&&Y(L)&&mn===null&&(mn=L.getFormat(),Pr=L.getStyle())}const M=E>v,O=R>x;if(M&&!O){const D=p[x+1],I=D===void 0?null:mt.getElementByKey(D);Tu(p,h,R,x,y.withBefore(I))}else O&&!M&&Su(g,E,v,y.element)})(i,f,d,l,c,s)}cl(i)&&(it+=hr),u.__lexicalTextContent=it,it=a+it})(e,t,t.getDOMSlot(n)),r=t,mn==null||mn===r.__textFormat||xa||r.setTextFormat(mn),(function(o){Pr==null||Pr===o.__textStyle||xa||o.setTextStyle(Pr)})(t)}function wa(e,t){const n=[];let r=e.__first;for(;r!==null;){const o=t.get(r);o===void 0&&U(101),n.push(r),r=o.__next}return n}function ki(e,t){const n=qr.get(e);let r=on.get(e);n!==void 0&&r!==void 0||U(61);const o=wo||Cu.has(e)||bu.has(e),i=Jr(mt,e);if(n===r&&!o){if(V(n)){const s=i.__lexicalTextContent;s!==void 0&&(it+=s,Dn+=s)}else{const s=n.getTextContent();Dn+=s,it+=s}return i}if(n!==r&&o&&Tf(Xi,Yi,Ja,r,"updated"),r.updateDOM(n,i,Gr)){const s=Ca(e,null);return t===null&&U(62),t.replaceChild(s,i),ba(e,null),s}if(V(n)&&V(r)){const s=r.__indent;(wo||s!==n.__indent)&&n_(i,s);const a=r.__format;if((wo||a!==n.__format)&&r_(i,a),o&&(vk(n,r,i),tt(r)||r.isInline()||o_(n,r,i)),cl(r)&&(it+=hr,Dn+=hr),(wo||r.__dir!==n.__dir)&&(Eu(i,r),tt(r)&&!wo))for(const l of r.getChildren())V(l)&&Eu(Jr(mt,l.getKey()),l)}else{const s=r.getTextContent();if(Ce(r)){const a=r.decorate(mt,Gr);a!==null&&i_(e,a)}it+=s,Dn+=s}if(!xa&&tt(r)&&r.__cachedText!==Dn){const s=r.getWritable();s.__cachedText=Dn,r=s}return i}function i_(e,t){let n=mt._pendingDecorators;const r=mt._decorators;if(n===null){if(r[e]===t)return;n=q_(mt)}n[e]=t}function ec(e){let t=e.nextSibling;return t!==null&&t===mt._blockCursorElement&&(t=t.nextSibling),t}function _k(e,t,n,r,o,i){it="",Dn="",wo=r===2,mt=n,Gr=n._config,Yi=n._nodes,Ja=mt._listeners.mutation,bu=o,Cu=i,qr=e._nodeMap,on=t._nodeMap,xa=t._readOnly,wu=new Map(n._keyToDOMMap);const s=new Map;return Xi=s,ki("root",null),mt=void 0,Yi=void 0,bu=void 0,Cu=void 0,qr=void 0,on=void 0,Gr=void 0,wu=void 0,Xi=void 0,s}function Ru(e){const t=wu.get(e);return t===void 0&&U(75,e),t}function ie(e){return{type:e}}const zn=ie("SELECTION_CHANGE_COMMAND"),rf=ie("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Za=ie("CLICK_COMMAND"),s_=ie("BEFORE_INPUT_COMMAND"),a_=ie("INPUT_COMMAND"),l_=ie("COMPOSITION_START_COMMAND"),c_=ie("COMPOSITION_END_COMMAND"),cr=ie("DELETE_CHARACTER_COMMAND"),Io=ie("INSERT_LINE_BREAK_COMMAND"),Yr=ie("INSERT_PARAGRAPH_COMMAND"),Wr=ie("CONTROLLED_TEXT_INSERTION_COMMAND"),of=ie("PASTE_COMMAND"),ku=ie("REMOVE_TEXT_COMMAND"),Yo=ie("DELETE_WORD_COMMAND"),Xr=ie("DELETE_LINE_COMMAND"),Rt=ie("FORMAT_TEXT_COMMAND"),u_=ie("UNDO_COMMAND"),d_=ie("REDO_COMMAND"),f_=ie("KEYDOWN_COMMAND"),sf=ie("KEY_ARROW_RIGHT_COMMAND"),xk=ie("MOVE_TO_END"),af=ie("KEY_ARROW_LEFT_COMMAND"),bk=ie("MOVE_TO_START"),lf=ie("KEY_ARROW_UP_COMMAND"),cf=ie("KEY_ARROW_DOWN_COMMAND"),Sa=ie("KEY_ENTER_COMMAND"),h_=ie("KEY_SPACE_COMMAND"),Qa=ie("KEY_BACKSPACE_COMMAND"),uf=ie("KEY_ESCAPE_COMMAND"),df=ie("KEY_DELETE_COMMAND"),ff=ie("KEY_TAB_COMMAND"),Ck=ie("INSERT_TAB_COMMAND"),wk=ie("INDENT_CONTENT_COMMAND"),up=ie("OUTDENT_CONTENT_COMMAND"),g_=ie("DROP_COMMAND"),$o=ie("FORMAT_ELEMENT_COMMAND"),p_=ie("DRAGSTART_COMMAND"),m_=ie("DRAGOVER_COMMAND"),Sk=ie("DRAGEND_COMMAND"),el=ie("COPY_COMMAND"),tl=ie("CUT_COMMAND"),Au=ie("SELECT_ALL_COMMAND"),y_=ie("FOCUS_COMMAND"),Ek=ie("BLUR_COMMAND"),Tk=ie("KEY_MODIFIER_COMMAND"),Fn=Object.freeze({}),Mu=[["keydown",function(e,t){Ji=e.timeStamp,v_=e.key,!t.isComposing()&&Z(t,f_,e)}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;tn(n)&&r!=="touch"&&r!=="pen"&&e.button===0&&Sn(t,()=>{z_(n)||(Fu=!0)})}],["compositionstart",function(e,t){Z(t,l_,e)}],["compositionend",function(e,t){Ur?Ai=!0:oi||!as&&!ls?Z(t,c_,e):(Lu=!0,Ou=e.data)}],["input",function(e,t){e.stopPropagation(),Sn(t,()=>{t.dispatchCommand(a_,e)},{event:e}),So=null}],["click",function(e,t){Sn(t,()=>{const n=G(),r=St(qt(t)),o=An();if(r){if(W(n)){const i=n.anchor,s=i.getNode();if(i.type==="element"&&i.offset===0&&n.isCollapsed()&&!tt(s)&&Ke().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=xe(s,l=>V(l)&&!l.isInline());V(a)&&a.select(0)}}else if(e.pointerType==="touch"||e.pointerType==="pen"){const i=r.anchorNode;(je(i)||Zn(i))&&He(il(o,r,t,e))}}Z(t,Za,e)})}],["cut",Fn],["copy",Fn],["dragstart",Fn],["dragover",Fn],["dragend",Fn],["paste",Fn],["focus",Fn],["blur",Fn],["drop",Fn]];_a&&Mu.push(["beforeinput",(e,t)=>(function(n,r){const o=n.inputType;o==="deleteCompositionText"||Ur&&Q_(r)||o!=="insertCompositionText"&&Z(r,s_,n)})(e,t)]);let Ji=0,v_=null,__=0,So=null;const Nu=new WeakMap,Ea=new WeakMap;let Pu=!1,Fu=!1,Ii=!1,Ai=!1,Lu=!1,Ou="",Or=null,x_=[0,"",0,"root",0];function b_(e,t,n,r,o){const i=e.anchor,s=e.focus,a=i.getNode(),l=Fe(),c=St(qt(l)),u=c!==null?c.anchorNode:null,f=i.key,d=l.getElementByKey(f),h=n.length;return f!==s.key||!Y(a)||(!o&&(!_a||__<r+50)||a.isDirty()&&h<2||X_(n))&&i.offset!==s.offset&&!a.isComposing()||In(a)||a.isDirty()&&h>1||(o||!_a)&&d!==null&&!a.isComposing()&&u!==Jo(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,_=p.getParentOrThrow(),y=Hr(p);return m===0?!p.canInsertTextBefore()||!_.canInsertTextBefore()&&!p.isComposing()||y||(function(v){const x=v.getPreviousSibling();return(Y(x)||V(x)&&x.isInline())&&!x.canInsertTextAfter()})(p):m===p.getTextContentSize()&&(!p.canInsertTextAfter()||!_.canInsertTextAfter()&&!p.isComposing()||y)})(e,a)}function dp(e,t){return Zn(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function fp(e,t,n){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}=e;Pu&&(Pu=!1,dp(r,o)&&dp(i,s)&&!Or)||Sn(t,()=>{if(!n)return void He(null);if(!ds(t,r,i))return;let a=G();if(Or&&W(a)&&a.isCollapsed()){const l=a.anchor,c=Or.anchor;(l.key===c.key&&l.offset===c.offset+1||l.offset===1&&c.getNode().is(l.getNode().getPreviousSibling()))&&(a=Or.clone(),He(a))}if(Or=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=qt(t).event,f=u?u.timeStamp:performance.now(),[d,h,g,p,m]=x_,_=Ke(),y=t.isComposing()===!1&&_.getTextContent()==="";if(f<m+200&&l.offset===g&&l.key===p)na(a,d,h);else if(l.type==="text")Y(c)||U(141),C_(a,c);else if(l.type==="element"&&!y){V(c)||U(259);const v=l.getNode();v.isEmpty()?(function(x,b){const w=b.getTextFormat(),T=b.getTextStyle();na(x,w,T)})(a,v):na(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,_=g?f:u,y=g?u:f;let v=2047,x=!1;for(let b=0;b<h;b++){const w=d[b],T=w.getTextContentSize();if(Y(w)&&T!==0&&!(b===0&&w.__key===_&&p===T||b===h-1&&w.__key===y&&m===0)&&(x=!0,v&=w.getFormat(),v===0))break}a.format=x?v:0}}Z(t,zn,void 0)})}function na(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function C_(e,t){na(e,t.getFormat(),t.getStyle())}function w_(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function Rk(e){const t=e.inputType,n=w_(e),r=Fe(),o=G();if(t==="deleteContentBackward"){if(o===null){const f=An();if(!W(f))return!0;He(f.clone())}if(W(o)){const f=o.anchor.key===o.focus.key;if(i=e.timeStamp,v_==="MediaLast"&&i<Ji+30&&r.isComposing()&&f){if(ut(null),Ji=0,setTimeout(()=>{Sn(r,()=>{ut(null)})},30),W(o)){const d=o.anchor.getNode();d.markDirty(),Y(d)||U(142),C_(o,d)}}else{ut(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=Zg&&f&&!p&&g;if(m&&o.isCollapsed()&&(m=!Ce(ju(o.anchor,!0))),!m){Z(r,cr,!0);const _=G();Zg&&W(_)&&_.isCollapsed()&&(Or=_,setTimeout(()=>Or=null))}}return!0}}var i;if(!W(o))return!0;const s=e.data;So!==null&&Sf(!1,r,So),o.dirty&&So===null||!o.isCollapsed()||tt(o.anchor.getNode())||n===null||o.applyDOMRange(n),So=null;const a=o.anchor,l=o.focus,c=a.getNode(),u=l.getNode();if(t==="insertText"||t==="insertTranspose"){if(s===`
|
|
12
12
|
`)e.preventDefault(),Z(r,Io,!1);else if(s===hr)e.preventDefault(),Z(r,Yr,void 0);else if(s==null&&e.dataTransfer){const f=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(f)}else s!=null&&b_(o,n,s,e.timeStamp,!0)?(e.preventDefault(),Z(r,Wr,s)):So=s;return __=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Z(r,Wr,e);break;case"insertFromComposition":ut(null),Z(r,Wr,e);break;case"insertLineBreak":ut(null),Z(r,Io,!1);break;case"insertParagraph":ut(null),Ii&&!oi?(Ii=!1,Z(r,Io,!1)):Z(r,Yr,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Z(r,of,e);break;case"deleteByComposition":(function(f,d){return f!==d||V(f)||V(d)||!Hr(f)||!Hr(d)})(c,u)&&Z(r,ku,e);break;case"deleteByDrag":case"deleteByCut":Z(r,ku,e);break;case"deleteContent":Z(r,cr,!1);break;case"deleteWordBackward":Z(r,Yo,!0);break;case"deleteWordForward":Z(r,Yo,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Z(r,Xr,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Z(r,Xr,!1);break;case"formatStrikeThrough":Z(r,Rt,"strikethrough");break;case"formatBold":Z(r,Rt,"bold");break;case"formatItalic":Z(r,Rt,"italic");break;case"formatUnderline":Z(r,Rt,"underline");break;case"historyUndo":Z(r,u_,void 0);break;case"historyRedo":Z(r,d_,void 0)}return!0}function kk(e){if(je(e.target)&&z_(e.target))return!0;const t=Fe(),n=G(),r=e.data,o=w_(e);if(r!=null&&W(n)&&b_(n,o,r,e.timeStamp,!1)){Ai&&(Ta(t,r),Ai=!1);const i=n.anchor.getNode(),s=St(qt(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;_a&&!n.isCollapsed()&&Y(i)&&s.anchorNode!==null&&i.getTextContent().slice(0,l)+r+i.getTextContent().slice(l+c)===Z_(s.anchorNode)||Z(t,Wr,r);const u=r.length;Ur&&u>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=u),as||oi||ls||!t.isComposing()||(Ji=0,ut(null))}else Sf(!1,t,r!==null?r:void 0),Ai&&(Ta(t,r||void 0),Ai=!1);return(function(){st();const i=Fe();X0(i)})(),!0}function Ak(e){const t=Fe(),n=G();if(W(n)&&!t.isComposing()){const r=n.anchor,o=n.anchor.getNode();ut(r.key),(e.timeStamp<Ji+30||r.type==="element"||!n.isCollapsed()||o.getFormat()!==n.format||Y(o)&&o.getStyle()!==n.style)&&Z(t,Wr,rk)}return!0}function Mk(e){return Ta(Fe(),e.data),!0}function Ta(e,t){const n=e._compositionKey;if(ut(null),n!==null&&t!=null){if(t===""){const r=Me(n),o=Jo(e.getElementByKey(n));return void(o!==null&&o.nodeValue!==null&&Y(r)&&Ef(r,o.nodeValue,null,null,!0))}if(t[t.length-1]===`
|
|
@@ -44,19 +44,19 @@
|
|
|
44
44
|
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(i&&n.skipInitialOnChange)&&n.onChange(o),i=!1,o}return s.updateDeps=a=>{r=a},s}function Dy(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const _L=(e,t)=>Math.abs(e-t)<1.01,xL=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,o),n)}},Vy=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},bL=e=>e,CL=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=t;o<=n;o++)r.push(o);return r},wL=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=s=>{const{width:a,height:l}=s;t({width:Math.round(a),height:Math.round(l)})};if(o(Vy(n)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(s=>{const a=()=>{const l=s[0];if(l?.borderBoxSize){const c=l.borderBoxSize[0];if(c){o({width:c.inlineSize,height:c.blockSize});return}}o(Vy(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},jy={passive:!0},By=typeof window>"u"?!0:"onscrollend"in window,SL=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const i=e.options.useScrollendEvent&&By?()=>{}:xL(r,()=>{t(o,!1)},e.options.isScrollingResetDelay),s=u=>()=>{const{horizontal:f,isRtl:d}=e.options;o=f?n.scrollLeft*(d&&-1||1):n.scrollTop,i(),t(o,u)},a=s(!0),l=s(!1);l(),n.addEventListener("scroll",a,jy);const c=e.options.useScrollendEvent&&By;return c&&n.addEventListener("scrollend",l,jy),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",l)}},EL=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},TL=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;const s=e+t;(i=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[r.options.horizontal?"left":"top"]:s,behavior:n})};class RL{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(i=>{const s=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()})}));return{disconnect:()=>{var o;(o=r())==null||o.disconnect(),n=null},observe:o=>{var i;return(i=r())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=r())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,o])=>{typeof o>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:bL,rangeExtractor:CL,onChange:()=>{},measureElement:EL,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,o;(o=(r=this.options).onChange)==null||o.call(r,this,n)},this.maybeNotify=Co(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const o=new Map,i=new Map;for(let s=r-1;s>=0;s--){const a=n[s];if(o.has(a.lane))continue;const l=i.get(a.lane);if(l==null||a.end>l.end?i.set(a.lane,a):a.end<l.end&&o.set(a.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((s,a)=>s.end===a.end?s.index-a.index:s.end-a.end)[0]:void 0},this.getMeasurementOptions=Co(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,o,i,s,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:s,lanes:a}),{key:!1,skipInitialOnChange:!0,onChange:()=>{this.notify(this.isScrolling)}}),this.getMeasurements=Co(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:s,lanes:a},l)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const d of this.laneAssignments.keys())d>=n&&this.laneAssignments.delete(d);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(d=>{this.itemSizeCache.set(d.key,d.size)}));const c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const u=this.measurementsCache.slice(0,c),f=new Array(a).fill(void 0);for(let d=0;d<c;d++){const h=u[d];h&&(f[h.lane]=d)}for(let d=c;d<n;d++){const h=i(d),g=this.laneAssignments.get(d);let p,m;if(g!==void 0&&this.options.lanes>1){p=g;const x=f[p],b=x!==void 0?u[x]:void 0;m=b?b.end+this.options.gap:r+o}else{const x=this.options.lanes===1?u[d-1]:this.getFurthestMeasurement(u,d);m=x?x.end+this.options.gap:r+o,p=x?x.lane:d%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(d,p)}const _=l.get(h),y=typeof _=="number"?_:this.options.estimateSize(d),v=m+y;u[d]={index:d,start:m,size:y,end:v,key:h,lane:p},f[p]=d}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Co(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,o,i)=>this.range=n.length>0&&r>0?kL({measurements:n,outerSize:r,scrollOffset:o,lanes:i}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Co(()=>{let n=null,r=null;const o=this.calculateRange();return o&&(n=o.startIndex,r=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,o,i,s)=>i===null||s===null?[]:n({startIndex:i,endIndex:s,overscan:r,count:o}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,o=n.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const o=this.indexFromElement(n),i=this.measurementsCache[o];if(!i)return;const s=i.key,a=this.elementsCache.get(s);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(s,n)),n.isConnected&&this.resizeItem(o,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const o=this.measurementsCache[n];if(!o)return;const i=this.itemSizeCache.get(o.key)??o.size,s=r-i;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,s,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",s),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,o)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(o))});return}this._measureElement(n,void 0)},this.getVirtualItems=Co(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const o=[];for(let i=0,s=n.length;i<s;i++){const a=n[i],l=r[a];o.push(l)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return Dy(r[tb(0,r.length-1,o=>Dy(r[o]).start,n)])},this.getOffsetForAlignment=(n,r,o=0)=>{const i=this.getSize(),s=this.getScrollOffset();r==="auto"&&(r=n>=s+i?"end":"start"),r==="center"?n+=(o-i)/2:r==="end"&&(n-=i);const a=this.getTotalSize()+this.options.scrollMargin-i;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.measurementsCache[n];if(!o)return;const i=this.getSize(),s=this.getScrollOffset();if(r==="auto")if(o.end>=s+i-this.options.scrollPaddingEnd)r="end";else if(o.start<=s+this.options.scrollPaddingStart)r="start";else return[s,r];const a=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,r,o.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(n,{align:r="auto",behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let i=0;const s=10,a=c=>{if(!this.targetWindow)return;const u=this.getOffsetForIndex(n,c);if(!u){console.warn("Failed to get offset for index:",n);return}const[f,d]=u;this._scrollToOffset(f,{adjustments:void 0,behavior:o}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),g=this.getOffsetForIndex(n,d);if(!g){console.warn("Failed to get offset for index:",n);return}_L(g[0],h)||l(d)})},l=c=>{this.targetWindow&&(i++,i<s?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",i,s),this.targetWindow.requestAnimationFrame(()=>a(c))):console.warn(`Failed to scroll to index ${n} after ${s} attempts.`))};a(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let o;if(r.length===0)o=this.options.paddingStart;else if(this.options.lanes===1)o=((n=r[r.length-1])==null?void 0:n.end)??0;else{const i=Array(this.options.lanes).fill(null);let s=r.length-1;for(;s>=0&&i.some(a=>a===null);){const a=r[s];i[a.lane]===null&&(i[a.lane]=a.end),s--}o=Math.max(...i.filter(a=>a!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:o})=>{this.options.scrollToFn(n,{behavior:o,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const tb=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else if(i>r)t=o-1;else return o}return e>0?e-1:0};function kL({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const o=e.length-1,i=l=>e[l].start;if(e.length<=r)return{startIndex:0,endIndex:o};let s=tb(0,o,i,n),a=s;if(r===1)for(;a<o&&e[a].end<n+t;)a++;else if(r>1){const l=Array(r).fill(0);for(;a<o&&l.some(u=>u<n+t);){const u=e[a];l[u.lane]=u.end,a++}const c=Array(r).fill(n+t);for(;s>=0&&c.some(u=>u>=n);){const u=e[s];c[u.lane]=u.start,s--}s=Math.max(0,s-s%r),a=Math.min(o,a+(r-1-a%r))}return{startIndex:s,endIndex:a}}const zy=typeof document<"u"?N.useLayoutEffect:N.useEffect;function AL(e){const t=N.useReducer(()=>({}),{})[1],n={...e,onChange:(o,i)=>{var s;i?zi.flushSync(t):t(),(s=e.onChange)==null||s.call(e,o,i)}},[r]=N.useState(()=>new RL(n));return r.setOptions(n),zy(()=>r._didMount(),[]),zy(()=>r._willUpdate()),r}function ML(e){return AL({observeElementRect:wL,observeElementOffset:SL,scrollToFn:TL,...e})}const NL="_main_1qx2l_8",Wy={main:NL},nb=C.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:r=100,virtualize:o=!1,maxHeight:i=448},s)=>{const a=C.useRef(null),l=C.useMemo(()=>C.Children.toArray(e),[e]),c=ML({count:l.length,getScrollElement:()=>a.current,estimateSize:()=>r,measureElement:f=>f.getBoundingClientRect().height});return C.useImperativeHandle(s,()=>({scrollToTop:()=>c.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>c.scrollToOffset(c.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(f,d={})=>c.scrollToIndex(f,{behavior:"smooth",...d}),scrollToOffset:(f,d={})=>c.scrollToOffset(f,{behavior:"smooth",...d}),scrollBy:f=>{const d=c.scrollOffset||0;c.scrollToOffset(d+f,{behavior:"smooth"})},getElement:()=>a.current,getScrollOffset:()=>c.scrollOffset||0,getTotalSize:()=>c.getTotalSize()}),[c]),C.useMemo(()=>o||l.length>50,[o,l])&&l.length>0?S.jsx(q,{ref:a,row:n,maxHeight:i,className:z.cx(Wy.main,t),w:"full",p:"var(--spacing-2xl)",children:S.jsx(q,{relative:!0,h:c.getTotalSize(),children:c.getVirtualItems().map(f=>S.jsx(q,{"data-index":f.index,ref:c.measureElement,w:"full",absolute:!0,style:{top:0,left:0,transform:`translateY(${f.start}px)`},children:l[f.index]},f.key))})}):S.jsx(q,{ref:a,className:z.cx(Wy.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:S.jsx(q,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});nb.displayName="ModalMain";const Cl=rv;Cl.Header=eb;Cl.Main=nb;Cl.Footer=ov;const rb=C.createContext(null),PL=()=>C.useContext(rb),_s=({children:e})=>{const[t,n]=C.useState(null),r=PL();return C.useEffect(()=>{if(typeof document>"u")return;const o=r?.current??document.body;if(!o)return;let i=o.querySelector("[data-portal-root]")??void 0;i||(i=document.createElement("div"),i.setAttribute("data-portal-root","true"),o.appendChild(i)),n(i)},[r]),t?zi.createPortal(e,t):null};function ob(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function ar(e,t){return typeof e=="function"?e(t):e}function $t(e,t){return n=>{t.setState(r=>({...r,[e]:ar(n,r[e])}))}}function wl(e){return e instanceof Function}function FL(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function LL(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const s=t(i);s!=null&&s.length&&r(s)})};return r(e),n}function ae(e,t,n){let r=[],o;return i=>{let s;n.key&&n.debug&&(s=Date.now());const a=e(i);if(!(a.length!==r.length||a.some((u,f)=>r[f]!==u)))return o;r=a;let c;if(n.key&&n.debug&&(c=Date.now()),o=t(...a),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-s)*100)/100,f=Math.round((Date.now()-c)*100)/100,d=f/16,h=(g,p)=>{for(g=String(g);g.length<p;)g=" "+g;return g};console.info(`%c⏱ ${h(f,5)} /${h(u,5)} ms`,`
|
|
45
45
|
font-size: .6rem;
|
|
46
46
|
font-weight: bold;
|
|
47
|
-
color: hsl(${Math.max(0,Math.min(120-120*d,120))}deg 100% 31%);`,n?.key)}return o}}function le(e,t,n,r){return{debug:()=>{var o;return(o=e?.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function OL(e,t,n,r){const o=()=>{var s;return(s=i.getValue())!=null?s:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:ae(()=>[e,n,t,i],(s,a,l,c)=>({table:s,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),le(e.options,"debugCells","cell.getContext"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(i,n,t,e)},{}),i}function IL(e,t,n,r){var o,i;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(o=(i=a.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=d=>{let h=d;for(const p of l.split(".")){var g;h=(g=h)==null?void 0:g[p],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${p}" in deeply nested key "${l}" returned undefined.`)}return h}:u=d=>d[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(c)}`,accessorFn:u,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:ae(()=>[!0],()=>{var d;return[f,...(d=f.columns)==null?void 0:d.flatMap(h=>h.getFlatColumns())]},le(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:ae(()=>[e._getOrderColumnsFn()],d=>{var h;if((h=f.columns)!=null&&h.length){let g=f.columns.flatMap(p=>p.getLeafColumns());return d(g)}return[f]},le(e.options,"debugColumns","column.getLeafColumns"))};for(const d of e._features)d.createColumn==null||d.createColumn(f,e);return f}const ht="debugHeaders";function Hy(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(i),s},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(i,e)}),i}const $L={createTable:e=>{e.getHeaderGroups=ae(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,s;const a=(i=r?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?i:[],l=(s=o?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?s:[],c=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(o!=null&&o.includes(f.id)));return Gs(t,[...a,...c,...l],e)},le(e.options,ht,"getHeaderGroups")),e.getCenterHeaderGroups=ae(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),Gs(t,n,e,"center")),le(e.options,ht,"getCenterHeaderGroups")),e.getLeftHeaderGroups=ae(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return Gs(t,i,e,"left")},le(e.options,ht,"getLeftHeaderGroups")),e.getRightHeaderGroups=ae(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return Gs(t,i,e,"right")},le(e.options,ht,"getRightHeaderGroups")),e.getFooterGroups=ae(()=>[e.getHeaderGroups()],t=>[...t].reverse(),le(e.options,ht,"getFooterGroups")),e.getLeftFooterGroups=ae(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),le(e.options,ht,"getLeftFooterGroups")),e.getCenterFooterGroups=ae(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),le(e.options,ht,"getCenterFooterGroups")),e.getRightFooterGroups=ae(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),le(e.options,ht,"getRightFooterGroups")),e.getFlatHeaders=ae(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),le(e.options,ht,"getFlatHeaders")),e.getLeftFlatHeaders=ae(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),le(e.options,ht,"getLeftFlatHeaders")),e.getCenterFlatHeaders=ae(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),le(e.options,ht,"getCenterFlatHeaders")),e.getRightFlatHeaders=ae(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),le(e.options,ht,"getRightFlatHeaders")),e.getCenterLeafHeaders=ae(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),le(e.options,ht,"getCenterLeafHeaders")),e.getLeftLeafHeaders=ae(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),le(e.options,ht,"getLeftLeafHeaders")),e.getRightLeafHeaders=ae(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),le(e.options,ht,"getRightLeafHeaders")),e.getLeafHeaders=ae(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,s,a,l,c;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},le(e.options,ht,"getLeafHeaders"))}};function Gs(e,t,n,r){var o,i;let s=0;const a=function(d,h){h===void 0&&(h=1),s=Math.max(s,h),d.filter(g=>g.getIsVisible()).forEach(g=>{var p;(p=g.columns)!=null&&p.length&&a(g.columns,h+1)},0)};a(e);let l=[];const c=(d,h)=>{const g={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},p=[];d.forEach(m=>{const _=[...p].reverse()[0],y=m.column.depth===g.depth;let v,x=!1;if(y&&m.column.parent?v=m.column.parent:(v=m.column,x=!0),_&&_?.column===v)_.subHeaders.push(m);else{const b=Hy(n,v,{id:[r,h,v.id,m?.id].filter(Boolean).join("_"),isPlaceholder:x,placeholderId:x?`${p.filter(w=>w.column===v).length}`:void 0,depth:h,index:p.length});b.subHeaders.push(m),p.push(b)}g.headers.push(m),m.headerGroup=g}),l.push(g),h>0&&c(p,h-1)},u=t.map((d,h)=>Hy(n,d,{depth:s,index:h}));c(u,s-1),l.reverse();const f=d=>d.filter(g=>g.column.getIsVisible()).map(g=>{let p=0,m=0,_=[0];g.subHeaders&&g.subHeaders.length?(_=[],f(g.subHeaders).forEach(v=>{let{colSpan:x,rowSpan:b}=v;p+=x,_.push(b)})):p=1;const y=Math.min(..._);return m=m+y,g.colSpan=p,g.rowSpan=m,{colSpan:p,rowSpan:m}});return f((o=(i=l[0])==null?void 0:i.headers)!=null?o:[]),l}const DL=(e,t,n,r,o,i,s)=>{let a={id:t,index:r,original:n,depth:o,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>LL(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:ae(()=>[e.getAllLeafColumns()],l=>l.map(c=>OL(e,a,c,c.id)),le(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:ae(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),le(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},VL={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},ib=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};ib.autoRemove=e=>sn(e);const sb=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};sb.autoRemove=e=>sn(e);const ab=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};ab.autoRemove=e=>sn(e);const lb=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};lb.autoRemove=e=>sn(e);const cb=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});cb.autoRemove=e=>sn(e)||!(e!=null&&e.length);const ub=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});ub.autoRemove=e=>sn(e)||!(e!=null&&e.length);const db=(e,t,n)=>e.getValue(t)===n;db.autoRemove=e=>sn(e);const fb=(e,t,n)=>e.getValue(t)==n;fb.autoRemove=e=>sn(e);const uh=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};uh.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(o)?1/0:o;if(i>s){const a=i;i=s,s=a}return[i,s]};uh.autoRemove=e=>sn(e)||sn(e[0])&&sn(e[1]);const $n={includesString:ib,includesStringSensitive:sb,equalsString:ab,arrIncludes:lb,arrIncludesAll:cb,arrIncludesSome:ub,equals:db,weakEquals:fb,inNumberRange:uh};function sn(e){return e==null||e===""}const jL={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:$t("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?$n.includesString:typeof r=="number"?$n.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?$n.equals:Array.isArray(r)?$n.arrIncludes:$n.weakEquals},e.getFilterFn=()=>{var n,r;return wl(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:$n[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r?.find(u=>u.id===e.id),s=ar(n,i?i.value:void 0);if(Ky(o,s,e)){var a;return(a=r?.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:s};if(i){var c;return(c=r?.map(u=>u.id===e.id?l:u))!=null?c:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=ar(t,o))==null?void 0:i.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(Ky(l,s.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Ky(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const BL=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),zL=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},WL=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},HL=(e,t,n)=>{let r,o;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r===void 0?s>=s&&(r=o=s):(r>s&&(r=s),o<s&&(o=s)))}),[r,o]},KL=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},UL=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!FL(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,s)=>i-s);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},GL=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),qL=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,YL=(e,t)=>t.length,zc={sum:BL,min:zL,max:WL,extent:HL,mean:KL,median:UL,unique:GL,uniqueCount:qL,count:YL},XL={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:$t("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return zc.sum;if(Object.prototype.toString.call(r)==="[object Date]")return zc.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return wl(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:zc[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function JL(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(s=>s.id===i)).filter(Boolean),...r]}const ZL={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:$t("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=ae(n=>[Bi(t,n)],n=>n.findIndex(r=>r.id===e.id),le(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=Bi(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Bi(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=ae(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const s=[...t],a=[...o];for(;a.length&&s.length;){const l=s.shift(),c=a.findIndex(u=>u.id===l);c>-1&&i.push(a.splice(c,1)[0])}i=[...i,...a]}return JL(i,n,r)},le(e.options,"debugTable","_getOrderColumnsFn"))}},Wc=()=>({left:[],right:[]}),QL={getInitialState:e=>({columnPinning:Wc(),...e}),getDefaultOptions:e=>({onColumnPinningChange:$t("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,s;if(n==="right"){var a,l;return{left:((a=o?.left)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((l=o?.right)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var c,u;return{left:[...((c=o?.left)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((u=o?.right)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((i=o?.left)!=null?i:[]).filter(f=>!(r!=null&&r.includes(f))),right:((s=o?.right)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,s;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(a=>r?.includes(a)),s=n.some(a=>o?.includes(a));return i?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=ae(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(s=>!i.includes(s.column.id))},le(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=ae(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),le(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=ae(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),le(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?Wc():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Wc())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=ae(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),le(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=ae(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),le(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=ae(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},le(e.options,"debugColumns","getCenterLeafColumns"))}};function eO(e){return e||(typeof document<"u"?document:null)}const qs={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Hc=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),tO={getDefaultColumnDef:()=>qs,getInitialState:e=>({columnSizing:{},columnSizingInfo:Hc(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:$t("columnSizing",e),onColumnSizingInfoChange:$t("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:qs.minSize,(r=i??e.columnDef.size)!=null?r:qs.size),(o=e.columnDef.maxSize)!=null?o:qs.maxSize)},e.getStart=ae(n=>[n,Bi(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),le(t.options,"debugColumns","getStart")),e.getAfter=ae(n=>[n,Bi(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),le(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r?.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),Kc(i)&&i.touches&&i.touches.length>1))return;const s=e.getSize(),a=e?e.getLeafHeaders().map(_=>[_.column.id,_.column.getSize()]):[[r.id,r.getSize()]],l=Kc(i)?Math.round(i.touches[0].clientX):i.clientX,c={},u=(_,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(v=>{var x,b;const w=t.options.columnResizeDirection==="rtl"?-1:1,T=(y-((x=v?.startOffset)!=null?x:0))*w,E=Math.max(T/((b=v?.startSize)!=null?b:0),-.999999);return v.columnSizingStart.forEach(R=>{let[M,O]=R;c[M]=Math.round(Math.max(O+O*E,0)*100)/100}),{...v,deltaOffset:T,deltaPercentage:E}}),(t.options.columnResizeMode==="onChange"||_==="end")&&t.setColumnSizing(v=>({...v,...c})))},f=_=>u("move",_),d=_=>{u("end",_),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=eO(n),g={moveHandler:_=>f(_.clientX),upHandler:_=>{h?.removeEventListener("mousemove",g.moveHandler),h?.removeEventListener("mouseup",g.upHandler),d(_.clientX)}},p={moveHandler:_=>(_.cancelable&&(_.preventDefault(),_.stopPropagation()),f(_.touches[0].clientX),!1),upHandler:_=>{var y;h?.removeEventListener("touchmove",p.moveHandler),h?.removeEventListener("touchend",p.upHandler),_.cancelable&&(_.preventDefault(),_.stopPropagation()),d((y=_.touches[0])==null?void 0:y.clientX)}},m=nO()?{passive:!1}:!1;Kc(i)?(h?.addEventListener("touchmove",p.moveHandler,m),h?.addEventListener("touchend",p.upHandler,m)):(h?.addEventListener("mousemove",g.moveHandler,m),h?.addEventListener("mouseup",g.upHandler,m)),t.setColumnSizingInfo(_=>({..._,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Hc():(n=e.initialState.columnSizingInfo)!=null?n:Hc())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let Ys=null;function nO(){if(typeof Ys=="boolean")return Ys;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Ys=e,Ys}function Kc(e){return e.type==="touchstart"}const rO={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:$t("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=ae(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),le(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=ae(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],le(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>ae(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),le(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Bi(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const oO={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},iO={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:$t("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>$n.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return wl(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:$n[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},sO={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:$t("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const s=i.split(".");r=Math.max(r,s.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=r,n=(o=n)!=null?o:!i,!i&&n)return{...s,[e.id]:!0};if(i&&!n){const{[e.id]:a,...l}=s;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},hd=0,gd=10,Uc=()=>({pageIndex:hd,pageSize:gd}),aO={getInitialState:e=>({...e,pagination:{...Uc(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:$t("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>ar(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?Uc():(o=e.initialState.pagination)!=null?o:Uc())},e.setPageIndex=r=>{e.setPagination(o=>{let i=ar(r,o.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,s)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?hd:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:hd)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?gd:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:gd)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,ar(r,o.pageSize)),s=o.pageSize*o.pageIndex,a=Math.floor(s/i);return{...o,pageIndex:a,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let s=ar(r,(i=e.options.pageCount)!=null?i:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...o,pageCount:s}}),e.getPageOptions=ae(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,s)=>s)),o},le(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Gc=()=>({top:[],bottom:[]}),lO={getInitialState:e=>({rowPinning:Gc(),...e}),getDefaultOptions:e=>({onRowPinningChange:$t("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],s=o?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...s,e.id,...i]);t.setRowPinning(l=>{var c,u;if(n==="bottom"){var f,d;return{top:((f=l?.top)!=null?f:[]).filter(p=>!(a!=null&&a.has(p))),bottom:[...((d=l?.bottom)!=null?d:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)]}}if(n==="top"){var h,g;return{top:[...((h=l?.top)!=null?h:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)],bottom:((g=l?.bottom)!=null?g:[]).filter(p=>!(a!=null&&a.has(p)))}}return{top:((c=l?.top)!=null?c:[]).filter(p=>!(a!=null&&a.has(p))),bottom:((u=l?.bottom)!=null?u:[]).filter(p=>!(a!=null&&a.has(p)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(a=>r?.includes(a)),s=n.some(a=>o?.includes(a));return i?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(s=>{let{id:a}=s;return a});return(r=i?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?Gc():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Gc())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(s=>{const a=e.getRow(s,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(s=>t.find(a=>a.id===s))).filter(Boolean).map(s=>({...s,position:r}))},e.getTopRows=ae(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),le(e.options,"debugRows","getTopRows")),e.getBottomRows=ae(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),le(e.options,"debugRows","getBottomRows")),e.getCenterRows=ae(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},le(e.options,"debugRows","getCenterRows"))}},cO={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:$t("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{pd(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=ae(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?qc(e,n):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=ae(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?qc(e,n):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=ae(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?qc(e,n):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var s;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const a={...i};return pd(a,e.id,n,(s=r?.selectChildren)!=null?s:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return dh(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return md(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return md(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},pd=(e,t,n,r,o)=>{var i;const s=o.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=s.subRows)!=null&&i.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>pd(e,a.id,n,r,o))};function qc(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(s,a){return s.map(l=>{var c;const u=dh(l,n);if(u&&(r.push(l),o[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:i(l.subRows)}),u)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function dh(e,t){var n;return(n=t[e.id])!=null?n:!1}function md(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(s=>{if(!(i&&!o)&&(s.getCanSelect()&&(dh(s,t)?i=!0:o=!1),s.subRows&&s.subRows.length)){const a=md(s,t);a==="all"?i=!0:(a==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const yd=/([0-9]+)/gm,uO=(e,t,n)=>hb(br(e.getValue(n)).toLowerCase(),br(t.getValue(n)).toLowerCase()),dO=(e,t,n)=>hb(br(e.getValue(n)),br(t.getValue(n))),fO=(e,t,n)=>fh(br(e.getValue(n)).toLowerCase(),br(t.getValue(n)).toLowerCase()),hO=(e,t,n)=>fh(br(e.getValue(n)),br(t.getValue(n))),gO=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},pO=(e,t,n)=>fh(e.getValue(n),t.getValue(n));function fh(e,t){return e===t?0:e>t?1:-1}function br(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function hb(e,t){const n=e.split(yd).filter(Boolean),r=t.split(yd).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),s=parseInt(o,10),a=parseInt(i,10),l=[s,a].sort();if(isNaN(l[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-r.length}const Ei={alphanumeric:uO,alphanumericCaseSensitive:dO,text:fO,textCaseSensitive:hO,datetime:gO,basic:pO},mO={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:$t("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return Ei.datetime;if(typeof i=="string"&&(r=!0,i.split(yd).length>1))return Ei.alphanumeric}return r?Ei.text:Ei.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return wl(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Ei[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(s=>{const a=s?.find(h=>h.id===e.id),l=s?.findIndex(h=>h.id===e.id);let c=[],u,f=i?n:o==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?a?u="toggle":u="add":s!=null&&s.length&&l!==s.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(i||o||(u="remove")),u==="add"){var d;c=[...s,{id:e.id,desc:f}],c.splice(0,c.length-((d=t.options.maxMultiSortColCount)!=null?d:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=s.map(h=>h.id===e.id?{...h,desc:f}:h):u==="remove"?c=s.filter(h=>h.id!==e.id):c=[{id:e.id,desc:f}];return c})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:s==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},yO=[$L,rO,ZL,QL,VL,jL,oO,iO,mO,XL,sO,aO,lO,cO,tO];function vO(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...yO,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((d,h)=>Object.assign(d,h.getDefaultOptions==null?void 0:h.getDefaultOptions(o)),{}),s=d=>o.options.mergeOptions?o.options.mergeOptions(i,d):{...i,...d};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(d=>{var h;l=(h=d.getInitialState==null?void 0:d.getInitialState(l))!=null?h:l});const c=[];let u=!1;const f={_features:r,options:{...i,...e},initialState:l,_queue:d=>{c.push(d),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{o.setState(o.initialState)},setOptions:d=>{const h=ar(d,o.options);o.options=s(h)},getState:()=>o.options.state,setState:d=>{o.options.onStateChange==null||o.options.onStateChange(d)},_getRowId:(d,h,g)=>{var p;return(p=o.options.getRowId==null?void 0:o.options.getRowId(d,h,g))!=null?p:`${g?[g.id,h].join("."):h}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(d,h)=>{let g=(h?o.getPrePaginationRowModel():o.getRowModel()).rowsById[d];if(!g&&(g=o.getCoreRowModel().rowsById[d],!g))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${d}`):new Error;return g},_getDefaultColumnDef:ae(()=>[o.options.defaultColumn],d=>{var h;return d=(h=d)!=null?h:{},{header:g=>{const p=g.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:g=>{var p,m;return(p=(m=g.renderValue())==null||m.toString==null?void 0:m.toString())!=null?p:null},...o._features.reduce((g,p)=>Object.assign(g,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...d}},le(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:ae(()=>[o._getColumnDefs()],d=>{const h=function(g,p,m){return m===void 0&&(m=0),g.map(_=>{const y=IL(o,_,m,p),v=_;return y.columns=v.columns?h(v.columns,y,m+1):[],y})};return h(d)},le(e,"debugColumns","getAllColumns")),getAllFlatColumns:ae(()=>[o.getAllColumns()],d=>d.flatMap(h=>h.getFlatColumns()),le(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:ae(()=>[o.getAllFlatColumns()],d=>d.reduce((h,g)=>(h[g.id]=g,h),{}),le(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:ae(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(d,h)=>{let g=d.flatMap(p=>p.getLeafColumns());return h(g)},le(e,"debugColumns","getAllLeafColumns")),getColumn:d=>{const h=o._getAllFlatColumnsById()[d];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${d}' does not exist.`),h}};Object.assign(o,f);for(let d=0;d<o._features.length;d++){const h=o._features[d];h==null||h.createTable==null||h.createTable(o)}return o}function _O(){return e=>ae(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,s){i===void 0&&(i=0);const a=[];for(let c=0;c<o.length;c++){const u=DL(e,e._getRowId(o[c],c,s),o[c],c,i,void 0,s?.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(o[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=r(u.originalSubRows,i+1,u))}}return a};return n.rows=r(t),n},le(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function xO(e){const t=[],n=r=>{var o;t.push(r),(o=r.subRows)!=null&&o.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function bO(e){return t=>ae(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:o,pageIndex:i}=n;let{rows:s,flatRows:a,rowsById:l}=r;const c=o*i,u=c+o;s=s.slice(c,u);let f;t.options.paginateExpandedRows?f={rows:s,flatRows:a,rowsById:l}:f=xO({rows:s,flatRows:a,rowsById:l}),f.flatRows=[];const d=h=>{f.flatRows.push(h),h.subRows.length&&h.subRows.forEach(d)};return f.rows.forEach(d),f},le(t.options,"debugTable","getPaginationRowModel"))}function CO(){return e=>ae(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],i=r.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),s={};i.forEach(l=>{const c=e.getColumn(l.id);c&&(s[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=l.map(u=>({...u}));return c.sort((u,f)=>{for(let h=0;h<i.length;h+=1){var d;const g=i[h],p=s[g.id],m=p.sortUndefined,_=(d=g?.desc)!=null?d:!1;let y=0;if(m){const v=u.getValue(g.id),x=f.getValue(g.id),b=v===void 0,w=x===void 0;if(b||w){if(m==="first")return b?-1:1;if(m==="last")return b?1:-1;y=b&&w?0:b?m:-m}}if(y===0&&(y=p.sortingFn(u,f,g.id)),y!==0)return _&&(y*=-1),p.invertSorting&&(y*=-1),y}return u.index-f.index}),c.forEach(u=>{var f;o.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:o,rowsById:n.rowsById}},le(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function Uy(e,t){return e?wO(e)?N.createElement(e,t):e:null}function wO(e){return SO(e)||typeof e=="function"||EO(e)}function SO(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function EO(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function TO(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=N.useState(()=>({current:vO(t)})),[r,o]=N.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:s=>{o(s),e.onStateChange==null||e.onStateChange(s)}})),n.current}const RO=e=>N.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("style",null,`
|
|
48
|
-
@keyframes spin {
|
|
49
|
-
from {
|
|
50
|
-
transform: rotate(0deg)
|
|
51
|
-
}
|
|
52
|
-
to {
|
|
53
|
-
transform: rotate(360deg)
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
.spinner {
|
|
57
|
-
transform-origin: center
|
|
58
|
-
animation: spin 1s linear infinite
|
|
59
|
-
}
|
|
47
|
+
color: hsl(${Math.max(0,Math.min(120-120*d,120))}deg 100% 31%);`,n?.key)}return o}}function le(e,t,n,r){return{debug:()=>{var o;return(o=e?.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function OL(e,t,n,r){const o=()=>{var s;return(s=i.getValue())!=null?s:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:ae(()=>[e,n,t,i],(s,a,l,c)=>({table:s,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),le(e.options,"debugCells","cell.getContext"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(i,n,t,e)},{}),i}function IL(e,t,n,r){var o,i;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(o=(i=a.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=d=>{let h=d;for(const p of l.split(".")){var g;h=(g=h)==null?void 0:g[p],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${p}" in deeply nested key "${l}" returned undefined.`)}return h}:u=d=>d[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(c)}`,accessorFn:u,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:ae(()=>[!0],()=>{var d;return[f,...(d=f.columns)==null?void 0:d.flatMap(h=>h.getFlatColumns())]},le(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:ae(()=>[e._getOrderColumnsFn()],d=>{var h;if((h=f.columns)!=null&&h.length){let g=f.columns.flatMap(p=>p.getLeafColumns());return d(g)}return[f]},le(e.options,"debugColumns","column.getLeafColumns"))};for(const d of e._features)d.createColumn==null||d.createColumn(f,e);return f}const ht="debugHeaders";function Hy(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(i),s},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(i,e)}),i}const $L={createTable:e=>{e.getHeaderGroups=ae(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,s;const a=(i=r?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?i:[],l=(s=o?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?s:[],c=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(o!=null&&o.includes(f.id)));return Gs(t,[...a,...c,...l],e)},le(e.options,ht,"getHeaderGroups")),e.getCenterHeaderGroups=ae(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),Gs(t,n,e,"center")),le(e.options,ht,"getCenterHeaderGroups")),e.getLeftHeaderGroups=ae(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return Gs(t,i,e,"left")},le(e.options,ht,"getLeftHeaderGroups")),e.getRightHeaderGroups=ae(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return Gs(t,i,e,"right")},le(e.options,ht,"getRightHeaderGroups")),e.getFooterGroups=ae(()=>[e.getHeaderGroups()],t=>[...t].reverse(),le(e.options,ht,"getFooterGroups")),e.getLeftFooterGroups=ae(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),le(e.options,ht,"getLeftFooterGroups")),e.getCenterFooterGroups=ae(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),le(e.options,ht,"getCenterFooterGroups")),e.getRightFooterGroups=ae(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),le(e.options,ht,"getRightFooterGroups")),e.getFlatHeaders=ae(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),le(e.options,ht,"getFlatHeaders")),e.getLeftFlatHeaders=ae(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),le(e.options,ht,"getLeftFlatHeaders")),e.getCenterFlatHeaders=ae(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),le(e.options,ht,"getCenterFlatHeaders")),e.getRightFlatHeaders=ae(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),le(e.options,ht,"getRightFlatHeaders")),e.getCenterLeafHeaders=ae(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),le(e.options,ht,"getCenterLeafHeaders")),e.getLeftLeafHeaders=ae(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),le(e.options,ht,"getLeftLeafHeaders")),e.getRightLeafHeaders=ae(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),le(e.options,ht,"getRightLeafHeaders")),e.getLeafHeaders=ae(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,s,a,l,c;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},le(e.options,ht,"getLeafHeaders"))}};function Gs(e,t,n,r){var o,i;let s=0;const a=function(d,h){h===void 0&&(h=1),s=Math.max(s,h),d.filter(g=>g.getIsVisible()).forEach(g=>{var p;(p=g.columns)!=null&&p.length&&a(g.columns,h+1)},0)};a(e);let l=[];const c=(d,h)=>{const g={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},p=[];d.forEach(m=>{const _=[...p].reverse()[0],y=m.column.depth===g.depth;let v,x=!1;if(y&&m.column.parent?v=m.column.parent:(v=m.column,x=!0),_&&_?.column===v)_.subHeaders.push(m);else{const b=Hy(n,v,{id:[r,h,v.id,m?.id].filter(Boolean).join("_"),isPlaceholder:x,placeholderId:x?`${p.filter(w=>w.column===v).length}`:void 0,depth:h,index:p.length});b.subHeaders.push(m),p.push(b)}g.headers.push(m),m.headerGroup=g}),l.push(g),h>0&&c(p,h-1)},u=t.map((d,h)=>Hy(n,d,{depth:s,index:h}));c(u,s-1),l.reverse();const f=d=>d.filter(g=>g.column.getIsVisible()).map(g=>{let p=0,m=0,_=[0];g.subHeaders&&g.subHeaders.length?(_=[],f(g.subHeaders).forEach(v=>{let{colSpan:x,rowSpan:b}=v;p+=x,_.push(b)})):p=1;const y=Math.min(..._);return m=m+y,g.colSpan=p,g.rowSpan=m,{colSpan:p,rowSpan:m}});return f((o=(i=l[0])==null?void 0:i.headers)!=null?o:[]),l}const DL=(e,t,n,r,o,i,s)=>{let a={id:t,index:r,original:n,depth:o,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>LL(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:ae(()=>[e.getAllLeafColumns()],l=>l.map(c=>OL(e,a,c,c.id)),le(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:ae(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),le(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},VL={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},ib=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};ib.autoRemove=e=>sn(e);const sb=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};sb.autoRemove=e=>sn(e);const ab=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};ab.autoRemove=e=>sn(e);const lb=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};lb.autoRemove=e=>sn(e);const cb=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});cb.autoRemove=e=>sn(e)||!(e!=null&&e.length);const ub=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});ub.autoRemove=e=>sn(e)||!(e!=null&&e.length);const db=(e,t,n)=>e.getValue(t)===n;db.autoRemove=e=>sn(e);const fb=(e,t,n)=>e.getValue(t)==n;fb.autoRemove=e=>sn(e);const uh=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};uh.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(o)?1/0:o;if(i>s){const a=i;i=s,s=a}return[i,s]};uh.autoRemove=e=>sn(e)||sn(e[0])&&sn(e[1]);const $n={includesString:ib,includesStringSensitive:sb,equalsString:ab,arrIncludes:lb,arrIncludesAll:cb,arrIncludesSome:ub,equals:db,weakEquals:fb,inNumberRange:uh};function sn(e){return e==null||e===""}const jL={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:$t("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?$n.includesString:typeof r=="number"?$n.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?$n.equals:Array.isArray(r)?$n.arrIncludes:$n.weakEquals},e.getFilterFn=()=>{var n,r;return wl(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:$n[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r?.find(u=>u.id===e.id),s=ar(n,i?i.value:void 0);if(Ky(o,s,e)){var a;return(a=r?.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:s};if(i){var c;return(c=r?.map(u=>u.id===e.id?l:u))!=null?c:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=ar(t,o))==null?void 0:i.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(Ky(l,s.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Ky(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const BL=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),zL=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},WL=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},HL=(e,t,n)=>{let r,o;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r===void 0?s>=s&&(r=o=s):(r>s&&(r=s),o<s&&(o=s)))}),[r,o]},KL=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},UL=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!FL(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,s)=>i-s);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},GL=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),qL=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,YL=(e,t)=>t.length,zc={sum:BL,min:zL,max:WL,extent:HL,mean:KL,median:UL,unique:GL,uniqueCount:qL,count:YL},XL={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:$t("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return zc.sum;if(Object.prototype.toString.call(r)==="[object Date]")return zc.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return wl(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:zc[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function JL(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(s=>s.id===i)).filter(Boolean),...r]}const ZL={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:$t("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=ae(n=>[Bi(t,n)],n=>n.findIndex(r=>r.id===e.id),le(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=Bi(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Bi(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=ae(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const s=[...t],a=[...o];for(;a.length&&s.length;){const l=s.shift(),c=a.findIndex(u=>u.id===l);c>-1&&i.push(a.splice(c,1)[0])}i=[...i,...a]}return JL(i,n,r)},le(e.options,"debugTable","_getOrderColumnsFn"))}},Wc=()=>({left:[],right:[]}),QL={getInitialState:e=>({columnPinning:Wc(),...e}),getDefaultOptions:e=>({onColumnPinningChange:$t("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,s;if(n==="right"){var a,l;return{left:((a=o?.left)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((l=o?.right)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var c,u;return{left:[...((c=o?.left)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((u=o?.right)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((i=o?.left)!=null?i:[]).filter(f=>!(r!=null&&r.includes(f))),right:((s=o?.right)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,s;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(a=>r?.includes(a)),s=n.some(a=>o?.includes(a));return i?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=ae(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(s=>!i.includes(s.column.id))},le(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=ae(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),le(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=ae(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),le(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?Wc():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Wc())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=ae(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),le(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=ae(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),le(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=ae(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},le(e.options,"debugColumns","getCenterLeafColumns"))}};function eO(e){return e||(typeof document<"u"?document:null)}const qs={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Hc=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),tO={getDefaultColumnDef:()=>qs,getInitialState:e=>({columnSizing:{},columnSizingInfo:Hc(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:$t("columnSizing",e),onColumnSizingInfoChange:$t("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:qs.minSize,(r=i??e.columnDef.size)!=null?r:qs.size),(o=e.columnDef.maxSize)!=null?o:qs.maxSize)},e.getStart=ae(n=>[n,Bi(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),le(t.options,"debugColumns","getStart")),e.getAfter=ae(n=>[n,Bi(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),le(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r?.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),Kc(i)&&i.touches&&i.touches.length>1))return;const s=e.getSize(),a=e?e.getLeafHeaders().map(_=>[_.column.id,_.column.getSize()]):[[r.id,r.getSize()]],l=Kc(i)?Math.round(i.touches[0].clientX):i.clientX,c={},u=(_,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(v=>{var x,b;const w=t.options.columnResizeDirection==="rtl"?-1:1,T=(y-((x=v?.startOffset)!=null?x:0))*w,E=Math.max(T/((b=v?.startSize)!=null?b:0),-.999999);return v.columnSizingStart.forEach(R=>{let[M,O]=R;c[M]=Math.round(Math.max(O+O*E,0)*100)/100}),{...v,deltaOffset:T,deltaPercentage:E}}),(t.options.columnResizeMode==="onChange"||_==="end")&&t.setColumnSizing(v=>({...v,...c})))},f=_=>u("move",_),d=_=>{u("end",_),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=eO(n),g={moveHandler:_=>f(_.clientX),upHandler:_=>{h?.removeEventListener("mousemove",g.moveHandler),h?.removeEventListener("mouseup",g.upHandler),d(_.clientX)}},p={moveHandler:_=>(_.cancelable&&(_.preventDefault(),_.stopPropagation()),f(_.touches[0].clientX),!1),upHandler:_=>{var y;h?.removeEventListener("touchmove",p.moveHandler),h?.removeEventListener("touchend",p.upHandler),_.cancelable&&(_.preventDefault(),_.stopPropagation()),d((y=_.touches[0])==null?void 0:y.clientX)}},m=nO()?{passive:!1}:!1;Kc(i)?(h?.addEventListener("touchmove",p.moveHandler,m),h?.addEventListener("touchend",p.upHandler,m)):(h?.addEventListener("mousemove",g.moveHandler,m),h?.addEventListener("mouseup",g.upHandler,m)),t.setColumnSizingInfo(_=>({..._,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Hc():(n=e.initialState.columnSizingInfo)!=null?n:Hc())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let Ys=null;function nO(){if(typeof Ys=="boolean")return Ys;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Ys=e,Ys}function Kc(e){return e.type==="touchstart"}const rO={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:$t("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=ae(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),le(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=ae(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],le(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>ae(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),le(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Bi(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const oO={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},iO={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:$t("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>$n.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return wl(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:$n[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},sO={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:$t("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const s=i.split(".");r=Math.max(r,s.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=r,n=(o=n)!=null?o:!i,!i&&n)return{...s,[e.id]:!0};if(i&&!n){const{[e.id]:a,...l}=s;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},hd=0,gd=10,Uc=()=>({pageIndex:hd,pageSize:gd}),aO={getInitialState:e=>({...e,pagination:{...Uc(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:$t("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>ar(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?Uc():(o=e.initialState.pagination)!=null?o:Uc())},e.setPageIndex=r=>{e.setPagination(o=>{let i=ar(r,o.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,s)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?hd:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:hd)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?gd:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:gd)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,ar(r,o.pageSize)),s=o.pageSize*o.pageIndex,a=Math.floor(s/i);return{...o,pageIndex:a,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let s=ar(r,(i=e.options.pageCount)!=null?i:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...o,pageCount:s}}),e.getPageOptions=ae(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,s)=>s)),o},le(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Gc=()=>({top:[],bottom:[]}),lO={getInitialState:e=>({rowPinning:Gc(),...e}),getDefaultOptions:e=>({onRowPinningChange:$t("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],s=o?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...s,e.id,...i]);t.setRowPinning(l=>{var c,u;if(n==="bottom"){var f,d;return{top:((f=l?.top)!=null?f:[]).filter(p=>!(a!=null&&a.has(p))),bottom:[...((d=l?.bottom)!=null?d:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)]}}if(n==="top"){var h,g;return{top:[...((h=l?.top)!=null?h:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)],bottom:((g=l?.bottom)!=null?g:[]).filter(p=>!(a!=null&&a.has(p)))}}return{top:((c=l?.top)!=null?c:[]).filter(p=>!(a!=null&&a.has(p))),bottom:((u=l?.bottom)!=null?u:[]).filter(p=>!(a!=null&&a.has(p)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(a=>r?.includes(a)),s=n.some(a=>o?.includes(a));return i?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(s=>{let{id:a}=s;return a});return(r=i?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?Gc():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Gc())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(s=>{const a=e.getRow(s,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(s=>t.find(a=>a.id===s))).filter(Boolean).map(s=>({...s,position:r}))},e.getTopRows=ae(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),le(e.options,"debugRows","getTopRows")),e.getBottomRows=ae(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),le(e.options,"debugRows","getBottomRows")),e.getCenterRows=ae(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},le(e.options,"debugRows","getCenterRows"))}},cO={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:$t("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{pd(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=ae(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?qc(e,n):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=ae(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?qc(e,n):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=ae(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?qc(e,n):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var s;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const a={...i};return pd(a,e.id,n,(s=r?.selectChildren)!=null?s:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return dh(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return md(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return md(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},pd=(e,t,n,r,o)=>{var i;const s=o.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=s.subRows)!=null&&i.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>pd(e,a.id,n,r,o))};function qc(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(s,a){return s.map(l=>{var c;const u=dh(l,n);if(u&&(r.push(l),o[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:i(l.subRows)}),u)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function dh(e,t){var n;return(n=t[e.id])!=null?n:!1}function md(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(s=>{if(!(i&&!o)&&(s.getCanSelect()&&(dh(s,t)?i=!0:o=!1),s.subRows&&s.subRows.length)){const a=md(s,t);a==="all"?i=!0:(a==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const yd=/([0-9]+)/gm,uO=(e,t,n)=>hb(br(e.getValue(n)).toLowerCase(),br(t.getValue(n)).toLowerCase()),dO=(e,t,n)=>hb(br(e.getValue(n)),br(t.getValue(n))),fO=(e,t,n)=>fh(br(e.getValue(n)).toLowerCase(),br(t.getValue(n)).toLowerCase()),hO=(e,t,n)=>fh(br(e.getValue(n)),br(t.getValue(n))),gO=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},pO=(e,t,n)=>fh(e.getValue(n),t.getValue(n));function fh(e,t){return e===t?0:e>t?1:-1}function br(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function hb(e,t){const n=e.split(yd).filter(Boolean),r=t.split(yd).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),s=parseInt(o,10),a=parseInt(i,10),l=[s,a].sort();if(isNaN(l[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-r.length}const Ei={alphanumeric:uO,alphanumericCaseSensitive:dO,text:fO,textCaseSensitive:hO,datetime:gO,basic:pO},mO={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:$t("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return Ei.datetime;if(typeof i=="string"&&(r=!0,i.split(yd).length>1))return Ei.alphanumeric}return r?Ei.text:Ei.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return wl(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Ei[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(s=>{const a=s?.find(h=>h.id===e.id),l=s?.findIndex(h=>h.id===e.id);let c=[],u,f=i?n:o==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?a?u="toggle":u="add":s!=null&&s.length&&l!==s.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(i||o||(u="remove")),u==="add"){var d;c=[...s,{id:e.id,desc:f}],c.splice(0,c.length-((d=t.options.maxMultiSortColCount)!=null?d:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=s.map(h=>h.id===e.id?{...h,desc:f}:h):u==="remove"?c=s.filter(h=>h.id!==e.id):c=[{id:e.id,desc:f}];return c})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:s==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},yO=[$L,rO,ZL,QL,VL,jL,oO,iO,mO,XL,sO,aO,lO,cO,tO];function vO(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...yO,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((d,h)=>Object.assign(d,h.getDefaultOptions==null?void 0:h.getDefaultOptions(o)),{}),s=d=>o.options.mergeOptions?o.options.mergeOptions(i,d):{...i,...d};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(d=>{var h;l=(h=d.getInitialState==null?void 0:d.getInitialState(l))!=null?h:l});const c=[];let u=!1;const f={_features:r,options:{...i,...e},initialState:l,_queue:d=>{c.push(d),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{o.setState(o.initialState)},setOptions:d=>{const h=ar(d,o.options);o.options=s(h)},getState:()=>o.options.state,setState:d=>{o.options.onStateChange==null||o.options.onStateChange(d)},_getRowId:(d,h,g)=>{var p;return(p=o.options.getRowId==null?void 0:o.options.getRowId(d,h,g))!=null?p:`${g?[g.id,h].join("."):h}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(d,h)=>{let g=(h?o.getPrePaginationRowModel():o.getRowModel()).rowsById[d];if(!g&&(g=o.getCoreRowModel().rowsById[d],!g))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${d}`):new Error;return g},_getDefaultColumnDef:ae(()=>[o.options.defaultColumn],d=>{var h;return d=(h=d)!=null?h:{},{header:g=>{const p=g.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:g=>{var p,m;return(p=(m=g.renderValue())==null||m.toString==null?void 0:m.toString())!=null?p:null},...o._features.reduce((g,p)=>Object.assign(g,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...d}},le(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:ae(()=>[o._getColumnDefs()],d=>{const h=function(g,p,m){return m===void 0&&(m=0),g.map(_=>{const y=IL(o,_,m,p),v=_;return y.columns=v.columns?h(v.columns,y,m+1):[],y})};return h(d)},le(e,"debugColumns","getAllColumns")),getAllFlatColumns:ae(()=>[o.getAllColumns()],d=>d.flatMap(h=>h.getFlatColumns()),le(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:ae(()=>[o.getAllFlatColumns()],d=>d.reduce((h,g)=>(h[g.id]=g,h),{}),le(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:ae(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(d,h)=>{let g=d.flatMap(p=>p.getLeafColumns());return h(g)},le(e,"debugColumns","getAllLeafColumns")),getColumn:d=>{const h=o._getAllFlatColumnsById()[d];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${d}' does not exist.`),h}};Object.assign(o,f);for(let d=0;d<o._features.length;d++){const h=o._features[d];h==null||h.createTable==null||h.createTable(o)}return o}function _O(){return e=>ae(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,s){i===void 0&&(i=0);const a=[];for(let c=0;c<o.length;c++){const u=DL(e,e._getRowId(o[c],c,s),o[c],c,i,void 0,s?.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(o[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=r(u.originalSubRows,i+1,u))}}return a};return n.rows=r(t),n},le(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function xO(e){const t=[],n=r=>{var o;t.push(r),(o=r.subRows)!=null&&o.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function bO(e){return t=>ae(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:o,pageIndex:i}=n;let{rows:s,flatRows:a,rowsById:l}=r;const c=o*i,u=c+o;s=s.slice(c,u);let f;t.options.paginateExpandedRows?f={rows:s,flatRows:a,rowsById:l}:f=xO({rows:s,flatRows:a,rowsById:l}),f.flatRows=[];const d=h=>{f.flatRows.push(h),h.subRows.length&&h.subRows.forEach(d)};return f.rows.forEach(d),f},le(t.options,"debugTable","getPaginationRowModel"))}function CO(){return e=>ae(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],i=r.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),s={};i.forEach(l=>{const c=e.getColumn(l.id);c&&(s[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=l.map(u=>({...u}));return c.sort((u,f)=>{for(let h=0;h<i.length;h+=1){var d;const g=i[h],p=s[g.id],m=p.sortUndefined,_=(d=g?.desc)!=null?d:!1;let y=0;if(m){const v=u.getValue(g.id),x=f.getValue(g.id),b=v===void 0,w=x===void 0;if(b||w){if(m==="first")return b?-1:1;if(m==="last")return b?1:-1;y=b&&w?0:b?m:-m}}if(y===0&&(y=p.sortingFn(u,f,g.id)),y!==0)return _&&(y*=-1),p.invertSorting&&(y*=-1),y}return u.index-f.index}),c.forEach(u=>{var f;o.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:o,rowsById:n.rowsById}},le(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function Uy(e,t){return e?wO(e)?N.createElement(e,t):e:null}function wO(e){return SO(e)||typeof e=="function"||EO(e)}function SO(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function EO(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function TO(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=N.useState(()=>({current:vO(t)})),[r,o]=N.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:s=>{o(s),e.onStateChange==null||e.onStateChange(s)}})),n.current}const RO=e=>N.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("style",null,`\r
|
|
48
|
+
@keyframes spin {\r
|
|
49
|
+
from {\r
|
|
50
|
+
transform: rotate(0deg);\r
|
|
51
|
+
}\r
|
|
52
|
+
to {\r
|
|
53
|
+
transform: rotate(360deg);\r
|
|
54
|
+
}\r
|
|
55
|
+
}\r
|
|
56
|
+
.spinner {\r
|
|
57
|
+
transform-origin: center;\r
|
|
58
|
+
animation: spin 1s linear infinite;\r
|
|
59
|
+
}\r
|
|
60
60
|
`),N.createElement("g",{className:"spinner"},N.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}),N.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"}))),kO=e=>N.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("g",{clipPath:"url(#clip0_2074_3858)"},N.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"})),N.createElement("defs",null,N.createElement("clipPath",{id:"clip0_2074_3858"},N.createElement("rect",{width:24,height:24,fill:"white"})))),AO="_table_19yhs_8",MO={table:AO},gb=C.forwardRef(({children:e,className:t,style:n,...r},o)=>S.jsx("td",{ref:o,className:z.cx(t),style:n,...r,children:e}));gb.displayName="TableBodyCell";const pb=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:r="center",py:o="var(--spacing-sm)",px:i="var(--spacing-md)",minHeight:s="56px",...a},l)=>S.jsx(q,{row:t,justifyContent:n,alignItems:r,py:o,px:i,minHeight:s,ref:l,...a,children:e}));pb.displayName="TableBodyCellContent";const mb=C.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:r=!1,...o},i)=>{const s=z.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return S.jsx("tr",{ref:i,className:z.cx(s,t),...o,children:e})});mb.displayName="TableBodyRow";const NO=C.forwardRef(({children:e,className:t,style:n,justifyContent:r="flex-start",alignItems:o="flex-start",...i},s)=>{const a=z.css({justifyContent:r,alignItems:o,fontWeight:"inherit"});return S.jsx("th",{ref:s,className:z.cx(a,t),style:n,...i,children:e})}),hh=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:r="center",py:o="var(--spacing-sm)",px:i="var(--spacing-md)",minHeight:s="56px",...a},l)=>S.jsx(q,{row:t,justifyContent:n,alignItems:r,py:o,px:i,minHeight:s,ref:l,...a,children:e}));hh.displayName="TableHeadCellContent";const PO=e=>N.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),FO=e=>N.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),LO=({sortDirection:e,gap:t="5px",...n})=>S.jsxs(q,{gap:t,...n,children:[S.jsx(FO,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),S.jsx(PO,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),yb=({children:e,tableProps:t,gap:n="10px",...r})=>{const o=t.column.getIsSorted();return S.jsxs(hh,{style:{cursor:"pointer",userSelect:"none"},gap:n,...r,children:[e,S.jsx(LO,{sortDirection:o})]})};yb.displayName="TableHeadCellContentSortable";const vb=C.forwardRef(({children:e,className:t,showBorders:n=!1,...r},o)=>{const i=z.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return S.jsx("tr",{ref:o,className:z.cx(i,t),...r,children:e})});vb.displayName="TableHeadRow";const OO=e=>N.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),IO=e=>N.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),$O=e=>N.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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"}),N.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"}),N.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"})),Yc=(e,t)=>{const n=t-e+1;return Array.from({length:n},(r,o)=>e+o)};function DO(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=Yc(1,Math.min(o,t)),a=Yc(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]:[],...Yc(l,c),...c<t-o-1?["end-dots"]:t-o>o?[t-o]:[],...a]}const VO=({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=C.useRef(null),[u,f]=C.useState(0),d=Math.ceil(n/t),h=e>0,g=e<d-1;C.useEffect(()=>{const b=c.current;if(!b)return;const w=new ResizeObserver(T=>{for(const E of T)f(E.contentRect.width)});return w.observe(b),()=>{w.disconnect()}},[]);const m=(b=>{if(b<=0)return 1;const M=b-96;if(M<=40)return 1;const O=Math.floor((M+8)/48);return Math.max(1,Math.min(10,O))})(u),_=DO({page:e+1,count:d,maxVisiblePages:m}),y=()=>{h&&r(e-1)},v=()=>{g&&r(e+1)},x=b=>{o(Number(b))};return n===0?null:S.jsxs(q,{flex:1,row:!0,justifyContent:"space-between",children:[S.jsxs(q,{ref:c,flex:1,row:!0,overflow:"hidden",gap:"var(--spacing-sm)",children:[S.jsx(Kn,{onClick:y,disabled:!h,color:"neutral",size:"sm",children:S.jsx(OO,{})}),S.jsx(q,{row:!0,gap:"var(--spacing-sm)",children:_.map(b=>S.jsx(jO,{isDots:b==="start-dots"||b==="end-dots",isCurrentPage:b===e+1,disabled:b==="start-dots"||b==="end-dots",onClick:()=>r(b-1),children:b},b))}),S.jsx(Kn,{color:"neutral",size:"sm",onClick:v,disabled:!g,children:S.jsx(IO,{})})]}),s&&S.jsx(q,{alignItems:"flex-end",children:S.jsx(ch,{width:"fit-content",value:t.toString(),size:"sm",items:i.map(b=>({value:b.toString(),label:b.toString()})),returnedValue:b=>b.value,renderDropdownItem:a,renderSingleInputItem:l,onChange:b=>x(b)})})]})},jO=({children:e,isCurrentPage:t=!1,onClick:n,isDots:r=!1,disabled:o=!1})=>{const i=z.css({cursor:o?"not-allowed":"pointer",userSelect:"none",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t?"var(--fill-accent-secondary)":"var(--fill-bg-secondary)",borderRadius:"var(--corner-sm)",border:t?"1px solid var(--fill-accent-secondary-hover)":"1px solid var(--border-neutral-alpha-basic)"}),s=z.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return S.jsx(q,{className:i,onClick:o?void 0:n,children:r?S.jsx($O,{className:s}):S.jsx(ce,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},BO=z.css({position:"relative",borderRadius:"var(--corner-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%)"}}),zO=z.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--gray-86) var(--gray-96)"}),_b=C.memo(({data:e,children:t,className:n,showBorders:r=!1,...o})=>{const[i,s]=C.useState(!1),[a,l]=C.useState(!1),c=C.useRef(null),u=C.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)},[]);C.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=z.css({border:r?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:i?1:0},"&::after":{opacity:a?1:0}});return S.jsx(q,{className:z.cx(BO,f,n),...o,children:S.jsx(q,{ref:c,className:zO,children:t})})});_b.displayName="TableWrapper";const WO=z.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),HO=z.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"}),gi=({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:_,totalCount:y,loading:v=!1,emptyLabels:x={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:b={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:w,containerClassName:T,tableOptions:E={},onRowClick:R,getRowId:M,headCellComponent:O=NO,bodyCellComponent:D=gb,headRowComponent:I=vb,bodyRowComponent:L=mb,onReset:B,renderPageSizeSelectorDropdownItem:K,renderPageSizeSelectorInputItem:P})=>{const[A,$]=C.useState([]),[H,Q]=C.useState([]),[J,X]=C.useState({}),[se,re]=C.useState({pageIndex:0,pageSize:10}),[he,we]=C.useState({}),te=l??A,ye=u??H,Se=d??J,$e=g??se,ee=m??he,pe=ve=>{const Re=typeof ve=="function"?ve(te):ve;c?c(Re):$(Re)},Ne=ve=>{const Re=typeof ve=="function"?ve(ye):ve;f?f(Re):Q(Re)},Ze=ve=>{const Re=typeof ve=="function"?ve(Se):ve;h?h(Re):X(Re)},Le=ve=>{const Re=typeof ve=="function"?ve($e):ve;p?p(Re):re(Re)},hn=TO({data:t,columns:n,state:{sorting:te,columnFilters:ye,columnVisibility:Se,pagination:$e,rowSelection:ee},onSortingChange:pe,onColumnFiltersChange:Ne,onColumnVisibilityChange:Ze,onPaginationChange:Le,onRowSelectionChange:ve=>{const Re=typeof ve=="function"?ve(ee):ve;_?_(Re):we(Re)},getCoreRowModel:_O(),getSortedRowModel:o?CO():void 0,getPaginationRowModel:i?bO():void 0,enableRowSelection:s,enableMultiRowSelection:a,getRowId:M,manualPagination:!!y,pageCount:y?Math.ceil(y/$e.pageSize):void 0,...E});C.useImperativeHandle(e,()=>hn);const{rows:gn}=hn.getRowModel(),Dt=(ve,Re)=>{R&&R(ve.original,Re)};return v?S.jsxs(q,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:z.cx(T),children:[S.jsx(RO,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),S.jsx(ce,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:b.title}),S.jsx(ce,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:b.description}),typeof b.action=="string"?S.jsx(Go,{width:"auto",onClick:B,intensity:"secondary",color:"accent",children:b.action}):b.action]}):gn.length?S.jsxs(q,{w:"full",gap:"var(--spacing-xl)",className:z.cx(T),children:[S.jsx(_b,{data:t,showBorders:r,children:S.jsxs("table",{className:z.cx(WO,MO.table,w),children:[S.jsx("thead",{className:HO,children:hn.getHeaderGroups().map(ve=>S.jsx(I,{showBorders:r,children:ve.headers.map(Re=>S.jsx(O,{style:{width:Re.getSize()},onClick:Re.column.getToggleSortingHandler(),children:Re.isPlaceholder?null:Uy(Re.column.columnDef.header,Re.getContext())},Re.id))},ve.id))}),S.jsx("tbody",{children:gn.map((ve,Re)=>S.jsx(L,{showBorders:r,isSelected:ve.getIsSelected(),onClick:()=>Dt(ve,Re),children:ve.getVisibleCells().map(Vt=>S.jsx(D,{children:Uy(Vt.column.columnDef.cell,Vt.getContext())},Vt.id))},ve.id))})]})}),i&&!v&&S.jsx(VO,{pageIndex:$e.pageIndex,pageSize:$e.pageSize,totalCount:y||t.length,renderPageSizeSelectorDropdownItem:K,renderPageSizeSelectorInputItem:P,onPageChange:ve=>Le({...$e,pageIndex:ve}),onPageSizeChange:ve=>Le({...$e,pageSize:ve,pageIndex:0})})]}):S.jsxs(q,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:z.cx(T),children:[S.jsx(kO,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),S.jsx(ce,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:x.title}),S.jsx(ce,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:x.description}),typeof x.action=="string"?S.jsx(Go,{width:"auto",onClick:B,intensity:"secondary",color:"accent",children:x.action}):x.action]})};gi.displayName="Table";gi.HeadCellContent=hh;gi.BodyCellContent=pb;gi.HeadCellContentSortable=yb;gi.createColumnHelper=ob;const Xc={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}},KO={positive:{color:"var(--fill-positive-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-positive-tint-high)"],[1,"var(--fill-positive-transparent)"]]}},negative:{color:"var(--fill-negative-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-negative-tint-high)"],[1,"var(--fill-negative-transparent)"]]}},accent:{color:"var(--fill-accent-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-accent-tint-high)"],[1,"var(--fill-accent-transparent)"]]}},warning:{color:"var(--fill-warning-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-warning-tint-high)"],[1,"var(--fill-warning-transparent)"]]}}},UO=(e,t,n,r,o)=>({...Xc,plotOptions:{areaspline:{marker:{enabled:!1,states:{hover:{enabled:o}}},allowPointSelect:!1}},xAxis:{...Xc.xAxis,...n},yAxis:{...Xc.yAxis,...r},series:[{type:"areaspline",data:t,...KO[e]}]}),GO=e=>({outside:!0,enabled:!!e,padding:0,position:{alignByTranslate:!0},shadow:{color:"var(--effect-shadow-m)",offsetX:0,offsetY:0},borderRadius:8,backgroundColor:"var(--fill-bg-primary)",useHTML:!0,...e}),xb=({color:e="positive",data:t=[],xAxis:n,yAxis:r,containerProps:o,highcharts:i,tooltip:s})=>{const a=C.useRef(null);C.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[]);const l=C.useMemo(()=>UO(e,t,n,r,!!s),[e,t,n,r,s]),c=C.useMemo(()=>s?GO(s):{enabled:!1},[s]);return S.jsx(da.Chart,{highcharts:i,ref:a,options:l,containerProps:o,children:S.jsx(da.Tooltip,{...c})})};xb.displayName="LineChart";const qO={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:"var(--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}},YO={positive:{colors:["var(--fill-positive-primary)","var(--fill-positive-tint-high)"]},negative:{colors:["var(--fill-negative-primary)","var(--fill-negative-tint-high)"]},accent:{colors:["var(--fill-accent-primary)","var(--fill-accent-tint-high)"]},warning:{colors:["var(--fill-warning-primary)","var(--fill-warning-tint-high)"]}},XO=(e,t)=>({...qO,series:[{type:"pie",data:[{name:"",y:Math.min(e,100)},{name:"",y:Math.max(100-e,0)}],...YO[t]}]}),bb=C.forwardRef(({highcharts:e,color:t="positive",percentage:n,label:r=s=>`${s}%`,containerProps:o},i)=>{const s=C.useRef(null),a=i||s;C.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[a]);const l=C.useMemo(()=>XO(n,t),[n,t]);return S.jsx(da.Chart,{highcharts:e,ref:a,options:l,containerProps:o,children:S.jsx(da.Title,{children:r?.(n)})})});bb.displayName="PieProgressChart";const JO=e=>N.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ZO="_link_aolvt_8",QO="_separator_aolvt_19",e5="_nav_aolvt_23",ua={link:ZO,separator:QO,nav:e5,"nav-item":"_nav-item_aolvt_29"},gh=({children:e,separator:t=S.jsx(JO,{className:ua.separator})})=>{const n=C.Children.toArray(e).filter(r=>C.isValidElement(r));return S.jsx("nav",{"aria-label":"breadcrumb",className:ua.nav,children:n.map((r,o)=>{const i=o===n.length-1;return S.jsxs(ce,{tag:"span",className:ua["nav-item"],children:[C.cloneElement(r,{active:r.props.active??i}),!i&&t]},o)})})},t5=({children:e,href:t,active:n,className:r,activeClassName:o,activeElement:i,onClick:s})=>n?i||S.jsx(ce,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:z.cx(r,o),onClick:s,children:e}):S.jsx("a",{href:t,className:z.cx(ua.link,r),onClick:s,children:e});gh.Item=t5;gh.displayName="Breadcrumbs";const n5=gh,r5={primary:{bg:"var(--fill-accent-tint)",text:"var(--text-accent)",icon:"var(--icon-accent)"},secondary:{bg:"var(--fill-neutral-tint)",text:"var(--text-secondary)",icon:"var(--icon-tertiary)"},negative:{bg:"var(--fill-negative-tint)",text:"var(--text-negative)",icon:"var(--icon-negative)"},positive:{bg:"var(--fill-positive-tint)",text:"var(--text-positive)",icon:"var(--icon-positive)"},warning:{bg:"var(--fill-warning-tint)",text:"var(--text-warning)",icon:"var(--icon-warning)"},neutral:{bg:"var(--fill-neutral-tint)",text:"var(--text-tertiary)",icon:"var(--icon-tertiary)"},custom:{bg:"var(--fill-accent-tint)",text:"var(--text-accent)",icon:"var(--icon-accent)"}},o5={"2xs":{size:"var(--height-avatar-2xs)",borderRadius:"var(--corner-xs)",iconSize:"var(--height-icon-2xs)",fontSize:"var(--font-size-caption-2)",fontWeight:"var(--font-weight-medium)"},xs:{size:"var(--height-avatar-xs)",borderRadius:"var(--corner-sm)",iconSize:"var(--height-icon-xs)",fontSize:"var(--font-size-caption-1)",fontWeight:"var(--font-weight-medium)"},sm:{size:"var(--height-avatar-sm)",borderRadius:"var(--corner-sm)",iconSize:"var(--height-icon-xs)",fontSize:"var(--font-size-body-2)",fontWeight:"var(--font-weight-medium)"},md:{size:"var(--height-avatar-md)",borderRadius:"var(--corner-sm)",iconSize:"var(--height-icon-sm)",fontSize:"var(--font-size-body-2)",fontWeight:"var(--font-weight-medium)"},lg:{size:"var(--height-avatar-lg)",borderRadius:"var(--corner-md)",iconSize:"var(--height-icon-md)",fontSize:"var(--font-size-body-1)",fontWeight:"var(--font-weight-semibold)"},xl:{size:"var(--height-avatar-xl)",borderRadius:"var(--corner-md)",iconSize:"var(--height-icon-md)",fontSize:"var(--font-size-body-1)",fontWeight:"var(--font-weight-semibold)"},"2xl":{size:"var(--height-avatar-2xl)",borderRadius:"var(--corner-md)",iconSize:"var(--height-icon-md)",fontSize:"var(--font-size-headline-2)",fontWeight:"var(--font-weight-medium)"},custom:{size:"var(--height-avatar-md)",borderRadius:"var(--corner-sm)",iconSize:"var(--height-icon-sm)",fontSize:"var(--font-size-body-2)",fontWeight:"var(--font-weight-medium)"}},Cb=C.forwardRef(({children:e,color:t="primary",size:n="md",fullRound:r=!1,className:o},i)=>{const s=C.useMemo(()=>r5[t],[t]),a=C.useMemo(()=>o5[n],[n]),l=C.useMemo(()=>z.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:"var(--transition-general)","& svg":{width:a.iconSize,height:a.iconSize,color:s.icon,transition:"var(--transition-general)"},"& img":{width:"100%",height:"100%",objectFit:"cover"},"&:has(img)":{backgroundColor:"transparent",border:"1px solid var(--border-neutral-alpha-low)"}}),[s,a,r]);return S.jsx(q,{ref:i,center:!0,overflow:"hidden",className:z.cx(l,o),children:e})});Cb.displayName="Avatar";const vd={neutral:{border:"var(--border-neutral-alpha-low)",bg:"var(--status-neutral-tint)",color:"var(--text-secondary)",colorName:"secondary"},accent:{border:"var(--border-accent-secondary)",bg:"var(--status-accent-tint-low)",color:"var(--text-accent)",colorName:"accent"},warning:{border:"var(--border-warning-secondary)",bg:"var(--status-warning-tint-low)",color:"var(--text-warning)",colorName:"warning"},positive:{border:"var(--border-positive-secondary)",bg:"var(--status-positive-tint-low)",color:"var(--text-positive)",colorName:"positive"},negative:{border:"var(--border-negative-secondary)",bg:"var(--status-negative-tint-low)",color:"var(--text-negative)",colorName:"negative"}},Xs={sm:{h:24,text:"caption-1",corner:"var(--corner-xs)",p:"6px var(--spacing-sm)"},md:{h:32,text:"body-2",corner:"var(--corner-sm)",p:"6px var(--spacing-md)"},lg:{h:40,text:"body-2",corner:"var(--corner-md)",p:"6px var(--spacing-lg)"}},i5=(e,t,n,r)=>{const o=vd[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 z.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})},s5=z.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}}),wb=({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=i5(r,t,s,a);return S.jsxs(q,{row:!0,alignItems:"center",gap:"var(--spacing-sm)",p:Xs[n].p,h:Xs[n].h,overflow:"hidden",borderRadius:Xs[n].corner,onClick:a,className:z.cx(u,c),children:[a&&S.jsx(io,{}),o,S.jsx(ce,{variant:Xs[n].text,colorName:vd[t].colorName,textOverflow:"ellipsis",children:e}),i,l&&!s&&S.jsx(ce,{className:s5,colorName:vd[t].colorName,onClick:f=>{f.stopPropagation(),l(f)},children:S.jsx(J1,{})})]})};wb.displayName="Badge";const a5=e=>N.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),N.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Gy=e=>N.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.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}),N.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"}),N.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"})),l5=e=>N.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),N.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),c5=e=>N.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},N.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"})),u5="_hint_4a6nb_8",d5="_md_4a6nb_19",f5="_sm_4a6nb_24",h5="_icon_4a6nb_29",g5="_content_4a6nb_40",p5="_title_4a6nb_46",m5="_subtitle_4a6nb_51",y5="_disabled_4a6nb_57",v5="_warning_4a6nb_62",_5="_solid_4a6nb_62",x5="_negative_4a6nb_67",b5="_positive_4a6nb_72",C5="_accent_4a6nb_77",w5="_neutral_4a6nb_82",S5="_soft_4a6nb_87",Zt={hint:u5,md:d5,sm:f5,icon:h5,content:g5,title:p5,subtitle:m5,disabled:y5,warning:v5,solid:_5,negative:x5,positive:b5,accent:C5,neutral:w5,soft:S5},E5={negative:S.jsx(l5,{}),positive:S.jsx(a5,{}),accent:S.jsx(Gy,{}),warning:S.jsx(Gy,{}),neutral:S.jsx(c5,{})},T5=({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||E5[n];return S.jsxs("div",{className:Pi(Zt.hint,Zt[n],Zt[r],Zt[o],s&&Zt.disabled,a),style:l,"aria-disabled":s,children:[c&&S.jsx("span",{className:Zt.icon,children:c}),S.jsxs("div",{className:Zt.content,children:[e&&S.jsx(ce,{className:Pi(Zt.title,fa(Zt,"title",o)),variant:o==="md"?"body-1":"caption-2",children:e}),t&&S.jsx(ce,{className:Pi(Zt.subtitle,fa(Zt,"subtitle",o)),variant:o==="md"?"body-2":"caption-1",children:t})]})]})},R5=z.keyframes`
|
|
61
61
|
from {
|
|
62
62
|
opacity: 0;
|