lizaui 8.3.9 → 8.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/button/index.cjs.js +1 -1
- package/dist/button/index.es.js +1 -1
- package/dist/calendar/index.cjs.js +1 -1
- package/dist/calendar/index.es.js +1 -1
- package/dist/chunks/{button-DaAJ3J_i.js → button-DFrxQHAW.js} +2 -2
- package/dist/chunks/{button-DaAJ3J_i.js.map → button-DFrxQHAW.js.map} +1 -1
- package/dist/chunks/{button-DJYse8Dw.js → button-uo4_Xad_.js} +2 -2
- package/dist/chunks/{button-DJYse8Dw.js.map → button-uo4_Xad_.js.map} +1 -1
- package/dist/chunks/features-animation-BRAvwYFN.js +3437 -0
- package/dist/chunks/features-animation-BRAvwYFN.js.map +1 -0
- package/dist/chunks/features-animation-BoXKk5t2.js +2 -0
- package/dist/chunks/features-animation-BoXKk5t2.js.map +1 -0
- package/dist/chunks/index-BbDfYVLO.js +174 -0
- package/dist/chunks/index-BbDfYVLO.js.map +1 -0
- package/dist/chunks/index-CL73JQgs.js +2 -0
- package/dist/chunks/index-CL73JQgs.js.map +1 -0
- package/dist/chunks/index-DC9BfnBH.js +208 -0
- package/dist/chunks/index-DC9BfnBH.js.map +1 -0
- package/dist/chunks/index-lrI_r1ww.js +10 -0
- package/dist/chunks/index-lrI_r1ww.js.map +1 -0
- package/dist/chunks/proxy-BwQyOw8U.js +2 -0
- package/dist/chunks/proxy-BwQyOw8U.js.map +1 -0
- package/dist/chunks/proxy-kv_Ue2k_.js +1346 -0
- package/dist/chunks/proxy-kv_Ue2k_.js.map +1 -0
- package/dist/chunks/ripple-CzU7YM2G.js +69 -0
- package/dist/chunks/{ripple-DMI95LHg.js.map → ripple-CzU7YM2G.js.map} +1 -1
- package/dist/chunks/ripple-SBteSEo3.js +2 -0
- package/dist/chunks/{ripple-DieNd7XQ.js.map → ripple-SBteSEo3.js.map} +1 -1
- package/dist/chunks/{scroll-area-BwqigcJy.js → scroll-area-B0mWCpSW.js} +2 -2
- package/dist/chunks/{scroll-area-BwqigcJy.js.map → scroll-area-B0mWCpSW.js.map} +1 -1
- package/dist/chunks/{scroll-area-1okMO4N6.js → scroll-area-CE7quLQL.js} +2 -2
- package/dist/chunks/{scroll-area-1okMO4N6.js.map → scroll-area-CE7quLQL.js.map} +1 -1
- package/dist/chunks/{select-B6a8A7js.js → select-BwMqXSzv.js} +2 -2
- package/dist/chunks/{select-B6a8A7js.js.map → select-BwMqXSzv.js.map} +1 -1
- package/dist/chunks/{select-CFefk2Xz.js → select-DGSPwoy8.js} +2 -2
- package/dist/chunks/{select-CFefk2Xz.js.map → select-DGSPwoy8.js.map} +1 -1
- package/dist/chunks/{textarea-BPsle-xc.js → textarea-BYbersWf.js} +32 -31
- package/dist/chunks/{textarea-BPsle-xc.js.map → textarea-BYbersWf.js.map} +1 -1
- package/dist/chunks/{textarea-C2i9A3jn.js → textarea-D9X4fUkV.js} +12 -12
- package/dist/chunks/{textarea-C2i9A3jn.js.map → textarea-D9X4fUkV.js.map} +1 -1
- package/dist/modal/index.cjs.js +1 -1
- package/dist/modal/index.cjs.js.map +1 -1
- package/dist/modal/index.es.js +15 -14
- package/dist/modal/index.es.js.map +1 -1
- package/dist/pagination/index.cjs.js +1 -1
- package/dist/pagination/index.es.js +3 -3
- package/dist/phone-input/index.cjs.js +1 -1
- package/dist/phone-input/index.cjs.js.map +1 -1
- package/dist/phone-input/index.es.js +62 -61
- package/dist/phone-input/index.es.js.map +1 -1
- package/dist/ripple/index.cjs.js +1 -1
- package/dist/ripple/index.es.js +1 -1
- package/dist/table/index.cjs.js +1 -1
- package/dist/table/index.cjs.js.map +1 -1
- package/dist/table/index.es.js +11 -11
- package/dist/table/index.es.js.map +1 -1
- package/dist/time-input/index.cjs.js +1 -1
- package/dist/time-input/index.es.js +2 -2
- package/dist/ui/index.cjs.js +1 -1
- package/dist/ui/index.es.js +7 -7
- package/package.json +1 -1
- package/dist/chunks/ripple-DMI95LHg.js +0 -68
- package/dist/chunks/ripple-DieNd7XQ.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const n=require("./features-animation-BoXKk5t2.js"),Ft=require("./jsx-runtime-BjzqJBtL.js"),O=require("react"),F=require("./index-lrI_r1ww.js");function Pt(t){return t==="x"||t==="y"?n.isDragging[t]?null:(n.isDragging[t]=!0,()=>{n.isDragging[t]=!1}):n.isDragging.x||n.isDragging.y?null:(n.isDragging.x=n.isDragging.y=!0,()=>{n.isDragging.x=n.isDragging.y=!1})}function G(t){return F.isObject(t)&&"ownerSVGElement"in t}function Tt(t){return G(t)&&t.tagName==="svg"}function A(t,e,s,o){return n.addDomEvent(t,e,n.addPointerInfo(s),o)}const Dt=1e-4,Nt=1-Dt,Wt=1+Dt,Et=.01,Gt=0-Et,$t=0+Et;function P(t){return t.max-t.min}function zt(t,e,s){return Math.abs(t-e)<=s}function $(t,e,s,o=.5){t.origin=o,t.originPoint=n.mixNumber(e.min,e.max,t.origin),t.scale=P(s)/P(e),t.translate=n.mixNumber(s.min,s.max,t.origin)-t.originPoint,(t.scale>=Nt&&t.scale<=Wt||isNaN(t.scale))&&(t.scale=1),(t.translate>=Gt&&t.translate<=$t||isNaN(t.translate))&&(t.translate=0)}function B(t,e,s,o){$(t.x,e.x,s.x,o?o.originX:void 0),$(t.y,e.y,s.y,o?o.originY:void 0)}function z(t,e,s){t.min=s.min+e.min,t.max=t.min+P(e)}function Ht(t,e,s){z(t.x,e.x,s.x),z(t.y,e.y,s.y)}function H(t,e,s){t.min=e.min-s.min,t.max=t.min+P(e)}function V(t,e,s){H(t.x,e.x,s.x),H(t.y,e.y,s.y)}function E(t){return[t("x"),t("y")]}const St=({current:t})=>t?t.ownerDocument.defaultView:null,N=(t,e)=>Math.abs(t-e);function Rt(t,e){const s=N(t.x,e.x),o=N(t.y,e.y);return Math.sqrt(s**2+o**2)}class At{constructor(e,s,{transformPagePoint:o,contextWindow:l=window,dragSnapToOrigin:u=!1,distanceThreshold:i=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 f=M(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,p=Rt(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!d&&!p)return;const{point:v}=f,{timestamp:y}=n.frameData;this.history.push({...v,timestamp:y});const{onStart:g,onMove:x}=this.handlers;d||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=w(d,this.transformPagePoint),n.frame.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:p,onSessionEnd:v,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=M(f.type==="pointercancel"?this.lastMoveEventInfo:w(d,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,g),v&&v(f,g)},!n.isPrimaryPointer(e))return;this.dragSnapToOrigin=u,this.handlers=s,this.transformPagePoint=o,this.distanceThreshold=i,this.contextWindow=l||window;const r=n.extractEventInfo(e),a=w(r,this.transformPagePoint),{point:h}=a,{timestamp:c}=n.frameData;this.history=[{...h,timestamp:c}];const{onSessionStart:m}=s;m&&m(e,M(a,this.history)),this.removeListeners=n.pipe(A(this.contextWindow,"pointermove",this.handlePointerMove),A(this.contextWindow,"pointerup",this.handlePointerUp),A(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),n.cancelFrame(this.updatePoint)}}function w(t,e){return e?{point:e(t.point)}:t}function X(t,e){return{x:t.x-e.x,y:t.y-e.y}}function M({point:t},e){return{point:t,delta:X(t,Lt(e)),offset:X(t,Xt(e)),velocity:qt(e,.1)}}function Xt(t){return t[0]}function Lt(t){return t[t.length-1]}function qt(t,e){if(t.length<2)return{x:0,y:0};let s=t.length-1,o=null;const l=Lt(t);for(;s>=0&&(o=t[s],!(l.timestamp-o.timestamp>n.secondsToMilliseconds(e)));)s--;if(!o)return{x:0,y:0};const u=n.millisecondsToSeconds(l.timestamp-o.timestamp);if(u===0)return{x:0,y:0};const i={x:(l.x-o.x)/u,y:(l.y-o.y)/u};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Yt(t,{min:e,max:s},o){return e!==void 0&&t<e?t=o?n.mixNumber(e,t,o.min):Math.max(t,e):s!==void 0&&t>s&&(t=o?n.mixNumber(s,t,o.max):Math.min(t,s)),t}function q(t,e,s){return{min:e!==void 0?t.min+e:void 0,max:s!==void 0?t.max+s-(t.max-t.min):void 0}}function _t(t,{top:e,left:s,bottom:o,right:l}){return{x:q(t.x,s,l),y:q(t.y,e,o)}}function Y(t,e){let s=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&([s,o]=[o,s]),{min:s,max:o}}function Zt(t,e){return{x:Y(t.x,e.x),y:Y(t.y,e.y)}}function Kt(t,e){let s=.5;const o=P(t),l=P(e);return l>o?s=n.progress(e.min,e.max-o,t.min):o>l&&(s=n.progress(t.min,t.max-l,e.min)),n.clamp(0,1,s)}function Jt(t,e){const s={};return e.min!==void 0&&(s.min=e.min-t.min),e.max!==void 0&&(s.max=e.max-t.min),s}const W=.35;function Qt(t=W){return t===!1?t=0:t===!0&&(t=W),{x:_(t,"left","right"),y:_(t,"top","bottom")}}function _(t,e,s){return{min:Z(t,e),max:Z(t,s)}}function Z(t,e){return typeof t=="number"?t:t[e]||0}const te=new WeakMap;class ee{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=n.createBox(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:s=!1,distanceThreshold:o}={}){const{presenceContext:l}=this.visualElement;if(l&&l.isPresent===!1)return;const u=m=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(n.extractEventInfo(m).point)},i=(m,f)=>{const{drag:d,dragPropagation:p,onDragStart:v}=this.getProps();if(d&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Pt(d),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),E(g=>{let x=this.getAxisMotionValue(g).get()||0;if(n.percent.test(x)){const{projection:T}=this.visualElement;if(T&&T.layout){const S=T.layout.layoutBox[g];S&&(x=P(S)*(parseFloat(x)/100))}}this.originPoint[g]=x}),v&&n.frame.postRender(()=>v(m,f)),n.addValueToWillChange(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},r=(m,f)=>{this.latestPointerEvent=m,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:p,onDirectionLock:v,onDrag:y}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:g}=f;if(p&&this.currentDirection===null){this.currentDirection=ie(g),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),y&&y(m,f)},a=(m,f)=>{this.latestPointerEvent=m,this.latestPanInfo=f,this.stop(m,f),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>E(m=>this.getAnimationState(m)==="paused"&&this.getAxisMotionValue(m).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new At(e,{onSessionStart:u,onStart:i,onMove:r,onSessionEnd:a,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:St(this.visualElement)})}stop(e,s){const o=e||this.latestPointerEvent,l=s||this.latestPanInfo,u=this.isDragging;if(this.cancel(),!u||!l||!o)return;const{velocity:i}=l;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&n.frame.postRender(()=>r(o,l))}cancel(){this.isDragging=!1;const{projection:e,animationState:s}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(e,s,o){const{drag:l}=this.getProps();if(!o||!C(e,l,this.currentDirection))return;const u=this.getAxisMotionValue(e);let i=this.originPoint[e]+o[e];this.constraints&&this.constraints[e]&&(i=Yt(i,this.constraints[e],this.elastic[e])),u.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:s}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,l=this.constraints;e&&n.isRefObject(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&o?this.constraints=_t(o.layoutBox,e):this.constraints=!1,this.elastic=Qt(s),l!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&E(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=Jt(o.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:s}=this.getProps();if(!e||!n.isRefObject(e))return!1;const o=e.current;n.invariant(o!==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:l}=this.visualElement;if(!l||!l.layout)return!1;const u=n.measurePageBox(o,l.root,this.visualElement.getTransformPagePoint());let i=Zt(l.layout.layoutBox,u);if(s){const r=s(n.convertBoxToBoundingBox(i));this.hasMutatedConstraints=!!r,r&&(i=n.convertBoundingBoxToBox(r))}return i}startAnimation(e){const{drag:s,dragMomentum:o,dragElastic:l,dragTransition:u,dragSnapToOrigin:i,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},h=E(c=>{if(!C(c,s,this.currentDirection))return;let m=a&&a[c]||{};i&&(m={min:0,max:0});const f=l?200:1e6,d=l?40:1e7,p={type:"inertia",velocity:o?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...u,...m};return this.startAxisValueAnimation(c,p)});return Promise.all(h).then(r)}startAxisValueAnimation(e,s){const o=this.getAxisMotionValue(e);return n.addValueToWillChange(this.visualElement,e),o.start(n.animateMotionValue(e,o,0,s,this.visualElement,!1))}stopAnimation(){E(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){E(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const s=`_drag${e.toUpperCase()}`,o=this.visualElement.getProps(),l=o[s];return l||this.visualElement.getValue(e,(o.initial?o.initial[e]:void 0)||0)}snapToCursor(e){E(s=>{const{drag:o}=this.getProps();if(!C(s,o,this.currentDirection))return;const{projection:l}=this.visualElement,u=this.getAxisMotionValue(s);if(l&&l.layout){const{min:i,max:r}=l.layout.layoutBox[s];u.set(e[s]-n.mixNumber(i,r,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:s}=this.getProps(),{projection:o}=this.visualElement;if(!n.isRefObject(s)||!o||!this.constraints)return;this.stopAnimation();const l={x:0,y:0};E(i=>{const r=this.getAxisMotionValue(i);if(r&&this.constraints!==!1){const a=r.get();l[i]=Kt({min:a,max:a},this.constraints[i])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),E(i=>{if(!C(i,e,null))return;const r=this.getAxisMotionValue(i),{min:a,max:h}=this.constraints[i];r.set(n.mixNumber(a,h,l[i]))})}addListeners(){if(!this.visualElement.current)return;te.set(this.visualElement,this);const e=this.visualElement.current,s=A(e,"pointerdown",a=>{const{drag:h,dragListener:c=!0}=this.getProps();h&&c&&this.start(a)}),o=()=>{const{dragConstraints:a}=this.getProps();n.isRefObject(a)&&a.current&&(this.constraints=this.resolveRefConstraints())},{projection:l}=this.visualElement,u=l.addEventListener("measure",o);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),n.frame.read(o);const i=n.addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),r=l.addEventListener("didUpdate",(({delta:a,hasLayoutChanged:h})=>{this.isDragging&&h&&(E(c=>{const m=this.getAxisMotionValue(c);m&&(this.originPoint[c]+=a[c].translate,m.set(m.get()+a[c].translate))}),this.visualElement.render())}));return()=>{i(),s(),u(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:o=!1,dragPropagation:l=!1,dragConstraints:u=!1,dragElastic:i=W,dragMomentum:r=!0}=e;return{...e,drag:s,dragDirectionLock:o,dragPropagation:l,dragConstraints:u,dragElastic:i,dragMomentum:r}}}function C(t,e,s){return(e===!0||e===t)&&(s===null||s===t)}function ie(t,e=10){let s=null;return Math.abs(t.y)>e?s="y":Math.abs(t.x)>e&&(s="x"),s}class se extends n.Feature{constructor(e){super(e),this.removeGroupControls=n.noop,this.removeListeners=n.noop,this.controls=new ee(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||n.noop}unmount(){this.removeGroupControls(),this.removeListeners()}}const K=t=>(e,s)=>{t&&n.frame.postRender(()=>t(e,s))};class ne extends n.Feature{constructor(){super(...arguments),this.removePointerDownListener=n.noop}onPointerDown(e){this.session=new At(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:St(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:s,onPan:o,onPanEnd:l}=this.node.getProps();return{onSessionStart:K(e),onStart:K(s),onMove:o,onEnd:(u,i)=>{delete this.session,l&&n.frame.postRender(()=>l(u,i))}}}mount(){this.removePointerDownListener=A(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const j={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function J(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const L={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(n.px.test(t))t=parseFloat(t);else return t;const s=J(t,e.target.x),o=J(t,e.target.y);return`${s}% ${o}%`}},oe={correct:(t,{treeScale:e,projectionDelta:s})=>{const o=t,l=n.complex.parse(t);if(l.length>5)return o;const u=n.complex.createTransformer(t),i=typeof l[0]!="number"?1:0,r=s.x.scale*e.x,a=s.y.scale*e.y;l[0+i]/=r,l[1+i]/=a;const h=n.mixNumber(r,a,.5);return typeof l[2+i]=="number"&&(l[2+i]/=h),typeof l[3+i]=="number"&&(l[3+i]/=h),u(l)}};let k=!1;class re extends O.Component{componentDidMount(){const{visualElement:e,layoutGroup:s,switchLayoutGroup:o,layoutId:l}=this.props,{projection:u}=e;n.addScaleCorrector(ae),u&&(s.group&&s.group.add(u),o&&o.register&&l&&o.register(u),k&&u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,onExitComplete:()=>this.safeToRemove()})),j.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:s,visualElement:o,drag:l,isPresent:u}=this.props,{projection:i}=o;return i&&(i.isPresent=u,k=!0,l||e.layoutDependency!==s||s===void 0||e.isPresent!==u?i.willUpdate():this.safeToRemove(),e.isPresent!==u&&(u?i.promote():i.relegate()||n.frame.postRender(()=>{const r=i.getStack();(!r||!r.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),n.microtask.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:s,switchLayoutGroup:o}=this.props,{projection:l}=e;k=!0,l&&(l.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(l),o&&o.deregister&&o.deregister(l))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Bt(t){const[e,s]=F.usePresence(),o=O.useContext(F.LayoutGroupContext);return Ft.jsxRuntimeExports.jsx(re,{...t,layoutGroup:o,switchLayoutGroup:O.useContext(n.SwitchLayoutGroupContext),isPresent:e,safeToRemove:s})}const ae={borderRadius:{...L,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomLeftRadius:L,borderBottomRightRadius:L,boxShadow:oe};function le(t,e,s){const o=n.isMotionValue(t)?t:n.motionValue(t);return o.start(n.animateMotionValue("",o,e,s)),o.animation}const he=(t,e)=>t.depth-e.depth;class Vt{constructor(){this.children=[],this.isDirty=!1}add(e){n.addUniqueItem(this.children,e),this.isDirty=!0}remove(e){n.removeItem(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(he),this.isDirty=!1,this.children.forEach(e)}}function Ct(t,e){const s=n.time.now(),o=({timestamp:l})=>{const u=l-s;u>=e&&(n.cancelFrame(o),t(u-e))};return n.frame.setup(o,!0),()=>n.cancelFrame(o)}const jt=["TopLeft","TopRight","BottomLeft","BottomRight"],ce=jt.length,Q=t=>typeof t=="string"?parseFloat(t):t,tt=t=>typeof t=="number"||n.px.test(t);function ue(t,e,s,o,l,u){l?(t.opacity=n.mixNumber(0,s.opacity??1,me(o)),t.opacityExit=n.mixNumber(e.opacity??1,0,fe(o))):u&&(t.opacity=n.mixNumber(e.opacity??1,s.opacity??1,o));for(let i=0;i<ce;i++){const r=`border${jt[i]}Radius`;let a=et(e,r),h=et(s,r);if(a===void 0&&h===void 0)continue;a||(a=0),h||(h=0),a===0||h===0||tt(a)===tt(h)?(t[r]=Math.max(n.mixNumber(Q(a),Q(h),o),0),(n.percent.test(h)||n.percent.test(a))&&(t[r]+="%")):t[r]=h}(e.rotate||s.rotate)&&(t.rotate=n.mixNumber(e.rotate||0,s.rotate||0,o))}function et(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const me=wt(0,.5,n.circOut),fe=wt(.5,.95,n.noop);function wt(t,e,s){return o=>o<t?0:o>e?1:s(n.progress(t,e,o))}function it(t,e){t.min=e.min,t.max=e.max}function D(t,e){it(t.x,e.x),it(t.y,e.y)}function st(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function nt(t,e,s,o,l){return t-=e,t=n.scalePoint(t,1/s,o),l!==void 0&&(t=n.scalePoint(t,1/l,o)),t}function de(t,e=0,s=1,o=.5,l,u=t,i=t){if(n.percent.test(e)&&(e=parseFloat(e),e=n.mixNumber(i.min,i.max,e/100)-i.min),typeof e!="number")return;let r=n.mixNumber(u.min,u.max,o);t===u&&(r-=e),t.min=nt(t.min,e,s,r,l),t.max=nt(t.max,e,s,r,l)}function ot(t,e,[s,o,l],u,i){de(t,e[s],e[o],e[l],e.scale,u,i)}const pe=["x","scaleX","originX"],ge=["y","scaleY","originY"];function rt(t,e,s,o){ot(t.x,e,pe,s?s.x:void 0,o?o.x:void 0),ot(t.y,e,ge,s?s.y:void 0,o?o.y:void 0)}function at(t){return t.translate===0&&t.scale===1}function Mt(t){return at(t.x)&&at(t.y)}function lt(t,e){return t.min===e.min&&t.max===e.max}function ye(t,e){return lt(t.x,e.x)&<(t.y,e.y)}function ht(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function kt(t,e){return ht(t.x,e.x)&&ht(t.y,e.y)}function ct(t){return P(t.x)/P(t.y)}function ut(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class ve{constructor(){this.members=[]}add(e){n.addUniqueItem(this.members,e),e.scheduleRender()}remove(e){if(n.removeItem(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(e){const s=this.members.findIndex(l=>e===l);if(s===0)return!1;let o;for(let l=s;l>=0;l--){const u=this.members[l];if(u.isPresent!==!1){o=u;break}}return o?(this.promote(o),!0):!1}promote(e,s){const o=this.lead;if(e!==o&&(this.prevLead=o,this.lead=e,e.show(),o)){o.instance&&o.scheduleRender(),e.scheduleRender(),e.resumeFrom=o,s&&(e.resumeFrom.preserveOpacity=!0),o.snapshot&&(e.snapshot=o.snapshot,e.snapshot.latestValues=o.animationValues||o.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:l}=e.options;l===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:s,resumingFrom:o}=e;s.onExitComplete&&s.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function xe(t,e,s){let o="";const l=t.x.translate/e.x,u=t.y.translate/e.y,i=s?.z||0;if((l||u||i)&&(o=`translate3d(${l}px, ${u}px, ${i}px) `),(e.x!==1||e.y!==1)&&(o+=`scale(${1/e.x}, ${1/e.y}) `),s){const{transformPerspective:h,rotate:c,rotateX:m,rotateY:f,skewX:d,skewY:p}=s;h&&(o=`perspective(${h}px) ${o}`),c&&(o+=`rotate(${c}deg) `),m&&(o+=`rotateX(${m}deg) `),f&&(o+=`rotateY(${f}deg) `),d&&(o+=`skewX(${d}deg) `),p&&(o+=`skewY(${p}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return(r!==1||a!==1)&&(o+=`scale(${r}, ${a})`),o||"none"}const b=["","X","Y","Z"],Pe=1e3;let Te=0;function I(t,e,s,o){const{latestValues:l}=e;l[t]&&(s[t]=l[t],e.setStaticValue(t,0),o&&(o[t]=0))}function bt(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const s=n.getOptimisedAppearId(e);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:l,layoutId:u}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",n.frame,!(l||u))}const{parent:o}=t;o&&!o.hasCheckedOptimisedAppear&&bt(o)}function It({attachResizeListener:t,defaultParent:e,measureScroll:s,checkIsScrollRoot:o,resetTransform:l}){return class{constructor(i={},r=e?.()){this.id=Te++,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.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(Se),this.nodes.forEach(Be),this.nodes.forEach(Ve),this.nodes.forEach(Re)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let a=0;a<this.path.length;a++)this.path[a].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vt)}addEventListener(i,r){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new n.SubscriptionManager),this.eventHandlers.get(i).add(r)}notifyListeners(i,...r){const a=this.eventHandlers.get(i);a&&a.notify(...r)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=G(i)&&!Tt(i),this.instance=i;const{layoutId:r,layout:a,visualElement:h}=this.options;if(h&&!h.current&&h.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(a||r)&&(this.isLayoutDirty=!0),t){let c,m=0;const f=()=>this.root.updateBlockedByResize=!1;n.frame.read(()=>{m=window.innerWidth}),t(i,()=>{const d=window.innerWidth;d!==m&&(m=d,this.root.updateBlockedByResize=!0,c&&c(),c=Ct(f,250),j.hasAnimatedSinceResize&&(j.hasAnimatedSinceResize=!1,this.nodes.forEach(dt)))})}r&&this.root.registerSharedNode(r,this),this.options.animate!==!1&&h&&(r||a)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:m,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||h.getDefaultTransition()||ke,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=h.getProps(),g=!this.targetLayout||!kt(this.targetLayout,d),x=!m&&f;if(this.options.layoutRoot||this.resumeFrom||x||m&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...n.getValueTransition(p,"layout"),onPlay:v,onComplete:y};(h.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(c,x)}else m||dt(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),n.cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ce),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&bt(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const m=this.path[c];m.shouldResetTransform=!0,m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}const{layoutId:r,layout:a}=this.options;if(r===void 0&&!a)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(mt);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ft);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Le),this.nodes.forEach(De),this.nodes.forEach(Ee)):this.nodes.forEach(ft),this.clearAllSnapshots();const r=n.time.now();n.frameData.delta=n.clamp(0,1e3/60,r-n.frameData.timestamp),n.frameData.timestamp=r,n.frameData.isProcessing=!0,n.frameSteps.update.process(n.frameData),n.frameSteps.preRender.process(n.frameData),n.frameSteps.render.process(n.frameData),n.frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,n.microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ae),this.sharedNodes.forEach(je)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,n.frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){n.frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!P(this.snapshot.measuredBox.x)&&!P(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 a=0;a<this.path.length;a++)this.path[a].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=n.createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:r}=this.options;r&&r.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let r=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(r=!1),r&&this.instance){const a=o(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:a,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:a}}}resetTransform(){if(!l)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,r=this.projectionDelta&&!Mt(this.projectionDelta),a=this.getTransformTemplate(),h=a?a(this.latestValues,""):void 0,c=h!==this.prevTransformTemplateValue;i&&this.instance&&(r||n.hasTransform(this.latestValues)||c)&&(l(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const r=this.measurePageBox();let a=this.removeElementScroll(r);return i&&(a=this.removeTransform(a)),be(a),{animationId:this.root.animationId,measuredBox:r,layoutBox:a,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return n.createBox();const r=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ie))){const{scroll:h}=this.root;h&&(n.translateAxis(r.x,h.offset.x),n.translateAxis(r.y,h.offset.y))}return r}removeElementScroll(i){const r=n.createBox();if(D(r,i),this.scroll?.wasRoot)return r;for(let a=0;a<this.path.length;a++){const h=this.path[a],{scroll:c,options:m}=h;h!==this.root&&c&&m.layoutScroll&&(c.wasRoot&&D(r,i),n.translateAxis(r.x,c.offset.x),n.translateAxis(r.y,c.offset.y))}return r}applyTransform(i,r=!1){const a=n.createBox();D(a,i);for(let h=0;h<this.path.length;h++){const c=this.path[h];!r&&c.options.layoutScroll&&c.scroll&&c!==c.root&&n.transformBox(a,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),n.hasTransform(c.latestValues)&&n.transformBox(a,c.latestValues)}return n.hasTransform(this.latestValues)&&n.transformBox(a,this.latestValues),a}removeTransform(i){const r=n.createBox();D(r,i);for(let a=0;a<this.path.length;a++){const h=this.path[a];if(!h.instance||!n.hasTransform(h.latestValues))continue;n.hasScale(h.latestValues)&&h.updateSnapshot();const c=n.createBox(),m=h.measurePageBox();D(c,m),rt(r,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,c)}return n.hasTransform(this.latestValues)&&rt(r,this.latestValues),r}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==n.frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){const r=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=r.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=r.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=r.isSharedProjectionDirty);const a=!!this.resumingFrom||this!==r;if(!(i||a&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:m}=this.options;if(!(!this.layout||!(c||m))){if(this.resolvedRelativeTargetAt=n.frameData.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=n.createBox(),this.relativeTargetOrigin=n.createBox(),V(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),D(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=n.createBox(),this.targetWithTransforms=n.createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ht(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):D(this.target,this.layout.layoutBox),n.applyBoxDelta(this.target,this.targetDelta)):D(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=n.createBox(),this.relativeTargetOrigin=n.createBox(),V(this.relativeTargetOrigin,this.target,f.target),D(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||n.hasScale(this.parent.latestValues)||n.has2DTranslate(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const i=this.getLead(),r=!!this.resumingFrom||this!==i;let a=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(a=!1),r&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(a=!1),this.resolvedRelativeTargetAt===n.frameData.timestamp&&(a=!1),a)return;const{layout:h,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||c))return;D(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,f=this.treeScale.y;n.applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,r),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=n.createBox());const{target:d}=i;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(st(this.prevProjectionDelta.x,this.projectionDelta.x),st(this.prevProjectionDelta.y,this.projectionDelta.y)),B(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==f||!ut(this.projectionDelta.x,this.prevProjectionDelta.x)||!ut(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.visualElement?.scheduleRender(),i){const r=this.getStack();r&&r.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=n.createDelta(),this.projectionDelta=n.createDelta(),this.projectionDeltaWithTransform=n.createDelta()}setAnimationOrigin(i,r=!1){const a=this.snapshot,h=a?a.latestValues:{},c={...this.latestValues},m=n.createDelta();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!r;const f=n.createBox(),d=a?a.source:void 0,p=this.layout?this.layout.source:void 0,v=d!==p,y=this.getStack(),g=!y||y.members.length<=1,x=!!(v&&!g&&this.options.crossfade===!0&&!this.path.some(Me));this.animationProgress=0;let T;this.mixTargetDelta=S=>{const R=S/1e3;pt(m.x,i.x,R),pt(m.y,i.y,R),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(V(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),we(this.relativeTarget,this.relativeTargetOrigin,f,R),T&&ye(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=n.createBox()),D(T,this.relativeTarget)),v&&(this.animationValues=c,ue(c,h,this.latestValues,R,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(n.cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=n.frame.update(()=>{j.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=n.motionValue(0)),this.currentAnimation=le(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:r=>{this.mixTargetDelta(r),i.onUpdate&&i.onUpdate(r)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Pe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:r,target:a,layout:h,latestValues:c}=i;if(!(!r||!a||!h)){if(this!==i&&this.layout&&h&&Ut(this.options.animationType,this.layout.layoutBox,h.layoutBox)){a=this.target||n.createBox();const m=P(this.layout.layoutBox.x);a.x.min=i.target.x.min,a.x.max=a.x.min+m;const f=P(this.layout.layoutBox.y);a.y.min=i.target.y.min,a.y.max=a.y.min+f}D(r,a),n.transformBox(r,c),B(this.projectionDeltaWithTransform,this.layoutCorrected,r,c)}}registerSharedNode(i,r){this.sharedNodes.has(i)||this.sharedNodes.set(i,new ve),this.sharedNodes.get(i).add(r);const h=r.options.initialPromotionConfig;r.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(r):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){const{layoutId:i}=this.options;return i?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:i}=this.options;return i?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:r,preserveFollowOpacity:a}={}){const h=this.getStack();h&&h.promote(this,a),i&&(this.projectionDelta=void 0,this.needsReset=!0),r&&this.setOptions({transition:r})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let r=!1;const{latestValues:a}=i;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(r=!0),!r)return;const h={};a.z&&I("z",i,h,this.animationValues);for(let c=0;c<b.length;c++)I(`rotate${b[c]}`,i,h,this.animationValues),I(`skew${b[c]}`,i,h,this.animationValues);i.render();for(const c in h)i.setStaticValue(c,h[c]),this.animationValues&&(this.animationValues[c]=h[c]);i.scheduleRender()}applyProjectionStyles(i,r){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const a=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=n.resolveMotionValue(r?.pointerEvents)||"",i.transform=a?a(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=n.resolveMotionValue(r?.pointerEvents)||""),this.hasProjected&&!n.hasTransform(this.latestValues)&&(i.transform=a?a({},""):"none",this.hasProjected=!1);return}i.visibility="";const c=h.animationValues||h.latestValues;this.applyTransformsToTarget();let m=xe(this.projectionDeltaWithTransform,this.treeScale,c);a&&(m=a(c,m)),i.transform=m;const{x:f,y:d}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,h.animationValues?i.opacity=h===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:i.opacity=h===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in n.scaleCorrectors){if(c[p]===void 0)continue;const{correct:v,applyTo:y,isCSSVariable:g}=n.scaleCorrectors[p],x=m==="none"?c[p]:v(c[p],h);if(y){const T=y.length;for(let S=0;S<T;S++)i[y[S]]=x}else g?this.options.visualElement.renderState.vars[p]=x:i[p]=x}this.options.layoutId&&(i.pointerEvents=h===this?n.resolveMotionValue(r?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(mt),this.root.sharedNodes.clear()}}}function De(t){t.updateLayout()}function Ee(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:l}=t.options,u=e.source!==t.layout.source;l==="size"?E(c=>{const m=u?e.measuredBox[c]:e.layoutBox[c],f=P(m);m.min=s[c].min,m.max=m.min+f}):Ut(l,e.layoutBox,s)&&E(c=>{const m=u?e.measuredBox[c]:e.layoutBox[c],f=P(s[c]);m.max=m.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+f)});const i=n.createDelta();B(i,s,e.layoutBox);const r=n.createDelta();u?B(r,t.applyTransform(o,!0),e.measuredBox):B(r,s,e.layoutBox);const a=!Mt(i);let h=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:m,layout:f}=c;if(m&&f){const d=n.createBox();V(d,e.layoutBox,m.layoutBox);const p=n.createBox();V(p,s,f.layoutBox),kt(d,p)||(h=!0),c.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=d,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:r,layoutDelta:i,hasLayoutChanged:a,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Se(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Re(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ae(t){t.clearSnapshot()}function mt(t){t.clearMeasurements()}function ft(t){t.isLayoutDirty=!1}function Le(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function dt(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Be(t){t.resolveTargetDelta()}function Ve(t){t.calcProjection()}function Ce(t){t.resetSkewAndRotation()}function je(t){t.removeLeadSnapshot()}function pt(t,e,s){t.translate=n.mixNumber(e.translate,0,s),t.scale=n.mixNumber(e.scale,1,s),t.origin=e.origin,t.originPoint=e.originPoint}function gt(t,e,s,o){t.min=n.mixNumber(e.min,s.min,o),t.max=n.mixNumber(e.max,s.max,o)}function we(t,e,s,o){gt(t.x,e.x,s.x,o),gt(t.y,e.y,s.y,o)}function Me(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const ke={duration:.45,ease:[.4,0,.1,1]},yt=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),vt=yt("applewebkit/")&&!yt("chrome/")?Math.round:n.noop;function xt(t){t.min=vt(t.min),t.max=vt(t.max)}function be(t){xt(t.x),xt(t.y)}function Ut(t,e,s){return t==="position"||t==="preserve-aspect"&&!zt(ct(e),ct(s),.2)}function Ie(t){return t!==t.root&&t.scroll?.wasRoot}const Ue=It({attachResizeListener:(t,e)=>n.addDomEvent(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),U={current:void 0},Ot=It({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!U.current){const t=new Ue({});t.mount(window),t.setOptions({layoutScroll:!0}),U.current=t}return U.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Oe={pan:{Feature:ne},drag:{Feature:se,ProjectionNode:Ot,MeasureLayout:Bt}},Fe={layout:{ProjectionNode:Ot,MeasureLayout:Bt}},Ne={...n.animations,...n.gestureAnimations,...Oe,...Fe},We=n.createMotionProxy(Ne,n.createDomVisualElement);exports.FlatTree=Vt;exports.addPointerEvent=A;exports.calcLength=P;exports.delay=Ct;exports.distance=N;exports.distance2D=Rt;exports.isSVGElement=G;exports.isSVGSVGElement=Tt;exports.motion=We;exports.setDragLock=Pt;
|
|
2
|
+
//# sourceMappingURL=proxy-BwQyOw8U.js.map
|