"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4555],{64555:(t,e,i)=>{let s,o;i.d(e,{P:()=>eM});var n=i(94701),r=i(77896),a=i(26666),l=i(94322),h=i(6500),u=i(39622),c=i(29792);function d(t){return[t("x"),t("y")]}var p=i(92419),m=i(39361);function y(t){return t.max-t.min}function g(t,e,i,s=.5){t.origin=s,t.originPoint=(0,m.k)(e.min,e.max,t.origin),t.scale=y(i)/y(e),t.translate=(0,m.k)(i.min,i.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function v(t,e,i,s){g(t.x,e.x,i.x,s?s.originX:void 0),g(t.y,e.y,i.y,s?s.originY:void 0)}function f(t,e,i,s=0){t.min=(s?(0,m.k)(i.min,i.max,s):i.min)+e.min,t.max=t.min+y(e)}function x(t,e,i,s=0){let o=s?(0,m.k)(i.min,i.max,s):i.min;t.min=e.min-o,t.max=t.min+y(e)}function P(t,e,i,s){x(t.x,e.x,i.x,s?.x),x(t.y,e.y,i.y,s?.y)}var T=i(73934),D=i(23781),E=i(68745),w=i(33152),S=i(39719),A=i(51945),R=i(32494),L=i(73142);function k(t){return(0,L.G)(t)&&"ownerSVGElement"in t}var j=i(38561);let B=new WeakMap,V=(t,e,i)=>(s,o)=>o&&o[0]?o[0][t+"Size"]:k(s)&&"getBBox"in s?s.getBBox()[e]:s[i],M=V("inline","width","offsetWidth"),C=V("block","height","offsetHeight");function U({target:t,borderBoxSize:e}){B.get(t)?.forEach(i=>{i(t,{get width(){return M(t,e)},get height(){return C(t,e)}})})}function b(t){t.forEach(U)}let I=new Set;function F(t,e){return"function"==typeof t?(I.add(t),o||(o=()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};I.forEach(e=>e(t))},window.addEventListener("resize",o)),()=>{I.delete(t),I.size||"function"!=typeof o||(window.removeEventListener("resize",o),o=void 0)}):function(t,e){s||"undefined"!=typeof ResizeObserver&&(s=new ResizeObserver(b));let i=(0,j.K)(t);return i.forEach(t=>{let i=B.get(t);i||(i=new Set,B.set(t,i)),i.add(e),s?.observe(t)}),()=>{i.forEach(t=>{let i=B.get(t);i?.delete(e),i?.size||s?.unobserve(t)})}}(t,e)}var O=i(78041),W=i(6833);function G(t,e,i,s){return(0,R.k)(t,e,(0,W.F)(i),s)}let z=({current:t})=>t?t.ownerDocument.defaultView:null;var H=i(96344),N=i(55141),X=i(23656),$=i(27290);let Q=(t,e)=>Math.abs(t-e),q=new Set(["auto","scroll"]);class Y{constructor(t,e,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:n=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=K(this.lastRawMoveEventInfo,this.transformPagePoint));let t=Z(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,i=function(t,e){return Math.sqrt(Q(t.x,e.x)**2+Q(t.y,e.y)**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!i)return;let{point:s}=t,{timestamp:o}=T.uv;this.history.push({...s,timestamp:o});let{onStart:n,onMove:r}=this.handlers;e||(n&&n(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=K(e,this.transformPagePoint),T.Gt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:s,resumeAnimation:o}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&o&&o(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let n=Z("pointercancel"===t.type?this.lastMoveEventInfo:K(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,n),s&&s(t,n)},!(0,N.M)(t))return;this.dragSnapToOrigin=o,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=n,this.contextWindow=s||window;let a=K((0,W.e)(t),this.transformPagePoint),{point:l}=a,{timestamp:h}=T.uv;this.history=[{...l,timestamp:h}];let{onSessionStart:u}=e;u&&u(t,Z(a,this.history)),this.removeListeners=(0,X.F)(G(this.contextWindow,"pointermove",this.handlePointerMove),G(this.contextWindow,"pointerup",this.handlePointerUp),G(this.contextWindow,"pointercancel",this.handlePointerUp)),r&&this.startScrollTracking(r)}startScrollTracking(t){let e=t.parentElement;for(;e;){let t=getComputedStyle(e);(q.has(t.overflowX)||q.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){let e=this.scrollPositions.get(t);if(!e)return;let i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-e.x,y:s.y-e.y};(0!==o.x||0!==o.y)&&(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),T.Gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),(0,T.WG)(this.updatePoint)}}function K(t,e){return e?{point:e(t.point)}:t}function _(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Z({point:t},e){return{point:t,delta:_(t,J(e)),offset:_(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,s=null,o=J(t);for(;i>=0&&(s=t[i],!(o.timestamp-s.timestamp>(0,$.f)(.1)));)i--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&o.timestamp-s.timestamp>2*(0,$.f)(e)&&(s=t[1]);let n=(0,$.X)(o.timestamp-s.timestamp);if(0===n)return{x:0,y:0};let r={x:(o.x-s.x)/n,y:(o.y-s.y)/n};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}(e,.1)}}function J(t){return t[t.length-1]}var tt=i(91225),te=i(48895);function ti(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function ts(t,e){let i=e.min-t.min,s=e.max-t.max;return e.max-e.min{e&&this.snapToCursor((0,W.e)(t).point),this.stopAnimation()},n=(t,e)=>{let{drag:i,dragPropagation:s,onDragStart:o}=this.getProps();if(i&&!s&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(t){if("x"===t||"y"===t)if(c.I[t])return null;else return c.I[t]=!0,()=>{c.I[t]=!1};return c.I.x||c.I.y?null:(c.I.x=c.I.y=!0,()=>{c.I.x=c.I.y=!1})}(i),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),d(t=>{let e=this.getAxisMotionValue(t).get()||0;if(p.KN.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let s=i.layout.layoutBox[t];s&&(e=y(s)*(parseFloat(e)/100))}}this.originPoint[t]=e}),o&&T.Gt.update(()=>o(t,e),!1,!0),(0,D.g)(this.visualElement,"transform");let{animationState:n}=this.visualElement;n&&n.setActive("whileDrag",!0)},r=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;let{dragPropagation:i,dragDirectionLock:s,onDirectionLock:o,onDrag:n}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:r}=e;if(s&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(r),null!==this.currentDirection&&o&&o(this.currentDirection);return}this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),n&&T.Gt.update(()=>n(t,e),!1,!0)},a=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{let{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:h}=this.getProps();this.panSession=new Y(t,{onSessionStart:o,onStart:n,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:i,contextWindow:z(this.visualElement),element:this.visualElement.current})}stop(t,e){let i=t||this.latestPointerEvent,s=e||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;let{velocity:n}=s;this.startAnimation(n);let{onDragEnd:r}=this.getProps();r&&T.Gt.postRender(()=>r(i,s))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,i){let{drag:s}=this.getProps();if(!i||!th(t,s,this.currentDirection))return;let o=this.getAxisMotionValue(t),n=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(n=function(t,{min:e,max:i},s){return void 0!==e&&ti&&(t=s?(0,m.k)(i,t,s.max):Math.min(t,i)),t}(n,this.constraints[t],this.elastic[t])),o.set(n)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&(0,H.X)(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:s,right:o}){return{x:ti(t.x,i,o),y:ti(t.y,e,s)}}(i.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:to(t,"left","right"),y:to(t,"top","bottom")}}(e),s!==this.constraints&&!(0,H.X)(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&d(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){let i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!(0,H.X)(e))return!1;let s=e.current;(0,O.V)(null!==s,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:o}=this.visualElement;if(!o||!o.layout)return!1;let n=(0,E.L)(s,o.root,this.visualElement.getTransformPagePoint()),r=(t=o.layout.layoutBox,{x:ts(t.x,n.x),y:ts(t.y,n.y)});if(i){let t=i((0,w.pA)(r));this.hasMutatedConstraints=!!t,t&&(r=(0,w.FY)(t))}return r}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:n,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{};return Promise.all(d(r=>{if(!th(r,e,this.currentDirection))return;let l=a&&a[r]||{};(!0===n||n===r)&&(l={min:0,max:0});let h={type:"inertia",velocity:i?t[r]:0,bounceStiffness:s?200:1e6,bounceDamping:s?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(r,h)})).then(r)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return(0,D.g)(this.visualElement,t),i.start((0,S.f)(t,i,0,e,this.visualElement,!1))}stopAnimation(){d(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps();return i[e]||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){d(e=>{let{drag:i}=this.getProps();if(!th(e,i,this.currentDirection))return;let{projection:s}=this.visualElement,o=this.getAxisMotionValue(e);if(s&&s.layout){let{min:i,max:n}=s.layout.layoutBox[e],r=o.get()||0;o.set(t[e]-(0,m.k)(i,n,.5)+r)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!(0,H.X)(e)||!i||!this.constraints)return;this.stopAnimation();let s={x:0,y:0};d(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){let i=e.get();s[t]=function(t,e){let i=.5,s=y(t),o=y(e);return o>s?i=(0,tt.q)(e.min,e.max-s,t.min):s>o&&(i=(0,tt.q)(t.min,t.max-o,e.min)),(0,te.q)(0,1,i)}({min:i,max:i},this.constraints[t])}});let{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),d(e=>{if(!th(e,t,null))return;let i=this.getAxisMotionValue(e),{min:o,max:n}=this.constraints[e];i.set((0,m.k)(o,n,s[e]))}),this.visualElement.render()}addListeners(){let t;if(!this.visualElement.current)return;tr.set(this.visualElement,this);let e=this.visualElement.current,i=G(e,"pointerdown",t=>{let{drag:i,dragListener:s=!0}=this.getProps(),o=t.target,n=o!==e&&(0,A.a)(o);i&&s&&!n&&this.start(t)}),s=()=>{let{dragConstraints:i}=this.getProps();(0,H.X)(i)&&i.current&&(this.constraints=this.resolveRefConstraints(),t||(t=function(t,e,i){let s=F(t,tl(i)),o=F(e,tl(i));return()=>{s(),o()}}(e,i.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,n=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),T.Gt.read(s);let r=(0,R.k)(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(d(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),i(),n(),a&&a(),t&&t()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:n=.35,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:s,dragConstraints:o,dragElastic:n,dragMomentum:r}}}function tl(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function th(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}class tu extends l.X{constructor(t){super(t),this.removeGroupControls=h.l,this.removeListeners=h.l,this.controls=new ta(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||h.l}update(){let{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}let tc=t=>(e,i)=>{t&&T.Gt.update(()=>t(e,i),!1,!0)};class td extends l.X{constructor(){super(...arguments),this.removePointerDownListener=h.l}onPointerDown(t){this.session=new Y(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:z(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:tc(t),onStart:tc(e),onMove:tc(i),onEnd:(t,e)=>{delete this.session,s&&T.Gt.postRender(()=>s(t,e))}}}mount(){this.removePointerDownListener=G(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}var tp=i(95155);let tm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var ty=i(38358),tg=i(12115),tv=i(75601),tf=i(60296),tx=i(98860);let tP=!1;class tT extends tg.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:s}=this.props,{projection:o}=t;o&&(e.group&&e.group.add(o),i&&i.register&&s&&i.register(o),tP&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),tm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:s,isPresent:o}=this.props,{projection:n}=i;return n&&(n.isPresent=o,t.layoutDependency!==e&&n.setOptions({...n.options,layoutDependency:e}),tP=!0,s||t.layoutDependency!==e||void 0===e||t.isPresent!==o?n.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?n.promote():n.relegate()||T.Gt.postRender(()=>{let t=n.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:t,layoutAnchor:e}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=e,i.root.didUpdate(),ty.k.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:s}=t;tP=!0,s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function tD(t){let[e,i]=(0,tv.xQ)(),s=(0,tg.useContext)(tf.L);return(0,tp.jsx)(tT,{...t,layoutGroup:s,switchLayoutGroup:(0,tg.useContext)(tx.N),isPresent:e,safeToRemove:i})}var tE=i(8453),tw=i(22039),tS=i(33182),tA=i(60738),tR=i(63354),tL=i(27424),tk=i(45385),tj=i(62213),tB=i(23867),tV=i(7170),tM=i(69809);let tC=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],tU=tC.length,tb=t=>"string"==typeof t?parseFloat(t):t,tI=t=>"number"==typeof t||p.px.test(t);function tF(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let tO=tG(0,.5,tM.yT),tW=tG(.5,.95,h.l);function tG(t,e,i){return s=>se?1:i((0,tt.q)(t,e,s))}function tz(t,e){t.min=e.min,t.max=e.max}function tH(t,e){tz(t.x,e.x),tz(t.y,e.y)}function tN(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}var tX=i(17727);function t$(t,e,i,s,o){return t-=e,t=(0,tX.hq)(t,1/i,s),void 0!==o&&(t=(0,tX.hq)(t,1/o,s)),t}function tQ(t,e,[i,s,o],n,r){!function(t,e=0,i=1,s=.5,o,n=t,r=t){if(p.KN.test(e)&&(e=parseFloat(e),e=(0,m.k)(r.min,r.max,e/100)-r.min),"number"!=typeof e)return;let a=(0,m.k)(n.min,n.max,s);t===n&&(a-=e),t.min=t$(t.min,e,i,a,o),t.max=t$(t.max,e,i,a,o)}(t,e[i],e[s],e[o],e.scale,n,r)}let tq=["x","scaleX","originX"],tY=["y","scaleY","originY"];function tK(t,e,i,s){tQ(t.x,e,tq,i?i.x:void 0,s?s.x:void 0),tQ(t.y,e,tY,i?i.y:void 0,s?s.y:void 0)}function t_(t){return 0===t.translate&&1===t.scale}function tZ(t){return t_(t.x)&&t_(t.y)}function tJ(t,e){return t.min===e.min&&t.max===e.max}function t0(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function t1(t,e){return t0(t.x,e.x)&&t0(t.y,e.y)}function t5(t){return y(t.x)/y(t.y)}function t2(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}var t3=i(16105);class t9{constructor(){this.members=[]}add(t){(0,t3.Kq)(this.members,t);for(let e=this.members.length-1;e>=0;e--){let i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;let s=i.instance;s&&!1!==s.isConnected||i.snapshot||((0,t3.Ai)(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if((0,t3.Ai)(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){let t=this.members[e];if(!1!==t.isPresent&&t.instance?.isConnected!==!1)return this.promote(t),!0}return!1}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();let{layoutDependency:s}=i.options,{layoutDependency:o}=t.options;(void 0===s||s!==o)&&(t.resumeFrom=i,e&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let t4=(t,e)=>t.depth-e.depth;class t6{constructor(){this.children=[],this.isDirty=!1}add(t){(0,t3.Kq)(this.children,t),this.isDirty=!0}remove(t){(0,t3.Ai)(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(t4),this.isDirty=!1,this.children.forEach(t)}}var t7=i(42418);let t8={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},et=["","X","Y","Z"],ee=0;function ei(t,e,i,s){let{latestValues:o}=e;o[t]&&(i[t]=o[t],e.setStaticValue(t,0),s&&(s[t]=0))}function es({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},i=e?.()){this.id=ee++,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,tB.Q.value&&(t8.nodes=t8.calculatedTargetDeltas=t8.calculatedProjections=0),this.nodes.forEach(er),this.nodes.forEach(ey),this.nodes.forEach(eg),this.nodes.forEach(ea),tB.Q.addProjectionMetrics&&tB.Q.addProjectionMetrics(t8)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;T.Gt.read(()=>{s=window.innerWidth}),t(e,()=>{let t=window.innerWidth;t!==s&&(s=t,this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=tL.k.now(),s=({timestamp:e})=>{let o=e-i;o>=250&&((0,T.WG)(s),t(o-250))};return T.Gt.setup(s,!0),()=>(0,T.WG)(s)}(o,250),tm.hasAnimatedSinceResize&&(tm.hasAnimatedSinceResize=!1,this.nodes.forEach(em)))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:s})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let n=this.options.transition||o.getDefaultTransition()||eD,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!t1(this.targetLayout,s),h=!e&&i;if(this.options.layoutRoot||this.resumeFrom||h||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={...(0,tR.r)(n,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,h)}else e||em(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),(0,T.WG)(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(ev),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:i}=e.options;if(!i)return;let s=(0,tA.P)(i);if(window.MotionHasOptimisedAnimation(s,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",T.Gt,!(t||i))}let{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&t(o)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||y(this.snapshot.measuredBox.x)||y(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 t=0;t{let s=e/1e3;if(ex(r.x,t.x,s),ex(r.y,t.y,s),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var h,y,g,v,f,x;P(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),g=this.relativeTarget,v=this.relativeTargetOrigin,f=a,x=s,eP(g.x,v.x,f.x,x),eP(g.y,v.y,f.y,x),i&&(h=this.relativeTarget,y=i,tJ(h.x,y.x)&&tJ(h.y,y.y))&&(this.isProjectionDirty=!1),i||(i=(0,u.ge)()),tH(i,this.relativeTarget)}l&&(this.animationValues=n,function(t,e,i,s,o,n){o?(t.opacity=(0,m.k)(0,i.opacity??1,tO(s)),t.opacityExit=(0,m.k)(e.opacity??1,0,tW(s))):n&&(t.opacity=(0,m.k)(e.opacity??1,i.opacity??1,s));for(let o=0;o{tm.hasAnimatedSinceResize=!0,tj.q.layout++,this.motionValue||(this.motionValue=(0,tw.OQ)(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(t,e,i){let s=(0,tS.S)(t)?t:(0,tw.OQ)(t);return s.start((0,S.f)("",s,e,i)),s.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{tj.q.layout--},onComplete:()=>{tj.q.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:s,latestValues:o}=t;if(e&&i&&s){if(this!==t&&this.layout&&s&&eA(this.options.animationType,this.layout.layoutBox,s.layoutBox)){i=this.target||(0,u.ge)();let e=y(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let s=y(this.layout.layoutBox.y);i.y