티스토리 수익 글 보기

티스토리 수익 글 보기

“use strict”;(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2828],{10575:(t,e,i)=>{i.d(e,{I:()=>s});var n=i(59282),r=i(86358),o=i(85189);function s(){o.r.current||(0,r.U)();let[t]=(0,n.useState)(o.O.current);return t}},21674:(t,e,i)=>{i.d(e,{s:()=>r});var n=i(30240);function r(t){return(0,n.G)(t)&&”offsetHeight”in t}},29129:(t,e,i)=>{i.d(e,{E:()=>r});var n=i(59282);let r=i(13625).B?n.useLayoutEffect:n.useEffect},39068:(t,e,i)=>{i.d(e,{x:()=>l});var n=i(54202),r=i(59282),o=i(45943),s=i(76986),a=i(28096);function l(t){let{children:e,isValidProp:i,…l}=t;i&&(0,s.D)(i),(l={…(0,r.useContext)(o.Q),…l}).isStatic=(0,a.M)(()=>l.isStatic);let u=(0,r.useMemo)(()=>l,[JSON.stringify(l.transition),l.transformPagePoint,l.reducedMotion]);return(0,n.jsx)(o.Q.Provider,{value:u,children:e})}},45943:(t,e,i)=>{i.d(e,{Q:()=>n});let n=(0,i(59282).createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:”never”})},48478:(t,e,i)=>{i.d(e,{N:()=>a});var n=i(92382),r=i(55337),o=i(70140),s=i(59282),a=(0,n.Hx)(function(){let t=(0,o.useRouter)(),e=(0,o.useSearchParams)(),[i,a]=(0,s.useOptimistic)(e);return{searchParams:i,updateUrl:(0,s.useCallback)((e,i)=>{(0,s.startTransition)(()=>{a(e)});let o=function(t,e){let i=t.split(“#”)[0]??””;return i+(0,n.OB)(e)+location.hash}(location.origin+location.pathname,e);(0,r.Y)(“[nuqs queue (app)] Updating url: %s”,o),(“push”===i.history?history.pushState:history.replaceState).call(history,null,””,o),i.scroll&&window.scrollTo(0,0),i.shallow||t.replace(o,{scroll:!1})},[]),rateLimitFactor:2}})},57752:(t,e,i)=>{i.d(e,{L:()=>n});let n=(0,i(59282).createContext)({})},57814:(t,e,i)=>{i.d(e,{t:()=>n});let n=(0,i(59282).createContext)(null)},60268:(t,e,i)=>{i.d(e,{N:()=>x});var n=i(54202),r=i(59282),o=i(57752),s=i(28096),a=i(29129),l=i(57814),u=i(21674),h=i(45943);function c(t,e){if(“function”==typeof t)return t(e);null!=t&&(t.current=e)}class d extends r.Component{getSnapshotBeforeUpdate(t){let e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){let t=e.offsetParent,i=(0,u.s)(t)&&t.offsetWidth||0,n=this.props.sizeRef.current;n.height=e.offsetHeight||0,n.width=e.offsetWidth||0,n.top=e.offsetTop,n.left=e.offsetLeft,n.right=i-n.width-n.left}return null}componentDidUpdate(){}render(){return this.props.children}}function p(t){let{children:e,isPresent:i,anchorX:o,root:s}=t,a=(0,r.useId)(),l=(0,r.useRef)(null),u=(0,r.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:p}=(0,r.useContext)(h.Q),m=function(…t){return r.useCallback(function(…t){return e=>{let i=!1,n=t.map(t=>{let n=c(t,e);return i||”function”!=typeof n||(i=!0),n});if(i)return()=>{for(let e=0;e{let{width:t,height:e,top:n,left:r,right:h}=u.current;if(i||!l.current||!t||!e)return;l.current.dataset.motionPopId=a;let c=document.createElement(“style”);p&&(c.nonce=p);let d=null!=s?s:document.head;return d.appendChild(c),c.sheet&&c.sheet.insertRule(‘\n [data-motion-pop-id=”‘.concat(a,'”] {\n position: absolute !important;\n width: ‘).concat(t,”px !important;\n height: “).concat(e,”px !important;\n “).concat(“left”===o?”left: “.concat(r):”right: “.concat(h),”px !important;\n top: “).concat(n,”px !important;\n }\n “)),()=>{d.contains(c)&&d.removeChild(c)}},[i]),(0,n.jsx)(d,{isPresent:i,childRef:l,sizeRef:u,children:r.cloneElement(e,{ref:m})})}let m=t=>{let{children:e,initial:i,isPresent:o,onExitComplete:a,custom:u,presenceAffectsLayout:h,mode:c,anchorX:d,root:m}=t,v=(0,s.M)(f),g=(0,r.useId)(),y=!0,x=(0,r.useMemo)(()=>(y=!1,{id:g,initial:i,isPresent:o,custom:u,onExitComplete:t=>{for(let e of(v.set(t,!0),v.values()))if(!e)return;a&&a()},register:t=>(v.set(t,!1),()=>v.delete(t))}),[o,v,a]);return h&&y&&(x={…x}),(0,r.useMemo)(()=>{v.forEach((t,e)=>v.set(e,!1))},[o]),r.useEffect(()=>{o||v.size||!a||a()},[o]),”popLayout”===c&&(e=(0,n.jsx)(p,{isPresent:o,anchorX:d,root:m,children:e})),(0,n.jsx)(l.t.Provider,{value:x,children:e})};function f(){return new Map}var v=i(78561);let g=t=>t.key||””;function y(t){let e=[];return r.Children.forEach(t,t=>{(0,r.isValidElement)(t)&&e.push(t)}),e}let x=t=>{let{children:e,custom:i,initial:l=!0,onExitComplete:u,presenceAffectsLayout:h=!0,mode:c=”sync”,propagate:d=!1,anchorX:p=”left”,root:f}=t,[x,w]=(0,v.xQ)(d),P=(0,r.useMemo)(()=>y(e),[e]),E=d&&!x?[]:P.map(g),T=(0,r.useRef)(!0),C=(0,r.useRef)(P),R=(0,s.M)(()=>new Map),[S,b]=(0,r.useState)(P),[A,D]=(0,r.useState)(P);(0,a.E)(()=>{T.current=!1,C.current=P;for(let t=0;t{let e=g(t),r=(!d||!!x)&&(P===A||E.includes(e));return(0,n.jsx)(m,{isPresent:r,initial:(!T.current||!!l)&&void 0,custom:i,presenceAffectsLayout:h,mode:c,root:f,onExitComplete:r?void 0:()=>{if(!R.has(e))return;R.set(e,!0);let t=!0;R.forEach(e=>{e||(t=!1)}),t&&(null==j||j(),D(C.current),d&&(null==w||w()),u&&u())},anchorX:p,children:t},e)})})}},60302:(t,e,i)=>{i.d(e,{z:()=>v});var n=i(37390),r=i(32009),o=i(35614);function s(t){return”number”==typeof t?t:parseFloat(t)}var a=i(59282),l=i(45943),u=i(85575),h=i(28096);function c(t){let e=(0,h.M)(()=>(0,u.OQ)(t)),{isStatic:i}=(0,a.useContext)(l.Q);if(i){let[,i]=(0,a.useState)(t);(0,a.useEffect)(()=>e.on(“change”,i),[])}return e}var d=i(18706),p=i(29129);function m(t,e){let i=c(e()),n=()=>i.set(e());return n(),(0,p.E)(()=>{let e=()=>o.Gt.preRender(n,!1,!0),i=t.map(t=>t.on(“change”,e));return()=>{i.forEach(t=>t()),(0,o.WG)(n)}}),i}function f(t,e){let i=(0,h.M)(()=>[]);return m(t,()=>{i.length=0;let n=t.length;for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:{},{isStatic:i}=(0,a.useContext)(l.Q),h=()=>(0,n.S)(t)?t.get():t;if(i)return function(t,e,i,n){if(“function”==typeof t){u.bt.current=[],t();let e=m(u.bt.current,t);return u.bt.current=void 0,e}let r=function(…t){let e=!Array.isArray(t[0]),i=e?0:-1,n=t[0+i],r=t[1+i],o=t[2+i],s=t[3+i],a=(0,d.G)(r,o,s);return e?a(n):a}(void 0,void 0,void 0);return Array.isArray(t)?f(t,r):f([t],t=>{let[e]=t;return r(e)})}(h);let p=c(h());return(0,a.useInsertionEffect)(()=>(function(t,e,i){let a,l=t.get(),u=null,h=l,c=”string”==typeof l?l.replace(/[\d.-]/g,””):void 0,d=()=>{u&&(u.stop(),u=null)},p=()=>{d(),u=new r.s({keyframes:[s(t.get()),s(h)],velocity:t.getVelocity(),type:”spring”,restDelta:.001,restSpeed:.01,…i,onUpdate:a})};if(t.attach((t,e)=>{h=t,a=t=>{var i,n;return e((i=t,(n=c)?i+n:i))},o.Gt.postRender(p)},d),(0,n.S)(e)){let i=e.on(“change”,e=>{var i,n;return t.set((i=e,(n=c)?i+n:i))}),n=t.on(“destroy”,i);return()=>{i(),n()}}return d})(p,t,e),[p,JSON.stringify(e)]),p}},68809:(t,e,i)=>{i.d(e,{P:()=>iC});var n=i(59282),r=i(81202),o=i(26651);let s=[“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 a(t){if(“string”!=typeof t||t.includes(“-“));else if(s.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}var l=i(54202),u=i(57752);let h=(0,n.createContext)({strict:!1});var c=i(45943);let d=(0,n.createContext)({});var p=i(59452),m=i(67694);function f(t){return Array.isArray(t)?t.join(” “):t}var v=i(37390),g=i(780),y=i(96554);let x=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function w(t,e,i){for(let n in e)(0,v.S)(e[n])||(0,g.z)(n,i)||(t[n]=e[n])}var P=i(34232);let E=()=>({…x(),attrs:{}});var T=i(35e3),C=i(76986),R=i(76643),S=i(57814),b=i(47524),A=i(28096);function D(t){return(0,v.S)(t)?t.get():t}let L=t=>(e,i)=>{let r=(0,n.useContext)(d),o=(0,n.useContext)(S.t),s=()=>(function(t,e,i,n){let{scrapeMotionValuesFromProps:r,createRenderState:o}=t;return{latestValues:function(t,e,i,n){let r={},o=n(t,{});for(let t in o)r[t]=D(o[t]);let{initial:s,animate:a}=t,l=(0,p.e)(t),u=(0,p.O)(t);e&&u&&!l&&!1!==t.inherit&&(void 0===s&&(s=e.initial),void 0===a&&(a=e.animate));let h=!!i&&!1===i.initial,c=(h=h||!1===s)?a:s;if(c&&”boolean”!=typeof c&&!(0,R.N)(c)){let e=Array.isArray(c)?c:[c];for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;o&&function(t){for(let e in t)V.B[e]={…V.B[e],…t[e]}}(o);let g=a(t)?M:j;function R(e,i){var o,R,b;let A,D={…(0,n.useContext)(c.Q),…e,layoutId:function(t){let{layoutId:e}=t,i=(0,n.useContext)(u.L).id;return i&&void 0!==e?i+”-“+e:e}(e)},{isStatic:L}=D,j=function(t){let{initial:e,animate:i}=function(t,e){if((0,p.e)(t)){let{initial:e,animate:i}=t;return{initial:!1===e||(0,m.w)(e)?e:void 0,animate:(0,m.w)(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,n.useContext)(d));return(0,n.useMemo)(()=>({initial:e,animate:i}),[f(e),f(i)])}(e),M=g(e,L);if(!L&&k.B){R=0,b=0,(0,n.useContext)(h).strict;let e=function(t){let{drag:e,layout:i}=V.B;if(!e&&!i)return{};let n={…e,…i};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==i?void 0:i.isEnabled(t))?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(D);A=e.MeasureLayout,j.visualElement=function(t,e,i,r,o){var s,a,l,u;let{visualElement:p}=(0,n.useContext)(d),m=(0,n.useContext)(h),f=(0,n.useContext)(S.t),v=(0,n.useContext)(c.Q).reducedMotion,g=(0,n.useRef)(null);r=r||m.renderer,!g.current&&r&&(g.current=r(t,{visualState:e,parent:p,props:i,presenceContext:f,blockInitialAnimation:!!f&&!1===f.initial,reducedMotionConfig:v}));let y=g.current,x=(0,n.useContext)(N);y&&!y.projection&&o&&(“html”===y.type||”svg”===y.type)&&function(t,e,i,n){let{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:h}=e;t.projection=new i(t.latestValues,e[“data-framer-portal-id”]?void 0:function t(e){if(e)return!1!==e.options.allowProjection?e.projection:t(e.parent)}(t.parent)),t.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!s||a&&O(a),visualElement:t,animationType:”string”==typeof o?o:”both”,initialPromotionConfig:n,crossfade:h,layoutScroll:l,layoutRoot:u})}(g.current,i,o,x);let w=(0,n.useRef)(!1);(0,n.useInsertionEffect)(()=>{y&&w.current&&y.update(i,f)});let P=i[F.n],E=(0,n.useRef)(!!P&&!(null==(s=(a=window).MotionHandoffIsComplete)?void 0:s.call(a,P))&&(null==(l=(u=window).MotionHasOptimisedAnimation)?void 0:l.call(u,P)));return(0,I.E)(()=>{y&&(w.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),E.current&&y.animationState&&y.animationState.animateChanges())}),(0,n.useEffect)(()=>{y&&(!E.current&&y.animationState&&y.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{var t,e;null==(t=(e=window).MotionHandoffMarkAsComplete)||t.call(e,P)}),E.current=!1),y.enteringChildren=void 0)}),y}(t,M,D,s,e.ProjectionNode)}return(0,l.jsxs)(d.Provider,{value:j,children:[A&&j.visualElement?(0,l.jsx)(A,{visualElement:j.visualElement,…D}):null,function(t,e,i,r,o){let{latestValues:s}=r,l=arguments.length>5&&void 0!==arguments[5]&&arguments[5],u=(a(t)?function(t,e,i,r){let o=(0,n.useMemo)(()=>{let i=E();return(0,P.B)(i,e,(0,T.n)(r),t.transformTemplate,t.style),{…i.attrs,style:{…i.style}}},[e]);if(t.style){let e={};w(e,t.style,t),o.style={…e,…o.style}}return o}:function(t,e){let i={},r=function(t,e){let i=t.style||{},r={};return w(r,i,t),Object.assign(r,function(t,e){let{transformTemplate:i}=t;return(0,n.useMemo)(()=>{let t=x();return(0,y.O)(t,e,i),Object.assign({},t.vars,t.style)},[e])}(t,e)),r}(t,e);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=”none”,r.touchAction=!0===t.drag?”none”:”pan-“.concat(“x”===t.drag?”y”:”x”)),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=r,i})(e,s,o,t),h=(0,C.J)(e,”string”==typeof t,l),c=t!==n.Fragment?{…h,…u,ref:i}:{},{children:d}=e,p=(0,n.useMemo)(()=>(0,v.S)(d)?d.get():d,[d]);return(0,n.createElement)(t,{…c,children:p})}(t,e,(o=j.visualElement,(0,n.useCallback)(t=>{t&&M.onMount&&M.onMount(t),o&&(t?o.mount(t):o.unmount()),i&&(“function”==typeof i?i(t):O(i)&&(i.current=t))},[o])),M,L,r)]})}R.displayName=”motion.”.concat(“string”==typeof t?t:”create(“.concat(null!=(i=null!=(e=t.displayName)?e:t.name)?i:””,”)”));let b=(0,n.forwardRef)(R);return b[B]=t,b}var W=i(30992),G=i(23612);function H(t,e,i,n=0,r=1){let o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),s=t.size,a=(s-1)*n;return”function”==typeof i?i(o,s):1===r?o*n:a-o*n}function z(t,e,i={}){let n=(0,W.K)(t,e,”exit”===i.type?t.presenceContext?.custom:void 0),{transition:r=t.getDefaultTransition()||{}}=n||{};i.transitionOverride&&(r=i.transitionOverride);let o=n?()=>Promise.all((0,G.$)(t,n,i)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(n=0)=>{let{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=r;return function(t,e,i=0,n=0,r=0,o=1,s){let a=[];for(let l of t.variantChildren)l.notify(“AnimationStart”,e),a.push(z(l,e,{…s,delay:i+(“function”==typeof n?0:n)+H(t.variantChildren,l,n,r,o)}).then(()=>l.notify(“AnimationComplete”,e)));return Promise.all(a)}(t,e,n,o,s,a,i)}:()=>Promise.resolve(),{when:a}=r;if(!a)return Promise.all([o(),s(i.delay)]);{let[t,e]=”beforeChildren”===a?[o,s]:[s,o];return t().then(()=>e())}}var K=i(46545);function _(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let n=0;nPromise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let n;if(t.notify(“AnimationStart”,e),Array.isArray(e))n=Promise.all(e.map(e=>z(t,e,i)));else if(“string”==typeof e)n=z(t,e,i);else{let r=”function”==typeof e?(0,W.K)(t,e,i.custom):e;n=Promise.all((0,G.$)(t,r,i))}return n.then(()=>{t.notify(“AnimationComplete”,e)})})(t,e,i))),i=J(),n=!0,r=e=>(i,n)=>{let r=(0,W.K)(t,n,”exit”===e?t.presenceContext?.custom:void 0);if(r){let{transition:t,transitionEnd:e,…n}=r;i={…i,…n,…e}}return i};function o(o){let{props:s}=t,a=function t(e){if(!e)return;if(!e.isControllingVariants){let i=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(i.initial=e.props.initial),i}let i={};for(let t=0;tc&&y,T=!1,C=Array.isArray(g)?g:[g],S=C.reduce(r(f),{});!1===x&&(S={});let{prevResolvedValues:b={}}=v,A={…b,…S},D=e=>{E=!0,u.has(e)&&(T=!0,u.delete(e)),v.needsAnimating[e]=!0;let i=t.getValue(e);i&&(i.liveStyle=!1)};for(let t in A){let e=S[t],i=b[t];if(h.hasOwnProperty(t))continue;let n=!1;((0,K.p)(e)&&(0,K.p)(i)?_(e,i):e===i)?void 0!==e&&u.has(t)?D(t):v.protectedKeys[t]=!0:null!=e?D(t):u.add(t)}v.prevProp=g,v.prevResolvedValues=S,v.isActive&&(h={…h,…S}),n&&t.blockInitialAnimation&&(E=!1);let L=w&&P,j=!L||T;E&&j&&l.push(…C.map(e=>{let i={type:f};if(“string”==typeof e&&n&&!L&&t.manuallyAnimateOnMount&&t.parent){let{parent:n}=t,r=(0,W.K)(n,e);if(n.enteringChildren&&r){let{delayChildren:e}=r.transition||{};i.delay=H(n.enteringChildren,t,e)}}return{animation:e,options:i}}))}if(u.size){let e={};if(“boolean”!=typeof s.initial){let i=(0,W.K)(t,Array.isArray(s.initial)?s.initial[0]:s.initial);i&&i.transition&&(e.transition=i.transition)}u.forEach(i=>{let n=t.getBaseTarget(i),r=t.getValue(i);r&&(r.liveStyle=!0),e[i]=n??null}),l.push({animation:e})}let f=!!l.length;return n&&(!1===s.initial||s.initial===s.animate)&&!t.manuallyAnimateOnMount&&(f=!1),n=!1,f?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,n){if(i[e].isActive===n)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,n)),i[e].isActive=n;let r=o(e);for(let t in i)i[t].protectedKeys={};return r},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=J()}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();(0,R.N)(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let te=0;class ti extends Z{constructor(){super(…arguments),this.id=te++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;let n=this.node.animationState.setActive(“exit”,!t);e&&!t&&n.then(()=>{e(this.id)})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}var tn=i(61426);let tr={x:!1,y:!1};var to=i(48595),ts=i(35614),ta=i(1617),tl=i(17959),tu=i(93619);function th(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i)}let tc=t=>”mouse”===t.pointerType?”number”!=typeof t.button||t.button<=0:!1!==t.isPrimary;function td(t){return{point:{x:t.pageX,y:t.pageY}}}let tp=t=>e=>tc(e)&&t(e,td(e));function tm(t,e,i,n){return th(t,e,tp(i),n)}var tf=i(64113);function tv(t){return t.max-t.min}function tg(t,e,i,n=.5){t.origin=n,t.originPoint=(0,ta.k)(e.min,e.max,t.origin),t.scale=tv(i)/tv(e),t.translate=(0,ta.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 ty(t,e,i,n){tg(t.x,e.x,i.x,n?n.originX:void 0),tg(t.y,e.y,i.y,n?n.originY:void 0)}function tx(t,e,i){t.min=i.min+e.min,t.max=t.min+tv(e)}function tw(t,e,i){t.min=e.min-i.min,t.max=t.min+tv(e)}function tP(t,e,i){tw(t.x,e.x,i.x),tw(t.y,e.y,i.y)}var tE=i(27395);function tT(t){return[t("x"),t("y")]}var tC=i(42892);let tR=({current:t})=>t?t.ownerDocument.defaultView:null;var tS=i(43990),tb=i(41682),tA=i(4488);let tD=(t,e)=>Math.abs(t-e);class tL{constructor(t,e,{transformPagePoint:i,contextWindow:n=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let t=tk(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,i=function(t,e){return Math.sqrt(tD(t.x,e.x)**2+tD(t.y,e.y)**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!i)return;let{point:n}=t,{timestamp:r}=ts.uv;this.history.push({…n,timestamp:r});let{onStart:o,onMove:s}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=tj(e,this.transformPagePoint),ts.Gt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:n,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=tk(“pointercancel”===t.type?this.lastMoveEventInfo:tj(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,o),n&&n(t,o)},!tc(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=n||window;let s=tj(td(t),this.transformPagePoint),{point:a}=s,{timestamp:l}=ts.uv;this.history=[{…a,timestamp:l}];let{onSessionStart:u}=e;u&&u(t,tk(s,this.history)),this.removeListeners=(0,tb.F)(tm(this.contextWindow,”pointermove”,this.handlePointerMove),tm(this.contextWindow,”pointerup”,this.handlePointerUp),tm(this.contextWindow,”pointercancel”,this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),(0,ts.WG)(this.updatePoint)}}function tj(t,e){return e?{point:e(t.point)}:t}function tM(t,e){return{x:t.x-e.x,y:t.y-e.y}}function tk({point:t},e){return{point:t,delta:tM(t,tV(e)),offset:tM(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,n=null,r=tV(t);for(;i>=0&&(n=t[i],!(r.timestamp-n.timestamp>(0,tA.f)(.1)));)i–;if(!n)return{x:0,y:0};let o=(0,tA.X)(r.timestamp-n.timestamp);if(0===o)return{x:0,y:0};let s={x:(r.x-n.x)/o,y:(r.y-n.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}(e,.1)}}function tV(t){return t[t.length-1]}var tB=i(73787),tO=i(36169);function tF(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 tN(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min{let{dragSnapToOrigin:i}=this.getProps();i?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(td(t).point)},onStart:(t,e)=>{let{drag:i,dragPropagation:n,onDragStart:r}=this.getProps();if(i&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(t){if(“x”===t||”y”===t)if(tr[t])return null;else return tr[t]=!0,()=>{tr[t]=!1};return tr.x||tr.y?null:(tr.x=tr.y=!0,()=>{tr.x=tr.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),tT(t=>{let e=this.getAxisMotionValue(t).get()||0;if(to.KN.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let n=i.layout.layoutBox[t];n&&(e=tv(n)*(parseFloat(e)/100))}}this.originPoint[t]=e}),r&&ts.Gt.postRender(()=>r(t,e)),(0,tS.g)(this.visualElement,”transform”);let{animationState:o}=this.visualElement;o&&o.setActive(“whileDrag”,!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;let{dragPropagation:i,dragDirectionLock:n,onDirectionLock:r,onDrag:o}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:s}=e;if(n&&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}(s),null!==this.currentDirection&&r&&r(this.currentDirection);return}this.updateAxis(“x”,e.point,s),this.updateAxis(“y”,e.point,s),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>tT(t=>”paused”===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,distanceThreshold:i,contextWindow:tR(this.visualElement)})}stop(t,e){let i=t||this.latestPointerEvent,n=e||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!n||!i)return;let{velocity:o}=n;this.startAnimation(o);let{onDragEnd:s}=this.getProps();s&&ts.Gt.postRender(()=>s(i,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive(“whileDrag”,!1)}updateAxis(t,e,i){let{drag:n}=this.getProps();if(!i||!tH(t,n,this.currentDirection))return;let r=this.getAxisMotionValue(t),o=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:i},n){return void 0!==e&&ti&&(t=n?(0,ta.k)(i,t,n.max):Math.min(t,i)),t}(o,this.constraints[t],this.elastic[t])),r.set(o)}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,n=this.constraints;t&&O(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:n,right:r}){return{x:tF(t.x,i,r),y:tF(t.y,e,n)}}(i.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:tI(t,”left”,”right”),y:tI(t,”top”,”bottom”)}}(e),n!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&tT(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||!O(e))return!1;let n=e.current;(0,tl.V)(null!==n,”If `dragConstraints` is set as a React ref, that ref must be passed to another component’s `ref` prop.”,”drag-constraints-ref”);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let o=(0,tC.L)(n,r.root,this.visualElement.getTransformPagePoint()),s=(t=r.layout.layoutBox,{x:tN(t.x,o.x),y:tN(t.y,o.y)});if(i){let t=i((0,tf.pA)(s));this.hasMutatedConstraints=!!t,t&&(s=(0,tf.FY)(t))}return s}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:n,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{};return Promise.all(tT(s=>{if(!tH(s,e,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});let u={type:”inertia”,velocity:i?t[s]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,…r,…l};return this.startAxisValueAnimation(s,u)})).then(s)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return(0,tS.g)(this.visualElement,t),i.start((0,tu.f)(t,i,0,e,this.visualElement,!1))}stopAnimation(){tT(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){tT(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}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){tT(e=>{let{drag:i}=this.getProps();if(!tH(e,i,this.currentDirection))return;let{projection:n}=this.visualElement,r=this.getAxisMotionValue(e);if(n&&n.layout){let{min:i,max:o}=n.layout.layoutBox[e];r.set(t[e]-(0,ta.k)(i,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!O(e)||!i||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};tT(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){let i=e.get();n[t]=function(t,e){let i=.5,n=tv(t),r=tv(e);return r>n?i=(0,tB.q)(e.min,e.max-n,t.min):n>r&&(i=(0,tB.q)(t.min,t.max-r,e.min)),(0,tO.q)(0,1,i)}({min:i,max:i},this.constraints[t])}});let{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},””):”none”,i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),tT(e=>{if(!tH(e,t,null))return;let i=this.getAxisMotionValue(e),{min:r,max:o}=this.constraints[e];i.set((0,ta.k)(r,o,n[e]))})}addListeners(){if(!this.visualElement.current)return;tW.set(this.visualElement,this);let t=tm(this.visualElement.current,”pointerdown”,t=>{let{drag:e,dragListener:i=!0}=this.getProps();e&&i&&this.start(t)}),e=()=>{let{dragConstraints:t}=this.getProps();O(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,n=i.addEventListener(“measure”,e);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ts.Gt.read(e);let r=th(window,”resize”,()=>this.scalePositionWithinConstraints()),o=i.addEventListener(“didUpdate”,({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(tT(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(),t(),n(),o&&o()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:r=!1,dragElastic:o=.35,dragMomentum:s=!0}=t;return{…t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:r,dragElastic:o,dragMomentum:s}}}function tH(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}class tz extends Z{constructor(t){super(t),this.removeGroupControls=tn.l,this.removeListeners=tn.l,this.controls=new tG(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tn.l}unmount(){this.removeGroupControls(),this.removeListeners()}}let tK=t=>(e,i)=>{t&&ts.Gt.postRender(()=>t(e,i))};class t_ extends Z{constructor(){super(…arguments),this.removePointerDownListener=tn.l}onPointerDown(t){this.session=new tL(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:tR(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:tK(t),onStart:tK(e),onMove:i,onEnd:(t,e)=>{delete this.session,n&&ts.Gt.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=tm(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 t$=i(82790),tQ=i(78561);let tq={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function tX(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let tY={correct:(t,e)=>{if(!e.target)return t;if(“string”==typeof t)if(!to.px.test(t))return t;else t=parseFloat(t);let i=tX(t,e.target.x),n=tX(t,e.target.y);return`${i}% ${n}%`}};var tJ=i(49145),tZ=i(77436);let t0=!1;class t1 extends n.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:r}=t;(0,tZ.$)(t5),r&&(e.group&&e.group.add(r),i&&i.register&&n&&i.register(r),t0&&r.root.didUpdate(),r.addEventListener(“animationComplete”,()=>{this.safeToRemove()}),r.setOptions({…r.options,onExitComplete:()=>this.safeToRemove()})),tq.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:n,isPresent:r}=this.props,{projection:o}=i;return o&&(o.isPresent=r,t0=!0,n||t.layoutDependency!==e||void 0===e||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||ts.Gt.postRender(()=>{let t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),t$.k.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;t0=!0,n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function t2(t){let[e,i]=(0,tQ.xQ)(),r=(0,n.useContext)(u.L);return(0,l.jsx)(t1,{…t,layoutGroup:r,switchLayoutGroup:(0,n.useContext)(N),isPresent:e,safeToRemove:i})}let t5={borderRadius:{…tY,applyTo:[“borderTopLeftRadius”,”borderTopRightRadius”,”borderBottomLeftRadius”,”borderBottomRightRadius”]},borderTopLeftRadius:tY,borderTopRightRadius:tY,borderBottomLeftRadius:tY,borderBottomRightRadius:tY,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let n=tJ.f.parse(t);if(n.length>5)return t;let r=tJ.f.createTransformer(t),o=+(“number”!=typeof n[0]),s=i.x.scale*e.x,a=i.y.scale*e.y;n[0+o]/=s,n[1+o]/=a;let l=(0,ta.k)(s,a,.5);return”number”==typeof n[2+o]&&(n[2+o]/=l),”number”==typeof n[3+o]&&(n[3+o]/=l),r(n)}}};var t9=i(94379),t3=i(49777),t4=i(76020),t8=i(11626),t6=i(95344),t7=i(94485),et=i(85575),ee=i(48583),ei=i(13429),en=i(16219),er=i(33919);let eo=(t,e)=>t.depth-e.depth;class es{constructor(){this.children=[],this.isDirty=!1}add(t){(0,er.Kq)(this.children,t),this.isDirty=!0}remove(t){(0,er.Ai)(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(eo),this.isDirty=!1,this.children.forEach(t)}}var ea=i(40427);let el=[“TopLeft”,”TopRight”,”BottomLeft”,”BottomRight”],eu=el.length,eh=t=>”string”==typeof t?parseFloat(t):t,ec=t=>”number”==typeof t||to.px.test(t);function ed(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let ep=ef(0,.5,ea.yT),em=ef(.5,.95,tn.l);function ef(t,e,i){return n=>ne?1:i((0,tB.q)(t,e,n))}function ev(t,e){t.min=e.min,t.max=e.max}function eg(t,e){ev(t.x,e.x),ev(t.y,e.y)}function ey(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}var ex=i(96);function ew(t,e,i,n,r){return t-=e,t=(0,ex.hq)(t,1/i,n),void 0!==r&&(t=(0,ex.hq)(t,1/r,n)),t}function eP(t,e,[i,n,r],o,s){!function(t,e=0,i=1,n=.5,r,o=t,s=t){if(to.KN.test(e)&&(e=parseFloat(e),e=(0,ta.k)(s.min,s.max,e/100)-s.min),”number”!=typeof e)return;let a=(0,ta.k)(o.min,o.max,n);t===o&&(a-=e),t.min=ew(t.min,e,i,a,r),t.max=ew(t.max,e,i,a,r)}(t,e[i],e[n],e[r],e.scale,o,s)}let eE=[“x”,”scaleX”,”originX”],eT=[“y”,”scaleY”,”originY”];function eC(t,e,i,n){eP(t.x,e,eE,i?i.x:void 0,n?n.x:void 0),eP(t.y,e,eT,i?i.y:void 0,n?n.y:void 0)}function eR(t){return 0===t.translate&&1===t.scale}function eS(t){return eR(t.x)&&eR(t.y)}function eb(t,e){return t.min===e.min&&t.max===e.max}function eA(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function eD(t,e){return eA(t.x,e.x)&&eA(t.y,e.y)}function eL(t){return tv(t.x)/tv(t.y)}function ej(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class eM{constructor(){this.members=[]}add(t){(0,er.Kq)(this.members,t),t.scheduleRender()}remove(t){if((0,er.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){let e,i=this.members.findIndex(e=>t===e);if(0===i)return!1;for(let t=i;t>=0;t–){let i=this.members[t];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:n}=t.options;!1===n&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:e,resumingFrom:i}=t;e.onExitComplete&&e.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}var ek=i(41319);let eV={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},eB=[“”,”X”,”Y”,”Z”],eO=0;function eF(t,e,i,n){let{latestValues:r}=e;r[t]&&(i[t]=r[t],e.setStaticValue(t,0),n&&(n[t]=0))}function eN({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:n,resetTransform:r}){return class{constructor(t={},i=e?.()){this.id=eO++,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,t9.Q.value&&(eV.nodes=eV.calculatedTargetDeltas=eV.calculatedProjections=0),this.nodes.forEach(eW),this.nodes.forEach(eQ),this.nodes.forEach(eq),this.nodes.forEach(eG),t9.Q.addProjectionMetrics&&t9.Q.addProjectionMetrics(eV)},this.resolvedRelativeTargetAt=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;ts.Gt.read(()=>{n=window.innerWidth}),t(e,()=>{let t=window.innerWidth;t!==n&&(n=t,this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=t6.k.now(),n=({timestamp:r})=>{let o=r-i;o>=250&&((0,ts.WG)(n),t(o-e))};return ts.Gt.setup(n,!0),()=>(0,ts.WG)(n)}(r,250),tq.hasAnimatedSinceResize&&(tq.hasAnimatedSinceResize=!1,this.nodes.forEach(e$)))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&r&&(i||n)&&this.addEventListener(“didUpdate”,({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let o=this.options.transition||r.getDefaultTransition()||e1,{onLayoutAnimationStart:s,onLayoutAnimationComplete:a}=r.getProps(),l=!this.targetLayout||!eD(this.targetLayout,n),u=!e&&i;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={…(0,t8.r)(o,”layout”),onPlay:s,onComplete:a};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u)}else e||e$(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}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,ts.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(eX),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 n=(0,en.P)(i);if(window.MotionHasOptimisedAnimation(n,”transform”)){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,”transform”,ts.Gt,!(t||i))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&t(r)}(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||tv(this.snapshot.measuredBox.x)||tv(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 n=e/1e3;if(eJ(s.x,t.x,n),eJ(s.y,t.y,n),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,d,p,m,f,v;tP(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=a,v=n,eZ(p.x,m.x,f.x,v),eZ(p.y,m.y,f.y,v),i&&(u=this.relativeTarget,d=i,eb(u.x,d.x)&&eb(u.y,d.y))&&(this.isProjectionDirty=!1),i||(i=(0,tE.ge)()),eg(i,this.relativeTarget)}l&&(this.animationValues=o,function(t,e,i,n,r,o){r?(t.opacity=(0,ta.k)(0,i.opacity??1,ep(n)),t.opacityExit=(0,ta.k)(e.opacity??1,0,em(n))):o&&(t.opacity=(0,ta.k)(e.opacity??1,i.opacity??1,n));for(let r=0;r{tq.hasAnimatedSinceResize=!0,t7.q.layout++,this.motionValue||(this.motionValue=(0,et.OQ)(0)),this.currentAnimation=(0,ei.z)(this.motionValue,[0,1e3],{…t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{t7.q.layout–},onComplete:()=>{t7.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:n,latestValues:r}=t;if(e&&i&&n){if(this!==t&&this.layout&&n&&e3(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||(0,tE.ge)();let e=tv(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let n=tv(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+n}eg(e,i),(0,ex.Ww)(e,r),ty(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new eM),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){let{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let n=this.getStack();n&&n.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;let n={};i.z&&eF(“z”,t,n,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(ez),this.root.sharedNodes.clear()}}}function eI(t){t.updateLayout()}function eU(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners(“didUpdate”)){let{layoutBox:i,measuredBox:n}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;”size”===r?tT(t=>{let n=o?e.measuredBox[t]:e.layoutBox[t],r=tv(n);n.min=i[t].min,n.max=n.min+r}):e3(r,e.layoutBox,i)&&tT(n=>{let r=o?e.measuredBox[n]:e.layoutBox[n],s=tv(i[n]);r.max=r.min+s,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[n].max=t.relativeTarget[n].min+s)});let s=(0,tE.xU)();ty(s,i,e.layoutBox);let a=(0,tE.xU)();o?ty(a,t.applyTransform(n,!0),e.measuredBox):ty(a,i,e.layoutBox);let l=!eS(s),u=!1;if(!t.resumeFrom){let n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:r,layout:o}=n;if(r&&o){let s=(0,tE.ge)();tP(s,e.layoutBox,r.layoutBox);let a=(0,tE.ge)();tP(a,i,o.layoutBox),eD(s,a)||(u=!0),n.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=s,t.relativeParent=n)}}}t.notifyListeners(“didUpdate”,{layout:i,snapshot:e,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function eW(t){t9.Q.value&&eV.nodes++,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 eG(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function eH(t){t.clearSnapshot()}function ez(t){t.clearMeasurements()}function eK(t){t.isLayoutDirty=!1}function e_(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify(“BeforeLayoutMeasure”),t.resetTransform()}function e$(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function eQ(t){t.resolveTargetDelta()}function eq(t){t.calcProjection()}function eX(t){t.resetSkewAndRotation()}function eY(t){t.removeLeadSnapshot()}function eJ(t,e,i){t.translate=(0,ta.k)(e.translate,0,i),t.scale=(0,ta.k)(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function eZ(t,e,i,n){t.min=(0,ta.k)(e.min,i.min,n),t.max=(0,ta.k)(e.max,i.max,n)}function e0(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let e1={duration:.45,ease:[.4,0,.1,1]},e2=t=>”undefined”!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),e5=e2(“applewebkit/”)&&!e2(“chrome/”)?Math.round:tn.l;function e9(t){t.min=e5(t.min),t.max=e5(t.max)}function e3(t,e,i){return”position”===t||”preserve-aspect”===t&&!(.2>=Math.abs(eL(e)-eL(i)))}function e4(t){return t!==t.root&&t.scroll?.wasRoot}let e8=eN({attachResizeListener:(t,e)=>th(t,”resize”,e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),e6={current:void 0},e7=eN({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!e6.current){let t=new e8({});t.mount(window),t.setOptions({layoutScroll:!0}),e6.current=t}return e6.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:”none”},checkIsScrollRoot:t=>”fixed”===window.getComputedStyle(t).position});var it=i(46577);function ie(t,e){let i=(0,it.K)(t),n=new AbortController;return[i,{passive:!0,…e,signal:n.signal},()=>n.abort()]}function ii(t){return!(“touch”===t.pointerType||tr.x||tr.y)}function ir(t,e,i){let{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive(“whileHover”,”Start”===i);let r=n[“onHover”+i];r&&ts.Gt.postRender(()=>r(e,td(e)))}class io extends Z{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,r,o]=ie(t,i),s=t=>{if(!ii(t))return;let{target:i}=t,n=e(i,t);if(“function”!=typeof n||!i)return;let o=t=>{ii(t)&&(n(t),i.removeEventListener(“pointerleave”,o))};i.addEventListener(“pointerleave”,o,r)};return n.forEach(t=>{t.addEventListener(“pointerenter”,s,r)}),o}(t,(t,e)=>(ir(this.node,e,”Start”),t=>ir(this.node,t,”End”))))}unmount(){}}class is extends Z{constructor(){super(…arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(“:focus-visible”)}catch(e){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=(0,tb.F)(th(this.node.current,”focus”,()=>this.onFocus()),th(this.node.current,”blur”,()=>this.onBlur()))}unmount(){}}var ia=i(21674);let il=(t,e)=>!!e&&(t===e||il(t,e.parentElement)),iu=new Set([“BUTTON”,”INPUT”,”SELECT”,”TEXTAREA”,”A”]),ih=new WeakSet;function ic(t){return e=>{“Enter”===e.key&&t(e)}}function id(t,e){t.dispatchEvent(new PointerEvent(“pointer”+e,{isPrimary:!0,bubbles:!0}))}let ip=(t,e)=>{let i=t.currentTarget;if(!i)return;let n=ic(()=>{if(ih.has(i))return;id(i,”down”);let t=ic(()=>{id(i,”up”)});i.addEventListener(“keyup”,t,e),i.addEventListener(“blur”,()=>id(i,”cancel”),e)});i.addEventListener(“keydown”,n,e),i.addEventListener(“blur”,()=>i.removeEventListener(“keydown”,n),e)};function im(t){return tc(t)&&!(tr.x||tr.y)}function iv(t,e,i){let{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive(“whileTap”,”Start”===i);let r=n[“onTap”+(“End”===i?””:i)];r&&ts.Gt.postRender(()=>r(e,td(e)))}class ig extends Z{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,r,o]=ie(t,i),s=t=>{let n=t.currentTarget;if(!im(t))return;ih.add(n);let o=e(n,t),s=(t,e)=>{window.removeEventListener(“pointerup”,a),window.removeEventListener(“pointercancel”,l),ih.has(n)&&ih.delete(n),im(t)&&”function”==typeof o&&o(t,{success:e})},a=t=>{s(t,n===window||n===document||i.useGlobalTarget||il(n,t.target))},l=t=>{s(t,!1)};window.addEventListener(“pointerup”,a,r),window.addEventListener(“pointercancel”,l,r)};return n.forEach(t=>{((i.useGlobalTarget?window:t).addEventListener(“pointerdown”,s,r),(0,ia.s)(t))&&(t.addEventListener(“focus”,t=>ip(t,r)),iu.has(t.tagName)||-1!==t.tabIndex||t.hasAttribute(“tabindex”)||(t.tabIndex=0))}),o}(t,(t,e)=>(iv(this.node,e,”Start”),(t,{success:e})=>iv(this.node,t,e?”End”:”Cancel”)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}let iy=new WeakMap,ix=new WeakMap,iw=t=>{let e=iy.get(t.target);e&&e(t)},iP=t=>{t.forEach(iw)},iE={some:0,all:1};class iT extends Z{constructor(){super(…arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:n=”some”,once:r}=t,o={root:e?e.current:void 0,rootMargin:i,threshold:”number”==typeof n?n:iE[n]};return function(t,e,i){let n=function({root:t,…e}){let i=t||document;ix.has(i)||ix.set(i,{});let n=ix.get(i),r=JSON.stringify(e);return n[r]||(n[r]=new IntersectionObserver(iP,{root:t,…e})),n[r]}(e);return iy.set(t,i),n.observe(t),()=>{iy.delete(t),n.unobserve(t)}}(this.node.current,o,t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,r&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(“whileInView”,e);let{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),o=e?i:n;o&&o(t)})}mount(){this.startObserver()}update(){if(“undefined”==typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;[“amount”,”margin”,”root”].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){}}let iC=function(t,e){if(“undefined”==typeof Proxy)return U;let i=new Map,n=(i,n)=>U(i,n,t,e);return new Proxy((t,e)=>n(t,e),{get:(r,o)=>”create”===o?n:(i.has(o)||i.set(o,U(o,void 0,t,e)),i.get(o))})}({animation:{Feature:tt},exit:{Feature:ti},inView:{Feature:iT},tap:{Feature:ig},focus:{Feature:is},hover:{Feature:io},pan:{Feature:t_},drag:{Feature:tz,ProjectionNode:e7,MeasureLayout:t2},layout:{ProjectionNode:e7,MeasureLayout:t2}},(t,e)=>a(t)?new o.l(e):new r.M(e,{allowProjection:t!==n.Fragment}))},76986:(t,e,i)=>{i.d(e,{J:()=>a,D:()=>s});let n=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 r(t){return t.startsWith(“while”)||t.startsWith(“drag”)&&”draggable”!==t||t.startsWith(“layout”)||t.startsWith(“onTap”)||t.startsWith(“onPan”)||t.startsWith(“onLayout”)||n.has(t)}let o=t=>!r(t);function s(t){“function”==typeof t&&(o=e=>e.startsWith(“on”)?!r(e):t(e))}try{s(require(“@emotion/is-prop-valid”).default)}catch{}function a(t,e,i){let n={};for(let s in t)(“values”!==s||”object”!=typeof t.values)&&(o(s)||!0===i&&r(s)||!e&&!r(s)||t.draggable&&s.startsWith(“onDrag”))&&(n[s]=t[s]);return n}},78561:(t,e,i)=>{i.d(e,{xQ:()=>o});var n=i(59282),r=i(57814);function o(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],e=(0,n.useContext)(r.t);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:o,register:s}=e,a=(0,n.useId)();(0,n.useEffect)(()=>{if(t)return s(a)},[t]);let l=(0,n.useCallback)(()=>t&&o&&o(a),[a,o,t]);return!i&&o?[!1,l]:[!0]}},86898:(t,e,i)=>{i.d(e,{UC:()=>tA,q7:()=>tR,N_:()=>tb,B8:()=>tC,bL:()=>tT,l9:()=>tS,LM:()=>tD});var n,r=i(59282),o=i(63311),s=i(73949),a=i(85170),l=i(43883),u=i(54202),h=r.forwardRef((t,e)=>{let{children:i,…n}=t,o=r.Children.toArray(i),s=o.find(p);if(s){let t=s.props.children,i=o.map(e=>e!==s?e:r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null);return(0,u.jsx)(c,{…n,ref:e,children:r.isValidElement(t)?r.cloneElement(t,void 0,i):null})}return(0,u.jsx)(c,{…n,ref:e,children:i})});h.displayName=”Slot”;var c=r.forwardRef((t,e)=>{let{children:i,…n}=t;if(r.isValidElement(i)){let t=function(t){let e=Object.getOwnPropertyDescriptor(t.props,”ref”)?.get,i=e&&”isReactWarning”in e&&e.isReactWarning;return i?t.ref:(i=(e=Object.getOwnPropertyDescriptor(t,”ref”)?.get)&&”isReactWarning”in e&&e.isReactWarning)?t.props.ref:t.props.ref||t.ref}(i);return r.cloneElement(i,{…function(t,e){let i={…e};for(let n in e){let r=t[n],o=e[n];/^on[A-Z]/.test(n)?r&&o?i[n]=(…t)=>{o(…t),r(…t)}:r&&(i[n]=r):”style”===n?i[n]={…r,…o}:”className”===n&&(i[n]=[r,o].filter(Boolean).join(” “))}return{…t,…i}}(n,i.props),ref:e?(0,l.t)(e,t):t})}return r.Children.count(i)>1?r.Children.only(null):null});c.displayName=”SlotClone”;var d=({children:t})=>(0,u.jsx)(u.Fragment,{children:t});function p(t){return r.isValidElement(t)&&t.type===d}var m=[“a”,”button”,”div”,”form”,”h2″,”h3″,”img”,”input”,”label”,”li”,”nav”,”ol”,”p”,”span”,”svg”,”ul”].reduce((t,e)=>{let i=r.forwardRef((t,i)=>{let{asChild:n,…r}=t,o=n?h:e;return”undefined”!=typeof window&&(window[Symbol.for(“radix-ui”)]=!0),(0,u.jsx)(o,{…r,ref:i})});return i.displayName=`Primitive.${e}`,{…t,[e]:i}},{});function f(t,e){t&&o.flushSync(()=>t.dispatchEvent(e))}var v=i(434),g=r.createContext(void 0),y=i(85065),x=i(65322);function w(t){let e=t+”CollectionProvider”,[i,n]=(0,s.A)(e),[o,a]=i(e,{collectionRef:{current:null},itemMap:new Map}),c=t=>{let{scope:e,children:i}=t,n=r.useRef(null),s=r.useRef(new Map).current;return(0,u.jsx)(o,{scope:e,itemMap:s,collectionRef:n,children:i})};c.displayName=e;let d=t+”CollectionSlot”,p=r.forwardRef((t,e)=>{let{scope:i,children:n}=t,r=a(d,i),o=(0,l.s)(e,r.collectionRef);return(0,u.jsx)(h,{ref:o,children:n})});p.displayName=d;let m=t+”CollectionItemSlot”,f=”data-radix-collection-item”,v=r.forwardRef((t,e)=>{let{scope:i,children:n,…o}=t,s=r.useRef(null),c=(0,l.s)(e,s),d=a(m,i);return r.useEffect(()=>(d.itemMap.set(s,{ref:s,…o}),()=>void d.itemMap.delete(s))),(0,u.jsx)(h,{…{[f]:””},ref:c,children:n})});return v.displayName=m,[{Provider:c,Slot:p,ItemSlot:v},function(e){let i=a(t+”CollectionConsumer”,e);return r.useCallback(()=>{let t=i.collectionRef.current;if(!t)return[];let e=Array.from(t.querySelectorAll(“[“.concat(f,”]”)));return Array.from(i.itemMap.values()).sort((t,i)=>e.indexOf(t.ref.current)-e.indexOf(i.ref.current))},[i.collectionRef,i.itemMap])},n]}var P=i(19226),E=i(45798),T=”dismissableLayer.update”,C=r.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),R=r.forwardRef((t,e)=>{var i,o;let{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:h,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:p,onDismiss:f,…v}=t,g=r.useContext(C),[y,x]=r.useState(null),w=null!=(o=null==y?void 0:y.ownerDocument)?o:null==(i=globalThis)?void 0:i.document,[,R]=r.useState({}),A=(0,l.s)(e,t=>x(t)),D=Array.from(g.layers),[L]=[…g.layersWithOutsidePointerEventsDisabled].slice(-1),j=D.indexOf(L),M=y?D.indexOf(y):-1,k=g.layersWithOutsidePointerEventsDisabled.size>0,V=M>=j,B=function(t){var e;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(e=globalThis)?void 0:e.document,n=(0,P.c)(t),o=r.useRef(!1),s=r.useRef(()=>{});return r.useEffect(()=>{let t=t=>{if(t.target&&!o.current){let e=function(){b(“dismissableLayer.pointerDownOutside”,n,r,{discrete:!0})},r={originalEvent:t};”touch”===t.pointerType?(i.removeEventListener(“click”,s.current),s.current=e,i.addEventListener(“click”,s.current,{once:!0})):e()}else i.removeEventListener(“click”,s.current);o.current=!1},e=window.setTimeout(()=>{i.addEventListener(“pointerdown”,t)},0);return()=>{window.clearTimeout(e),i.removeEventListener(“pointerdown”,t),i.removeEventListener(“click”,s.current)}},[i,n]),{onPointerDownCapture:()=>o.current=!0}}(t=>{let e=t.target,i=[…g.branches].some(t=>t.contains(e));V&&!i&&(null==c||c(t),null==p||p(t),t.defaultPrevented||null==f||f())},w),O=function(t){var e;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(e=globalThis)?void 0:e.document,n=(0,P.c)(t),o=r.useRef(!1);return r.useEffect(()=>{let t=t=>{t.target&&!o.current&&b(“dismissableLayer.focusOutside”,n,{originalEvent:t},{discrete:!1})};return i.addEventListener(“focusin”,t),()=>i.removeEventListener(“focusin”,t)},[i,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(t=>{let e=t.target;![…g.branches].some(t=>t.contains(e))&&(null==d||d(t),null==p||p(t),t.defaultPrevented||null==f||f())},w);return(0,E.U)(t=>{M===g.layers.size-1&&(null==h||h(t),!t.defaultPrevented&&f&&(t.preventDefault(),f()))},w),r.useEffect(()=>{if(y)return s&&(0===g.layersWithOutsidePointerEventsDisabled.size&&(n=w.body.style.pointerEvents,w.body.style.pointerEvents=”none”),g.layersWithOutsidePointerEventsDisabled.add(y)),g.layers.add(y),S(),()=>{s&&1===g.layersWithOutsidePointerEventsDisabled.size&&(w.body.style.pointerEvents=n)}},[y,w,s,g]),r.useEffect(()=>()=>{y&&(g.layers.delete(y),g.layersWithOutsidePointerEventsDisabled.delete(y),S())},[y,g]),r.useEffect(()=>{let t=()=>R({});return document.addEventListener(T,t),()=>document.removeEventListener(T,t)},[]),(0,u.jsx)(m.div,{…v,ref:A,style:{pointerEvents:k?V?”auto”:”none”:void 0,…t.style},onFocusCapture:(0,a.m)(t.onFocusCapture,O.onFocusCapture),onBlurCapture:(0,a.m)(t.onBlurCapture,O.onBlurCapture),onPointerDownCapture:(0,a.m)(t.onPointerDownCapture,B.onPointerDownCapture)})});function S(){let t=new CustomEvent(T);document.dispatchEvent(t)}function b(t,e,i,n){let{discrete:r}=n,o=i.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:i});e&&o.addEventListener(t,e,{once:!0}),r?f(o,s):o.dispatchEvent(s)}R.displayName=”DismissableLayer”,r.forwardRef((t,e)=>{let i=r.useContext(C),n=r.useRef(null),o=(0,l.s)(e,n);return r.useEffect(()=>{let t=n.current;if(t)return i.branches.add(t),()=>{i.branches.delete(t)}},[i.branches]),(0,u.jsx)(m.div,{…t,ref:o})}).displayName=”DismissableLayerBranch”;var A=i(21678),D=i(62258),L=r.forwardRef((t,e)=>(0,u.jsx)(m.span,{…t,ref:e,style:{position:”absolute”,border:0,width:1,height:1,padding:0,margin:-1,overflow:”hidden”,clip:”rect(0, 0, 0, 0)”,whiteSpace:”nowrap”,wordWrap:”normal”,…t.style}}));L.displayName=”VisuallyHidden”;var j=”NavigationMenu”,[M,k,V]=w(j),[B,O,F]=w(j),[N,I]=(0,s.A)(j,[V,F]),[U,W]=N(j),[G,H]=N(j),z=r.forwardRef((t,e)=>{let{__scopeNavigationMenu:i,value:n,onValueChange:o,defaultValue:s,delayDuration:a=200,skipDelayDuration:h=300,orientation:c=”horizontal”,dir:d,…p}=t,[f,y]=r.useState(null),x=(0,l.s)(e,t=>y(t)),w=function(t){let e=r.useContext(g);return t||e||”ltr”}(d),P=r.useRef(0),E=r.useRef(0),T=r.useRef(0),[C,R]=r.useState(!0),[S=””,b]=(0,v.i)({prop:n,onChange:t=>{let e=h>0;””!==t?(window.clearTimeout(T.current),e&&R(!1)):(window.clearTimeout(T.current),T.current=window.setTimeout(()=>R(!0),h)),null==o||o(t)},defaultProp:s}),A=r.useCallback(()=>{window.clearTimeout(E.current),E.current=window.setTimeout(()=>b(“”),150)},[b]),D=r.useCallback(t=>{window.clearTimeout(E.current),b(t)},[b]),L=r.useCallback(t=>{S===t?window.clearTimeout(E.current):P.current=window.setTimeout(()=>{window.clearTimeout(E.current),b(t)},a)},[S,b,a]);return r.useEffect(()=>()=>{window.clearTimeout(P.current),window.clearTimeout(E.current),window.clearTimeout(T.current)},[]),(0,u.jsx)(_,{scope:i,isRootMenu:!0,value:S,dir:w,orientation:c,rootNavigationMenu:f,onTriggerEnter:t=>{window.clearTimeout(P.current),C?L(t):D(t)},onTriggerLeave:()=>{window.clearTimeout(P.current),A()},onContentEnter:()=>window.clearTimeout(E.current),onContentLeave:A,onItemSelect:t=>{b(e=>e===t?””:t)},onItemDismiss:()=>b(“”),children:(0,u.jsx)(m.nav,{“aria-label”:”Main”,”data-orientation”:c,dir:w,…p,ref:x})})});z.displayName=j;var K=”NavigationMenuSub”;r.forwardRef((t,e)=>{let{__scopeNavigationMenu:i,value:n,onValueChange:r,defaultValue:o,orientation:s=”horizontal”,…a}=t,l=W(K,i),[h=””,c]=(0,v.i)({prop:n,onChange:r,defaultProp:o});return(0,u.jsx)(_,{scope:i,isRootMenu:!1,value:h,dir:l.dir,orientation:s,rootNavigationMenu:l.rootNavigationMenu,onTriggerEnter:t=>c(t),onItemSelect:t=>c(t),onItemDismiss:()=>c(“”),children:(0,u.jsx)(m.div,{“data-orientation”:s,…a,ref:e})})}).displayName=K;var _=t=>{let{scope:e,isRootMenu:i,rootNavigationMenu:n,dir:o,orientation:s,children:a,value:l,onItemSelect:h,onItemDismiss:c,onTriggerEnter:d,onTriggerLeave:p,onContentEnter:m,onContentLeave:f}=t,[v,g]=r.useState(null),[y,w]=r.useState(new Map),[E,T]=r.useState(null);return(0,u.jsx)(U,{scope:e,isRootMenu:i,rootNavigationMenu:n,value:l,previousValue:(0,A.Z)(l),baseId:(0,x.B)(),dir:o,orientation:s,viewport:v,onViewportChange:g,indicatorTrack:E,onIndicatorTrackChange:T,onTriggerEnter:(0,P.c)(d),onTriggerLeave:(0,P.c)(p),onContentEnter:(0,P.c)(m),onContentLeave:(0,P.c)(f),onItemSelect:(0,P.c)(h),onItemDismiss:(0,P.c)(c),onViewportContentChange:r.useCallback((t,e)=>{w(i=>(i.set(t,e),new Map(i)))},[]),onViewportContentRemove:r.useCallback(t=>{w(e=>e.has(t)?(e.delete(t),new Map(e)):e)},[]),children:(0,u.jsx)(M.Provider,{scope:e,children:(0,u.jsx)(G,{scope:e,items:y,children:a})})})},$=”NavigationMenuList”,Q=r.forwardRef((t,e)=>{let{__scopeNavigationMenu:i,…n}=t,r=W($,i),o=(0,u.jsx)(m.ul,{“data-orientation”:r.orientation,…n,ref:e});return(0,u.jsx)(m.div,{style:{position:”relative”},ref:r.onIndicatorTrackChange,children:(0,u.jsx)(M.Slot,{scope:i,children:r.isRootMenu?(0,u.jsx)(tp,{asChild:!0,children:o}):o})})});Q.displayName=$;var q=”NavigationMenuItem”,[X,Y]=N(q),J=r.forwardRef((t,e)=>{let{__scopeNavigationMenu:i,value:n,…o}=t,s=(0,x.B)(),a=r.useRef(null),l=r.useRef(null),h=r.useRef(null),c=r.useRef(()=>{}),d=r.useRef(!1),p=r.useCallback(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:”start”;if(a.current){c.current();let e=tv(a.current);e.length&&tg(“start”===t?e:e.reverse())}},[]),f=r.useCallback(()=>{if(a.current){let t=tv(a.current);t.length&&(c.current=function(t){return t.forEach(t=>{t.dataset.tabindex=t.getAttribute(“tabindex”)||””,t.setAttribute(“tabindex”,”-1″)}),()=>{t.forEach(t=>{let e=t.dataset.tabindex;t.setAttribute(“tabindex”,e)})}}(t))}},[]);return(0,u.jsx)(X,{scope:i,value:n||s||”LEGACY_REACT_AUTO_VALUE”,triggerRef:l,contentRef:a,focusProxyRef:h,wasEscapeCloseRef:d,onEntryKeyDown:p,onFocusProxyEnter:p,onRootContentClose:f,onContentFocusOutside:f,children:(0,u.jsx)(m.li,{…o,ref:e})})});J.displayName=q;var Z=”NavigationMenuTrigger”,tt=r.forwardRef((t,e)=>{let{__scopeNavigationMenu:i,disabled:n,…o}=t,s=W(Z,t.__scopeNavigationMenu),h=Y(Z,t.__scopeNavigationMenu),c=r.useRef(null),d=(0,l.s)(c,h.triggerRef,e),p=tw(s.baseId,h.value),f=tP(s.baseId,h.value),v=r.useRef(!1),g=r.useRef(!1),y=h.value===s.value;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(M.ItemSlot,{scope:i,value:h.value,children:(0,u.jsx)(tf,{asChild:!0,children:(0,u.jsx)(m.button,{id:p,disabled:n,”data-disabled”:n?””:void 0,”data-state”:tx(y),”aria-expanded”:y,”aria-controls”:f,…o,ref:d,onPointerEnter:(0,a.m)(t.onPointerEnter,()=>{g.current=!1,h.wasEscapeCloseRef.current=!1}),onPointerMove:(0,a.m)(t.onPointerMove,tE(()=>{n||g.current||h.wasEscapeCloseRef.current||v.current||(s.onTriggerEnter(h.value),v.current=!0)})),onPointerLeave:(0,a.m)(t.onPointerLeave,tE(()=>{n||(s.onTriggerLeave(),v.current=!1)})),onClick:(0,a.m)(t.onClick,()=>{s.onItemSelect(h.value),g.current=y}),onKeyDown:(0,a.m)(t.onKeyDown,t=>{let e={horizontal:”ArrowDown”,vertical:”rtl”===s.dir?”ArrowLeft”:”ArrowRight”}[s.orientation];y&&t.key===e&&(h.onEntryKeyDown(),t.preventDefault())})})})}),y&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(L,{“aria-hidden”:!0,tabIndex:0,ref:h.focusProxyRef,onFocus:t=>{let e=h.contentRef.current,i=t.relatedTarget,n=i===c.current,r=null==e?void 0:e.contains(i);(n||!r)&&h.onFocusProxyEnter(n?”start”:”end”)}}),s.viewport&&(0,u.jsx)(“span”,{“aria-owns”:f})]})]})});tt.displayName=Z;var te=”navigationMenu.linkSelect”,ti=r.forwardRef((t,e)=>{let{__scopeNavigationMenu:i,active:n,onSelect:r,…o}=t;return(0,u.jsx)(tf,{asChild:!0,children:(0,u.jsx)(m.a,{“data-active”:n?””:void 0,”aria-current”:n?”page”:void 0,…o,ref:e,onClick:(0,a.m)(t.onClick,t=>{let e=t.target,i=new CustomEvent(te,{bubbles:!0,cancelable:!0});e.addEventListener(te,t=>null==r?void 0:r(t),{once:!0}),f(e,i),i.defaultPrevented||t.metaKey||f(e,new CustomEvent(tl,{bubbles:!0,cancelable:!0}))},{checkForDefaultPrevented:!1})})})});ti.displayName=”NavigationMenuLink”;var tn=”NavigationMenuIndicator”;r.forwardRef((t,e)=>{let{forceMount:i,…n}=t,r=W(tn,t.__scopeNavigationMenu),s=!!r.value;return r.indicatorTrack?o.createPortal((0,u.jsx)(y.C,{present:i||s,children:(0,u.jsx)(tr,{…n,ref:e})}),r.indicatorTrack):null}).displayName=tn;var tr=r.forwardRef((t,e)=>{let{__scopeNavigationMenu:i,…n}=t,o=W(tn,i),s=k(i),[a,l]=r.useState(null),[h,c]=r.useState(null),d=”horizontal”===o.orientation,p=!!o.value;r.useEffect(()=>{var t;let e=null==(t=s().find(t=>t.value===o.value))?void 0:t.ref.current;e&&l(e)},[s,o.value]);let f=()=>{a&&c({size:d?a.offsetWidth:a.offsetHeight,offset:d?a.offsetLeft:a.offsetTop})};return ty(a,f),ty(o.indicatorTrack,f),h?(0,u.jsx)(m.div,{“aria-hidden”:!0,”data-state”:p?”visible”:”hidden”,”data-orientation”:o.orientation,…n,ref:e,style:{position:”absolute”,…d?{left:0,width:h.size+”px”,transform:”translateX(“.concat(h.offset,”px)”)}:{top:0,height:h.size+”px”,transform:”translateY(“.concat(h.offset,”px)”)},…n.style}}):null}),to=”NavigationMenuContent”,ts=r.forwardRef((t,e)=>{let{forceMount:i,…n}=t,r=W(to,t.__scopeNavigationMenu),o=Y(to,t.__scopeNavigationMenu),s=(0,l.s)(o.contentRef,e),h=o.value===r.value,c={value:o.value,triggerRef:o.triggerRef,focusProxyRef:o.focusProxyRef,wasEscapeCloseRef:o.wasEscapeCloseRef,onContentFocusOutside:o.onContentFocusOutside,onRootContentClose:o.onRootContentClose,…n};return r.viewport?(0,u.jsx)(ta,{forceMount:i,…c,ref:s}):(0,u.jsx)(y.C,{present:i||h,children:(0,u.jsx)(tu,{“data-state”:tx(h),…c,ref:s,onPointerEnter:(0,a.m)(t.onPointerEnter,r.onContentEnter),onPointerLeave:(0,a.m)(t.onPointerLeave,tE(r.onContentLeave)),style:{pointerEvents:!h&&r.isRootMenu?”none”:void 0,…c.style}})})});ts.displayName=to;var ta=r.forwardRef((t,e)=>{let{onViewportContentChange:i,onViewportContentRemove:n}=W(to,t.__scopeNavigationMenu);return(0,D.N)(()=>{i(t.value,{ref:e,…t})},[t,e,i]),(0,D.N)(()=>()=>n(t.value),[t.value,n]),null}),tl=”navigationMenu.rootContentDismiss”,tu=r.forwardRef((t,e)=>{let{__scopeNavigationMenu:i,value:n,triggerRef:o,focusProxyRef:s,wasEscapeCloseRef:h,onRootContentClose:c,onContentFocusOutside:d,…p}=t,m=W(to,i),f=r.useRef(null),v=(0,l.s)(f,e),g=tw(m.baseId,n),y=tP(m.baseId,n),x=k(i),w=r.useRef(null),{onItemDismiss:P}=m;r.useEffect(()=>{let t=f.current;if(m.isRootMenu&&t){let e=()=>{var e;P(),c(),t.contains(document.activeElement)&&(null==(e=o.current)||e.focus())};return t.addEventListener(tl,e),()=>t.removeEventListener(tl,e)}},[m.isRootMenu,t.value,o,P,c]);let E=r.useMemo(()=>{let t=x().map(t=>t.value);”rtl”===m.dir&&t.reverse();let e=t.indexOf(m.value),i=t.indexOf(m.previousValue),r=n===m.value,o=i===t.indexOf(n);if(!r&&!o)return w.current;let s=(()=>{if(e!==i){if(r&&-1!==i)return e>i?”from-end”:”from-start”;if(o&&-1!==e)return e>i?”to-start”:”to-end”}return null})();return w.current=s,s},[m.previousValue,m.value,m.dir,x,n]);return(0,u.jsx)(tp,{asChild:!0,children:(0,u.jsx)(R,{id:y,”aria-labelledby”:g,”data-motion”:E,”data-orientation”:m.orientation,…p,ref:v,disableOutsidePointerEvents:!1,onDismiss:()=>{var t;let e=new Event(tl,{bubbles:!0,cancelable:!0});null==(t=f.current)||t.dispatchEvent(e)},onFocusOutside:(0,a.m)(t.onFocusOutside,t=>{var e;d();let i=t.target;(null==(e=m.rootNavigationMenu)?void 0:e.contains(i))&&t.preventDefault()}),onPointerDownOutside:(0,a.m)(t.onPointerDownOutside,t=>{var e;let i=t.target,n=x().some(t=>{var e;return null==(e=t.ref.current)?void 0:e.contains(i)}),r=m.isRootMenu&&(null==(e=m.viewport)?void 0:e.contains(i));(n||r||!m.isRootMenu)&&t.preventDefault()}),onKeyDown:(0,a.m)(t.onKeyDown,t=>{let e=t.altKey||t.ctrlKey||t.metaKey;if(“Tab”===t.key&&!e){let e=tv(t.currentTarget),n=document.activeElement,r=e.findIndex(t=>t===n);if(tg(t.shiftKey?e.slice(0,r).reverse():e.slice(r+1,e.length)))t.preventDefault();else{var i;null==(i=s.current)||i.focus()}}}),onEscapeKeyDown:(0,a.m)(t.onEscapeKeyDown,t=>{h.current=!0})})})}),th=”NavigationMenuViewport”,tc=r.forwardRef((t,e)=>{let{forceMount:i,…n}=t,r=!!W(th,t.__scopeNavigationMenu).value;return(0,u.jsx)(y.C,{present:i||r,children:(0,u.jsx)(td,{…n,ref:e})})});tc.displayName=th;var td=r.forwardRef((t,e)=>{let{__scopeNavigationMenu:i,children:n,…o}=t,s=W(th,i),h=(0,l.s)(e,s.onViewportChange),c=H(to,t.__scopeNavigationMenu),[d,p]=r.useState(null),[f,v]=r.useState(null),g=d?(null==d?void 0:d.width)+”px”:void 0,x=d?(null==d?void 0:d.height)+”px”:void 0,w=!!s.value,P=w?s.value:s.previousValue;return ty(f,()=>{f&&p({width:f.offsetWidth,height:f.offsetHeight})}),(0,u.jsx)(m.div,{“data-state”:tx(w),”data-orientation”:s.orientation,…o,ref:h,style:{pointerEvents:!w&&s.isRootMenu?”none”:void 0,”–radix-navigation-menu-viewport-width”:g,”–radix-navigation-menu-viewport-height”:x,…o.style},onPointerEnter:(0,a.m)(t.onPointerEnter,s.onContentEnter),onPointerLeave:(0,a.m)(t.onPointerLeave,tE(s.onContentLeave)),children:Array.from(c.items).map(t=>{let[e,{ref:i,forceMount:n,…r}]=t,o=P===e;return(0,u.jsx)(y.C,{present:n||o,children:(0,u.jsx)(tu,{…r,ref:(0,l.t)(i,t=>{o&&t&&v(t)})})},e)})})}),tp=r.forwardRef((t,e)=>{let{__scopeNavigationMenu:i,…n}=t,r=W(“FocusGroup”,i);return(0,u.jsx)(B.Provider,{scope:i,children:(0,u.jsx)(B.Slot,{scope:i,children:(0,u.jsx)(m.div,{dir:r.dir,…n,ref:e})})})}),tm=[“ArrowRight”,”ArrowLeft”,”ArrowUp”,”ArrowDown”],tf=r.forwardRef((t,e)=>{let{__scopeNavigationMenu:i,…n}=t,r=O(i),o=W(“FocusGroupItem”,i);return(0,u.jsx)(B.ItemSlot,{scope:i,children:(0,u.jsx)(m.button,{…n,ref:e,onKeyDown:(0,a.m)(t.onKeyDown,t=>{if([“Home”,”End”,…tm].includes(t.key)){let e=r().map(t=>t.ref.current);if([“rtl”===o.dir?”ArrowRight”:”ArrowLeft”,”ArrowUp”,”End”].includes(t.key)&&e.reverse(),tm.includes(t.key)){let i=e.indexOf(t.currentTarget);e=e.slice(i+1)}setTimeout(()=>tg(e)),t.preventDefault()}})})})});function tv(t){let e=[],i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>{let e=”INPUT”===t.tagName&&”hidden”===t.type;return t.disabled||t.hidden||e?NodeFilter.FILTER_SKIP:t.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)e.push(i.currentNode);return e}function tg(t){let e=document.activeElement;return t.some(t=>t===e||(t.focus(),document.activeElement!==e))}function ty(t,e){let i=(0,P.c)(e);(0,D.N)(()=>{let e=0;if(t){let n=new ResizeObserver(()=>{cancelAnimationFrame(e),e=window.requestAnimationFrame(i)});return n.observe(t),()=>{window.cancelAnimationFrame(e),n.unobserve(t)}}},[t,i])}function tx(t){return t?”open”:”closed”}function tw(t,e){return””.concat(t,”-trigger-“).concat(e)}function tP(t,e){return””.concat(t,”-content-“).concat(e)}function tE(t){return e=>”mouse”===e.pointerType?t(e):void 0}var tT=z,tC=Q,tR=J,tS=tt,tb=ti,tA=ts,tD=tc}}]);