PageSourceSearch

https://www.tinykola.com/assets/CheckoutModal-BicL2qo0.js

js tinykola.com collected 2026-10-04 08:23:48 UTC 124,182 bytes, 1 lines download raw bytes

vendor: 6,524 bytes, line 1
1import{r as P,j as v,y as gr,l as yr,C as vr,d as xr,z as br}from"./index-CXXvMTt7.js";import{b as bn,P as Tn,i as Pn,v as Tr,c as Wt,G as Pr,s as wr,C as Sr,j as Ar,f as Vr,k as Cr,l as Dr,S as wn}from"./publicPayments-BDNEnf5P.js";import{L as ce}from"./loader-2-CeC1SA1A.js";import{S as Mr}from"./shield-check-DGPAAI66.js";const _s=P.createContext({});function Er(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ne=P.createContext(null),Us=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Rr(t=!0){const e=P.useContext(Ne);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=P.useId();P.useEffect(()=>{t&&i(o)},[t]);const r=P.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const _e=typeof window<"u",jr=_e?P.useLayoutEffect:P.useEffect,K=t=>t;let Ks=K;function Ue(t){let e;return()=>(e===void 0&&(e=t()),e)}const gt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},Z=t=>t*1e3,J=t=>t/1e3,Lr={useManualTiming:!1};function kr(t){let e=new Set,n=new Set,s=!1,i=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(a.schedule(c),t()),c(r)}const a={schedule:(c,u=!1,h=!1)=>{const f=h&&s?e:n;return u&&o.add(c),f.has(c)||f.add(c),c},cancel:c=>{n.delete(c),o.delete(c)},process:c=>{if(r=c,s){i=!0;return}s=!0,[e,n]=[n,e],e.forEach(l),e.clear(),s=!1,i&&(i=!1,a.process(c))}};return a}const $t=["read","resolveKeyframes","update","preRender","render","postRender"],Or=40;function Ws(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=$t.reduce((y,x)=>(y[x]=kr(o),y),{}),{read:l,resolveKeyframes:a,update:c,preRender:u,render:h,postRender:d}=r,f=()=>{const y=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(y-i.timestamp,Or),1),i.timestamp=y,i.isProcessing=!0,l.process(i),a.process(i),c.process(i),u.process(i),h.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(f))},m=()=>{n=!0,s=!0,i.isProcessing||t(f)};return{schedule:$t.reduce((y,x)=>{const b=r[x];return y[x]=(V,S=!1,C=!1)=>(n||m(),b.schedule(V,S,C)),y},{}),cancel:y=>{for(let x=0;x<$t.length;x++)r[$t[x]].cancel(y)},state:i,steps:r}}const{schedule:M,cancel:et,state:B,steps:ue}=Ws(typeof requestAnimationFrame<"u"?requestAnimationFrame:K,!0),$s=P.createContext({strict:!1}),Sn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},yt={};for(const t in Sn)yt[t]={isEnabled:e=>Sn[t].some(n=>!!e[n])};function Fr(t){for(const e in t)yt[e]={...yt[e],...t[e]}}const Br=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 Xt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Br.has(t)}let Gs=t=>!Xt(t);function Ir(t){t&&(Gs=e=>e.startsWith("on")?!Xt(e):t(e))}try{Ir(require("@emotion/is-prop-valid").default)}catch{}function Nr(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Gs(i)||n===!0&&Xt(i)||!e&&!Xt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function _r(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const se=P.createContext({});function Lt(t){return typeof t=="string"||Array.isArray(t)}function ie(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Ke=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],We=["initial",...Ke];function re(t){return ie(t.animate)||We.some(e=>Lt(t[e]))}function zs(t){return!!(re(t)||t.variants)}function Ur(t,e){if(re(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Lt(n)?n:void 0,animate:Lt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Kr(t){const{initial:e,animate:n}=Ur(t,P.useContext(se));return P.useMemo(()=>({initial:e,animate:n}),[An(e),An(n)])}function An(t){return Array.isArray(t)?t.join(" "):t}const Wr=Symbol.for("motionComponentSymbol");function ht(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function $r(t,e,n){return P.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):ht(n)&&(n.current=s))},[e])}const $e=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Gr="framerAppearId",Hs="data-"+$e(Gr),{schedule:Ge}=Ws(queueMicrotask,!1),qs=P.createContext({});function zr(t,e,n,s,i){var o,r;const{visualElement:l}=P.useContext(se),a=P.useContext($s),c=P.useContext(Ne),u=P.useContext(Us).reducedMotion,h=P.useRef(null);s=s||a.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:l,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const d=h.current,f=P.useContext(qs);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Hr(h.current,n,i,f);const m=P.useRef(!1);P.useInsertionEffect(()=>{d&&m.current&&d.update(n,c)});const p=n[Hs],g=P.useRef(!!p&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,p))&&((r=window.MotionHasOptimisedAnimation)===null||r===void 0?void 0:r.call(window,p)));return jr(()=>{d&&(m.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),Ge.render(d.render),g.current&&d.animationState&&d.animationState.animateChanges())}),P.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,p)}),g.current=!1))}),d}function Hr(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:l,layoutScroll:a,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ys(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||l&&ht(l),visualElement:t,animationType:typeof o=="str
1ing"?o:"both",initialPromotionConfig:s,layoutScroll:a,layoutRoot:c})}function Ys(t){if(t)return t.options.allowProjection!==!1?t.projection:Ys(t.parent)}function qr({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){var o,r;t&&Fr(t);function l(c,u){let h;const d={...P.useContext(Us),...c,layoutId:Yr(c)},{isStatic:f}=d,m=Kr(c),p=s(c,f);if(!f&&_e){Xr();const g=Zr(d);h=g.MeasureLayout,m.visualElement=zr(i,p,d,e,g.ProjectionNode)}return v.jsxs(se.Provider,{value:m,children:[h&&m.visualElement?v.jsx(h,{visualElement:m.visualElement,...d}):null,n(i,c,$r(p,m.visualElement,u),p,f,m.visualElement)]})}l.displayName=`motion.${typeof i=="string"?i:`create(${(r=(o=i.displayName)!==null&&o!==void 0?o:i.name)!==null&&r!==void 0?r:""})`}`;const a=P.forwardRef(l);return a[Wr]=i,a}function Yr({layoutId:t}){const e=P.useContext(_s).id;return e&&t!==void 0?e+"-"+t:t}function Xr(t,e){P.useContext($s).strict}function Zr(t){const{drag:e,layout:n}=yt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const Jr=["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 ze(t){return typeof t!="string"||t.includes("-")?!1:!!(Jr.indexOf(t)>-1||/[A-Z]/u.test(t))}function Vn(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function He(t,e,n,s){if(typeof e=="function"){const[i,o]=Vn(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=Vn(s);e=e(n!==void 0?n:t.custom,i,o)}return e}const we=t=>Array.isArray(t),Qr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),to=t=>we(t)?t[t.length-1]||0:t,N=t=>!!(t&&t.getVelocity);function Ht(t){const e=N(t)?t.get():t;return Qr(e)?e.toValue():e}function eo({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},s,i,o){const r={latestValues:no(s,i,o,t),renderState:e()};return n&&(r.onMount=l=>n({props:s,current:l,...r}),r.onUpdate=l=>n(l)),r}const Xs=t=>(e,n)=>{const s=P.useContext(se),i=P.useContext(Ne),o=()=>eo(t,e,s,i);return n?o():Er(o)};function no(t,e,n,s){const i={},o=s(t,{});for(const d in o)i[d]=Ht(o[d]);let{initial:r,animate:l}=t;const a=re(t),c=zs(t);e&&c&&!a&&t.inherit!==!1&&(r===void 0&&(r=e.initial),l===void 0&&(l=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?l:r;if(h&&typeof h!="boolean"&&!ie(h)){const d=Array.isArray(h)?h:[h];for(let f=0;f<d.length;f++){const m=He(t,d[f]);if(m){const{transitionEnd:p,transition:g,...y}=m;for(const x in y){let b=y[x];if(Array.isArray(b)){const V=u?b.length-1:0;b=b[V]}b!==null&&(i[x]=b)}for(const x in p)i[x]=p[x]}}}return i}const xt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ct=new Set(xt),Zs=t=>e=>typeof e=="string"&&e.startsWith(t),Js=Zs("--"),so=Zs("var(--"),qe=t=>so(t)?io.test(t.split("/*")[0].trim()):!1,io=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Qs=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Q=(t,e,n)=>n>e?e:n<t?t:n,bt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},kt={...bt,transform:t=>Q(0,1,t)},Gt={...bt,default:1},It=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),tt=It("deg"),Y=It("%"),w=It("px"),ro=It("vh"),oo=It("vw"),Cn={...Y,parse:t=>Y.parse(t)/100,transform:t=>Y.transform(t*100)},ao={borderWidth:w,borderTopWidth:w,borderRightWidth:w,borderBottomWidth:w,borderLeftWidth:w,borderRadius:w,radius:w,borderTopLeftRadius:w,borderTopRightRadius:w,borderBottomRightRadius:w,borderBottomLeftRadius:w,width:w,maxWidth:w,height:w,maxHeight:w,top:w,right:w,bottom:w,left:w,padding:w,paddingTop:w,paddingRight:w,paddingBottom:w,paddingLeft:w,margin:w,marginTop:w,marginRight:w,marginBottom:w,marginLeft:w,backgroundPositionX:w,backgroundPositionY:w},lo={rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:Gt,scaleX:Gt,scaleY:Gt,scaleZ:Gt,skew:tt,skewX:tt,skewY:tt,distance:w,translateX:w,translateY:w,translateZ:w,x:w,y:w,z:w,perspective:w,transformPerspective:w,opacity:kt,originX:Cn,originY:Cn,originZ:w},Dn={...bt,transform:Math.round},Ye={...ao,...lo,zIndex:Dn,size:w,fillOpacity:kt,strokeOpacity:kt,numOctaves:Dn},co={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},uo=xt.length;function ho(t,e,n){let s="",i=!0;for(let o=0;o<uo;o++){const r=xt[o],l=t[r];if(l===void 0)continue;let a=!0;if(typeof l=="number"?a=l===(r.startsWith("scale")?1:0):a=parseFloat(l)===0,!a||n){const c=Qs(l,Ye[r]);if(!a){i=!1;const u=co[r]||r;s+=`${u}(${c}) `}n&&(e[r]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Xe(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,l=!1;for(const a in e){const c=e[a];if(ct.has(a)){r=!0;continue}else if(Js(a)){i[a]=c;continue}else{const u=Qs(c,Ye[a]);a.startsWith("origin")?(l=!0,o[a]=u):s[a]=u}}if(e.transform||(r||n?s.transform=ho(e,t.transform,n):s.transform&&(s.transform="none")),l){const{originX:a="50%",originY:c="50%",originZ:u=0}=o;s.transformOrigin=`${a} ${c} ${u}`}}const fo={offset:"stroke-dashoffset",array:"stroke-dasharray"},mo={offset:"strokeDashoffset",array:"strokeDasharray"};function po(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?fo:mo;t[o.offset]=w.transform(-s);const r=w.transform(e),l=w.transform(n);t[o.array]=`${r} ${l}`}function Mn(t,e,n){return typeof t=="string"?t:w.transform(e+n*t)}function go(t,e,n){const s=Mn(e,t.x,t.width),i=Mn(n,t.y,t.height);return`${s} ${i}`}function Ze(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:l=1,pathOffset:a=0,...c}
vendor: 20,674 bytes, line 1
1,u,h){if(Xe(t,c,h),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:f,dimensions:m}=t;d.transform&&(m&&(f.transform=d.transform),delete d.transform),m&&(i!==void 0||o!==void 0||f.transform)&&(f.transformOrigin=go(m,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&po(d,r,l,a,!1)}const Je=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),ti=()=>({...Je(),attrs:{}}),Qe=t=>typeof t=="string"&&t.toLowerCase()==="svg";function ei(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const ni=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function si(t,e,n,s){ei(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(ni.has(i)?i:$e(i),e.attrs[i])}const Zt={};function yo(t){Object.assign(Zt,t)}function ii(t,{layout:e,layoutId:n}){return ct.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Zt[t]||t==="opacity")}function tn(t,e,n){var s;const{style:i}=t,o={};for(const r in i)(N(i[r])||e.style&&N(e.style[r])||ii(r,t)||((s=n?.getValue(r))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[r]=i[r]);return o}function ri(t,e,n){const s=tn(t,e,n);for(const i in t)if(N(t[i])||N(e[i])){const o=xt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}function vo(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const En=["x","y","width","height","cx","cy","r"],xo={useVisualState:Xs({scrapeMotionValuesFromProps:ri,createRenderState:ti,onUpdate:({props:t,prevProps:e,current:n,renderState:s,latestValues:i})=>{if(!n)return;let o=!!t.drag;if(!o){for(const l in i)if(ct.has(l)){o=!0;break}}if(!o)return;let r=!e;if(e)for(let l=0;l<En.length;l++){const a=En[l];t[a]!==e[a]&&(r=!0)}r&&M.read(()=>{vo(n,s),M.render(()=>{Ze(s,i,Qe(n.tagName),t.transformTemplate),si(n,s)})})}})},bo={useVisualState:Xs({scrapeMotionValuesFromProps:tn,createRenderState:Je})};function oi(t,e,n){for(const s in e)!N(e[s])&&!ii(s,n)&&(t[s]=e[s])}function To({transformTemplate:t},e){return P.useMemo(()=>{const n=Je();return Xe(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Po(t,e){const n=t.style||{},s={};return oi(s,n,t),Object.assign(s,To(t,e)),s}function wo(t,e){const n={},s=Po(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}function So(t,e,n,s){const i=P.useMemo(()=>{const o=ti();return Ze(o,e,Qe(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};oi(o,t.style,t),i.style={...o,...i.style}}return i}function Ao(t=!1){return(n,s,i,{latestValues:o},r)=>{const a=(ze(n)?So:wo)(s,o,r,n),c=Nr(s,typeof n=="string",t),u=n!==P.Fragment?{...c,...a,ref:i}:{},{children:h}=s,d=P.useMemo(()=>N(h)?h.get():h,[h]);return P.createElement(n,{...u,children:d})}}function Vo(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const r={...ze(s)?xo:bo,preloadedFeatures:t,useRender:Ao(i),createVisualElement:e,Component:s};return qr(r)}}function ai(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function oe(t,e,n){const s=t.getProps();return He(s,e,n!==void 0?n:s.custom,t)}const Co=Ue(()=>window.ScrollTimeline!==void 0);class Do{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e,n){const s=this.animations.map(i=>{if(Co()&&i.attachTimeline)return i.attachTimeline(e);if(typeof n=="function")return n(i)});return()=>{s.forEach((i,o)=>{i&&i(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Mo extends Do{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function en(t,e){return t?t[e]||t.default||t:void 0}const Se=2e4;function li(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Se;)e+=n,s=t.next(e);return e>=Se?1/0:e}function nn(t){return typeof t=="function"}function Rn(t,e){t.timeline=e,t.onfinish=null}const sn=t=>Array.isArray(t)&&typeof t[0]=="number",Eo={linearEasing:void 0};function Ro(t,e){const n=Ue(t);return()=>{var s;return(s=Eo[e])!==null&&s!==void 0?s:n()}}const Jt=Ro(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ci=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=t(gt(0,i-1,o))+", ";return`linear(${s.substring(0,s.length-2)})`};function ui(t){return!!(typeof t=="function"&&Jt()||!t||typeof t=="string"&&(t in Ae||Jt())||sn(t)||Array.isArray(t)&&t.every(ui))}const Vt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ae={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vt([0,.65,.55,1]),circOut:Vt([.55,0,1,.45]),backIn:Vt([.31,.01,.66,-.59]),backOut:Vt([.33,1.53,.69,.99])};function hi(t,e){if(t)return typeof t=="function"&&Jt()?ci(t,e):sn(t)?Vt(t):Array.isArray(t)?t.map(n=>hi(n,e)||Ae.easeOut):Ae[t]}const q={x:!1,y:!1};function di(){return q.x||q.y}function jo(t,e,n){var s;if(t instanceof Element)return[t];if(typeof t=="string"){let i=document;const o=(s=void 0)!==null&&s!==void 0?s:i.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t)}function fi(t,e){const n=jo(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function jn(t){return e=>{e.pointerType==="touch"||di()||t(e)}}function Lo(t,e,n={}){const[s,i,o]=fi(t,n),r=jn(l=>{const{target:a}=l,c=e(l);if(typeof c!="function"||!a)return;const u=jn(h=>{c(h),a.removeEventListener("pointerleave",u)});a.addEventListener("pointerleave",u,i)});return s.forEach(l=>{l.addEventListener("pointerenter",r,i)}),o}const mi=(t,e)=>e?t===e?!0:mi(t,e.parentElement):!1,rn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,ko=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Oo(t){return ko.has(t.tagName)||t.tabIndex!==-1}const Ct=new WeakSet;function Ln(t){return e=>{e.key==="Enter"&&t(e)}}function he(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Fo=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Ln(()=>{if(Ct.has(n))return;he(n,"down");const i=Ln(()=>{he(n,"up")}),o=()=>he(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function kn(t){return rn(t)&&!di()}function Bo(t,e,n={}){const[s,i,o]=fi(t,n),r=l=>{const a=l.currentTarget;if(!kn(l)||Ct.has(a))return;Ct.add(a);const c=e(l),u=(f,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",d),!(!kn(f)||!Ct.has(a))&&(Ct.delete(a),typeof c=="function"&&c(f,{success:m}))},h=f=>{u(f,n.useGlobalTarget||mi(a,f.target))},d=f=>{u(f,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",d,i)};return s.forEach(l=>{!Oo(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",r,i),l.addEventListener("focus",c=>Fo(c,i),i)}),o}function Io(t){return t==="x"||t==="y"?q[t]?null:(q[t]=!0,()=>{q[t]=!1}):q.x||q.y?null:(q.x=q.y=!0,()=>{q.x=q.y=!1})}const pi=new Set(["width","height","top","left","right","bottom",...xt]);let qt;function No(){qt=void 0}const X={now:()=>(qt===void 0&&X.set(B.isProcessing||Lr.useManualTiming?B.timestamp:performance.now()),qt),set:t=>{qt=t,queueMicrotask(No)}};function on(t,e){t.indexOf(e)===-1&&t.push(e)}function an(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class ln{constructor(){this.subscriptions=[]}add(e){return on(this.subscriptions,e),()=>an(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function gi(t,e){return e?t*(1e3/e):0}const On=30,_o=t=>!isNaN(parseFloat(t));class Uo{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=X.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=X.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=_o(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new ln);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=X.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>On)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,On);return gi(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ot(t,e){return new Uo(t,e)}function Ko(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ot(n))}function Wo(t,e){const n=oe(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const l=to(o[r]);Ko(t,r,l)}}function $o(t){return!!(N(t)&&t.add)}function Ve(t,e){const n=t.getValue("willChange");if($o(n))return n.add(e)}function yi(t){return t.props[Hs]}const vi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Go=1e-7,zo=12;function Ho(t,e,n,s,i){let o,r,l=0;do r=e+(n-e)/2,o=vi(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Go&&++l<zo);return r}function Nt(t,e,n,s){if(t===e&&n===s)return K;const i=o=>Ho(o,0,1,t,n);return o=>o===0||o===1?o:vi(i(o),e,s)}const xi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,bi=t=>e=>1-t(1-e),Ti=Nt(.33,1.53,.69,.99),cn=bi(Ti),Pi=xi(cn),wi=t=>(t*=2)<1?.5*cn(t):.5*(2-Math.pow(2,-10*(t-1))),un=t=>1-Math.sin(Math.acos(t)),Si=bi(un),Ai=xi(un),Vi=t=>/^0[^.\s]+$/u.test(t);function qo(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Vi(t):!0}const Mt=t=>Math.round(t*1e5)/1e5,hn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Yo(t){return t==null}const Xo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,dn=(t,e)=>n=>!!(typeof n=="string"&&Xo.test(n)&&n.startsWith(t)||e&&!Yo(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ci=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,l]=s.match(hn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:l!==void 0?parseFloat(l):1}},Zo=t=>Q(0,255,t),de={...bt,transform:t=>Math.round(Zo(t))},at={test:dn("rgb","red"),parse:Ci("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+de.transform(t)+", "+de.transform(e)+", "+de.transform(n)+", "+Mt(kt.transform(s))+")"};function Jo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ce={test:dn("#"),parse:Jo,transform:at.transform},dt={test:dn("hsl","hue"),parse:Ci("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Y.transform(Mt(e))+", "+Y.transform(Mt(n))+", "+Mt(kt.transform(s))+")"},I={test:t=>at.test(t)||Ce.test(t)||dt.test(t),parse:t=>at.test(t)?at.parse(t):dt.test(t)?dt.parse(t):Ce.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?at.transform(t):dt.transform(t)},Qo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ta(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(hn))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Qo))===null||n===void 0?void 0:n.length)||0)>0}const Di="number",Mi="color",ea="var",na="var(",Fn="${}",sa=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ft(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const l=e.replace(sa,a=>(I.test(a)?(s.color.push(o),i.push(Mi),n.push(I.parse(a))):a.startsWith(na)?(s.var.push(o),i.push(ea),n.push(a)):(s.number.push(o),i.push(Di),n.push(parseFloat(a))),++o,Fn)).split(Fn);return{values:n,split:l,indexes:s,types:i}}function Ei(t){return Ft(t).values}function Ri(t){const{split:e,types:n}=Ft(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const l=n[r];l===Di?o+=Mt(i[r]):l===Mi?o+=I.transform(i[r]):o+=i[r]}return o}}const ia=t=>typeof t=="number"?0:t;function ra(t){const e=Ei(t);return Ri(t)(e.map(ia))}const nt={test:ta,parse:Ei,createTransformer:Ri,getAnimatableNone:ra},oa=new Set(["brightness","contrast","saturate","opacity"]);function aa(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(hn)||[];if(!s)return t;const i=n.replace(s,"");let o=oa.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const la=/\b([a-z-]*)\(.*?\)/gu,De={...nt,getAnimatableNone:t=>{const e=t.match(la);return e?e.map(aa).join(" "):t}},ca={...Ye,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:De,WebkitFilter:De},fn=t=>ca[t];function ji(t,e){let n=fn(t);return n!==De&&(n=nt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ua=new Set(["auto","none","0"]);function ha(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!ua.has(o)&&Ft(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=ji(n,i)}const Bn=t=>t===bt||t===w,In=(t,e)=>parseFloat(t.split(", ")[e]),Nn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return In(i[1],e);{const o=s.match(/^matrix\((.+)\)$/u);return o?In(o[1],t):0}},da=new Set(["x","y","z"]),fa=xt.filter(t=>!da.has(t));function ma(t){const e=[];return fa.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const vt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Nn(4,13),y:Nn(5,14)};vt.translateX=vt.x;vt.translateY=vt.y;const lt=new Set;let Me=!1,Ee=!1;function Li(){if(Ee){const t=Array.from(lt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=ma(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var l;(l=s.getValue(o))===null||l===void 0||l.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ee=!1,Me=!1,lt.forEach(t=>t.complete()),lt.clear()}function ki(){lt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ee=!0)})}function pa(){ki(),Li()}class mn{constructor(e,n,s,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(lt.add(this),Me||(Me=!0,M.read(ki),M.resolveKeyframes(Li))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let o=0;o<e.length;o++)if(e[o]===null)if(o===0){const r=i?.get(),l=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,l);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=l),i&&r===void 0&&i.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),lt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,lt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Oi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),ga=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ya(t){const e=ga.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Fi(t,e,n=1){const[s,i]=ya(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Oi(r)?parseFloat(r):r}return qe(i)?Fi(i,e,n+1):i}const Bi=t=>e=>e.test(t),va={test:t=>t==="auto",parse:t=>t},Ii=[bt,w,Y,tt,oo,ro,va],_n=t=>Ii.find(Bi(t));class Ni extends mn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let c=e[a];if(typeof c=="string"&&(c=c.trim(),qe(c))){const u=Fi(c,n.current);u!==void 0&&(e[a]=u),a===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!pi.has(s)||e.length!==2)return;const[i,o]=e,r=_n(i),l=_n(o);if(r!==l)if(Bn(r)&&Bn(l))for(let a=0;a<e.length;a++){const c=e[a];typeof c=="string"&&(e[a]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)qo(e[i])&&s.push(i);s.length&&ha(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=vt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const o=n.getValue(s);o&&o.jump(this.measuredOrigin,!1);const r=i.length-1,l=i[r];i[r]=vt[s](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEac
vendor: 10,641 bytes, line 1
1h(([a,c])=>{n.getValue(a).set(c)}),this.resolveNoneKeyframes()}}const Un=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(nt.test(t)||t==="0")&&!t.startsWith("url("));function xa(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function ba(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Un(i,e),l=Un(o,e);return!r||!l?!1:xa(t)||(n==="spring"||nn(n))&&s}const Ta=t=>t!==null;function ae(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Ta),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||s===void 0?i[o]:s}const Pa=40;class _i{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=X.now(),this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Pa?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&pa(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=X.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:o,delay:r,onComplete:l,onUpdate:a,isGenerator:c}=this.options;if(!c&&!ba(e,s,i,o))if(r)this.options.duration=0;else{a&&a(ae(e,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const E=(t,e,n)=>t+(e-t)*n;function fe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function wa({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const l=n<.5?n*(1+e):n+e-n*e,a=2*n-l;i=fe(a,l,t+1/3),o=fe(a,l,t),r=fe(a,l,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Qt(t,e){return n=>n>0?e:t}const me=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Sa=[Ce,at,dt],Aa=t=>Sa.find(e=>e.test(t));function Kn(t){const e=Aa(t);if(!e)return!1;let n=e.parse(t);return e===dt&&(n=wa(n)),n}const Wn=(t,e)=>{const n=Kn(t),s=Kn(e);if(!n||!s)return Qt(t,e);const i={...n};return o=>(i.red=me(n.red,s.red,o),i.green=me(n.green,s.green,o),i.blue=me(n.blue,s.blue,o),i.alpha=E(n.alpha,s.alpha,o),at.transform(i))},Va=(t,e)=>n=>e(t(n)),_t=(...t)=>t.reduce(Va),Re=new Set(["none","hidden"]);function Ca(t,e){return Re.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Da(t,e){return n=>E(t,e,n)}function pn(t){return typeof t=="number"?Da:typeof t=="string"?qe(t)?Qt:I.test(t)?Wn:Ra:Array.isArray(t)?Ui:typeof t=="object"?I.test(t)?Wn:Ma:Qt}function Ui(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>pn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Ma(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=pn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Ea(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],l=t.indexes[r][i[r]],a=(n=t.values[l])!==null&&n!==void 0?n:0;s[o]=a,i[r]++}return s}const Ra=(t,e)=>{const n=nt.createTransformer(e),s=Ft(t),i=Ft(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Re.has(t)&&!i.values.length||Re.has(e)&&!s.values.length?Ca(t,e):_t(Ui(Ea(s,i),i.values),n):Qt(t,e)};function Ki(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?E(t,e,n):pn(t)(t,e)}const ja=5;function Wi(t,e,n){const s=Math.max(e-ja,0);return gi(n-t(s),e-s)}const R={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},pe=.001;function La({duration:t=R.duration,bounce:e=R.bounce,velocity:n=R.velocity,mass:s=R.mass}){let i,o,r=1-e;r=Q(R.minDamping,R.maxDamping,r),t=Q(R.minDuration,R.maxDuration,J(t)),r<1?(i=c=>{const u=c*r,h=u*t,d=u-n,f=je(c,r),m=Math.exp(-h);return pe-d/f*m},o=c=>{const h=c*r*t,d=h*n+n,f=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-h),p=je(Math.pow(c,2),r);return(-i(c)+pe>0?-1:1)*((d-f)*m)/p}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-pe+u*h},o=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const l=5/t,a=Oa(i,o,l);if(t=Z(t),isNaN(a))return{stiffness:R.stiffness,damping:R.damping,duration:t};{const c=Math.pow(a,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const ka=12;function Oa(t,e,n){let s=n;for(let i=1;i<ka;i++)s=s-t(s)/e(s);return s}function je(t,e){return t*Math.sqrt(1-e*e)}const Fa=["duration","bounce"],Ba=["stiffness","damping","mass"];function $n(t,e){return e.some(n=>t[n]!==void 0)}function Ia(t){let e={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...t};if(!$n(t,Ba)&&$n(t,Fa))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*Q(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:R.mass,stiffness:i,damping:o}}else{const n=La(t);e={...e,...n,mass:R.mass},e.isResolvedFromDuration=!0}return e}function $i(t=R.visualDuration,e=R.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:a,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:f}=Ia({...n,velocity:-J(n.velocity||0)}),m=d||0,p=c/(2*Math.sqrt(a*u)),g=r-o,y=J(Math.sqrt(a/u)),x=Math.abs(g)<5;s||(s=x?R.restSpeed.granular:R.restSpeed.default),i||(i=x?R.restDelta.granular:R.restDelta.default);let b;if(p<1){const S=je(y,p);b=C=>{const k=Math.exp(-p*y*C);return r-k*((m+p*y*g)/S*Math.sin(S*C)+g*Math.cos(S*C))}}else if(p===1)b=S=>r-Math.exp(-y*S)*(g+(m+y*g)*S);else{const S=y*Math.sqrt(p*p-1);b=C=>{const k=Math.exp(-p*y*C),A=Math.min(S*C,300);return r-k*((m+p*y*g)*Math.sinh(A)+S*g*Math.cosh(A))/S}}const V={calculatedDuration:f&&h||null,next:S=>{const C=b(S);if(f)l.done=S>=h;else{let k=0;p<1&&(k=S===0?Z(m):Wi(b,S,C));const A=Math.abs(k)<=s,O=Math.abs(r-C)<=i;l.done=A&&O}return l.value=l.done?r:C,l},toString:()=>{const S=Math.min(li(V),Se),C=ci(k=>V.next(S*k).value,S,30);return S+"ms "+C}};return V}function Gn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:l,max:a,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},f=A=>l!==void 0&&A<l||a!==void 0&&A>a,m=A=>l===void 0?a:a===void 0||Math.abs(l-A)<Math.abs(a-A)?l:a;let p=n*e;const g=h+p,y=r===void 0?g:r(g);y!==g&&(p=y-h);const x=A=>-p*Math.exp(-A/s),b=A=>y+x(A),V=A=>{const O=x(A),_=b(A);d.done=Math.abs(O)<=c,d.value=d.done?y:_};let S,C;const k=A=>{f(d.value)&&(S=A,C=$i({keyframes:[d.value,m(d.value)],velocity:Wi(b,A,d.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:A=>{let O=!1;return!C&&S===void 0&&(O=!0,V(A),k(A)),S!==void 0&&A>=S?C.next(A-S):(!O&&V(A),d)}}}const Na=Nt(.42,0,1,1),_a=Nt(0,0,.58,1),Gi=Nt(.42,0,.58,1),Ua=t=>Array.isArray(t)&&typeof t[0]!="number",Ka={linear:K,easeIn:Na,easeInOut:Gi,easeOut:_a,circIn:un,circInOut:Ai,circOut:Si,backIn:cn,backInOut:Pi,backOut:Ti,anticipate:wi},zn=t=>{if(sn(t)){Ks(t.length===4);const[e,n,s,i]=t;return Nt(e,n,s,i)}else if(typeof t=="string")return Ka[t];return t};function Wa(t,e,n){const s=[],i=n||Ki,o=t.length-1;for(let r=0;r<o;r++){let l=i(t[r],t[r+1]);if(e){const a=Array.isArray(e)?e[r]||K:e;l=_t(a,l)}s.push(l)}return s}function $a(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Ks(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const l=Wa(e,s,i),a=l.length,c=u=>{if(r&&u<t[0])return e[0];let h=0;if(a>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const d=gt(t[h],t[h+1],u);return l[h](d)};return n?u=>c(Q(t[0],t[o-1],u)):c}function Ga(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=gt(0,e,s);t.push(E(n,1,i))}}function za(t){const e=[0];return Ga(e,t.length-1),e}function Ha(t,e){return t.map(n=>n*e)}function qa(t,e){return t.map(()=>e||Gi).splice(0,t.length-1)}function te({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ua(s)?s.map(zn):zn(s),o={done:!1,value:e[0]},r=Ha(n&&n.length===e.length?n:za(e),t),l=$a(r,e,{ease:Array.isArray(i)?i:qa(e,i)});return{calculatedDuration:t,next:a=>(o.value=l(a),o.done=a>=t,o)}}const Ya=t=>{const e=({timestamp:n})=>t(n);return{start:()=>M.update(e,!0),stop:()=>et(e),now:()=>B.isProcessing?B.timestamp:X.now()}},Xa={decay:Gn,inertia:Gn,tween:te,keyframes:te,spring:$i},Za=t=>t/100;class gn extends _i{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:n,motionValue:s,element:i,keyframes:o}=this.options,r=i?.KeyframeResolver||mn,l=(a,c)=>this.onKeyframesResolved(a,c);this.resolver=new r(o,l,n,s,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,l=nn(n)?n:Xa[n]||te;let a,c;l!==te&&typeof e[0]!="number"&&(a=_t(Za,Ki(e[0],e[1])),e=[0,100]);const u=l({...this.options,keyframes:e});o==="mirror"&&(c=l({...this.options,keyframes:[...e].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=li(u));const{calculatedDuration:h}=u,d=h+i,f=d*(s+1)-i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:a,calculatedDuration:h,resolvedDuration:d,totalDuration:f}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:l,keyframes:a,calculatedDuration:c,totalDuration:u,resolvedDuration:h}=s;
vendor: 55,377 bytes, line 1
1if(this.startTime===null)return o.next(0);const{delay:d,repeat:f,repeatType:m,repeatDelay:p,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const y=this.currentTime-d*(this.speed>=0?1:-1),x=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let b=this.currentTime,V=o;if(f){const A=Math.min(this.currentTime,u)/h;let O=Math.floor(A),_=A%1;!_&&A>=1&&(_=1),_===1&&O--,O=Math.min(O,f+1),!!(O%2)&&(m==="reverse"?(_=1-_,p&&(_-=p/h)):m==="mirror"&&(V=r)),b=Q(0,1,_)*h}const S=x?{done:!1,value:a[0]}:V.next(b);l&&(S.value=l(S.value));let{done:C}=S;!x&&c!==null&&(C=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return k&&i!==void 0&&(S.value=ae(a,this.options,i)),g&&g(S.value),k&&this.finish(),S}get duration(){const{resolved:e}=this;return e?J(e.calculatedDuration):0}get time(){return J(this.currentTime)}set time(e){e=Z(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=J(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Ya,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Ja=new Set(["opacity","clipPath","filter","transform"]);function Qa(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:l="easeInOut",times:a}={}){const c={[e]:n};a&&(c.offset=a);const u=hi(l,i);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}const tl=Ue(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ee=10,el=2e4;function nl(t){return nn(t.type)||t.type==="spring"||!ui(t.ease)}function sl(t,e){const n=new gn({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&o<el;)s=n.sample(o),i.push(s.value),o+=ee;return{times:void 0,keyframes:i,duration:o-ee,ease:"linear"}}const zi={anticipate:wi,backInOut:Pi,circInOut:Ai};function il(t){return t in zi}class Hn extends _i{constructor(e){super(e);const{name:n,motionValue:s,element:i,keyframes:o}=this.options;this.resolver=new Ni(o,(r,l)=>this.onKeyframesResolved(r,l),n,s,i),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:s=300,times:i,ease:o,type:r,motionValue:l,name:a,startTime:c}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof o=="string"&&Jt()&&il(o)&&(o=zi[o]),nl(this.options)){const{onComplete:h,onUpdate:d,motionValue:f,element:m,...p}=this.options,g=sl(e,p);e=g.keyframes,e.length===1&&(e[1]=e[0]),s=g.duration,i=g.times,o=g.ease,r="keyframes"}const u=Qa(l.owner.current,a,e,{...this.options,duration:s,times:i,ease:o});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Rn(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:h}=this.options;l.set(ae(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:s,times:i,type:r,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return J(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return J(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=Z(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return K;const{animation:s}=n;Rn(s,e)}return K}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:o,ease:r,times:l}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:h,element:d,...f}=this.options,m=new gn({...f,keyframes:s,duration:i,type:o,ease:r,times:l,isGenerator:!0}),p=Z(this.time);c.setWithVelocity(m.sample(p-ee).value,m.sample(p).value,ee)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:o,damping:r,type:l}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:c}=n.owner.getProps();return tl()&&s&&Ja.has(s)&&!a&&!c&&!i&&o!=="mirror"&&r!==0&&l!=="inertia"}}const rl={type:"spring",stiffness:500,damping:25,restSpeed:10},ol=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),al={type:"keyframes",duration:.8},ll={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},cl=(t,{keyframes:e})=>e.length>2?al:ct.has(t)?t.startsWith("scale")?ol(e[1]):rl:ll;function ul({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:l,from:a,elapsed:c,...u}){return!!Object.keys(u).length}const yn=(t,e,n,s={},i,o)=>r=>{const l=en(s,t)||{},a=l.delay||s.delay||0;let{elapsed:c=0}=s;c=c-Z(a);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:d=>{e.set(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{r(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:o?void 0:i};ul(l)||(u={...u,...cl(t,u)}),u.duration&&(u.duration=Z(u.duration)),u.repeatDelay&&(u.repeatDelay=Z(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(h=!0)),h&&!o&&e.get()!==void 0){const d=ae(u.keyframes,l);if(d!==void 0)return M.update(()=>{u.onUpdate(d),u.onComplete()}),new Mo([])}return!o&&Hn.supports(u)?new Hn(u):new gn(u)};function hl({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Hi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:l,...a}=e;s&&(r=s);const c=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const h in a){const d=t.getValue(h,(o=t.latestValues[h])!==null&&o!==void 0?o:null),f=a[h];if(f===void 0||u&&hl(u,h))continue;const m={delay:n,...en(r||{},h)};let p=!1;if(window.MotionHandoffAnimation){const y=yi(t);if(y){const x=window.MotionHandoffAnimation(y,h,M);x!==null&&(m.startTime=x,p=!0)}}Ve(t,h),d.start(yn(h,d,f,t.shouldReduceMotion&&pi.has(h)?{type:!1}:m,t,p));const g=d.animation;g&&c.push(g)}return l&&Promise.all(c).then(()=>{M.update(()=>{l&&Wo(t,l)})}),c}function Le(t,e,n={}){var s;const i=oe(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(Hi(t,i,n)):()=>Promise.resolve(),l=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:d}=o;return dl(t,e,u+c,h,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[c,u]=a==="beforeChildren"?[r,l]:[l,r];return c().then(()=>u())}else return Promise.all([r(),l(n.delay)])}function dl(t,e,n=0,s=0,i=1,o){const r=[],l=(t.variantChildren.size-1)*s,a=i===1?(c=0)=>c*s:(c=0)=>l-c*s;return Array.from(t.variantChildren).sort(fl).forEach((c,u)=>{c.notify("AnimationStart",e),r.push(Le(c,e,{...o,delay:n+a(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(r)}function fl(t,e){return t.sortNodePosition(e)}function ml(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Le(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Le(t,e,n);else{const i=typeof e=="function"?oe(t,e,n.custom):e;s=Promise.all(Hi(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const pl=We.length;function qi(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?qi(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<pl;n++){const s=We[n],i=t.props[s];(Lt(i)||i===!1)&&(e[s]=i)}return e}const gl=[...Ke].reverse(),yl=Ke.length;function vl(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ml(t,n,s)))}function xl(t){let e=vl(t),n=qn(),s=!0;const i=a=>(c,u)=>{var h;const d=oe(t,u,a==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(d){const{transition:f,transitionEnd:m,...p}=d;c={...c,...p,...m}}return c};function o(a){e=a(t)}function r(a){const{props:c}=t,u=qi(t.parent)||{},h=[],d=new Set;let f={},m=1/0;for(let g=0;g<yl;g++){const y=gl[g],x=n[y],b=c[y]!==void 0?c[y]:u[y],V=Lt(b),S=y===a?x.isActive:null;S===!1&&(m=g);let C=b===u[y]&&b!==c[y]&&V;if(C&&s&&t.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...f},!x.isActive&&S===null||!b&&!x.prevProp||ie(b)||typeof b=="boolean")continue;const k=bl(x.prevProp,b);let A=k||y===a&&x.isActive&&!C&&V||g>m&&V,O=!1;const _=Array.isArray(b)?b:[b];let $=_.reduce(i(y),{});S===!1&&($={});const{prevResolvedValues:Tt={}}=x,Kt={...Tt,...$},Pt=F=>{A=!0,d.has(F)&&(O=!0,d.delete(F)),x.needsAnimating[F]=!0;const j=t.getValue(F);j&&(j.liveStyle=!1)};for(const F in Kt){const j=$[F],ut=Tt[F];if(f.hasOwnProperty(F))continue;let wt=!1;we(j)&&we(ut)?wt=!ai(j,ut):wt=j!==ut,wt?j!=null?Pt(F):d.add(F):j!==void 0&&d.has(F)?Pt(F):x.protectedKeys[F]=!0}x.prevProp=b,x.prevResolvedValues=$,x.isActive&&(f={...f,...$}),s&&t.blockInitialAnimation&&(A=!1),A&&(!(C&&k)||O)&&h.push(..._.map(F=>({animation:F,options:{type:y}})))}if(d.size){const g={};d.forEach(y=>{const x=t.getBaseTarget(y),b=t.getValue(y);b&&(b.liveStyle=!0),g[y]=x??null}),h.push({animation:g})}let p=!!h.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(h):Promise.resolve()}function l(a,c){var u;if(n[a].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(d=>{var f;return(f=d.animationState)===null||f===void 0?void 0:f.setActive(a,c)}),n[a].isActive=c;const h=r(a);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:r,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=qn(),s=!0}}}function bl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ai(e,t):!1}function it(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qn(){return{animate:it(!0),whileInView:it(),whileHover:it(),whileTap:it(),whileDrag:it(),whileFocus:it(),exit:it()}}class st{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Tl extends st{constructor(e){super(e),e.animationState||(e.animationState=xl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ie(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let Pl=0;class wl extends st{constructor(){super(...arguments),this.id=Pl++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Sl={animation:{Feature:Tl},exit:{Feature:wl}};function Bt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Ut(t){return{point:{x:t.pageX,y:t.pageY}}}const Al=t=>e=>rn(e)&&t(e,Ut(e));function Et(t,e,n,s){return Bt(t,e,Al(n),s)}const Yn=(t,e)=>Math.abs(t-e);function Vl(t,e){const n=Yn(t.x,e.x),s=Yn(t.y,e.y);return Math.sqrt(n**2+s**2)}class Yi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=ye(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=Vl(h.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:m}=h,{timestamp:p}=B;this.history.push({...m,timestamp:p});const{onStart:g,onMove:y}=this.handlers;d||(g&&g(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,h)},this.handlePointerMove=(h,d)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ge(d,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(h,d)=>{this.end();const{onEnd:f,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=ye(h.type==="pointercancel"?this.lastMoveEventInfo:ge(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(h,g),m&&m(h,g)},!rn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=Ut(e),l=ge(r,this.transformPagePoint),{point:a}=l,{timestamp:c}=B;this.history=[{...a,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,ye(l,this.history)),this.removeListeners=_t(Et(this.contextWindow,"pointermove",this.handlePointerMove),Et(this.contextWindow,"pointerup",this.handlePointerUp),Et(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),et(this.updatePoint)}}function ge(t,e){return e?{point:e(t.point)}:t}function Xn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ye({point:t},e){return{point:t,delta:Xn(t,Xi(e)),offset:Xn(t,Cl(e)),velocity:Dl(e,.1)}}function Cl(t){return t[0]}function Xi(t){return t[t.length-1]}function Dl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Xi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>Z(e)));)n--;if(!s)return{x:0,y:0};const o=J(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}const Zi=1e-4,Ml=1-Zi,El=1+Zi,Ji=.01,Rl=0-Ji,jl=0+Ji;function W(t){return t.max-t.min}function Ll(t,e,n){return Math.abs(t-e)<=n}function Zn(t,e,n,s=.5){t.origin=s,t.originPoint=E(e.min,e.max,t.origin),t.scale=W(n)/W(e),t.translate=E(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Ml&&t.scale<=El||isNaN(t.scale))&&(t.scale=1),(t.translate>=Rl&&t.translate<=jl||isNaN(t.translate))&&(t.translate=0)}function Rt(t,e,n,s){Zn(t.x,e.x,n.x,s?s.originX:void 0),Zn(t.y,e.y,n.y,s?s.originY:void 0)}function Jn(t,e,n){t.min=n.min+e.min,t.max=t.min+W(e)}function kl(t,e,n){Jn(t.x,e.x,n.x),Jn(t.y,e.y,n.y)}function Qn(t,e,n){t.min=e.min-n.min,t.max=t.min+W(e)}function jt(t,e,n){Qn(t.x,e.x,n.x),Qn(t.y,e.y,n.y)}function Ol(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?E(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?E(n,t,s.max):Math.min(t,n)),t}function ts(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Fl(t,{top:e,left:n,bottom:s,right:i}){return{x:ts(t.x,n,i),y:ts(t.y,e,s)}}function es(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Bl(t,e){return{x:es(t.x,e.x),y:es(t.y,e.y)}}function Il(t,e){let n=.5;const s=W(t),i=W(e);return i>s?n=gt(e.min,e.max-s,t.min):s>i&&(n=gt(t.min,t.max-i,e.min)),Q(0,1,n)}function Nl(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const ke=.35;function _l(t=ke){return t===!1?t=0:t===!0&&(t=ke),{x:ns(t,"left","right"),y:ns(t,"top","bottom")}}function ns(t,e,n){return{min:ss(t,e),max:ss(t,n)}}function ss(t,e){return typeof t=="number"?t:t[e]||0}const is=()=>({translate:0,scale:1,origin:0,originPoint:0}),ft=()=>({x:is(),y:is()}),rs=()=>({min:0,max:0}),L=()=>({x:rs(),y:rs()});function z(t){return[t("x"),t("y")]}function Qi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Ul({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Kl(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ve(t){return t===void 0||t===1}function Oe({scale:t,scaleX:e,scaleY:n}){return!ve(t)||!ve(e)||!ve(n)}function rt(t){return Oe(t)||tr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function tr(t){return os(t.x)||os(t.y)}function os(t){return t&&t!=="0%"}function ne(t,e,n){const s=t-n,i=e*s;return n+i}function as(t,e,n,s,i){return i!==void 0&&(t=ne(t,i,s)),ne(t,n,s)+e}function Fe(t,e=0,n=1,s,i){t.min=as(t.min,e,n,s,i),t.max=as(t.max,e,n,s,i)}function er(t,{x:e,y:n}){Fe(t.x,e.translate,e.scale,e.originPoint),Fe(t.y,n.translate,n.scale,n.originPoint)}const ls=.999999999999,cs=1.0000000000001;function Wl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let l=0;l<i;l++){o=n[l],r=o.projectionDelta;const{visualElement:a}=o.options;a&&a.props.style&&a.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&pt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,er(t,r)),s&&rt(o.latestValues)&&pt(t,o.latestValues))}e.x<cs&&e.x>ls&&(e.x=1),e.y<cs&&e.y>ls&&(e.y=1)}function mt(t,e){t.min=t.min+e,t.max=t.max+e}function us(t,e,n,s,i=.5){const o=E(t.min,t.max,i);Fe(t,e,n,o,s)}function pt(t,e){us(t.x,e.x,e.scaleX,e.scale,e.originX),us(t.y,e.y,e.scaleY,e.scale,e.originY)}function nr(t,e){return Qi(Kl(t.getBoundingClientRect(),e))}function $l(t,e,n){const s=nr(t,n),{scroll:i}=e;return i&&(mt(s.x,i.offset.x),mt(s.y,i.offset.y)),s}const sr=({current:t})=>t?t.ownerDocument.defaultView:null,Gl=new WeakMap;class zl{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=L(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ut(u).point)},o=(u,h)=>{const{drag:d,dragPropagation:f,onDragStart:m}=this.getProps();if(d&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Io(d),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),z(g=>{let y=this.getAxisMotionValue(g).get()||0;if(Y.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[g];b&&(y=W(b)*(parseFloat(y)/100))}}this.originPoint[g]=y}),m&&M.postRender(()=>m(u,h)),Ve(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},r=(u,h)=>{const{dragPropagation:d,dragDirectionLock:f,onDirectionLock:m,onDrag:p}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:g}=h;if(f&&this.currentDirection===null){this.currentDirection=Hl(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,g),this.updateAxis("y",h.point,g),this.visualElement.render(),p&&p(u,h)},l=(u,h)=>this.stop(u,h),a=()=>z(u=>{var h;return this.getAnimationState(u)==="paused"&&((h=this.getAxisMotionValue(u).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Yi(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:l,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:sr(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&M.postRender(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!zt(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Ol(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&ht(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Fl(i.layoutBox,n):this.constraints=!1,this.elastic=_l(s),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&z(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Nl(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ht(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=$l(s,i.root,this.visualElement.getTransformPagePoint());let r=Bl(i.layout.layoutBox,o);if(n){const l=n(Ul(r));this.hasMutatedConstraints=!!l,l&&(r=Qi(l))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:l}=this.getProps(),a=this.constraints||{},c=z(u=>{if(!zt(u,n,this.currentDirection))return;let h=a&&a[u]||{};r&&(h={min:0,max:0});const d=i?200:1e6,f=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(l)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ve(this.visualElement,e),s.start(yn(e,s,0,n,this.visualElement,!1))}stopAnimation(){z(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){z(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){z(n=>{const{drag:s}=this.getProps();if(!zt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:l}=i.layout.layoutBox[n];o.set(e[n]-E(r,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ht(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};z(r=>{const l=this.getAxisMotionValue(r);if(l&&this.constraints!==!1){const a=l.get();i[r]=Il({min:a,max:a},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),z(r=>{if(!zt(r,e,null))return;const l=this.getAxisMotionValue(r),{min:a,max:c}=this.constraints[r];l.set(E(a,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;Gl.set(this.visualElement,this);const e=this.visualElement.current,n=Et(e,"pointerdown",a=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(a)}),s=()=>{const{dragConstraints:a}=this.getProps();ht(a)&&a.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),M.read(s);const r=Bt(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:a,hasLayoutChanged:c})=>{this.isDragging&&c&&(z(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=a[u].translate,h.set(h.get()+a[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),l&&l()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=ke,dragMomentum:l=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:l}}}function zt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Hl(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class ql extends st{constructor(e){super(e),this.removeGroupControls=K,this.removeListeners=K,this.controls=new zl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||K}unmount(){this.removeGroupControls(),this.removeListeners()}}const hs=t=>(e,n)=>{t&&M.postRender(()=>t(e,n))};class Yl extends st{constructor(){super(...arguments),this.removePointerDownListener=K}onPointerDown(e){this.session=new Yi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sr(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:hs(e),onStart:hs(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&M.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Et(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 Yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ds(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const At={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(w.test(t))t=parseFloat(t);else return t;const n=ds(t,e.target.x),s=ds(t,e.target.y);return`${n}% ${s}%`}},Xl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=nt.parse(t);if(i.length>5)return s;const o=nt.createTransformer(t),r=typeof i[0]!="number"?1:0,l=n.x.scale*e.x,a=n.y.scale*e.y;i[0+r]/=l,i[1+r]/=a;const c=E(l,a,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}};class Zl extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;yo(Jl),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Yt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||M.postRender(()=>{const l=r.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Ge.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ir(t){const[e,n]=Rr(),s=P.useContext(_s);return v.jsx(Zl,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(qs),isPresent:e,safeToRemove:n})}const Jl={borderRadius:{...At,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:At,borderTopRightRadius:At,borderBottomLeftRadius:At,borderBottomRightRadius:At,boxShadow:Xl};function Ql(t,e,n){const s=N(t)?t:Ot(t);return s.start(yn("",s,e,n)),s.animation}function tc(t){return t instanceof SVGElement&&t.tagName!=="svg"}const ec=(t,e)=>t.depth-e.depth;class nc{constructor(){this.children=[],this.isDirty=!1}add(e){on(this.children,e),this.isDirty=!0}remove(e){an(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ec),this.isDirty=!1,this.children.forEach(e)}}function sc(t,e){const n=X.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(et(s),t(o-e))};return M.read(s,!0),()=>et(s)}const rr=["TopLeft","TopRight","BottomLeft","BottomRight"],ic=rr.length,fs=t=>typeof t=="string"?parseFloat(t):t,ms=t=>typeof t=="number"||w.test(t);function rc(t,e,n,s,i,o){i?(t.opacity=E(0,n.opacity!==void 0?n.opacity:1,oc(s)),t.opacityExit=E(e.opacity!==void 0?e.opacity:1,0,ac(s))):o&&(t.opacity=E(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;r<ic;r++){const l=`border${rr[r]}Radius`;let a=ps(e,l),c=ps(n,l);if(a===void 0&&c===void 0)continue;a||(a=0),c||(c=0),a===0||c===0||ms(a)===ms(c)?(t[l]=Math.max(E(fs(a),fs(c),s),0),(Y.test(c)||Y.test(a))&&(t[l]+="%")):t[l]=c}(e.rotate||n.rotate)&&(t.rotate=E(e.rotate||0,n.rotate||0,s))}function ps(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const oc=or(0,.5,Si),ac=or(.5,.95,K);function or(t,e,n){return s=>s<t?0:s>e?1:n(gt(t,e,s))}function gs(t,e){t.min=e.min,t.max=e.max}function G(t,e){gs(t.x,e.x),gs(t.y,e.y)}function ys(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function vs(t,e,n,s,i){return t-=e,t=ne(t,1/n,s),i!==void 0&&(t=ne(t,1/i,s)),t}function lc(t,e=0,n=1,s=.5,i,o=t,r=t){if(Y.test(e)&&(e=parseFloat(e),e=E(r.min,r.max,e/100)-r.min),typeof e!="number")return;let l=E(o.min,o.max,s);t===o&&(l-=e),t.min=vs(t.min,e,n,l,i),t.max=vs(t.max,e,n,l,i)}function xs(t,e,[n,s,i],o,r){lc(t,e[n],e[s],e[i],e.scale,o,r)}const cc=["x","scaleX","originX"],uc=["y","scaleY","originY"];function bs(t,e,n,s){xs(t.x,e,cc,n?n.x:void 0,s?s.x:void 0),xs(t.y,e,uc,n?n.y:void 0,s?s.y:void 0)}function Ts(t){return t.translate===0&&t.scale===1}function ar(t){return Ts(t.x)&&Ts(t.y)}function Ps(t,e){return t.min===e.min&&t.max===e.max}function hc(t,e){return Ps(t.x,e.x)&&Ps(t.y,e.y)}function ws(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function lr(t,e){return ws(t.x,e.x)&&ws(t.y,e.y)}function Ss(t){return W(t.x)/W(t.y)}function As(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class dc{constructor(){this.members=[]}add(e){on(this.members,e),e.scheduleRender()}remove(e){if(an(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function fc(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:d,skewX:f,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),d&&(s+=`rotateY(${d}deg) `),f&&(s+=`skewX(${f}deg) `),m&&(s+=`skewY(${m}deg) `)}const l=t.x.scale*e.x,a=t.y.scale*e.y;return(l!==1||a!==1)&&(s+=`scale(${l}, ${a})`),s||"none"}const ot={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Dt=typeof window<"u"&&window.MotionDebug!==void 0,xe=["","X","Y","Z"],mc={visibility:"hidden"},Vs=1e3;let pc=0;function be(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function cr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=yi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&cr(s)}function ur({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},l=e?.()){this.id=pc++,this.animationId=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,Dt&&(ot.totalNodes=ot.resolvedTargetDeltas=ot.recalculatedProjection=0),this.nodes.forEach(vc),this.nodes.forEach(wc),this.nodes.forEach(Sc),this.nodes.forEach(xc),Dt&&window.MotionDebug.record(ot)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let a=0;a<this.path.length;a++)this.path[a].shouldResetTransform=!0;this.root===this&&(this.nodes=new nc)}addEventListener(r,l){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new ln),this.eventHandlers.get(r).add(l)}notifyListeners(r,...l){const a=this.eventHandlers.get(r);a&&a.notify(...l)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=tc(r),this.instance=r;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(c||a)&&(this.isLayoutDirty=!0),t){let h;const d=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=sc(d,250),Yt.hasAnimatedSinceResize&&(Yt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ds))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:d,hasRelativeTargetChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||Mc,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),x=!this.targetLayout||!lr(this.targetLayout,m)||f,b=!d&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||d&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,b);const V={...en(p,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(V.delay=0,V.type=!1),this.startAnimation(V)}else d||Ds(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,et(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(Ac),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:a}=this.options;if(l===void 0&&!a)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Cs);return}this.isUpdating||this.nodes.forEach(Tc),this.isUpdating=!1,this.nodes.forEach(Pc),this.nodes.forEach(gc),this.nodes.forEach(yc),this.clearAllSnapshots();const l=X.now();B.delta=Q(0,1e3/60,l-B.timestamp),B.timestamp=l,B.isProcessing=!0,ue.update.process(B),ue.preRender.process(B),ue.render.process(B),B.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ge.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(bc),this.sharedNodes.forEach(Vc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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 r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=L(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(l=!1),l){const a=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:a,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:a}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!ar(this.projectionDelta),a=this.getTransformTemplate(),c=a?a(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&(l||rt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const l=this.measurePageBox();let a=this.removeElementScroll(l);return r&&(a=this.removeTransform(a)),Ec(a),{animationId:this.root.animationId,measuredBox:l,layoutBox:a,latestValues:{},source:this.id}}measurePageBox(){var r;const{visualElement:l}=this.options;if(!l)return L();const a=l.measureViewportBox();if(!(((r=this.scroll)===null||r===void 0?void 0:r.wasRoot)||this.path.some(Rc))){const{scroll:u}=this.root;u&&(mt(a.x,u.offset.x),mt(a.y,u.offset.y))}return a}removeElementScroll(r){var l;const a=L();if(G(a,r),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:h,options:d}=u;u!==this.root&&h&&d.layoutScroll&&(h.wasRoot&&G(a,r),mt(a.x,h.offset.x),mt(a.y,h.offset.y))}return a}applyTransform(r,l=!1){const a=L();G(a,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!l&&u.options.layoutScroll&&u.scroll&&u!==u.root&&pt(a,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),rt(u.latestValues)&&pt(a,u.latestValues)}return rt(this.latestValues)&&pt(a,this.latestValues),a}removeTransform(r){const l=L();G(l,r);for(let a=0;a<this.path.length;a++){const c=this.path[a];if(!c.instance||!rt(c.latestValues))continue;Oe(c.latestValues)&&c.updateSnapshot();const u=L(),h=c.measurePageBox();G(u,h),bs(l,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return rt(this.latestValues)&&bs(l,this.latestValues),l}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==B.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var l;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:d}=this.options;if(!(!this.layout||!(h||d))){if(this.resolvedRelativeTargetAt=B.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),jt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),G(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):G(this.target,this.layout.layoutBox),er(this.target,this.targetDelta)):G(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=L(),this.relativeTargetOrigin=L(),jt(this.relativeTargetOrigin,this.target,f.target),G(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Dt&&ot.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Oe(this.parent.latestValues)||tr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var r;const l=this.getLead(),a=!!this.resumingFrom||this!==l;let c=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===B.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;G(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Wl(this.layoutCorrected,this.treeScale,this.path,a),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=L());const{target:m}=l;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ys(this.prevProjectionDelta.x,this.projectionDelta.x),ys(this.prevProjectionDelta.y,this.projectionDelta.y)),Rt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!As(this.projectionDelta.x,this.prevProjectionDelta.x)||!As(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),Dt&&ot.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ft(),this.projectionDelta=ft(),this.projectionDeltaWithTransform=ft()}setAnimationOrigin(r,l=!1){const a=this.snapshot,c=a?a.latestValues:{},u={...this.latestValues},h=ft();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const d=L(),f=a?a.source:void 0,m=this.layout?this.layout.source:void 0,p=f!==m,g=this.getStack(),y=!g||g.members.length<=1,x=!!(p&&!y&&this.options.crossfade===!0&&!this.path.some(Dc));this.animationProgress=0;let b;this.mixTargetDelta=V=>{const S=V/1e3;Ms(h.x,r.x,S),Ms(h.y,r.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Cc(this.relativeTarget,this.relativeTargetOrigin,d,S),b&&hc(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=L()),G(b,this.relativeTarget)),p&&(this.animationValues=u,rc(u,c,this.latestValues,S,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(et(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Yt.hasAnimatedSinceResize=!0,this.currentAnimation=Ql(0,Vs,{...r,onUpdate:l=>{this.mixTargetDelta(l),r.onUpdate&&r.onUpdate(l)},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Vs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:l,target:a,layout:c,latestValues:u}=r;if(!(!l||!a||!c)){if(this!==r&&this.layout&&c&&hr(this.options.animationType,this.layout.layoutBox,c.layoutBox)){a=this.target||L();const h=W(this.layout.layoutBox.x);a.x.min=r.target.x.min,a.x.max=a.x.min+h;const d=W(this.layout.layoutBox.y);a.y.min=r.target.y.min,a.y.max=a.y.min+d}G(l,a),pt(l,u),Rt(this.projectionDeltaWithTransform,this.layoutCorrected,l,u)}}registerSharedNode(r,l){this.sharedNodes.has(r)||this.sharedNodes.set(r,new dc),this.sharedNodes.get(r).add(l);const c=l.options.initialPromotionConfig;l.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(l):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:l}=this.options;return l?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:l}=this.options;return l?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:l,preserveFollowOpacity:a}={}){const c=this.getStack();c&&c.promote(this,a),r&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let l=!1;const{latestValues:a}=r;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(l=!0),!l)return;const c={};a.z&&be("z",r,c,this.animationValues);for(let u=0;u<xe.length;u++)be(`rotate${xe[u]}`,r,c,this.animationValues),be(`skew${xe[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}getProjectionStyles(r){var l,a;if(!this.instance||this.isSVG)return;if(!this.isVisible)return mc;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ht(r?.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Ht(r?.pointerEvents)||""),this.hasProjected&&!rt(this.latestValues)&&(p.transform=u?u({},""):"none",this.hasProjected=!1),p}const d=h.animationValues||h.latestValues;this.applyTransformsToTarget(),c.transform=fc(this.projectionDeltaWithTransform,this.treeScale,d),u&&(c.transform=u(d,c.transform));const{x:f,y:m}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,h.animationValues?c.opacity=h===this?(a=(l=d.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&a!==void 0?a:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:c.opacity=h===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const p in Zt){if(d[p]===void 0)continue;const{correct:g,applyTo:y}=Zt[p],x=c.transform==="none"?d[p]:g(d[p],h);if(y){const b=y.length;for(let V=0;V<b;V++)c[y[V]]=x}else c[p]=x}return this.options.layoutId&&(c.pointerEvents=h===this?Ht(r?.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var l;return(l=r.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(Cs),this.root.sharedNodes.clear()}}}function gc(t){t.updateLayout()}function yc(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?z(h=>{const d=r?n.measuredBox[h]:n.layoutBox[h],f=W(d);d.min=s[h].min,d.max=d.min+f}):hr(o,n.layoutBox,s)&&z(h=>{const d=r?n.measuredBox[h]:n.layoutBox[h],f=W(s[h]);d.max=d.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+f)});const l=ft();Rt(l,s,n.layoutBox);const a=ft();r?Rt(a,t.applyTransform(i,!0),n.measuredBox):Rt(a,s,n.layoutBox);const c=!ar(l);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:d,layout:f}=h;if(d&&f){const m=L();jt(m,n.layoutBox,d.layoutBox);const p=L();jt(p,s,f.layoutBox),lr(m,p)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:a,layoutDelta:l,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function vc(t){Dt&&ot.totalNodes++,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 xc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function bc(t){t.clearSnapshot()}function Cs(t){t.clearMeasurements()}function Tc(t){t.isLayoutDirty=!1}function Pc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ds(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function wc(t){t.resolveTargetDelta()}function Sc(t){t.calcProjection()}
vendor: 6,582 bytes, line 1
1function Ac(t){t.resetSkewAndRotation()}function Vc(t){t.removeLeadSnapshot()}function Ms(t,e,n){t.translate=E(e.translate,0,n),t.scale=E(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Es(t,e,n,s){t.min=E(e.min,n.min,s),t.max=E(e.max,n.max,s)}function Cc(t,e,n,s){Es(t.x,e.x,n.x,s),Es(t.y,e.y,n.y,s)}function Dc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Mc={duration:.45,ease:[.4,0,.1,1]},Rs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),js=Rs("applewebkit/")&&!Rs("chrome/")?Math.round:K;function Ls(t){t.min=js(t.min),t.max=js(t.max)}function Ec(t){Ls(t.x),Ls(t.y)}function hr(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ll(Ss(e),Ss(n),.2)}function Rc(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const jc=ur({attachResizeListener:(t,e)=>Bt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Te={current:void 0},dr=ur({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Te.current){const t=new jc({});t.mount(window),t.setOptions({layoutScroll:!0}),Te.current=t}return Te.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Lc={pan:{Feature:Yl},drag:{Feature:ql,ProjectionNode:dr,MeasureLayout:ir}};function ks(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&M.postRender(()=>o(e,Ut(e)))}class kc extends st{mount(){const{current:e}=this.node;e&&(this.unmount=Lo(e,n=>(ks(this.node,n,"Start"),s=>ks(this.node,s,"End"))))}unmount(){}}class Oc extends st{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=_t(Bt(this.node.current,"focus",()=>this.onFocus()),Bt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Os(t,e,n){const{props:s}=t;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&M.postRender(()=>o(e,Ut(e)))}class Fc extends st{mount(){const{current:e}=this.node;e&&(this.unmount=Bo(e,n=>(Os(this.node,n,"Start"),(s,{success:i})=>Os(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Be=new WeakMap,Pe=new WeakMap,Bc=t=>{const e=Be.get(t.target);e&&e(t)},Ic=t=>{t.forEach(Bc)};function Nc({root:t,...e}){const n=t||document;Pe.has(n)||Pe.set(n,{});const s=Pe.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Ic,{root:t,...e})),s[i]}function _c(t,e,n){const s=Nc(e);return Be.set(t,n),s.observe(t),()=>{Be.delete(t),s.unobserve(t)}}const Uc={some:0,all:1};class Kc extends st{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Uc[i]},l=a=>{const{isIntersecting:c}=a;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),d=c?u:h;d&&d(a)};return _c(this.node.current,r,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Wc(e,n))&&this.startObserver()}unmount(){}}function Wc({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const $c={inView:{Feature:Kc},tap:{Feature:Fc},focus:{Feature:Oc},hover:{Feature:kc}},Gc={layout:{ProjectionNode:dr,MeasureLayout:ir}},Ie={current:null},fr={current:!1};function zc(){if(fr.current=!0,!!_e)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ie.current=t.matches;t.addListener(e),e()}else Ie.current=!1}const Hc=[...Ii,I,nt],qc=t=>Hc.find(Bi(t)),Fs=new WeakMap;function Yc(t,e,n){for(const s in e){const i=e[s],o=n[s];if(N(i))t.addValue(s,i);else if(N(o))t.addValue(s,Ot(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,Ot(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Bs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xc{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=mn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=X.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,M.render(this.render,!1,!0))};const{latestValues:a,renderState:c,onUpdate:u}=r;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=re(n),this.isVariantNode=zs(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const m=d[f];a[f]!==void 0&&N(m)&&m.set(a[f],!1)}}mount(e){this.current=e,Fs.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
vendor: 6,015 bytes, line 1
1h((n,s)=>this.bindToMotionValue(s,n)),fr.current||zc(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ie.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Fs.delete(this.current),this.projection&&this.projection.unmount(),et(this.notifyUpdate),et(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=ct.has(e),i=n.on("change",l=>{this.latestValues[e]=l,this.props.onUpdate&&M.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in yt){const n=yt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):L()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Bs.length;s++){const i=Bs[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Yc(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Ot(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Oi(i)||Vi(i))?i=parseFloat(i):!qc(i)&&nt.test(n)&&(i=ji(e,n)),this.setBaseTarget(e,N(i)?i.get():i)),N(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const r=He(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);r&&(i=r[e])}if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!N(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ln),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class mr extends Xc{constructor(){super(...arguments),this.KeyframeResolver=Ni}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;N(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Zc(t){return window.getComputedStyle(t)}class Jc extends mr{constructor(){super(...arguments),this.type="html",this.renderInstance=ei}readValueFromInstance(e,n){if(ct.has(n)){const s=fn(n);return s&&s.default||0}else{const s=Zc(e),i=(Js(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return nr(e,n)}build(e,n,s){Xe(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return tn(e,n,s)}}class Qc extends mr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=L}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ct.has(n)){const s=fn(n);return s&&s.default||0}return n=ni.has(n)?n:$e(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return ri(e,n,s)}build(e,n,s){Ze(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,i){si(e,n,s,i)}mount(e){this.isSVGTag=Qe(e.tagName),super.mount(e)}}const tu=(t,e)=>ze(t)?new Qc(e):new Jc(e,{allowProjection:t!==P.Fragment}),eu=Vo({...Sl,...$c,...Lc,...Gc}
1,tu),nu=_r(eu),su={name:"",email:"",phone:"",emailOtp:"",mobileOtp:"",restaurant_name:"",billing_name:"",billing_address:"",billing_city:"",billing_state_code:"",billing_pincode:"",buyer_gstin:""},Is=["Contact","Verify","Invoice & payment"];function Ns(t){const e=Math.floor(t/60),n=t%60;return`${String(e).padStart(2,"0")}:${String(n).padStart(2,"0")}`}function iu(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"web-"+Date.now()+"-"+Math.random().toString(36).slice(2)}function uu({plan:t,onClose:e,slug:n=bn,prefill:s}){const i=n===Tn?"pos":"rms",o=i==="pos",r=gr(i,t.code),l=(n===bn||n===Tn)&&!!r&&Pn(t,{baseAmountPaise:r.baseAmountPaise,durationDays:r.durationDays,allowedCodes:[r.code]}),[a,c]=P.useState(()=>{const T={...su};for(const[D,U]of Object.entries(s??{}))typeof U=="string"&&(T[D]=U);return T}),[u,h]=P.useState(1),[d,f]=P.useState(""),[m,p]=P.useState(""),[g,y]=P.useState(!1),[x,b]=P.useState(null),[V,S]=P.useState(0),[C,k]=P.useState(!1),[A]=P.useState(iu),O=t.amount_paise,_=t.gst_amount_paise??Math.round(O*.18),$=t.total_amount_paise??O+_,Tt=()=>{g||e()};P.useEffect(()=>{const T=D=>{D.key==="Escape"&&!g&&e()};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[g,e]),P.useEffect(()=>{const T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=T}},[]),P.useEffect(()=>{if(V<=0)return;const T=window.setTimeout(()=>{S(D=>Math.max(0,D-1))},1e3);return()=>window.clearTimeout(T)},[V]);const Kt=(T,D)=>{c(U=>({...U,[T]:D}))},Pt=()=>{const T=a.email.trim().toLowerCase();let D=a.phone.replace(/\D/g,"");if(D.length===12&&D.startsWith("91")&&(D=D.slice(2)),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(T))throw new Error("Enter a valid email address.");if(!/^[6-9]\d{9}$/.test(D))throw new Error("Enter a valid 10-digit Indian mobile number.");return{email:T,phone:D}},vn=async()=>{if(!(V>0)){y(!0),b(null);try{if(!l)throw new Error("This annual plan is not available for online checkout.");const T=Pt(),D=await wr(T.email,T.phone,n);f(D.verification_id),S(0),h(2)}catch(T){T instanceof Sr&&T.retryAfterSeconds>0?(S(T.retryAfterSeconds),b(null)):b(T instanceof Error?T.message:"Could not send both OTPs.")}finally{y(!1)}}},xn=async()=>{y(!0),b(null);try{if(!/^\d{6}$/.test(a.emailOtp)||!/^\d{6}$/.test(a.mobileOtp))throw new Error("Enter both 6-digit OTPs.");const T=await Ar(d,a.emailOtp,a.mobileOtp,n);p(T.verification_token),h(3)}catch(T){b(T instanceof Error?T.message:"Could not verify both OTPs.")}finally{y(!1)}},F=async()=>{b(null);try{const T=Pt();if(!a.name.trim())throw new Error("Enter the account holder name.");if(o&&!a.restaurant_name.trim()||[a.billing_name,a.billing_address,a.billing_city,a.billing_state_code,a.billing_pincode].some(le=>!le.trim()))throw new Error("Complete all required business and invoice fields.");if(a.billing_pincode.trim()&&!/^[1-9]\d{5}$/.test(a.billing_pincode.trim()))throw new Error("Enter a valid 6-digit PIN code.");const D=a.buyer_gstin.trim().toUpperCase();if(D&&!/^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(D))throw new Error("Enter a valid GSTIN or leave it blank.");if(D&&a.billing_state_code&&!D.startsWith(a.billing_state_code))throw new Error("Buyer GSTIN must match the selected state.");if(!C)throw new Error("Agree to the Terms and acknowledge the Privacy Policy before paying.");if(y(!0),!r)throw new Error("This plan is not in the public catalogue.");const H=(await Vr(n)).find(le=>le.code===r.code);if(!H||!Pn(H,{baseAmountPaise:r.baseAmountPaise,durationDays:r.durationDays,allowedCodes:[r.code]})||H.total_amount_paise!==$)throw new Error("The live plan or GST total changed. Close this window and try again.");br("AddPaymentInfo",{content_ids:H.code,content_type:"product",value:$/100,currency:"INR"});const St=await Cr({name:a.name.trim(),email:T.email,phone:T.phone,restaurant_name:a.restaurant_name.trim()||void 0,address:a.billing_address.trim()||void 0,billing_name:a.billing_name.trim()||void 0,billing_address:a.billing_address.trim()||void 0,billing_city:a.billing_city.trim()||void 0,billing_state_code:a.billing_state_code||void 0,billing_pincode:
1a.billing_pincode.trim()||void 0,buyer_gstin:D||void 0,verification_id:d,verification_token:m,idempotency_key:A,plan_code:H.code,return_url:window.location.origin+`/payment/return?product=${i}&order_id={order_id}`},n);if(St.currency.toUpperCase()!=="INR"||St.total_amount_paise!==$)throw new Error("The order total did not match the amount shown. Payment was stopped.");await Dr(St)}catch(T){b(T instanceof Error?T.message:"Could not start payment."),y(!1)}},j=(T,D,U={})=>v.jsxs("div",{children:[v.jsxs("label",{className:"mb-1 block text-sm font-medium text-slate-700",children:[D," ",U.required&&v.jsx("span",{className:"text-red-500",children:"*"})]}),v.jsx("input",{type:U.type??"text",value:a[T],placeholder:U.placeholder,disabled:g||u>1&&(T==="email"||T==="phone"),inputMode:U.type==="tel"||T==="emailOtp"||T==="mobileOtp"?"numeric":void 0,onChange:H=>Kt(T,H.target.value),className:"w-full rounded-xl border border-slate-300 bg-white px-3 py-2.5 text-slate-900 focus:outline-none focus:ring-2 focus:ring-brand-500 disabled:bg-slate-50"})]}),ut=u,wt="tel:"+wn.replace(/[^\d+]/g,""),pr="https://wa.me/"+wn.replace(/\D/g,"");return yr.createPortal(v.jsx("div",{className:"fixed inset-0 z-[90] flex items-center justify-center bg-slate-900/60 p-4",onClick:Tt,role:"dialog","aria-modal":"true","aria-labelledby":"checkout-modal-title",children:v.jsx(nu.div,{"data-clarity-mask":"true",initial:{opacity:0,scale:.96,y:10},animate:{opacity:1,scale:1,y:0},className:"max-h-[92vh] w-full max-w-xl overflow-y-auto rounded-2xl bg-white shadow-2xl",onClick:T=>T.stopPropagation(),children:v.jsxs("div",{className:"p-6",children:[v.jsxs("div",{className:"flex items-start justify-between",children:[v.jsxs("div",{children:[v.jsxs("h3",{id:"checkout-modal-title",className:"text-xl font-bold text-slate-900",children:["Buy ",t.name]}),v.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Annual plan · manual renewal · no auto-debit"})]}),v.jsx("button",{onClick:Tt,disabled:g,className:"text-xl text-slate-400",children:"✕"})]}),v.jsx("ol",{className:"my-5 flex items-start",children:Is.map((T,D)=>{const U=D+1,H=U<ut,St=U===ut;return v.jsxs("li",{className:"relative flex flex-1 flex-col items-center text-center",children:[D<Is.length-1&&v.jsx("span",{className:"absolute left-1/2 top-3.5 h-0.5 w-full "+(H?"bg-brand-600":"bg-slate-200")}),v.jsx("span",{className:"relative z-10 flex h-7 w-7 items-center justify-center rounded-full border text-xs font-bold "+(H?"border-brand-600 bg-brand-600 text-white":St?"border-brand-600 bg-white text-brand-700 ring-2 ring-brand-100":"border-slate-200 bg-white text-slate-400"),children:H?v.jsx(vr,{className:"h-4 w-4"}):U}),v.jsx("span",{className:"mt-1.5 px-1 text-[10px] leading-tight text-slate-600",children:T})]},T)})}),v.jsx("div",{className:"mb-5 rounded-xl bg-brand-50 px-4 py-3",children:v.jsxs("div",{className:"flex items-start justify-between gap-4",children:[v.jsxs("div",{children:[v.jsx("p",{className:"font-semibold text-slate-900",children:t.name}),v.jsx("p",{className:"text-xs text-slate-500",children:o?"12 calendar months (13 if first-purchase eligible)":`Valid ${Tr(t.duration_days)}`})]}),v.jsxs("div",{className:"text-right text-sm",children:[v.jsxs("p",{children:["Plan ",Wt(O)]}),v.jsxs("p",{children:["GST ",Wt(_)]}),v.jsx("p",{className:"mt-1 text-xl font-extrabold text-slate-900",children:Wt($)})]})]})}),u===1&&v.jsxs("div",{className:"space-y-4",children:[j("email","Email",{type:"email",required:!0,placeholder:"[email protected]"}),j("phone","Mobile number",{type:"tel",required:!0,placeholder:"10-digit Indian mobile"}),v.jsx("p",{className:"rounded-lg bg-slate-50 px-3 py-2 text-xs text-slate-600",children:"We send a different OTP to each channel. Both must be verified."}),v.jsxs("button",{type:"button",onClick:vn,disabled:g||V>0,className:"flex w-full items-center justify-center gap-2 rounded-xl bg-brand-600 py-3 font-bold text-white disabled:opacity-60",children:[g&&v.jsx(ce,{className:"h-4 w-4 animate-spin"}),V>0?`Try again in ${Ns(V)}`:"Send both OTPs"]}),V>0&&v.jsxs("p",{role:"status","aria-live":"polite",className:"rounded-lg bg-amber-50 px-3 py-2 text-sm text-amber-800",children:["You’ve requested OTPs 3 times. Try again in"," ",Ns(V),"."]})]}),u===2&&v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"rounded-lg border border-emerald-200 bg-emerald-50 p-3 text-sm text-emerald-900",children:["Codes sent to ",v.jsx("b",{children:a.email})," and ",v.jsx("b",{children:a.phone}),"."]}),j("emailOtp","Email OTP",{required:!0,placeholder:"6-digit email code"}),j("mobileOtp","Mobile OTP",{required:!0,placeholder:"6-digit SMS code"}),v.jsxs("button",{type:"button",onClick:xn,disabled:g,className:"flex w-full items-center justify-center gap-2 rounded-xl bg-brand-600 py-3 font-bold text-white disabled:opacity-60",children:[g&&v.jsx(ce,{className:"h-4 w-4 animate-spin"}),"Verify both"]}),v.jsx("button",{type:"button",onClick:()=>{h(1),f(""),c(T=>({...T,emailOtp:"",mobileOtp:""}))},disabled:g,className:"w-full text-sm font-semibold text-brand-700",children:"Change email or mobile"})]}),u===3&&v.jsxs("div",{className:"space-y-3",children:[v.jsxs("p",{className:"flex items-center gap-2 rounded-lg bg-emerald-50 px-3 py-2 text-sm font-semibold text-emerald-800",children:[v.jsx(Mr,{className:"h-4 w-4"})," Email and mobile verified"]}),o&&v.jsx("p",{className:"rounded-lg bg-brand-50 px-3 py-2 text-xs text-brand-900",children:"Your first POS annual purchase receives 13 calendar months only when this account has never used a Pro trial or bought an annual POS plan. Otherwise the term is 12 months."}),j("name","Contact name",{required:!0,placeholder:"Your full name"}),j("restaurant_name",o?"Business name":"Restaurant name",{required:o,placeholder:o?"Registered or trading name":"Optional"}),j("billing_name","Invoice name",{required:!0,placeholder:"Business or legal name"}),j("billing_address","Billing address",{required:!0,placeholder:"Building and street"}),v.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[j("billing_city","City",{required:!0}),j("billing_pincode","PIN code",{required:!0,placeholder:"6 digits"})]}),v.jsxs("div",{children:[v.jsxs("label",{className:"mb-1 block text-sm font-medium text-slate-700",children:["State / place of supply ",v.jsx("span",{className:"text-red-500",children:"*"})]}),v.jsxs("select",{value:a.billing_state_code,disabled:g,"aria-required":"true",onCh
1ange:T=>Kt("billing_state_code",T.target.value),className:"w-full rounded-xl border border-slate-300 bg-white px-3 py-2.5 text-slate-900 focus:ring-2 focus:ring-brand-500",children:[v.jsx("option",{value:"",children:"Select state"}),Pr.map(([T,D])=>v.jsx("option",{value:T,children:D},T))]})]}),j("buyer_gstin","Buyer GSTIN",{placeholder:"Optional for unregistered buyers"}),v.jsxs("label",{className:"flex items-start gap-3 rounded-xl border border-slate-200 bg-slate-50 p-3 text-sm text-slate-700",children:[v.jsx("input",{type:"checkbox",checked:C,disabled:g,onChange:T=>k(T.target.checked),className:"mt-1 h-4 w-4"}),v.jsxs("span",{children:["I agree to the ",v.jsx("a",{href:"/terms",target:"_blank",className:"font-semibold underline",children:"Terms"})," ","and acknowledge the ",v.jsx("a",{href:"/privacy",target:"_blank",className:"font-semibold underline",children:"Privacy Policy"}),"."]})]}),v.jsxs("button",{type:"button",onClick:F,disabled:g,className:"flex w-full items-center justify-center gap-2 rounded-xl bg-brand-600 py-3 font-bold text-white disabled:opacity-60",children:[g&&v.jsx(ce,{className:"h-4 w-4 animate-spin"}),"Pay ",Wt($)]}),v.jsx("p",{className:"text-center text-[11px] text-slate-400",children:"Cashfree secure checkout · invoice emailed by GRIDSPARK SOLUTIONS LLP"})]}),x&&v.jsx("p",{className:"mt-4 rounded-lg bg-red-50 px-3 py-2 text-sm text-red-700",children:x}),v.jsxs("div",{className:"mt-5 flex items-center justify-center gap-1.5 border-t border-slate-100 pt-4 text-xs text-slate-500",children:[v.jsx(xr,{className:"h-3.5 w-3.5"}),v.jsx("span",{children:"Need help?"}),v.jsx("a",{href:wt,className:"font-semibold text-brand-700",children:"Call"}),v.jsx("span",{children:"or"}),v.jsx("a",{href:pr,target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-brand-700",children:"WhatsApp"})]})]})})}),document.body)}export{uu as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.