pagecast 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ function So(t,e){for(var n=0;n<e.length;n++){const s=e[n];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in t)){const o=Object.getOwnPropertyDescriptor(s,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function wo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ve={exports:{}},jt={};var es;function Ao(){if(es)return jt;es=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(s,i,o){var r=null;if(o!==void 0&&(r=""+o),i.key!==void 0&&(r=""+i.key),"key"in i){o={};for(var a in i)a!=="key"&&(o[a]=i[a])}else o=i;return i=o.ref,{$$typeof:t,type:s,key:r,ref:i!==void 0?i:null,props:o}}return jt.Fragment=e,jt.jsx=n,jt.jsxs=n,jt}var ns;function Po(){return ns||(ns=1,Ve.exports=Ao()),Ve.exports}var Ge=Po(),Me={exports:{}},D={};var ss;function bo(){if(ss)return D;ss=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),r=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),d=Symbol.iterator;function p(h){return h===null||typeof h!="object"?null:(h=d&&h[d]||h["@@iterator"],typeof h=="function"?h:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,v={};function y(h,T,R){this.props=h,this.context=T,this.refs=v,this.updater=R||m}y.prototype.isReactComponent={},y.prototype.setState=function(h,T){if(typeof h!="object"&&typeof h!="function"&&h!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,h,T,"setState")},y.prototype.forceUpdate=function(h){this.updater.enqueueForceUpdate(this,h,"forceUpdate")};function x(){}x.prototype=y.prototype;function S(h,T,R){this.props=h,this.context=T,this.refs=v,this.updater=R||m}var w=S.prototype=new x;w.constructor=S,g(w,y.prototype),w.isPureReactComponent=!0;var V=Array.isArray;function I(){}var P={H:null,A:null,T:null,S:null},b=Object.prototype.hasOwnProperty;function L(h,T,R){var M=R.ref;return{$$typeof:t,type:h,key:T,ref:M!==void 0?M:null,props:R}}function E(h,T){return L(h.type,T,h.props)}function B(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function W(h){var T={"=":"=0",":":"=2"};return"$"+h.replace(/[=:]/g,function(R){return T[R]})}var Z=/\/+/g;function z(h,T){return typeof h=="object"&&h!==null&&h.key!=null?W(""+h.key):T.toString(36)}function nt(h){switch(h.status){case"fulfilled":return h.value;case"rejected":throw h.reason;default:switch(typeof h.status=="string"?h.then(I,I):(h.status="pending",h.then(function(T){h.status==="pending"&&(h.status="fulfilled",h.value=T)},function(T){h.status==="pending"&&(h.status="rejected",h.reason=T)})),h.status){case"fulfilled":return h.value;case"rejected":throw h.reason}}throw h}function K(h,T,R,M,k){var O=typeof h;(O==="undefined"||O==="boolean")&&(h=null);var j=!1;if(h===null)j=!0;else switch(O){case"bigint":case"string":case"number":j=!0;break;case"object":switch(h.$$typeof){case t:case e:j=!0;break;case l:return j=h._init,K(j(h._payload),T,R,M,k)}}if(j)return k=k(h),j=M===""?"."+z(h,0):M,V(k)?(R="",j!=null&&(R=j.replace(Z,"$&/")+"/"),K(k,T,R,"",function(ee){return ee})):k!=null&&(B(k)&&(k=E(k,R+(k.key==null||h&&h.key===k.key?"":(""+k.key).replace(Z,"$&/")+"/")+j)),T.push(k)),1;j=0;var J=M===""?".":M+":";if(V(h))for(var X=0;X<h.length;X++)M=h[X],O=J+z(M,X),j+=K(M,T,R,O,k);else if(X=p(h),typeof X=="function")for(h=X.call(h),X=0;!(M=h.next()).done;)M=M.value,O=J+z(M,X++),j+=K(M,T,R,O,k);else if(O==="object"){if(typeof h.then=="function")return K(nt(h),T,R,M,k);throw T=String(h),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.")}return j}function Q(h,T,R){if(h==null)return h;var M=[],k=0;return K(h,M,"","",function(O){return T.call(R,O,k++)}),M}function F(h){if(h._status===-1){var T=h._result;T=T(),T.then(function(R){(h._status===0||h._status===-1)&&(h._status=1,h._result=R)},function(R){(h._status===0||h._status===-1)&&(h._status=2,h._result=R)}),h._status===-1&&(h._status=0,h._result=T)}if(h._status===1)return h._result.default;throw h._result}var Y=typeof reportError=="function"?reportError:function(h){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h),error:h});if(!window.dispatchEvent(T))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",h);return}console.error(h)},it={map:Q,forEach:function(h,T,R){Q(h,function(){T.apply(this,arguments)},R)},count:function(h){var T=0;return Q(h,function(){T++}),T},toArray:function(h){return Q(h,function(T){return T})||[]},only:function(h){if(!B(h))throw Error("React.Children.only expected to receive a single React element child.");return h}};return D.Activity=f,D.Children=it,D.Component=y,D.Fragment=n,D.Profiler=i,D.PureComponent=S,D.StrictMode=s,D.Suspense=u,D.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,D.__COMPILER_RUNTIME={__proto__:null,c:function(h){return P.H.useMemoCache(h)}},D.cache=function(h){return function(){return h.apply(null,arguments)}},D.cacheSignal=function(){return null},D.cloneElement=function(h,T,R){if(h==null)throw Error("The argument must be a React element, but you passed "+h+".");var M=g({},h.props),k=h.key;if(T!=null)for(O in T.key!==void 0&&(k=""+T.key),T)!b.call(T,O)||O==="key"||O==="__self"||O==="__source"||O==="ref"&&T.ref===void 0||(M[O]=T[O]);var O=arguments.length-2;if(O===1)M.children=R;else if(1<O){for(var j=Array(O),J=0;J<O;J++)j[J]=arguments[J+2];M.children=j}return L(h.type,k,M)},D.createContext=function(h){return h={$$typeof:r,_currentValue:h,_currentValue2:h,_threadCount:0,Provider:null,Consumer:null},h.Provider=h,h.Consumer={$$typeof:o,_context:h},h},D.createElement=function(h,T,R){var M,k={},O=null;if(T!=null)for(M in T.key!==void 0&&(O=""+T.key),T)b.call(T,M)&&M!=="key"&&M!=="__self"&&M!=="__source"&&(k[M]=T[M]);var j=arguments.length-2;if(j===1)k.children=R;else if(1<j){for(var J=Array(j),X=0;X<j;X++)J[X]=arguments[X+2];k.children=J}if(h&&h.defaultProps)for(M in j=h.defaultProps,j)k[M]===void 0&&(k[M]=j[M]);return L(h,O,k)},D.createRef=function(){return{current:null}},D.forwardRef=function(h){return{$$typeof:a,render:h}},D.isValidElement=B,D.lazy=function(h){return{$$typeof:l,_payload:{_status:-1,_result:h},_init:F}},D.memo=function(h,T){return{$$typeof:c,type:h,compare:T===void 0?null:T}},D.startTransition=function(h){var T=P.T,R={};P.T=R;try{var M=h(),k=P.S;k!==null&&k(R,M),typeof M=="object"&&M!==null&&typeof M.then=="function"&&M.then(I,Y)}catch(O){Y(O)}finally{T!==null&&R.types!==null&&(T.types=R.types),P.T=T}},D.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},D.use=function(h){return P.H.use(h)},D.useActionState=function(h,T,R){return P.H.useActionState(h,T,R)},D.useCallback=function(h,T){return P.H.useCallback(h,T)},D.useContext=function(h){return P.H.useContext(h)},D.useDebugValue=function(){},D.useDeferredValue=function(h,T){return P.H.useDeferredValue(h,T)},D.useEffect=function(h,T){return P.H.useEffect(h,T)},D.useEffectEvent=function(h){return P.H.useEffectEvent(h)},D.useId=function(){return P.H.useId()},D.useImperativeHandle=function(h,T,R){return P.H.useImperativeHandle(h,T,R)},D.useInsertionEffect=function(h,T){return P.H.useInsertionEffect(h,T)},D.useLayoutEffect=function(h,T){return P.H.useLayoutEffect(h,T)},D.useMemo=function(h,T){return P.H.useMemo(h,T)},D.useOptimistic=function(h,T){return P.H.useOptimistic(h,T)},D.useReducer=function(h,T,R){return P.H.useReducer(h,T,R)},D.useRef=function(h){return P.H.useRef(h)},D.useState=function(h){return P.H.useState(h)},D.useSyncExternalStore=function(h,T,R){return P.H.useSyncExternalStore(h,T,R)},D.useTransition=function(){return P.H.useTransition()},D.version="19.2.6",D}var is;function Eo(){return is||(is=1,Me.exports=bo()),Me.exports}var C=Eo();const Co=wo(C),Of=So({__proto__:null,default:Co},[C]),Pi=C.createContext({});function vn(t){const e=C.useRef(null);return e.current===null&&(e.current=t()),e.current}const Vo=typeof window<"u",bi=Vo?C.useLayoutEffect:C.useEffect,Tn=C.createContext(null);function xn(t,e){t.indexOf(e)===-1&&t.push(e)}function Dt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const dt=(t,e,n)=>n>e?e:n<t?t:n;let Sn=()=>{};const vt={},Ei=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ci=t=>typeof t=="object"&&t!==null,Vi=t=>/^0[^.\s]+$/u.test(t);function Mi(t){let e;return()=>(e===void 0&&(e=t()),e)}const ot=t=>t,Zt=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Lt=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class wn{constructor(){this.subscriptions=[]}add(e){return xn(this.subscriptions,e),()=>Dt(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}}const st=t=>t*1e3,rt=t=>t/1e3,Ri=(t,e)=>e?t*(1e3/e):0,Mo=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},Di=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ro=1e-7,Do=12;function Lo(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Di(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Ro&&++a<Do);return r}function Jt(t,e,n,s){if(t===e&&n===s)return ot;const i=o=>Lo(o,0,1,t,n);return o=>o===0||o===1?o:Di(i(o),e,s)}const Li=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,An=t=>e=>1-t(1-e),ki=Jt(.33,1.53,.69,.99),Pn=An(ki),Ii=Li(Pn),Bi=t=>t>=1?1:(t*=2)<1?.5*Pn(t):.5*(2-Math.pow(2,-10*(t-1))),bn=t=>1-Math.sin(Math.acos(t)),Oi=An(bn),Fi=Li(bn),ko=Jt(.42,0,1,1),Io=Jt(0,0,.58,1),ji=Jt(.42,0,.58,1),_i=t=>Array.isArray(t)&&typeof t[0]!="number";function Ni(t,e){return _i(t)?t[Mo(0,t.length,e)]:t}const Ui=t=>Array.isArray(t)&&typeof t[0]=="number",Bo={linear:ot,easeIn:ko,easeInOut:ji,easeOut:Io,circIn:bn,circInOut:Fi,circOut:Oi,backIn:Pn,backInOut:Ii,backOut:ki,anticipate:Bi},Oo=t=>typeof t=="string",rs=t=>{if(Ui(t)){Sn(t.length===4);const[e,n,s,i]=t;return Jt(e,n,s,i)}else if(Oo(t))return Bo[t];return t},ne=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Fo(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function u(l){r.has(l)&&(c.schedule(l),t()),l(a)}const c={schedule:(l,f=!1,d=!1)=>{const m=d&&i?n:s;return f&&r.add(l),m.add(l),l},cancel:l=>{s.delete(l),r.delete(l)},process:l=>{if(a=l,i){o=!0;return}i=!0;const f=n;n=s,s=f,n.forEach(u),n.clear(),i=!1,o&&(o=!1,c.process(l))}};return c}const jo=40;function Wi(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=ne.reduce((S,w)=>(S[w]=Fo(o),S),{}),{setup:a,read:u,resolveKeyframes:c,preUpdate:l,update:f,preRender:d,render:p,postRender:m}=r,g=()=>{const S=vt.useManualTiming,w=S?i.timestamp:performance.now();n=!1,S||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,jo),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),u.process(i),c.process(i),l.process(i),f.process(i),d.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},v=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:ne.reduce((S,w)=>{const V=r[w];return S[w]=(I,P=!1,b=!1)=>(n||v(),V.schedule(I,P,b)),S},{}),cancel:S=>{for(let w=0;w<ne.length;w++)r[ne[w]].cancel(S)},state:i,steps:r}}const{schedule:N,cancel:mt,state:q,steps:Re}=Wi(typeof requestAnimationFrame<"u"?requestAnimationFrame:ot,!0);let oe;function _o(){oe=void 0}const tt={now:()=>(oe===void 0&&tt.set(q.isProcessing||vt.useManualTiming?q.timestamp:performance.now()),oe),set:t=>{oe=t,queueMicrotask(_o)}},Hi=t=>e=>typeof e=="string"&&e.startsWith(t),$i=Hi("--"),No=Hi("var(--"),En=t=>No(t)?Uo.test(t.split("/*")[0].trim()):!1,Uo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function os(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const It={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Gt={...It,transform:t=>dt(0,1,t)},se={...It,default:1},Ut=t=>Math.round(t*1e5)/1e5,Cn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Wo(t){return t==null}const Ho=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vn=(t,e)=>n=>!!(typeof n=="string"&&Ho.test(n)&&n.startsWith(t)||e&&!Wo(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ki=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Cn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},$o=t=>dt(0,255,t),De={...It,transform:t=>Math.round($o(t))},At={test:Vn("rgb","red"),parse:Ki("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+De.transform(t)+", "+De.transform(e)+", "+De.transform(n)+", "+Ut(Gt.transform(s))+")"};function Ko(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 ze={test:Vn("#"),parse:Ko,transform:At.transform},Qt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),pt=Qt("deg"),ht=Qt("%"),A=Qt("px"),Go=Qt("vh"),zo=Qt("vw"),as={...ht,parse:t=>ht.parse(t)/100,transform:t=>ht.transform(t*100)},Vt={test:Vn("hsl","hue"),parse:Ki("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ht.transform(Ut(e))+", "+ht.transform(Ut(n))+", "+Ut(Gt.transform(s))+")"},$={test:t=>At.test(t)||ze.test(t)||Vt.test(t),parse:t=>At.test(t)?At.parse(t):Vt.test(t)?Vt.parse(t):ze.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?At.transform(t):Vt.transform(t),getAnimatableNone:t=>{const e=$.parse(t);return e.alpha=0,$.transform(e)}},Yo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Xo(t){return isNaN(t)&&typeof t=="string"&&(t.match(Cn)?.length||0)+(t.match(Yo)?.length||0)>0}const Gi="number",zi="color",qo="var",Zo="var(",us="${}",Jo=/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 kt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(Jo,u=>($.test(u)?(s.color.push(o),i.push(zi),n.push($.parse(u))):u.startsWith(Zo)?(s.var.push(o),i.push(qo),n.push(u)):(s.number.push(o),i.push(Gi),n.push(parseFloat(u))),++o,us)).split(us);return{values:n,split:a,indexes:s,types:i}}function Qo(t){return kt(t).values}function Yi({split:t,types:e}){const n=t.length;return s=>{let i="";for(let o=0;o<n;o++)if(i+=t[o],s[o]!==void 0){const r=e[o];r===Gi?i+=Ut(s[o]):r===zi?i+=$.transform(s[o]):i+=s[o]}return i}}function ta(t){return Yi(kt(t))}const ea=t=>typeof t=="number"?0:$.test(t)?$.getAnimatableNone(t):t,na=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:ea(t);function sa(t){const e=kt(t);return Yi(e)(e.values.map((s,i)=>na(s,e.split[i])))}const lt={test:Xo,parse:Qo,createTransformer:ta,getAnimatableNone:sa};function Le(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 ia({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 a=n<.5?n*(1+e):n+e-n*e,u=2*n-a;i=Le(u,a,t+1/3),o=Le(u,a,t),r=Le(u,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function pe(t,e){return n=>n>0?e:t}const _=(t,e,n)=>t+(e-t)*n,ke=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ra=[ze,At,Vt],oa=t=>ra.find(e=>e.test(t));function ls(t){const e=oa(t);if(!e)return!1;let n=e.parse(t);return e===Vt&&(n=ia(n)),n}const cs=(t,e)=>{const n=ls(t),s=ls(e);if(!n||!s)return pe(t,e);const i={...n};return o=>(i.red=ke(n.red,s.red,o),i.green=ke(n.green,s.green,o),i.blue=ke(n.blue,s.blue,o),i.alpha=_(n.alpha,s.alpha,o),At.transform(i))},Ye=new Set(["none","hidden"]);function aa(t,e){return Ye.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ua(t,e){return n=>_(t,e,n)}function Mn(t){return typeof t=="number"?ua:typeof t=="string"?En(t)?pe:$.test(t)?cs:fa:Array.isArray(t)?Xi:typeof t=="object"?$.test(t)?cs:la:pe}function Xi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Mn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function la(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Mn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function ca(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const fa=(t,e)=>{const n=lt.createTransformer(e),s=kt(t),i=kt(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?Ye.has(t)&&!i.values.length||Ye.has(e)&&!s.values.length?aa(t,e):Zt(Xi(ca(s,i),i.values),n):pe(t,e)};function qi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?_(t,e,n):Mn(t)(t,e)}const ha=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>N.update(e,n),stop:()=>mt(e),now:()=>q.isProcessing?q.timestamp:tt.now()}},Zi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},me=2e4;function Rn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<me;)e+=n,s=t.next(e);return e>=me?1/0:e}function Ji(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Rn(s),me);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:rt(i)}}const U={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};function Xe(t,e){return t*Math.sqrt(1-e*e)}const da=12;function pa(t,e,n){let s=n;for(let i=1;i<da;i++)s=s-t(s)/e(s);return s}const Ie=.001;function ma({duration:t=U.duration,bounce:e=U.bounce,velocity:n=U.velocity,mass:s=U.mass}){let i,o,r=1-e;r=dt(U.minDamping,U.maxDamping,r),t=dt(U.minDuration,U.maxDuration,rt(t)),r<1?(i=c=>{const l=c*r,f=l*t,d=l-n,p=Xe(c,r),m=Math.exp(-f);return Ie-d/p*m},o=c=>{const f=c*r*t,d=f*n+n,p=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-f),g=Xe(Math.pow(c,2),r);return(-i(c)+Ie>0?-1:1)*((d-p)*m)/g}):(i=c=>{const l=Math.exp(-c*t),f=(c-n)*t+1;return-Ie+l*f},o=c=>{const l=Math.exp(-c*t),f=(n-c)*(t*t);return l*f});const a=5/t,u=pa(i,o,a);if(t=st(t),isNaN(u))return{stiffness:U.stiffness,damping:U.damping,duration:t};{const c=Math.pow(u,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const ya=["duration","bounce"],ga=["stiffness","damping","mass"];function fs(t,e){return e.some(n=>t[n]!==void 0)}function va(t){let e={velocity:U.velocity,stiffness:U.stiffness,damping:U.damping,mass:U.mass,isResolvedFromDuration:!1,...t};if(!fs(t,ga)&&fs(t,ya))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*dt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:U.mass,stiffness:i,damping:o}}else{const n=ma({...t,velocity:0});e={...e,...n,mass:U.mass},e.isResolvedFromDuration=!0}return e}function zt(t=U.visualDuration,e=U.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],a={done:!1,value:o},{stiffness:u,damping:c,mass:l,duration:f,velocity:d,isResolvedFromDuration:p}=va({...n,velocity:-rt(n.velocity||0)}),m=d||0,g=c/(2*Math.sqrt(u*l)),v=r-o,y=rt(Math.sqrt(u/l)),x=Math.abs(v)<5;s||(s=x?U.restSpeed.granular:U.restSpeed.default),i||(i=x?U.restDelta.granular:U.restDelta.default);let S,w,V,I,P,b;if(g<1)V=Xe(y,g),I=(m+g*y*v)/V,S=E=>{const B=Math.exp(-g*y*E);return r-B*(I*Math.sin(V*E)+v*Math.cos(V*E))},P=g*y*I+v*V,b=g*y*v-I*V,w=E=>Math.exp(-g*y*E)*(P*Math.sin(V*E)+b*Math.cos(V*E));else if(g===1){S=B=>r-Math.exp(-y*B)*(v+(m+y*v)*B);const E=m+y*v;w=B=>Math.exp(-y*B)*(y*E*B-m)}else{const E=y*Math.sqrt(g*g-1);S=z=>{const nt=Math.exp(-g*y*z),K=Math.min(E*z,300);return r-nt*((m+g*y*v)*Math.sinh(K)+E*v*Math.cosh(K))/E};const B=(m+g*y*v)/E,W=g*y*B-v*E,Z=g*y*v-B*E;w=z=>{const nt=Math.exp(-g*y*z),K=Math.min(E*z,300);return nt*(W*Math.sinh(K)+Z*Math.cosh(K))}}const L={calculatedDuration:p&&f||null,velocity:E=>st(w(E)),next:E=>{if(!p&&g<1){const W=Math.exp(-g*y*E),Z=Math.sin(V*E),z=Math.cos(V*E),nt=r-W*(I*Z+v*z),K=st(W*(P*Z+b*z));return a.done=Math.abs(K)<=s&&Math.abs(r-nt)<=i,a.value=a.done?r:nt,a}const B=S(E);if(p)a.done=E>=f;else{const W=st(w(E));a.done=Math.abs(W)<=s&&Math.abs(r-B)<=i}return a.value=a.done?r:B,a},toString:()=>{const E=Math.min(Rn(L),me),B=Zi(W=>L.next(E*W).value,E,30);return E+"ms "+B},toTransition:()=>{}};return L}zt.applyToOptions=t=>{const e=Ji(t,100,zt);return t.ease=e.ease,t.duration=st(e.duration),t.type="keyframes",t};const Ta=5;function Qi(t,e,n){const s=Math.max(e-Ta,0);return Ri(n-t(s),e-s)}function qe({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:u,restDelta:c=.5,restSpeed:l}){const f=t[0],d={done:!1,value:f},p=b=>a!==void 0&&b<a||u!==void 0&&b>u,m=b=>a===void 0?u:u===void 0||Math.abs(a-b)<Math.abs(u-b)?a:u;let g=n*e;const v=f+g,y=r===void 0?v:r(v);y!==v&&(g=y-f);const x=b=>-g*Math.exp(-b/s),S=b=>y+x(b),w=b=>{const L=x(b),E=S(b);d.done=Math.abs(L)<=c,d.value=d.done?y:E};let V,I;const P=b=>{p(d.value)&&(V=b,I=zt({keyframes:[d.value,m(d.value)],velocity:Qi(S,b,d.value),damping:i,stiffness:o,restDelta:c,restSpeed:l}))};return P(0),{calculatedDuration:null,next:b=>{let L=!1;return!I&&V===void 0&&(L=!0,w(b),P(b)),V!==void 0&&b>=V?I.next(b-V):(!L&&w(b),d)}}}function xa(t,e,n){const s=[],i=n||vt.mix||qi,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const u=Array.isArray(e)?e[r]||ot:e;a=Zt(u,a)}s.push(a)}return s}function tr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Sn(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 a=xa(e,s,i),u=a.length,c=l=>{if(r&&l<t[0])return e[0];let f=0;if(u>1)for(;f<t.length-2&&!(l<t[f+1]);f++);const d=Lt(t[f],t[f+1],l);return a[f](d)};return n?l=>c(dt(t[0],t[o-1],l)):c}function er(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Lt(0,e,s);t.push(_(n,1,i))}}function nr(t){const e=[0];return er(e,t.length-1),e}function Sa(t,e){return t.map(n=>n*e)}function wa(t,e){return t.map(()=>e||ji).splice(0,t.length-1)}function Wt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=_i(s)?s.map(rs):rs(s),o={done:!1,value:e[0]},r=Sa(n&&n.length===e.length?n:nr(e),t),a=tr(r,e,{ease:Array.isArray(i)?i:wa(e,i)});return{calculatedDuration:t,next:u=>(o.value=a(u),o.done=u>=t,o)}}const Aa=t=>t!==null;function Ae(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Aa),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Pa={decay:qe,inertia:qe,tween:Wt,keyframes:Wt,spring:zt};function sr(t){typeof t.type=="string"&&(t.type=Pa[t.type])}class Dn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const ba=t=>t/100;class ye extends Dn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==tt.now()&&this.tick(tt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;sr(e);const{type:n=Wt,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const u=n||Wt;u!==Wt&&typeof a[0]!="number"&&(this.mixKeyframes=Zt(ba,qi(a[0],a[1])),a=[0,100]);const c=u({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Rn(c));const{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:l,repeat:f,repeatType:d,repeatDelay:p,type:m,onUpdate:g,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let S=this.currentTime,w=s;if(f){const b=Math.min(this.currentTime,i)/a;let L=Math.floor(b),E=b%1;!E&&b>=1&&(E=1),E===1&&L--,L=Math.min(L,f+1),L%2&&(d==="reverse"?(E=1-E,p&&(E-=p/a)):d==="mirror"&&(w=r)),S=dt(0,1,E)*a}let V;x?(this.delayState.value=l[0],V=this.delayState):V=w.next(S),o&&!x&&(V.value=o(V.value));let{done:I}=V;!x&&u!==null&&(I=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return P&&m!==qe&&(V.value=Ae(l,this.options,v,this.speed)),g&&g(V.value),P&&this.finish(),V}then(e,n){return this.finished.then(e,n)}get duration(){return rt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+rt(e)}get time(){return rt(this.currentTime)}set time(e){e=st(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return Qi(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(tt.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=rt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=ha,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(tt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Ea(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Pt=t=>t*180/Math.PI,Ze=t=>{const e=Pt(Math.atan2(t[1],t[0]));return Je(e)},Ca={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ze,rotateZ:Ze,skewX:t=>Pt(Math.atan(t[1])),skewY:t=>Pt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Je=t=>(t=t%360,t<0&&(t+=360),t),hs=Ze,ds=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ps=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Va={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ds,scaleY:ps,scale:t=>(ds(t)+ps(t))/2,rotateX:t=>Je(Pt(Math.atan2(t[6],t[5]))),rotateY:t=>Je(Pt(Math.atan2(-t[2],t[0]))),rotateZ:hs,rotate:hs,skewX:t=>Pt(Math.atan(t[4])),skewY:t=>Pt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Qe(t){return t.includes("scale")?1:0}function tn(t,e){if(!t||t==="none")return Qe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Va,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ca,i=a}if(!i)return Qe(e);const o=s[e],r=i[1].split(",").map(Ra);return typeof o=="function"?o(r):r[o]}const Ma=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return tn(n,e)};function Ra(t){return parseFloat(t.trim())}const Bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ot=new Set([...Bt,"pathRotation"]),ms=t=>t===It||t===A,Da=new Set(["x","y","z"]),La=Bt.filter(t=>!Da.has(t));function ka(t){const e=[];return La.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const gt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-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:(t,{transform:e})=>tn(e,"x"),y:(t,{transform:e})=>tn(e,"y")};gt.translateX=gt.x;gt.translateY=gt.y;const bt=new Set;let en=!1,nn=!1,sn=!1;function ir(){if(nn){const t=Array.from(bt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=ka(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])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}nn=!1,en=!1,bt.forEach(t=>t.complete(sn)),bt.clear()}function rr(){bt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(nn=!0)})}function Ia(){sn=!0,rr(),ir(),sn=!1}class Ln{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(bt.add(this),en||(en=!0,N.read(rr),N.resolveKeyframes(ir))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Ea(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),bt.delete(this)}cancel(){this.state==="scheduled"&&(bt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ba=t=>t.startsWith("--");function or(t,e,n){Ba(e)?t.style.setProperty(e,n):t.style[e]=n}const Oa={};function ar(t,e){const n=Mi(t);return()=>Oa[e]??n()}const Fa=ar(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),ur=ar(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Nt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ys={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nt([0,.65,.55,1]),circOut:Nt([.55,0,1,.45]),backIn:Nt([.31,.01,.66,-.59]),backOut:Nt([.33,1.53,.69,.99])};function lr(t,e){if(t)return typeof t=="function"?ur()?Zi(t,e):"ease-out":Ui(t)?Nt(t):Array.isArray(t)?t.map(n=>lr(n,e)||ys.easeOut):ys[t]}function ja(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:u}={},c=void 0){const l={[e]:n};u&&(l.offset=u);const f=lr(a,i);Array.isArray(f)&&(l.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(l,d)}function kn(t){return typeof t=="function"&&"applyToOptions"in t}function _a({type:t,...e}){return kn(t)&&ur()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class cr extends Dn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:u}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,Sn(typeof e.type!="string");const c=_a(e);this.animation=ja(n,s,i,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const l=Ae(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(l),or(n,s,l),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return rt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+rt(e)}get time(){return rt(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=st(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Fa()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),ot):i(this)}}const fr={anticipate:Bi,backInOut:Ii,circInOut:Fi};function Na(t){return t in fr}function Ua(t){typeof t.ease=="string"&&Na(t.ease)&&(t.ease=fr[t.ease])}const Be=10;class Wa extends cr{constructor(e){Ua(e),sr(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ye({...r,autoplay:!1}),u=Math.max(Be,tt.now()-this.startTime),c=dt(0,Be,u-Be),l=a.sample(u).value,{name:f}=this.options;o&&f&&or(o,f,l),n.setWithVelocity(a.sample(Math.max(0,u-c)).value,l,c),a.stop()}}const gs=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(lt.test(t)||t==="0")&&!t.startsWith("url("));function Ha(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 $a(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=gs(i,e),a=gs(o,e);return!r||!a?!1:Ha(t)||(n==="spring"||kn(n))&&s}function rn(t){t.duration=0,t.type="keyframes"}const hr=new Set(["opacity","clipPath","filter","transform"]),Ka=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Ga(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Ka.test(t[e]))return!0;return!1}const za=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Ya=Mi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Xa(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=e.owner.getProps();return Ya()&&n&&(hr.has(n)||za.has(n)&&Ga(a))&&(n!=="transform"||!l)&&!c&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const qa=40;class Za extends Dn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:u,motionValue:c,element:l,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tt.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:u,motionValue:c,element:l,...f},p=l?.KeyframeResolver||Ln;this.keyframeResolver=new p(a,(m,g,v)=>this.onKeyframesResolved(m,g,d,!v),u,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:u,isHandoff:c,onUpdate:l}=s;this.resolvedAt=tt.now();let f=!0;$a(e,o,r,a)||(f=!1,(vt.instantAnimations||!u)&&l?.(Ae(e,s,n)),e[0]=e[e.length-1],rn(s),s.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>qa?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},m=f&&!c&&Xa(p),g=p.motionValue?.owner?.current;let v;if(m)try{v=new Wa({...p,element:g})}catch{v=new ye(p)}else v=new ye(p);v.finished.then(()=>{this.notifyFinished()}).catch(ot),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ia()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Ja{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}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){const n=this.animations.map(s=>s.attachTimeline(e));return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].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 state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return vs(this.animations,"duration")}get iterationDuration(){return vs(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function vs(t,e){let n=0;for(let s=0;s<t.length;s++){const i=t[s][e];i!==null&&i>n&&(n=i)}return n}class Qa extends Ja{then(e,n){return this.finished.finally(e).then(()=>{})}}function dr(t,e,n,s=0,i=1){const o=Array.from(t).sort((c,l)=>c.sortNodePosition(l)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}const Ts=30,tu=t=>!isNaN(parseFloat(t)),Ht={current:void 0};class eu{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=tt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=tt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=tu(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 wn);const s=this.events[e].add(n);return e==="change"?()=>{s(),N.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){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}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()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Ht.current&&Ht.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=tt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ts)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ts);return Ri(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Tt(t,e){return new eu(t,e)}function pr(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function In(t,e){const n=t?.[e]??t?.default??t;return n!==t?pr(n,t):n}const nu={type:"spring",stiffness:500,damping:25,restSpeed:10},su=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),iu={type:"keyframes",duration:.8},ru={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ou=(t,{keyframes:e})=>e.length>2?iu:Ot.has(t)?t.startsWith("scale")?su(e[1]):nu:ru,au=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function uu(t){for(const e in t)if(!au.has(e))return!0;return!1}const Bn=(t,e,n,s={},i,o)=>r=>{const a=In(s,t)||{},u=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-st(u);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};uu(a)||Object.assign(l,ou(t,l)),l.duration&&(l.duration=st(l.duration)),l.repeatDelay&&(l.repeatDelay=st(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let f=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(rn(l),l.delay===0&&(f=!0)),(vt.instantAnimations||vt.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(f=!0,rn(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const d=Ae(l.keyframes,a);if(d!==void 0){N.update(()=>{l.onUpdate(d),l.onComplete()});return}}return a.isSync?new ye(l):new Za(l)},lu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cu(t){const e=lu.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function mr(t,e,n=1){const[s,i]=cu(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Ei(r)?parseFloat(r):r}return En(i)?mr(i,e,n+1):i}function xs(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function On(t,e,n,s){if(typeof e=="function"){const[i,o]=xs(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]=xs(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Et(t,e,n){const s=t.getProps();return On(s,e,n!==void 0?n:s.custom,t)}const yr=new Set(["width","height","top","left","right","bottom",...Bt]),on=t=>Array.isArray(t);function fu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Tt(n))}function hu(t){return on(t)?t[t.length-1]||0:t}function du(t,e){const n=Et(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=hu(o[r]);fu(t,r,a)}}const G=t=>!!(t&&t.getVelocity);function pu(t){return!!(G(t)&&t.add)}function an(t,e){const n=t.getValue("willChange");if(pu(n))return n.add(e);if(!n&&vt.WillChange){const s=new vt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Fn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const mu="framerAppearId",gr="data-"+Fn(mu);function vr(t){return t.props[gr]}function yu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function jn(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o,transitionEnd:r,...a}=e;const u=t.getDefaultTransition();o=o?pr(o,u):u;const c=o?.reduceMotion,l=o?.skipAnimations;s&&(o=s);const f=[],d=i&&t.animationState&&t.animationState.getState()[i],p=o?.path;p&&p.animateVisualElement(t,a,o,n,f);for(const m in a){const g=t.getValue(m,t.latestValues[m]??null),v=a[m];if(v===void 0||d&&yu(d,m))continue;const y={delay:n,...In(o||{},m)};l&&(y.skipAnimations=!0);const x=g.get();if(x!==void 0&&!g.isAnimating()&&!Array.isArray(v)&&v===x&&!y.velocity){N.update(()=>g.set(v));continue}let S=!1;if(window.MotionHandoffAnimation){const I=vr(t);if(I){const P=window.MotionHandoffAnimation(I,m,N);P!==null&&(y.startTime=P,S=!0)}}an(t,m);const w=c??t.shouldReduceMotion;g.start(Bn(m,g,v,w&&yr.has(m)?{type:!1}:y,t,S));const V=g.animation;V&&f.push(V)}if(r){const m=()=>N.update(()=>{r&&du(t,r)});f.length?Promise.all(f).then(m):m()}return f}function un(t,e,n={}){const s=Et(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(jn(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:l,staggerDirection:f}=i;return gu(t,e,u,c,l,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[o,r]:[r,o];return u().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function gu(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(un(u,e,{...r,delay:n+(typeof s=="function"?0:s)+dr(t.variantChildren,u,s,i,o)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}function vu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>un(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=un(t,e,n);else{const i=typeof e=="function"?Et(t,e,n.custom):e;s=Promise.all(jn(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Tu={test:t=>t==="auto",parse:t=>t},Tr=t=>e=>e.test(t),xr=[It,A,ht,pt,zo,Go,Tu],Ss=t=>xr.find(Tr(t));function xu(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Vi(t):!0}const Su=new Set(["brightness","contrast","saturate","opacity"]);function wu(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Cn)||[];if(!s)return t;const i=n.replace(s,"");let o=Su.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Au=/\b([a-z-]*)\(.*?\)/gu,ln={...lt,getAnimatableNone:t=>{const e=t.match(Au);return e?e.map(wu).join(" "):t}},cn={...lt,getAnimatableNone:t=>{const e=lt.parse(t);return lt.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},ws={...It,transform:Math.round},Pu={rotate:pt,pathRotation:pt,rotateX:pt,rotateY:pt,rotateZ:pt,scale:se,scaleX:se,scaleY:se,scaleZ:se,skew:pt,skewX:pt,skewY:pt,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:Gt,originX:as,originY:as,originZ:A},ge={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,top:A,right:A,bottom:A,left:A,inset:A,insetBlock:A,insetBlockStart:A,insetBlockEnd:A,insetInline:A,insetInlineStart:A,insetInlineEnd:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,paddingBlock:A,paddingBlockStart:A,paddingBlockEnd:A,paddingInline:A,paddingInlineStart:A,paddingInlineEnd:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,marginBlock:A,marginBlockStart:A,marginBlockEnd:A,marginInline:A,marginInlineStart:A,marginInlineEnd:A,fontSize:A,backgroundPositionX:A,backgroundPositionY:A,...Pu,zIndex:ws,fillOpacity:Gt,strokeOpacity:Gt,numOctaves:ws},bu={...ge,color:$,backgroundColor:$,outlineColor:$,fill:$,stroke:$,borderColor:$,borderTopColor:$,borderRightColor:$,borderBottomColor:$,borderLeftColor:$,filter:ln,WebkitFilter:ln,mask:cn,WebkitMask:cn},Sr=t=>bu[t],Eu=new Set([ln,cn]);function wr(t,e){let n=Sr(t);return Eu.has(n)||(n=lt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Cu=new Set(["auto","none","0"]);function Vu(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Cu.has(o)&&kt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=wr(n,i)}class Mu extends Ln{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 l=0;l<e.length;l++){let f=e[l];if(typeof f=="string"&&(f=f.trim(),En(f))){const d=mr(f,n.current);d!==void 0&&(e[l]=d),l===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!yr.has(s)||e.length!==2)return;const[i,o]=e,r=Ss(i),a=Ss(o),u=os(i),c=os(o);if(u!==c&&gt[s]){this.needsMeasurement=!0;return}if(r!==a)if(ms(r)&&ms(a))for(let l=0;l<e.length;l++){const f=e[l];typeof f=="string"&&(e[l]=parseFloat(f))}else gt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||xu(e[i]))&&s.push(i);s.length&&Vu(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=gt[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(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=gt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,u])=>{e.getValue(a).set(u)}),this.resolveNoneKeyframes()}}function _n(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;e&&(s=e.current);const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const fn=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Ru(t){return Ci(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Nn}=Wi(queueMicrotask,!1),ut={x:!1,y:!1};function Ar(){return ut.x||ut.y}function Du(t){return t==="x"||t==="y"?ut[t]?null:(ut[t]=!0,()=>{ut[t]=!1}):ut.x||ut.y?null:(ut.x=ut.y=!0,()=>{ut.x=ut.y=!1})}function Pr(t,e){const n=_n(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Lu(t){return!(t.pointerType==="touch"||Ar())}function ku(t,e,n={}){const[s,i,o]=Pr(t,n);return s.forEach(r=>{let a=!1,u=!1,c;const l=()=>{r.removeEventListener("pointerleave",m)},f=v=>{c&&(c(v),c=void 0),l()},d=v=>{a=!1,window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d),u&&(u=!1,f(v))},p=()=>{a=!0,window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",d,i)},m=v=>{if(v.pointerType!=="touch"){if(a){u=!0;return}f(v)}},g=v=>{if(!Lu(v))return;u=!1;const y=e(r,v);typeof y=="function"&&(c=y,r.addEventListener("pointerleave",m,i))};r.addEventListener("pointerenter",g,i),r.addEventListener("pointerdown",p,i)}),o}const br=(t,e)=>e?t===e?!0:br(t,e.parentElement):!1,Un=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Iu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Bu(t){return Iu.has(t.tagName)||t.isContentEditable===!0}const Ou=new Set(["INPUT","SELECT","TEXTAREA"]);function Fu(t){return Ou.has(t.tagName)||t.isContentEditable===!0}const ae=new WeakSet;function As(t){return e=>{e.key==="Enter"&&t(e)}}function Oe(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const ju=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=As(()=>{if(ae.has(n))return;Oe(n,"down");const i=As(()=>{Oe(n,"up")}),o=()=>Oe(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 Ps(t){return Un(t)&&!Ar()}const bs=new WeakSet;function _u(t,e,n={}){const[s,i,o]=Pr(t,n),r=a=>{const u=a.currentTarget;if(!Ps(a)||bs.has(a))return;ae.add(u),n.stopPropagation&&bs.add(a);const c=e(u,a),l=(p,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),ae.has(u)&&ae.delete(u),Ps(p)&&typeof c=="function"&&c(p,{success:m})},f=p=>{l(p,u===window||u===document||n.useGlobalTarget||br(u,p.target))},d=p=>{l(p,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),Ru(a)&&(a.addEventListener("focus",c=>ju(c,i)),!Bu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Pe(t){return Ci(t)&&"ownerSVGElement"in t}const ue=new WeakMap;let le;const Er=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Pe(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Nu=Er("inline","width","offsetWidth"),Uu=Er("block","height","offsetHeight");function Wu({target:t,borderBoxSize:e}){ue.get(t)?.forEach(n=>{n(t,{get width(){return Nu(t,e)},get height(){return Uu(t,e)}})})}function Hu(t){t.forEach(Wu)}function $u(){typeof ResizeObserver>"u"||(le=new ResizeObserver(Hu))}function Ku(t,e){le||$u();const n=_n(t);return n.forEach(s=>{let i=ue.get(s);i||(i=new Set,ue.set(s,i)),i.add(e),le?.observe(s)}),()=>{n.forEach(s=>{const i=ue.get(s);i?.delete(e),i?.size||le?.unobserve(s)})}}const ce=new Set;let Mt;function Gu(){Mt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ce.forEach(e=>e(t))},window.addEventListener("resize",Mt)}function zu(t){return ce.add(t),Mt||Gu(),()=>{ce.delete(t),!ce.size&&typeof Mt=="function"&&(window.removeEventListener("resize",Mt),Mt=void 0)}}function Es(t,e){return typeof t=="function"?zu(t):Ku(t,e)}function Cr(t){return Pe(t)&&t.tagName==="svg"}function Yu(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=tr(i,o,r);return e?a(s):a}const Xu=[...xr,$,lt],qu=t=>Xu.find(Tr(t)),Cs=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rt=()=>({x:Cs(),y:Cs()}),Vs=()=>({min:0,max:0}),H=()=>({x:Vs(),y:Vs()}),Yt=new WeakMap;function be(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Xt(t){return typeof t=="string"||Array.isArray(t)}const Wn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hn=["initial",...Wn];function Ee(t){return be(t.animate)||Hn.some(e=>Xt(t[e]))}function Vr(t){return!!(Ee(t)||t.variants)}function Zu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(G(i))t.addValue(s,i);else if(G(o))t.addValue(s,Tt(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,Tt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ve={current:null},$n={current:!1},Ju=typeof window<"u";function Mr(){if($n.current=!0,!!Ju)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ve.current=t.matches;t.addEventListener("change",e),e()}else ve.current=!1}const Ms=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Te={};function Rr(t){Te=t}function Qu(){return Te}class Dr{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:r,visualState:a},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ln,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 p=tt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,N.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=u,this.blockInitialAnimation=!!r,this.isControllingVariants=Ee(n),this.isVariantNode=Vr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in d){const m=d[p];c[p]!==void 0&&G(m)&&m.set(c[p])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,Yt.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.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:($n.current||Mr(),this.shouldReduceMotion=ve.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),mt(this.notifyUpdate),mt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&hr.has(e)&&this.current instanceof HTMLElement){const{factory:r,keyframes:a,times:u,ease:c,duration:l}=n.accelerate,f=new cr({element:this.current,name:e,keyframes:a,times:u,ease:c,duration:st(l)}),d=r(f);this.valueSubscriptions.set(e,()=>{d(),f.cancel()});return}const s=Ot.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&N.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o()})}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 Te){const n=Te[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):H()}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<Ms.length;s++){const i=Ms[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=Zu(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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=Tt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ei(s)||Vi(s))?s=parseFloat(s):!qu(s)&&lt.test(n)&&(s=wr(e,n)),this.setBaseTarget(e,G(s)?s.get():s)),G(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=On(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!G(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new wn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Nn.render(this.render)}}class Lr extends Dr{constructor(){super(...arguments),this.KeyframeResolver=Mu}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[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;G(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class xt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function kr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function tl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function el(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 Fe(t){return t===void 0||t===1}function hn({scale:t,scaleX:e,scaleY:n}){return!Fe(t)||!Fe(e)||!Fe(n)}function wt(t){return hn(t)||Ir(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ir(t){return Rs(t.x)||Rs(t.y)}function Rs(t){return t&&t!=="0%"}function xe(t,e,n){const s=t-n,i=e*s;return n+i}function Ds(t,e,n,s,i){return i!==void 0&&(t=xe(t,i,s)),xe(t,n,s)+e}function dn(t,e=0,n=1,s,i){t.min=Ds(t.min,e,n,s,i),t.max=Ds(t.max,e,n,s,i)}function Br(t,{x:e,y:n}){dn(t.x,e.translate,e.scale,e.originPoint),dn(t.y,n.translate,n.scale,n.originPoint)}const Ls=.999999999999,ks=1.0000000000001;function nl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(ft(t.x,-o.scroll.offset.x),ft(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Br(t,r)),s&&wt(o.latestValues)&&fe(t,o.latestValues,o.layout?.layoutBox))}e.x<ks&&e.x>Ls&&(e.x=1),e.y<ks&&e.y>Ls&&(e.y=1)}function ft(t,e){t.min+=e,t.max+=e}function Is(t,e,n,s,i=.5){const o=_(t.min,t.max,i);dn(t,e,n,o,s)}function Bs(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function fe(t,e,n){const s=n??t;Is(t.x,Bs(e.x,s.x),e.scaleX,e.scale,e.originX),Is(t.y,Bs(e.y,s.y),e.scaleY,e.scale,e.originY)}function Or(t,e){return kr(el(t.getBoundingClientRect(),e))}function sl(t,e,n){const s=Or(t,n),{scroll:i}=e;return i&&(ft(s.x,i.offset.x),ft(s.y,i.offset.y)),s}const il={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rl=Bt.length;function ol(t,e,n){let s="",i=!0;for(let r=0;r<rl;r++){const a=Bt[r],u=t[a];if(u===void 0)continue;let c=!0;if(typeof u=="number")c=u===(a.startsWith("scale")?1:0);else{const l=parseFloat(u);c=a.startsWith("scale")?l===1:l===0}if(!c||n){const l=fn(u,ge[a]);if(!c){i=!1;const f=il[a]||a;s+=`${f}(${l}) `}n&&(e[a]=l)}}const o=t.pathRotation;return o&&(i=!1,s+=`rotate(${fn(o,ge.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Kn(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const u in e){const c=e[u];if(Ot.has(u)){r=!0;continue}else if($i(u)){i[u]=c;continue}else{const l=fn(c,ge[u]);u.startsWith("origin")?(a=!0,o[u]=l):s[u]=l}}if(e.transform||(r||n?s.transform=ol(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:u="50%",originY:c="50%",originZ:l=0}=o;s.transformOrigin=`${u} ${c} ${l}`}}function Fr(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Os(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const _t={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(A.test(t))t=parseFloat(t);else return t;const n=Os(t,e.target.x),s=Os(t,e.target.y);return`${n}% ${s}%`}},al={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=lt.parse(t);if(i.length>5)return s;const o=lt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,u=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=u;const c=_(a,u,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}},pn={borderRadius:{..._t,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_t,borderTopRightRadius:_t,borderBottomLeftRadius:_t,borderBottomRightRadius:_t,boxShadow:al};function jr(t,{layout:e,layoutId:n}){return Ot.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!pn[t]||t==="opacity")}function Gn(t,e,n){const s=t.style,i=e?.style,o={};if(!s)return o;for(const r in s)(G(s[r])||i&&G(i[r])||jr(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(o[r]=s[r]);return o}function ul(t){return window.getComputedStyle(t)}class _r extends Lr{constructor(){super(...arguments),this.type="html",this.renderInstance=Fr}readValueFromInstance(e,n){if(Ot.has(n))return this.projection?.isProjecting?Qe(n):Ma(e,n);{const s=ul(e),i=($i(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Or(e,n)}build(e,n,s){Kn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Gn(e,n,s)}}function ll(t,e){return t in e}class cl extends Dr{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,n){if(ll(n,e)){const s=e[n];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(e,n){delete n.output[e]}measureInstanceViewportBox(){return H()}build(e,n){Object.assign(e.output,n)}renderInstance(e,{output:n}){Object.assign(e,n)}sortInstanceNodePosition(){return 0}}const fl={offset:"stroke-dashoffset",array:"stroke-dasharray"},hl={offset:"strokeDashoffset",array:"strokeDasharray"};function dl(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?fl:hl;t[o.offset]=`${-s}`,t[o.array]=`${e} ${n}`}const pl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Nr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},u,c,l){if(Kn(t,a,c),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=l?.transformBox??"fill-box",delete f.transformBox);for(const p of pl)f[p]!==void 0&&(d[p]=f[p],delete f[p]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&dl(f,i,o,r,!1)}const Ur=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"]),Wr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function ml(t,e,n,s){Fr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ur.has(i)?i:Fn(i),e.attrs[i])}function Hr(t,e,n){const s=Gn(t,e,n);for(const i in t)if(G(t[i])||G(e[i])){const o=Bt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}class $r extends Lr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=H}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ot.has(n)){const s=Sr(n);return s&&s.default||0}return n=Ur.has(n)?n:Fn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Hr(e,n,s)}build(e,n,s){Nr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){ml(e,n,s,i)}mount(e){this.isSVGTag=Wr(e.tagName),super.mount(e)}}const yl=Hn.length;function Kr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Kr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<yl;n++){const s=Hn[n],i=t.props[s];(Xt(i)||i===!1)&&(e[s]=i)}return e}function Gr(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}const gl=[...Wn].reverse(),vl=Wn.length;function Tl(t){return e=>Promise.all(e.map(({animation:n,options:s})=>vu(t,n,s)))}function xl(t){let e=Tl(t),n=Fs(),s=!0,i=!1;const o=c=>(l,f)=>{const d=Et(t,f,c==="exit"?t.presenceContext?.custom:void 0);if(d){const{transition:p,transitionEnd:m,...g}=d;l={...l,...g,...m}}return l};function r(c){e=c(t)}function a(c){const{props:l}=t,f=Kr(t.parent)||{},d=[],p=new Set;let m={},g=1/0;for(let y=0;y<vl;y++){const x=gl[y],S=n[x],w=l[x]!==void 0?l[x]:f[x],V=Xt(w),I=x===c?S.isActive:null;I===!1&&(g=y);let P=w===f[x]&&w!==l[x]&&V;if(P&&(s||i)&&t.manuallyAnimateOnMount&&(P=!1),S.protectedKeys={...m},!S.isActive&&I===null||!w&&!S.prevProp||be(w)||typeof w=="boolean")continue;if(x==="exit"&&S.isActive&&I!==!0){S.prevResolvedValues&&(m={...m,...S.prevResolvedValues});continue}const b=Sl(S.prevProp,w);let L=b||x===c&&S.isActive&&!P&&V||y>g&&V,E=!1;const B=Array.isArray(w)?w:[w];let W=B.reduce(o(x),{});I===!1&&(W={});const{prevResolvedValues:Z={}}=S,z={...Z,...W},nt=F=>{L=!0,p.has(F)&&(E=!0,p.delete(F)),S.needsAnimating[F]=!0;const Y=t.getValue(F);Y&&(Y.liveStyle=!1)};for(const F in z){const Y=W[F],it=Z[F];if(m.hasOwnProperty(F))continue;let h=!1;on(Y)&&on(it)?h=!Gr(Y,it)||b:h=Y!==it,h?Y!=null?nt(F):p.add(F):Y!==void 0&&p.has(F)?nt(F):S.protectedKeys[F]=!0}S.prevProp=w,S.prevResolvedValues=W,S.isActive&&(m={...m,...W}),(s||i)&&t.blockInitialAnimation&&(L=!1);const K=P&&b;L&&(!K||E)&&d.push(...B.map(F=>{const Y={type:x};if(typeof F=="string"&&(s||i)&&!K&&t.manuallyAnimateOnMount&&t.parent){const{parent:it}=t,h=Et(it,F);if(it.enteringChildren&&h){const{delayChildren:T}=h.transition||{};Y.delay=dr(it.enteringChildren,t,T)}}return{animation:F,options:Y}}))}if(p.size){const y={};if(typeof l.initial!="boolean"){const x=Et(t,Array.isArray(l.initial)?l.initial[0]:l.initial);x&&x.transition&&(y.transition=x.transition)}p.forEach(x=>{const S=t.getBaseTarget(x),w=t.getValue(x);w&&(w.liveStyle=!0),y[x]=S??null}),d.push({animation:y})}let v=!!d.length;return s&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(v=!1),s=!1,i=!1,v?e(d):Promise.resolve()}function u(c,l){if(n[c].isActive===l)return Promise.resolve();t.variantChildren?.forEach(d=>d.animationState?.setActive(c,l)),n[c].isActive=l;const f=a(c);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:a,setActive:u,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Fs(),i=!0}}}function Sl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Gr(e,t):!1}function St(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Fs(){return{animate:St(!0),whileInView:St(),whileHover:St(),whileTap:St(),whileDrag:St(),whileFocus:St(),exit:St()}}function mn(t,e){t.min=e.min,t.max=e.max}function at(t,e){mn(t.x,e.x),mn(t.y,e.y)}function js(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const zr=1e-4,wl=1-zr,Al=1+zr,Yr=.01,Pl=0-Yr,bl=0+Yr;function et(t){return t.max-t.min}function El(t,e,n){return Math.abs(t-e)<=n}function _s(t,e,n,s=.5){t.origin=s,t.originPoint=_(e.min,e.max,t.origin),t.scale=et(n)/et(e),t.translate=_(n.min,n.max,t.origin)-t.originPoint,(t.scale>=wl&&t.scale<=Al||isNaN(t.scale))&&(t.scale=1),(t.translate>=Pl&&t.translate<=bl||isNaN(t.translate))&&(t.translate=0)}function $t(t,e,n,s){_s(t.x,e.x,n.x,s?s.originX:void 0),_s(t.y,e.y,n.y,s?s.originY:void 0)}function Ns(t,e,n,s=0){const i=s?_(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+et(e)}function Cl(t,e,n,s){Ns(t.x,e.x,n.x,s?.x),Ns(t.y,e.y,n.y,s?.y)}function Us(t,e,n,s=0){const i=s?_(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+et(e)}function Se(t,e,n,s){Us(t.x,e.x,n.x,s?.x),Us(t.y,e.y,n.y,s?.y)}function Ws(t,e,n,s,i){return t-=e,t=xe(t,1/n,s),i!==void 0&&(t=xe(t,1/i,s)),t}function Vl(t,e=0,n=1,s=.5,i,o=t,r=t){if(ht.test(e)&&(e=parseFloat(e),e=_(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=_(o.min,o.max,s);t===o&&(a-=e),t.min=Ws(t.min,e,n,a,i),t.max=Ws(t.max,e,n,a,i)}function Hs(t,e,[n,s,i],o,r){Vl(t,e[n],e[s],e[i],e.scale,o,r)}const Ml=["x","scaleX","originX"],Rl=["y","scaleY","originY"];function $s(t,e,n,s){Hs(t.x,e,Ml,n?n.x:void 0,s?s.x:void 0),Hs(t.y,e,Rl,n?n.y:void 0,s?s.y:void 0)}function Ks(t){return t.translate===0&&t.scale===1}function Xr(t){return Ks(t.x)&&Ks(t.y)}function Gs(t,e){return t.min===e.min&&t.max===e.max}function Dl(t,e){return Gs(t.x,e.x)&&Gs(t.y,e.y)}function zs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function qr(t,e){return zs(t.x,e.x)&&zs(t.y,e.y)}function Ys(t){return et(t.x)/et(t.y)}function Xs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function ct(t){return[t("x"),t("y")]}function Ll(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:l,pathRotation:f,rotateX:d,rotateY:p,skewX:m,skewY:g}=n;c&&(s=`perspective(${c}px) ${s}`),l&&(s+=`rotate(${l}deg) `),f&&(s+=`rotate(${f}deg) `),d&&(s+=`rotateX(${d}deg) `),p&&(s+=`rotateY(${p}deg) `),m&&(s+=`skewX(${m}deg) `),g&&(s+=`skewY(${g}deg) `)}const a=t.x.scale*e.x,u=t.y.scale*e.y;return(a!==1||u!==1)&&(s+=`scale(${a}, ${u})`),s||"none"}const Zr=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],kl=Zr.length,qs=t=>typeof t=="string"?parseFloat(t):t,Zs=t=>typeof t=="number"||A.test(t);function Il(t,e,n,s,i,o){i?(t.opacity=_(0,n.opacity??1,Bl(s)),t.opacityExit=_(e.opacity??1,0,Ol(s))):o&&(t.opacity=_(e.opacity??1,n.opacity??1,s));for(let r=0;r<kl;r++){const a=Zr[r];let u=Js(e,a),c=Js(n,a);if(u===void 0&&c===void 0)continue;u||(u=0),c||(c=0),u===0||c===0||Zs(u)===Zs(c)?(t[a]=Math.max(_(qs(u),qs(c),s),0),(ht.test(c)||ht.test(u))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=_(e.rotate||0,n.rotate||0,s))}function Js(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Bl=Jr(0,.5,Oi),Ol=Jr(.5,.95,ot);function Jr(t,e,n){return s=>s<t?0:s>e?1:n(Lt(t,e,s))}function Qr(t,e,n){const s=G(t)?t:Tt(t);return s.start(Bn("",s,e,n)),s.animation}function qt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Fl=(t,e)=>t.depth-e.depth;class jl{constructor(){this.children=[],this.isDirty=!1}add(e){xn(this.children,e),this.isDirty=!0}remove(e){Dt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Fl),this.isDirty=!1,this.children.forEach(e)}}function _l(t,e){const n=tt.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(mt(s),t(o-e))};return N.setup(s,!0),()=>mt(s)}function he(t){return G(t)?t.get():t}class Nl{constructor(){this.members=[]}add(e){xn(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(Dt(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(Dt(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){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:o}=e.options;(i===void 0||i!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const de={hasAnimatedSinceResize:!0,hasEverUpdated:!1},je=["","X","Y","Z"],Ul=1e3;let Wl=0;function _e(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function to(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=vr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",N,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&to(s)}function eo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Wl++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Kl),this.nodes.forEach(Zl),this.nodes.forEach(Jl),this.nodes.forEach(Gl)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new jl)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new wn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const u=this.eventHandlers.get(r);u&&u.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Pe(r)&&!Cr(r),this.instance=r;const{layoutId:a,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||a)&&(this.isLayoutDirty=!0),t){let l,f=0;const d=()=>this.root.updateBlockedByResize=!1;N.read(()=>{f=window.innerWidth}),t(r,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,l&&l(),l=_l(d,250),de.hasAnimatedSinceResize&&(de.hasAnimatedSinceResize=!1,this.nodes.forEach(ei)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||u)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||sc,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=c.getProps(),y=!this.targetLayout||!qr(this.targetLayout,p),x=!f&&d;if(this.options.layoutRoot||this.resumeFrom||x||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...In(m,"layout"),onPlay:g,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(l,x,S.path)}else f||ei(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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,this.eventHandlers.clear(),mt(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(Ql),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&&to(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const f=this.path[l];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)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()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(Yl),this.nodes.forEach(Qs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ti);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Xl),this.nodes.forEach(ql),this.nodes.forEach(Hl),this.nodes.forEach($l)):this.nodes.forEach(ti),this.clearAllSnapshots();const a=tt.now();q.delta=dt(0,1e3/60,a-q.timestamp),q.timestamp=a,q.isProcessing=!0,Re.update.process(q),Re.preRender.process(q),Re.render.process(q),q.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zl),this.sharedNodes.forEach(tc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,N.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){N.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!et(this.snapshot.measuredBox.x)&&!et(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=H()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const u=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Xr(this.projectionDelta),u=this.getTransformTemplate(),c=u?u(this.latestValues,""):void 0,l=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||wt(this.latestValues)||l)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let u=this.removeElementScroll(a);return r&&(u=this.removeTransform(u)),ic(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return H();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(rc))){const{scroll:c}=this.root;c&&(ft(a.x,c.offset.x),ft(a.y,c.offset.y))}return a}removeElementScroll(r){const a=H();if(at(a,r),this.scroll?.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:l,options:f}=c;c!==this.root&&l&&f.layoutScroll&&(l.wasRoot&&at(a,r),ft(a.x,l.offset.x),ft(a.y,l.offset.y))}return a}applyTransform(r,a=!1,u){const c=u||H();at(c,r);for(let l=0;l<this.path.length;l++){const f=this.path[l];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(ft(c.x,-f.scroll.offset.x),ft(c.y,-f.scroll.offset.y)),wt(f.latestValues)&&fe(c,f.latestValues,f.layout?.layoutBox)}return wt(this.latestValues)&&fe(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(r){const a=H();at(a,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!wt(c.latestValues))continue;let l;c.instance&&(hn(c.latestValues)&&c.updateSnapshot(),l=H(),at(l,c.measurePageBox())),$s(a,c.latestValues,c.snapshot?.layoutBox,l)}return wt(this.latestValues)&&$s(a,this.latestValues),a}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!==q.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==a;if(!(r||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:f}=this.options;if(!this.layout||!(l||f))return;this.resolvedRelativeTargetAt=q.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=H(),this.targetWithTransforms=H()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Cl(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):at(this.target,this.layout.layoutBox),Br(this.target,this.targetDelta)):at(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||hn(this.parent.latestValues)||Ir(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,u){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=H(),this.relativeTargetOrigin=H(),Se(this.relativeTargetOrigin,a,u,this.options.layoutAnchor||void 0),at(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===q.timestamp&&(u=!1),u)return;const{layout:c,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||l))return;at(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;nl(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=H());const{target:p}=r;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(js(this.prevProjectionDelta.x,this.projectionDelta.x),js(this.prevProjectionDelta.y,this.projectionDelta.y)),$t(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Xs(this.projectionDelta.x,this.prevProjectionDelta.x)||!Xs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Rt(),this.projectionDelta=Rt(),this.projectionDeltaWithTransform=Rt()}setAnimationOrigin(r,a=!1,u){const c=this.snapshot,l=c?c.latestValues:{},f={...this.latestValues},d=Rt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=H(),m=c?c.source:void 0,g=this.layout?this.layout.source:void 0,v=m!==g,y=this.getStack(),x=!y||y.members.length<=1,S=!!(v&&!x&&this.options.crossfade===!0&&!this.path.some(nc));this.animationProgress=0;let w;const V=u?.interpolateProjection(r);this.mixTargetDelta=I=>{const P=I/1e3,b=V?.(P);b?(d.x.translate=b.x,d.x.scale=_(r.x.scale,1,P),d.x.origin=r.x.origin,d.x.originPoint=r.x.originPoint,d.y.translate=b.y,d.y.scale=_(r.y.scale,1,P),d.y.origin=r.y.origin,d.y.originPoint=r.y.originPoint):(ni(d.x,r.x,P),ni(d.y,r.y,P)),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Se(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ec(this.relativeTarget,this.relativeTargetOrigin,p,P),w&&Dl(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=H()),at(w,this.relativeTarget)),v&&(this.animationValues=f,Il(f,l,this.latestValues,P,S,x)),b&&b.rotate!==void 0&&(this.animationValues||(this.animationValues=f),this.animationValues.pathRotation=b.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(mt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=N.update(()=>{de.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Tt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Qr(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},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(Ul),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:u,layout:c,latestValues:l}=r;if(!(!a||!u||!c)){if(this!==r&&this.layout&&c&&no(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||H();const f=et(this.layout.layoutBox.x);u.x.min=r.target.x.min,u.x.max=u.x.min+f;const d=et(this.layout.layoutBox.y);u.y.min=r.target.y.min,u.y.max=u.y.min+d}at(a,u),fe(a,l),$t(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Nl),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:u}={}){const c=this.getStack();c&&c.promote(this,u),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:u}=r;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const c={};u.z&&_e("z",r,c,this.animationValues);for(let l=0;l<je.length;l++)_e(`rotate${je[l]}`,r,c,this.animationValues),_e(`skew${je[l]}`,r,c,this.animationValues);r.render();for(const l in c)r.setStaticValue(l,c[l]),this.animationValues&&(this.animationValues[l]=c[l]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=he(a?.pointerEvents)||"",r.transform=u?u(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=he(a?.pointerEvents)||""),this.hasProjected&&!wt(this.latestValues)&&(r.transform=u?u({},""):"none",this.hasProjected=!1);return}r.visibility="";const l=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=Ll(this.projectionDeltaWithTransform,this.treeScale,l);u&&(f=u(l,f)),r.transform=f;const{x:d,y:p}=this.projectionDelta;r.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,c.animationValues?r.opacity=c===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:r.opacity=c===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const m in pn){if(l[m]===void 0)continue;const{correct:g,applyTo:v,isCSSVariable:y}=pn[m],x=f==="none"?l[m]:g(l[m],c);if(v){const S=v.length;for(let w=0;w<S;w++)r[v[w]]=x}else y?this.options.visualElement.renderState.vars[m]=x:r[m]=x}this.options.layoutId&&(r.pointerEvents=c===this?he(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Qs),this.root.sharedNodes.clear()}}}function Hl(t){t.updateLayout()}function $l(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;if(i==="size")ct(l=>{const f=o?e.measuredBox[l]:e.layoutBox[l],d=et(f);f.min=n[l].min,f.max=f.min+d});else if(i==="x"||i==="y"){const l=i==="x"?"y":"x";mn(o?e.measuredBox[l]:e.layoutBox[l],n[l])}else no(i,e.layoutBox,n)&&ct(l=>{const f=o?e.measuredBox[l]:e.layoutBox[l],d=et(n[l]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[l].max=t.relativeTarget[l].min+d)});const r=Rt();$t(r,n,e.layoutBox);const a=Rt();o?$t(a,t.applyTransform(s,!0),e.measuredBox):$t(a,n,e.layoutBox);const u=!Xr(r);let c=!1;if(!t.resumeFrom){const l=t.getClosestProjectingParent();if(l&&!l.resumeFrom){const{snapshot:f,layout:d}=l;if(f&&d){const p=t.options.layoutAnchor||void 0,m=H();Se(m,e.layoutBox,f.layoutBox,p);const g=H();Se(g,n,d.layoutBox,p),qr(m,g)||(c=!0),l.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=m,t.relativeParent=l)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Kl(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Gl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function zl(t){t.clearSnapshot()}function Qs(t){t.clearMeasurements()}function Yl(t){t.isLayoutDirty=!0,t.updateLayout()}function ti(t){t.isLayoutDirty=!1}function Xl(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function ql(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ei(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Zl(t){t.resolveTargetDelta()}function Jl(t){t.calcProjection()}function Ql(t){t.resetSkewAndRotation()}function tc(t){t.removeLeadSnapshot()}function ni(t,e,n){t.translate=_(e.translate,0,n),t.scale=_(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function si(t,e,n,s){t.min=_(e.min,n.min,s),t.max=_(e.max,n.max,s)}function ec(t,e,n,s){si(t.x,e.x,n.x,s),si(t.y,e.y,n.y,s)}function nc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const sc={duration:.45,ease:[.4,0,.1,1]},ii=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ri=ii("applewebkit/")&&!ii("chrome/")?Math.round:ot;function oi(t){t.min=ri(t.min),t.max=ri(t.max)}function ic(t){oi(t.x),oi(t.y)}function no(t,e,n){return t==="position"||t==="preserve-aspect"&&!El(Ys(e),Ys(n),.2)}function rc(t){return t!==t.root&&t.scroll?.wasRoot}const oc=eo({attachResizeListener:(t,e)=>qt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ne={current:void 0},so=eo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ne.current){const t=new oc({});t.mount(window),t.setOptions({layoutScroll:!0}),Ne.current=t}return Ne.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),zn=C.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function ac(t=!0){const e=C.useContext(Tn);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=C.useId();C.useEffect(()=>{if(t)return i(o)},[t]);const r=C.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const io=C.createContext({strict:!1}),ai={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"]};let ui=!1;function uc(){if(ui)return;const t={};for(const e in ai)t[e]={isEnabled:n=>ai[e].some(s=>!!n[s])};Rr(t),ui=!0}function ro(){return uc(),Qu()}function lc(t){const e=ro();for(const n in t)e[n]={...e[n],...t[n]};Rr(e)}const cc=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","propagate","ignoreStrict","viewport"]);function we(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||cc.has(t)}let oo=t=>!we(t);function fc(t){typeof t=="function"&&(oo=e=>e.startsWith("on")?!we(e):t(e))}try{fc(require("@emotion/is-prop-valid").default)}catch{}function hc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||G(t[i])||(oo(i)||n===!0&&we(i)||!e&&!we(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Ce=C.createContext({});function dc(t,e){if(Ee(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Xt(n)?n:void 0,animate:Xt(s)?s:void 0}}return t.inherit!==!1?e:{}}function pc(t){const{initial:e,animate:n}=dc(t,C.useContext(Ce));return C.useMemo(()=>({initial:e,animate:n}),[li(e),li(n)])}function li(t){return Array.isArray(t)?t.join(" "):t}const Yn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ao(t,e,n){for(const s in e)!G(e[s])&&!jr(s,n)&&(t[s]=e[s])}function mc({transformTemplate:t},e){return C.useMemo(()=>{const n=Yn();return Kn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function yc(t,e){const n=t.style||{},s={};return ao(s,n,t),Object.assign(s,mc(t,e)),s}function gc(t,e){const n={},s=yc(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}const uo=()=>({...Yn(),attrs:{}});function vc(t,e,n,s){const i=C.useMemo(()=>{const o=uo();return Nr(o,e,Wr(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ao(o,t.style,t),i.style={...o,...i.style}}return i}const Tc=["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 Xn(t){return typeof t!="string"||t.includes("-")?!1:!!(Tc.indexOf(t)>-1||/[A-Z]/u.test(t))}function xc(t,e,n,{latestValues:s},i,o=!1,r){const u=(r??Xn(t)?vc:gc)(e,s,i,t),c=hc(e,typeof t=="string",o),l=t!==C.Fragment?{...c,...u,ref:n}:{},{children:f}=e,d=C.useMemo(()=>G(f)?f.get():f,[f]);return C.createElement(t,{...l,children:d})}function Sc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:wc(n,s,i,t),renderState:e()}}function wc(t,e,n,s){const i={},o=s(t,{});for(const d in o)i[d]=he(o[d]);let{initial:r,animate:a}=t;const u=Ee(t),c=Vr(t);e&&c&&!u&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||r===!1;const f=l?a:r;if(f&&typeof f!="boolean"&&!be(f)){const d=Array.isArray(f)?f:[f];for(let p=0;p<d.length;p++){const m=On(t,d[p]);if(m){const{transitionEnd:g,transition:v,...y}=m;for(const x in y){let S=y[x];if(Array.isArray(S)){const w=l?S.length-1:0;S=S[w]}S!==null&&(i[x]=S)}for(const x in g)i[x]=g[x]}}}return i}const lo=t=>(e,n)=>{const s=C.useContext(Ce),i=C.useContext(Tn),o=()=>Sc(t,e,s,i);return n?o():vn(o)},Ac=lo({scrapeMotionValuesFromProps:Gn,createRenderState:Yn}),Pc=lo({scrapeMotionValuesFromProps:Hr,createRenderState:uo}),bc=Symbol.for("motionComponentSymbol");function Ec(t,e,n){const s=C.useRef(n);C.useInsertionEffect(()=>{s.current=n});const i=C.useRef(null);return C.useCallback(o=>{o&&t.onMount?.(o),e&&(o?e.mount(o):e.unmount());const r=s.current;if(typeof r=="function")if(o){const a=r(o);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):r(o);else r&&(r.current=o)},[e])}const co=C.createContext({});function Ct(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Cc(t,e,n,s,i,o){const{visualElement:r}=C.useContext(Ce),a=C.useContext(io),u=C.useContext(Tn),c=C.useContext(zn),l=c.reducedMotion,f=c.skipAnimations,d=C.useRef(null),p=C.useRef(!1);s=s||a.renderer,!d.current&&s&&(d.current=s(t,{visualState:e,parent:r,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:l,skipAnimations:f,isSVG:o}),p.current&&d.current&&(d.current.manuallyAnimateOnMount=!0));const m=d.current,g=C.useContext(co);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Vc(d.current,n,i,g);const v=C.useRef(!1);C.useInsertionEffect(()=>{m&&v.current&&m.update(n,u)});const y=n[gr],x=C.useRef(!!y&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return bi(()=>{p.current=!0,m&&(v.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),C.useEffect(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),x.current=!1),m.enteringChildren=void 0)}),m}function Vc(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:u,layoutRoot:c,layoutAnchor:l,layoutCrossfade:f}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:fo(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Ct(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:f,layoutScroll:u,layoutRoot:c,layoutAnchor:l})}function fo(t){if(t)return t.options.allowProjection!==!1?t.projection:fo(t.parent)}function Ue(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&lc(s);const o=n?n==="svg":Xn(t),r=o?Pc:Ac;function a(c,l){let f;const d={...C.useContext(zn),...c,layoutId:Mc(c)},{isStatic:p}=d,m=pc(c),g=r(c,p);if(!p&&typeof window<"u"){Rc();const v=Dc(d);f=v.MeasureLayout,m.visualElement=Cc(t,g,d,i,v.ProjectionNode,o)}return Ge.jsxs(Ce.Provider,{value:m,children:[f&&m.visualElement?Ge.jsx(f,{visualElement:m.visualElement,...d}):null,xc(t,c,Ec(g,m.visualElement,l),g,p,e,o)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const u=C.forwardRef(a);return u[bc]=t,u}function Mc({layoutId:t}){const e=C.useContext(Pi).id;return e&&t!==void 0?e+"-"+t:t}function Rc(t,e){C.useContext(io).strict}function Dc(t){const e=ro(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Lc(t,e){if(typeof Proxy>"u")return Ue;const n=new Map,s=(o,r)=>Ue(o,r,t,e),i=(o,r)=>s(o,r);return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,Ue(r,void 0,t,e)),n.get(r))})}const kc=(t,e)=>e.isSVG??Xn(t)?new $r(e):new _r(e,{allowProjection:t!==C.Fragment});class Ic extends xt{constructor(e){super(e),e.animationState||(e.animationState=xl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();be(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(){this.node.animationState.reset(),this.unmountControls?.()}}let Bc=0;class Oc extends xt{constructor(){super(...arguments),this.id=Bc++,this.isExitComplete=!1}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;if(e&&s===!1){if(this.isExitComplete){const{initial:o,custom:r}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const a=Et(this.node,o,r);if(a){const{transition:u,transitionEnd:c,...l}=a;for(const f in l)this.node.getValue(f)?.jump(l[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Fc={animation:{Feature:Ic},exit:{Feature:Oc}};function te(t){return{point:{x:t.pageX,y:t.pageY}}}const jc=t=>e=>Un(e)&&t(e,te(e));function Kt(t,e,n,s){return qt(t,e,jc(n),s)}const ho=({current:t})=>t?t.ownerDocument.defaultView:null,ci=(t,e)=>Math.abs(t-e);function _c(t,e){const n=ci(t.x,e.x),s=ci(t.y,e.y);return Math.sqrt(n**2+s**2)}const fi=new Set(["auto","scroll"]);class po{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ie(this.lastRawMoveEventInfo,this.transformPagePoint));const p=We(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=_c(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:v}=p,{timestamp:y}=q;this.history.push({...v,timestamp:y});const{onStart:x,onMove:S}=this.handlers;m||(x&&x(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=ie(m,this.transformPagePoint),N.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=We(p.type==="pointercancel"?this.lastMoveEventInfo:ie(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,x),v&&v(p,x)},!Un(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const u=te(e),c=ie(u,this.transformPagePoint),{point:l}=c,{timestamp:f}=q;this.history=[{...l,timestamp:f}];const{onSessionStart:d}=n;d&&d(e,We(c,this.history)),this.removeListeners=Zt(Kt(this.contextWindow,"pointermove",this.handlePointerMove),Kt(this.contextWindow,"pointerup",this.handlePointerUp),Kt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(fi.has(s.overflowX)||fi.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o={x:i.x-n.x,y:i.y-n.y};o.x===0&&o.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(e,i),N.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),mt(this.updatePoint)}}function ie(t,e){return e?{point:e(t.point)}:t}function hi(t,e){return{x:t.x-e.x,y:t.y-e.y}}function We({point:t},e){return{point:t,delta:hi(t,mo(e)),offset:hi(t,Nc(e)),velocity:Uc(e,.1)}}function Nc(t){return t[0]}function mo(t){return t[t.length-1]}function Uc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=mo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>st(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>st(e)*2&&(s=t[1]);const o=rt(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}function Wc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?_(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?_(n,t,s.max):Math.min(t,n)),t}function di(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 Hc(t,{top:e,left:n,bottom:s,right:i}){return{x:di(t.x,n,i),y:di(t.y,e,s)}}function pi(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 $c(t,e){return{x:pi(t.x,e.x),y:pi(t.y,e.y)}}function Kc(t,e){let n=.5;const s=et(t),i=et(e);return i>s?n=Lt(e.min,e.max-s,t.min):s>i&&(n=Lt(t.min,t.max-i,e.min)),dt(0,1,n)}function Gc(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 yn=.35;function zc(t=yn){return t===!1?t=0:t===!0&&(t=yn),{x:mi(t,"left","right"),y:mi(t,"top","bottom")}}function mi(t,e,n){return{min:yi(t,e),max:yi(t,n)}}function yi(t,e){return typeof t=="number"?t:t[e]||0}const Yc=new WeakMap;class Xc{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=H(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{n&&this.snapToCursor(te(f).point),this.stopAnimation()},r=(f,d)=>{const{drag:p,dragPropagation:m,onDragStart:g}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Du(p),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ct(y=>{let x=this.getAxisMotionValue(y).get()||0;if(ht.test(x)){const{projection:S}=this.visualElement;if(S&&S.layout){const w=S.layout.layoutBox[y];w&&(x=et(w)*(parseFloat(x)/100))}}this.originPoint[y]=x}),g&&N.update(()=>g(f,d),!1,!0),an(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:g,onDrag:v}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=d;if(m&&this.currentDirection===null){this.currentDirection=Zc(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),v&&N.update(()=>v(f,d),!1,!0)},u=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new po(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:s,contextWindow:ho(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&N.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!re(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Wc(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&Ct(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Hc(s.layoutBox,e):this.constraints=!1,this.elastic=zc(n),i!==this.constraints&&!Ct(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&ct(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Gc(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ct(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const o=sl(s,i.root,this.visualElement.getTransformPagePoint());let r=$c(i.layout.layoutBox,o);if(n){const a=n(tl(r));this.hasMutatedConstraints=!!a,a&&(r=kr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),u=this.constraints||{},c=ct(l=>{if(!re(l,n,this.currentDirection))return;let f=u&&u[l]||{};(r===!0||r===l)&&(f={min:0,max:0});const d=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:s?e[l]:0,bounceStiffness:d,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(l,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return an(this.visualElement,e),s.start(Bn(e,s,0,n,this.visualElement,!1))}stopAnimation(){ct(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){ct(n=>{const{drag:s}=this.getProps();if(!re(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n],u=o.get()||0;o.set(e[n]-_(r,a,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ct(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ct(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const u=a.get();i[r]=Kc({min:u,max:u},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.constraints=!1,this.resolveConstraints(),ct(r=>{if(!re(r,e,null))return;const a=this.getAxisMotionValue(r),{min:u,max:c}=this.constraints[r];a.set(_(u,c,i[r]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Yc.set(this.visualElement,this);const e=this.visualElement.current,n=Kt(e,"pointerdown",c=>{const{drag:l,dragListener:f=!0}=this.getProps(),d=c.target,p=d!==e&&Fu(d);l&&f&&!p&&this.start(c)});let s;const i=()=>{const{dragConstraints:c}=this.getProps();Ct(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),s||(s=qc(e,c.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,r=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),N.read(i);const a=qt(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(ct(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=c[f].translate,d.set(d.get()+c[f].translate))}),this.visualElement.render())}));return()=>{a(),n(),r(),u&&u(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=yn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function gi(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function qc(t,e,n){const s=Es(t,gi(n)),i=Es(e,gi(n));return()=>{s(),i()}}function re(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Zc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Jc extends xt{constructor(e){super(e),this.removeGroupControls=ot,this.removeListeners=ot,this.controls=new Xc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ot}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const He=t=>(e,n)=>{t&&N.update(()=>t(e,n),!1,!0)};class Qc extends xt{constructor(){super(...arguments),this.removePointerDownListener=ot}onPointerDown(e){this.session=new po(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ho(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:He(e),onStart:He(n),onMove:He(s),onEnd:(o,r)=>{delete this.session,i&&N.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Kt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let $e=!1;class tf extends C.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),$e&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),de.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,e.layoutDependency!==n&&r.setOptions({...r.options,layoutDependency:n}),$e=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||N.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Nn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;$e=!0,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 yo(t){const[e,n]=ac(),s=C.useContext(Pi);return Ge.jsx(tf,{...t,layoutGroup:s,switchLayoutGroup:C.useContext(co),isPresent:e,safeToRemove:n})}const ef={pan:{Feature:Qc},drag:{Feature:Jc,ProjectionNode:so,MeasureLayout:yo}};function vi(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&&N.postRender(()=>o(e,te(e)))}class nf extends xt{mount(){const{current:e}=this.node;e&&(this.unmount=ku(e,(n,s)=>(vi(this.node,s,"Start"),i=>vi(this.node,i,"End"))))}unmount(){}}class sf extends xt{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=Zt(qt(this.node.current,"focus",()=>this.onFocus()),qt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ti(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&N.postRender(()=>o(e,te(e)))}class rf extends xt{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=_u(e,(i,o)=>(Ti(this.node,o,"Start"),(r,{success:a})=>Ti(this.node,r,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const gn=new WeakMap,Ke=new WeakMap,of=t=>{const e=gn.get(t.target);e&&e(t)},af=t=>{t.forEach(of)};function uf({root:t,...e}){const n=t||document;Ke.has(n)||Ke.set(n,{});const s=Ke.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(af,{root:t,...e})),s[i]}function lf(t,e,n){const s=uf(e);return gn.set(t,n),s.observe(t),()=>{gn.delete(t),s.unobserve(t)}}const cf={some:0,all:1};class ff extends xt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();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:cf[i]},a=u=>{const{isIntersecting:c}=u;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:l,onViewportLeave:f}=this.node.getProps(),d=c?l:f;d&&d(u)};this.stopObserver=lf(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(hf(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function hf({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const df={inView:{Feature:ff},tap:{Feature:rf},focus:{Feature:sf},hover:{Feature:nf}},pf={layout:{ProjectionNode:so,MeasureLayout:yo}},mf={...Fc,...df,...ef,...pf},jf=Lc(mf,kc);function yf(t){const e=vn(()=>Tt(t)),{isStatic:n}=C.useContext(zn);if(n){const[,s]=C.useState(t);C.useEffect(()=>e.on("change",s),[])}return e}function go(t,e){const n=yf(e()),s=()=>n.set(e());return s(),bi(()=>{const i=()=>N.preRender(s,!1,!0),o=t.map(r=>r.on("change",i));return()=>{o.forEach(r=>r()),mt(s)}}),n}function gf(t){Ht.current=[],t();const e=go(Ht.current,t);return Ht.current=void 0,e}function _f(t,e,n,s){if(typeof t=="function")return gf(t);const o=typeof e=="function"?e:Yu(e,n,s),r=Array.isArray(t)?xi(t,o):xi([t],([u])=>o(u)),a=Array.isArray(t)?void 0:t.accelerate;return a&&!a.isTransformed&&typeof e!="function"&&Array.isArray(n)&&s?.clamp!==!1&&(r.accelerate={...a,times:e,keyframes:n,isTransformed:!0}),r}function xi(t,e){const n=vn(()=>[]);return go(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}function Nf(){!$n.current&&Mr();const[t]=C.useState(ve.current);return t}function qn(t){return typeof t=="object"&&!Array.isArray(t)}function vo(t,e,n,s){return t==null?[]:typeof t=="string"&&qn(e)?_n(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(i=>i!=null):[t]}function vf(t,e,n){return t*(e+1)+n*e}function Si(t,e,n,s){return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):s.get(e)??t}function Tf(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(Dt(t,i),s--)}}function xf(t,e,n,s,i,o){Tf(t,i,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:_(i,o,s[r]),easing:Ni(n,r)})}function Sf(t,e,n=0){const s=e+1+e*n;for(let i=0;i<t.length;i++)t[i]=t[i]/s}function wf(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}const Af="easeInOut",Pf=20;function bf(t,{defaultTransition:e={},...n}={},s,i){const o=e.duration||.3,r=new Map,a=new Map,u={},c=new Map;let l=0,f=0,d=0;for(let p=0;p<t.length;p++){const m=t[p];if(typeof m=="string"){c.set(m,f);continue}else if(!Array.isArray(m)){c.set(m.name,Si(f,m.at,l,c));continue}let[g,v,y={}]=m;y.at!==void 0&&(f=Si(f,y.at,l,c));let x=0;const S=(w,V,I,P=0,b=0)=>{const L=Ef(w),{delay:E=0,times:B=nr(L),type:W=e.type||"keyframes",repeat:Z,repeatType:z,repeatDelay:nt=0,...K}=V;let{ease:Q=e.ease||"easeOut",duration:F}=V;const Y=typeof E=="function"?E(P,b):E,it=L.length,h=kn(W)?W:i?.[W||"keyframes"];if(it<=2&&h){let k=100;if(it===2&&Mf(L)){const J=L[1]-L[0];k=Math.abs(J)}const O={...e,...K};F!==void 0&&(O.duration=st(F));const j=Ji(O,k,h);Q=j.ease,F=j.duration}F??(F=o);const T=f+Y;B.length===1&&B[0]===0&&(B[1]=1);const R=B.length-L.length;if(R>0&&er(B,R),L.length===1&&L.unshift(null),Z&&Z<Pf){const k=F>0?nt/F:0;F=vf(F,Z,nt);const O=[...L],j=[...B];Q=Array.isArray(Q)?[...Q]:[Q];const J=[...Q],X=z==="reverse"||z==="mirror";let ee=O,Zn=J;X&&(ee=[...O].reverse(),z==="reverse"&&(Zn=[...J].reverse().map(yt=>typeof yt=="function"?An(yt):yt)));for(let yt=0;yt<Z;yt++){const Jn=X&&yt%2===0,Qn=Jn?ee:O,xo=Jn?Zn:J,ts=(yt+1)*(1+k);k>0&&(L.push(L[L.length-1]),B.push(ts),Q.push("linear")),L.push(...Qn);for(let Ft=0;Ft<Qn.length;Ft++)B.push(j[Ft]+ts),Q.push(Ft===0?"linear":Ni(xo,Ft-1))}Sf(B,Z,k)}const M=T+F;xf(I,L,Q,B,T,M),x=Math.max(Y+F,x),d=Math.max(M,d)};if(G(g)){const w=wi(g,a);S(v,y,Ai("default",w))}else{const w=vo(g,v,s,u),V=w.length;for(let I=0;I<V;I++){v=v,y=y;const P=w[I],b=wi(P,a);for(const L in v)S(v[L],Cf(y,L),Ai(L,b),I,V)}}l=f,f+=x}return a.forEach((p,m)=>{for(const g in p){const v=p[g];v.sort(wf);const y=[],x=[],S=[];for(let P=0;P<v.length;P++){const{at:b,value:L,easing:E}=v[P];y.push(L),x.push(Lt(0,d,b)),S.push(E||"easeOut")}x[0]!==0&&(x.unshift(0),y.unshift(y[0]),S.unshift(Af)),x[x.length-1]!==1&&(x.push(1),y.push(null)),r.has(m)||r.set(m,{keyframes:{},transition:{}});const w=r.get(m);w.keyframes[g]=y;const{type:V,...I}=e;w.transition[g]={...I,duration:d,ease:S,times:x,...n}}}),r}function wi(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Ai(t,e){return e[t]||(e[t]=[]),e[t]}function Ef(t){return Array.isArray(t)?t:[t]}function Cf(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Vf=t=>typeof t=="number",Mf=t=>t.every(Vf);function Rf(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Pe(t)&&!Cr(t)?new $r(e):new _r(e);n.mount(t),Yt.set(t,n)}function Df(t){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new cl(e);n.mount(t),Yt.set(t,n)}function Lf(t,e){return G(t)||typeof t=="number"||typeof t=="string"&&!qn(e)}function To(t,e,n,s){const i=[];if(Lf(t,e))i.push(Qr(t,qn(e)&&e.default||e,n&&(n.default||n)));else{if(t==null)return i;const o=vo(t,e,s),r=o.length;for(let a=0;a<r;a++){const u=o[a],c=u instanceof Element?Rf:Df;Yt.has(u)||c(u);const l=Yt.get(u),f={...n};"delay"in f&&typeof f.delay=="function"&&(f.delay=f.delay(a,r)),i.push(...jn(l,{...e,transition:f},{}))}}return i}function kf(t,e,n){const s=[],i=t.map(r=>{if(Array.isArray(r)&&typeof r[0]=="function"){const a=r[0],u=Tt(0);return u.on("change",a),r.length===1?[u,[0,1]]:r.length===2?[u,[0,1],r[1]]:[u,r[1],r[2]]}return r});return bf(i,e,n,{spring:zt}).forEach(({keyframes:r,transition:a},u)=>{s.push(...To(u,r,a))}),s}function If(t){return Array.isArray(t)&&t.some(Array.isArray)}function Bf(t={}){const{scope:e,reduceMotion:n,skipAnimations:s}=t;function i(o,r,a){let u=[],c;const l={};if(n!==void 0&&(l.reduceMotion=n),s!==void 0&&(l.skipAnimations=s),If(o)){const{onComplete:d,...p}=r||{};typeof d=="function"&&(c=d),u=kf(o,{...l,...p},e)}else{const{onComplete:d,...p}=a||{};typeof d=="function"&&(c=d),u=To(o,r,{...l,...p},e)}const f=new Qa(u);return c&&f.finished.then(c),e&&(e.animations.push(f),f.finished.then(()=>{Dt(e.animations,f)})),f}return i}const Uf=Bf();export{Co as R,C as a,Of as b,yf as c,_f as d,Uf as e,wo as g,Ge as j,jf as m,Eo as r,Nf as u};
package/public/index.html CHANGED
@@ -5,10 +5,10 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <meta name="color-scheme" content="light" />
7
7
  <title>Pagecast</title>
8
- <script type="module" crossorigin src="/assets/index-BTCh8CIt.js"></script>
9
- <link rel="modulepreload" crossorigin href="/assets/motion-vendor-CDgKLzlB.js">
10
- <link rel="modulepreload" crossorigin href="/assets/dnd-vendor-BtfBOykZ.js">
11
- <link rel="stylesheet" crossorigin href="/assets/index-XOrnLHdD.css">
8
+ <script type="module" crossorigin src="/assets/index-DThD-nOy.js"></script>
9
+ <link rel="modulepreload" crossorigin href="/assets/motion-vendor-CqvjzA30.js">
10
+ <link rel="modulepreload" crossorigin href="/assets/dnd-vendor-BmyNMol4.js">
11
+ <link rel="stylesheet" crossorigin href="/assets/index-Ci9snOW8.css">
12
12
  </head>
13
13
  <body>
14
14
  <div id="root"></div>
package/src/cli.js CHANGED
@@ -9,6 +9,7 @@ import {
9
9
  getCloudflarePagesStatus,
10
10
  listCloudflarePagesProjects,
11
11
  publishReportSnapshot,
12
+ setupCloudflareFeedback,
12
13
  setupCloudflarePages,
13
14
  startServers
14
15
  } from "./server.js";
@@ -283,6 +284,47 @@ async function pages(args) {
283
284
  }
284
285
  }
285
286
 
287
+ async function feedback(args) {
288
+ const [subcommand, ...rest] = args;
289
+ const parsed = parseFlags(rest);
290
+ const json = wantsJson(parsed);
291
+ const accountId = optionValue(parsed, "account", "account-id");
292
+
293
+ try {
294
+ if (subcommand === "setup") {
295
+ const result = await setupCloudflareFeedback({ accountId, dataDir });
296
+ if (json) {
297
+ console.log(JSON.stringify({ ok: true, ...result }));
298
+ } else if (result.feedback?.url) {
299
+ console.log(`Feedback ready: ${result.feedback.url}`);
300
+ console.log("Reactions + view analytics now attach to pages you publish.");
301
+ } else {
302
+ console.log("Feedback setup did not complete.");
303
+ }
304
+ return;
305
+ }
306
+
307
+ if (subcommand === "status") {
308
+ const status = await getCloudflarePagesStatus({ dataDir });
309
+ const fb = status.config?.feedback;
310
+ if (json) {
311
+ console.log(JSON.stringify({ ok: true, feedback: fb || null }));
312
+ } else if (fb?.url) {
313
+ console.log(`Feedback: enabled (${fb.url})`);
314
+ } else {
315
+ console.log("Feedback: not set up. Run `pagecast feedback setup`.");
316
+ }
317
+ return;
318
+ }
319
+
320
+ console.error(`Unknown feedback command: ${subcommand || ""}\n`);
321
+ usage();
322
+ process.exit(1);
323
+ } catch (error) {
324
+ printError(error, json);
325
+ }
326
+ }
327
+
286
328
  function usage() {
287
329
  console.log(
288
330
  [
@@ -294,6 +336,8 @@ function usage() {
294
336
  " pagecast pages status [--json] Show Cloudflare Pages configuration",
295
337
  " pagecast pages projects list [--json] List Cloudflare Pages projects",
296
338
  " pagecast pages deploy <dir> --project <name> [--json] Deploy a static folder to Pages",
339
+ " pagecast feedback setup [--account <id>] [--json] Set up reactions + view analytics",
340
+ " pagecast feedback status [--json] Show feedback configuration",
297
341
  " pagecast --help Show this help"
298
342
  ].join("\n")
299
343
  );
@@ -317,6 +361,11 @@ async function run() {
317
361
  return;
318
362
  }
319
363
 
364
+ if (command === "feedback") {
365
+ await feedback(rest);
366
+ return;
367
+ }
368
+
320
369
  if (!command || command === "serve") {
321
370
  await serve();
322
371
  return;
package/src/markdown.js CHANGED
Binary file