diff --git a/404.html b/404.html index f87bae1d..dadefde9 100644 --- a/404.html +++ b/404.html @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git a/404/index.html b/404/index.html index d9bf9534..3913dff6 100644 --- a/404/index.html +++ b/404/index.html @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git "a/Sass-\354\202\254\354\232\251\352\270\260/index.html" "b/Sass-\354\202\254\354\232\251\352\270\260/index.html" index 4e791f47..ce7b6af2 100644 --- "a/Sass-\354\202\254\354\232\251\352\270\260/index.html" +++ "b/Sass-\354\202\254\354\232\251\352\270\260/index.html" @@ -78,4 +78,4 @@

- \ No newline at end of file + \ No newline at end of file diff --git a/_gatsby/slices/_gatsby-scripts-1.html b/_gatsby/slices/_gatsby-scripts-1.html index f897eeef..aa5b14cb 100644 --- a/_gatsby/slices/_gatsby-scripts-1.html +++ b/_gatsby/slices/_gatsby-scripts-1.html @@ -4,4 +4,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git a/commons-288422f67b1a4d800aad.js b/commons-dc874e109473e818028c.js similarity index 99% rename from commons-288422f67b1a4d800aad.js rename to commons-dc874e109473e818028c.js index bf2b4c49..4ac3f35e 100644 --- a/commons-288422f67b1a4d800aad.js +++ b/commons-dc874e109473e818028c.js @@ -1,2 +1,2 @@ -(self.webpackChunkgatsby_blog=self.webpackChunkgatsby_blog||[]).push([[351],{5787:function(t){"use strict";const e=/[\p{Lu}]/u,n=/[\p{Ll}]/u,i=/^[\p{Lu}](?![\p{Lu}])/gu,s=/([\p{Alpha}\p{N}_]|$)/u,o=/[_.\- ]+/,r=new RegExp("^"+o.source),a=new RegExp(o.source+s.source,"gu"),l=new RegExp("\\d+"+s.source,"gu"),c=(t,s)=>{if("string"!=typeof t&&!Array.isArray(t))throw new TypeError("Expected the input to be `string | string[]`");if(s={pascalCase:!1,preserveConsecutiveUppercase:!1,...s},0===(t=Array.isArray(t)?t.map((t=>t.trim())).filter((t=>t.length)).join("-"):t.trim()).length)return"";const o=!1===s.locale?t=>t.toLowerCase():t=>t.toLocaleLowerCase(s.locale),c=!1===s.locale?t=>t.toUpperCase():t=>t.toLocaleUpperCase(s.locale);if(1===t.length)return s.pascalCase?c(t):o(t);return t!==o(t)&&(t=((t,i,s)=>{let o=!1,r=!1,a=!1;for(let l=0;l(i.lastIndex=0,t.replace(i,(t=>e(t)))))(t,o):o(t),s.pascalCase&&(t=c(t.charAt(0))+t.slice(1)),((t,e)=>(a.lastIndex=0,l.lastIndex=0,t.replace(a,((t,n)=>e(n))).replace(l,(t=>e(t)))))(t,c)};t.exports=c,t.exports.default=c},8738:function(t,e,n){"use strict";n.d(e,{L:function(){return m},M:function(){return P},P:function(){return w},S:function(){return U},_:function(){return a},a:function(){return r},b:function(){return u},g:function(){return h},h:function(){return l}});var i=n(3236),s=(n(5787),n(507)),o=n.n(s);function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(s[n]=t[n]);return s}const l=()=>"undefined"!=typeof HTMLImageElement&&"loading"in HTMLImageElement.prototype;function c(t,e,n){const i={};let s="gatsby-image-wrapper";return"fixed"===n?(i.width=t,i.height=e):"constrained"===n&&(s="gatsby-image-wrapper gatsby-image-wrapper-constrained"),{className:s,"data-gatsby-image-wrapper":"",style:i}}function u(t,e,n,i,s){return void 0===s&&(s={}),r({},n,{loading:i,shouldLoad:t,"data-main-image":"",style:r({},s,{opacity:e?1:0})})}function h(t,e,n,i,s,o,a,l){const c={};o&&(c.backgroundColor=o,"fixed"===n?(c.width=i,c.height=s,c.backgroundColor=o,c.position="relative"):("constrained"===n||"fullWidth"===n)&&(c.position="absolute",c.top=0,c.left=0,c.bottom=0,c.right=0)),a&&(c.objectFit=a),l&&(c.objectPosition=l);const u=r({},t,{"aria-hidden":!0,"data-placeholder-image":"",style:r({opacity:e?0:1,transition:"opacity 500ms linear"},c)});return u}const d=["children"],p=function(t){let{layout:e,width:n,height:s}=t;return"fullWidth"===e?i.createElement("div",{"aria-hidden":!0,style:{paddingTop:s/n*100+"%"}}):"constrained"===e?i.createElement("div",{style:{maxWidth:n,display:"block"}},i.createElement("img",{alt:"",role:"presentation","aria-hidden":"true",src:"data:image/svg+xml;charset=utf-8,%3Csvg%20height='"+s+"'%20width='"+n+"'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%3E%3C/svg%3E",style:{maxWidth:"100%",display:"block",position:"static"}})):null},m=function(t){let{children:e}=t,n=a(t,d);return i.createElement(i.Fragment,null,i.createElement(p,r({},n)),e,null)},f=["src","srcSet","loading","alt","shouldLoad"],g=["fallback","sources","shouldLoad"],y=function(t){let{src:e,srcSet:n,loading:s,alt:o="",shouldLoad:l}=t,c=a(t,f);return i.createElement("img",r({},c,{decoding:"async",loading:s,src:l?e:void 0,"data-src":l?void 0:e,srcSet:l?n:void 0,"data-srcset":l?void 0:n,alt:o}))},v=function(t){let{fallback:e,sources:n=[],shouldLoad:s=!0}=t,o=a(t,g);const l=o.sizes||(null==e?void 0:e.sizes),c=i.createElement(y,r({},o,e,{sizes:l,shouldLoad:s}));return n.length?i.createElement("picture",null,n.map((t=>{let{media:e,srcSet:n,type:o}=t;return i.createElement("source",{key:e+"-"+o+"-"+n,type:o,media:e,srcSet:s?n:void 0,"data-srcset":s?void 0:n,sizes:l})})),c):c};var x;y.propTypes={src:s.string.isRequired,alt:s.string.isRequired,sizes:s.string,srcSet:s.string,shouldLoad:s.bool},v.displayName="Picture",v.propTypes={alt:s.string.isRequired,shouldLoad:s.bool,fallback:s.exact({src:s.string.isRequired,srcSet:s.string,sizes:s.string}),sources:s.arrayOf(s.oneOfType([s.exact({media:s.string.isRequired,type:s.string,sizes:s.string,srcSet:s.string.isRequired}),s.exact({media:s.string,type:s.string.isRequired,sizes:s.string,srcSet:s.string.isRequired})]))};const b=["fallback"],w=function(t){let{fallback:e}=t,n=a(t,b);return e?i.createElement(v,r({},n,{fallback:{src:e},"aria-hidden":!0,alt:""})):i.createElement("div",r({},n))};w.displayName="Placeholder",w.propTypes={fallback:s.string,sources:null==(x=v.propTypes)?void 0:x.sources,alt:function(t,e,n){return t[e]?new Error("Invalid prop `"+e+"` supplied to `"+n+"`. Validation failed."):null}};const P=function(t){return i.createElement(i.Fragment,null,i.createElement(v,r({},t)),i.createElement("noscript",null,i.createElement(v,r({},t,{shouldLoad:!0}))))};P.displayName="MainImage",P.propTypes=v.propTypes;const E=["as","className","class","style","image","loading","imgClassName","imgStyle","backgroundColor","objectFit","objectPosition"],S=["style","className"],T=t=>t.replace(/\n/g,""),A=function(t,e,n){for(var i=arguments.length,s=new Array(i>3?i-3:0),r=3;rJSON.stringify(s.images)),[s.images]);d&&(h=d);const A=function(t,e,n){let i="";return"fullWidth"===t&&(i=''),"constrained"===t&&(i='
"),i}(x,y,v);return(0,i.useEffect)((()=>{M||(M=n.e(856).then(n.bind(n,4856)).then((t=>{let{renderImageToString:e,swapPlaceholderImage:n}=t;return L=e,{renderImageToString:e,swapPlaceholderImage:n}})));const t=S.current.querySelector("[data-gatsby-image-ssr]");if(t&&l())return t.complete?(null==p||p({wasCached:!0}),null==m||m({wasCached:!0}),setTimeout((()=>{t.removeAttribute("data-gatsby-image-ssr")}),0)):(null==p||p({wasCached:!0}),t.addEventListener("load",(function e(){t.removeEventListener("load",e),null==m||m({wasCached:!0}),setTimeout((()=>{t.removeAttribute("data-gatsby-image-ssr")}),0)}))),void D.add(T);if(L&&D.has(T))return;let e,i;return M.then((t=>{let{renderImageToString:n,swapPlaceholderImage:a}=t;S.current&&(S.current.innerHTML=n(r({isLoading:!0,isLoaded:D.has(T),image:s},g)),D.has(T)||(e=requestAnimationFrame((()=>{S.current&&(i=a(S.current,T,D,o,p,m,f))}))))})),()=>{e&&cancelAnimationFrame(e),i&&i()}}),[s]),(0,i.useLayoutEffect)((()=>{D.has(T)&&L&&(S.current.innerHTML=L(r({isLoading:D.has(T),isLoaded:D.has(T),image:s},g)),null==p||p({wasCached:!0}),null==m||m({wasCached:!0}))}),[s]),(0,i.createElement)(e,r({},E,{style:r({},w,o,{backgroundColor:u}),className:P+(h?" "+h:""),ref:S,dangerouslySetInnerHTML:{__html:A},suppressHydrationWarning:!0}))},R=(0,i.memo)((function(t){return t.image?(0,i.createElement)(j,t):null}));R.propTypes=C,R.displayName="GatsbyImage";const B=["src","__imageData","__error","width","height","aspectRatio","tracedSVGOptions","placeholder","formats","quality","transformOptions","jpgOptions","pngOptions","webpOptions","avifOptions","blurredOptions","breakpoints","outputPixelDensities"];function F(t){return function(e){let{src:n,__imageData:s,__error:o}=e,l=a(e,B);return o&&console.warn(o),s?i.createElement(t,r({image:s},l)):(console.warn("Image not loaded",n),null)}}const O=F((function(t){let{as:e="div",className:n,class:s,style:o,image:l,loading:d="lazy",imgClassName:p,imgStyle:f,backgroundColor:g,objectFit:y,objectPosition:v}=t,x=a(t,E);if(!l)return console.warn("[gatsby-plugin-image] Missing image prop"),null;s&&(n=s),f=r({objectFit:y,objectPosition:v,backgroundColor:g},f);const{width:b,height:A,layout:C,images:V,placeholder:k,backgroundColor:D}=l,M=c(b,A,C),{style:L,className:j}=M,R=a(M,S),B={fallback:void 0,sources:[]};return V.fallback&&(B.fallback=r({},V.fallback,{srcSet:V.fallback.srcSet?T(V.fallback.srcSet):void 0})),V.sources&&(B.sources=V.sources.map((t=>r({},t,{srcSet:T(t.srcSet)})))),i.createElement(e,r({},R,{style:r({},L,o,{backgroundColor:g}),className:j+(n?" "+n:"")}),i.createElement(m,{layout:C,width:b,height:A},i.createElement(w,r({},h(k,!1,C,b,A,D,y,v))),i.createElement(P,r({"data-gatsby-image-ssr":"",className:p},x,u("eager"===d,!1,B,d,f)))))})),I=function(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s{if(void 0!==t.layout&&!N.has(t.layout))return new Error("Invalid value "+t.layout+'" provided for prop "layout". Defaulting to "constrained". Valid values are "fixed", "fullWidth" or "constrained".')}};O.displayName="StaticImage",O.propTypes=W;const U=F(R);U.displayName="StaticImage",U.propTypes=W},354:function(t,e,n){"use strict";n.d(e,{Z:function(){return v}});var i=n(3236),s=n(2143);function o(t){var e,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;ei.createElement(c.M,{key:e+n},i.createElement(u.E.div,{initial:{opacity:1},animate:{opacity:1},exit:{opacity:0},className:"split-text-module--container--38c69"},i.createElement("div",{className:"split-text-module--wrapper--636e1"},i.createElement(u.E.div,{initial:{y:"100%"},animate:"visible",variants:{visible:t=>({y:0,transition:{delay:.1*t}})},className:l("split-text-module--motion-div--9a9fd"," "===t&&"split-text-module--spacing--7be47"),custom:n},t))))))}function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{0:t,1:e}=(0,i.useState)(!0),{0:o,1:r}=(0,i.useState)(0);return(0,i.useEffect)((()=>{const t=f()((()=>{const t=window.scrollY;e(o>t),r(t)}),300);return"undefined"!=typeof window&&(r(window.scrollY),window.addEventListener("scroll",t)),()=>{"undefined"!=typeof window&&window.removeEventListener("scroll",t)}}),[o]),i.createElement("nav",{className:l("navigation-module--wrapper--2382f",!t&&"navigation-module--hide--a9821")},i.createElement("ul",{className:"navigation-module--inner--e3a96"},i.createElement("li",null,i.createElement(s.Link,{to:"/home/page/1"},i.createElement(g.S,{className:"navigation-module--logo--ffe4d",layout:"fixed",formats:["auto","webp","avif"],placeholder:"blurred",src:"../../images/icon.png",width:35,height:35,quality:95,alt:"logo",__imageData:n(6369)}),i.createElement(h,{words:"Suu3 Blog"}))),i.createElement("li",null,i.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/suu3"},i.createElement(p,{className:"navigation-module--icon--bf065"})))))};var v=t=>{let{location:e,children:n}=t;const s="/blog"===e.pathname;return i.createElement("div",{className:"global-wrapper","data-is-root-path":s},i.createElement("header",{className:"global-header"},i.createElement(y,null)),n,i.createElement("footer",null,"© ",(new Date).getFullYear(),", Built with"," ",i.createElement("a",{href:"https://www.gatsbyjs.com"},"Gatsby")))}},3283:function(t,e,n){"use strict";var i=n(3236),s=n(2143);e.Z=t=>{var e,n,o;let{description:r,title:a,children:l}=t;const{site:c}=(0,s.useStaticQuery)("2841359383"),u=r||c.siteMetadata.description,h=null===(e=c.siteMetadata)||void 0===e?void 0:e.title;return i.createElement(i.Fragment,null,i.createElement("title",null,h?a+" | "+h:a),i.createElement("meta",{name:"description",content:u}),i.createElement("meta",{property:"og:title",content:a}),i.createElement("meta",{property:"og:description",content:u}),i.createElement("meta",{property:"og:type",content:"website"}),i.createElement("meta",{name:"twitter:card",content:"summary"}),i.createElement("meta",{name:"twitter:creator",content:(null===(n=c.siteMetadata)||void 0===n||null===(o=n.social)||void 0===o?void 0:o.twitter)||""}),i.createElement("meta",{name:"twitter:title",content:a}),i.createElement("meta",{name:"twitter:description",content:u}),l)}},4396:function(t,e,n){var i=n(9165).Symbol;t.exports=i},732:function(t,e,n){var i=n(4396),s=n(1239),o=n(7058),r=i?i.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":r&&r in Object(t)?s(t):o(t)}},3124:function(t,e,n){var i=n(2996),s=/^\s+/;t.exports=function(t){return t?t.slice(0,i(t)+1).replace(s,""):t}},6476:function(t,e,n){var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=i},1239:function(t,e,n){var i=n(4396),s=Object.prototype,o=s.hasOwnProperty,r=s.toString,a=i?i.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var i=!0}catch(l){}var s=r.call(t);return i&&(e?t[a]=n:delete t[a]),s}},7058:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},9165:function(t,e,n){var i=n(6476),s="object"==typeof self&&self&&self.Object===Object&&self,o=i||s||Function("return this")();t.exports=o},2996:function(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},6292:function(t,e,n){var i=n(6838),s=n(6668),o=n(2448),r=Math.max,a=Math.min;t.exports=function(t,e,n){var l,c,u,h,d,p,m=0,f=!1,g=!1,y=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function v(e){var n=l,i=c;return l=c=void 0,m=e,h=t.apply(i,n)}function x(t){var n=t-p;return void 0===p||n>=e||n<0||g&&t-m>=u}function b(){var t=s();if(x(t))return w(t);d=setTimeout(b,function(t){var n=e-(t-p);return g?a(n,u-(t-m)):n}(t))}function w(t){return d=void 0,y&&l?v(t):(l=c=void 0,h)}function P(){var t=s(),n=x(t);if(l=arguments,c=this,p=t,n){if(void 0===d)return function(t){return m=t,d=setTimeout(b,e),f?v(t):h}(p);if(g)return clearTimeout(d),d=setTimeout(b,e),v(p)}return void 0===d&&(d=setTimeout(b,e)),h}return e=o(e)||0,i(n)&&(f=!!n.leading,u=(g="maxWait"in n)?r(o(n.maxWait)||0,e):u,y="trailing"in n?!!n.trailing:y),P.cancel=function(){void 0!==d&&clearTimeout(d),m=0,l=p=c=d=void 0},P.flush=function(){return void 0===d?h:w(s())},P}},6838:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},5073:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},6764:function(t,e,n){var i=n(732),s=n(5073);t.exports=function(t){return"symbol"==typeof t||s(t)&&"[object Symbol]"==i(t)}},6668:function(t,e,n){var i=n(9165);t.exports=function(){return i.Date.now()}},8209:function(t,e,n){var i=n(6292),s=n(6838);t.exports=function(t,e,n){var o=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return s(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),i(t,e,{leading:o,maxWait:e,trailing:r})}},2448:function(t,e,n){var i=n(3124),s=n(6838),o=n(6764),r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(s(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=s(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=i(t);var n=a.test(t);return n||l.test(t)?c(t.slice(2),n?2:8):r.test(t)?NaN:+t}},7538:function(t,e,n){"use strict";n.d(e,{E:function(){return tr}});var i=n(3236);const s=(0,i.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),o=(0,i.createContext)({});var r=n(8203),a=n(7337);const l=(0,i.createContext)({strict:!1});function c(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function u(t){return"string"==typeof t||Array.isArray(t)}function h(t){return"object"==typeof t&&"function"==typeof t.start}const d=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],p=["initial",...d];function m(t){return h(t.animate)||p.some((e=>u(t[e])))}function f(t){return Boolean(m(t)||t.variants)}function g(t){const{initial:e,animate:n}=function(t,e){if(m(t)){const{initial:e,animate:n}=t;return{initial:!1===e||u(e)?e:void 0,animate:u(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,(0,i.useContext)(o));return(0,i.useMemo)((()=>({initial:e,animate:n})),[y(e),y(n)])}function y(t){return Array.isArray(t)?t.join(" "):t}const v={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"]},x={};for(const nr in v)x[nr]={isEnabled:t=>v[nr].some((e=>!!t[e]))};var b=n(4786),w=n(7658);const P=(0,i.createContext)({}),E=Symbol.for("motionComponentSymbol");function S({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:u,Component:h}){t&&function(t){for(const e in t)x[e]={...x[e],...t[e]}}(t);const d=(0,i.forwardRef)((function(d,p){let m;const f={...(0,i.useContext)(s),...d,layoutId:T(d)},{isStatic:y}=f,v=g(d),x=u(d,y);if(!y&&b.j){v.visualElement=function(t,e,n,c){const{visualElement:u}=(0,i.useContext)(o),h=(0,i.useContext)(l),d=(0,i.useContext)(r.O),p=(0,i.useContext)(s).reducedMotion,m=(0,i.useRef)();c=c||h.renderer,!m.current&&c&&(m.current=c(t,{visualState:e,parent:u,props:n,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:p}));const f=m.current;(0,i.useInsertionEffect)((()=>{f&&f.update(n,d)}));const g=(0,i.useRef)(Boolean(window.HandoffAppearAnimations));return(0,a.L)((()=>{f&&(f.render(),g.current&&f.animationState&&f.animationState.animateChanges())})),(0,i.useEffect)((()=>{f&&(f.updateFeatures(),!g.current&&f.animationState&&f.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,g.current=!1)})),f}(h,x,f,e);const n=(0,i.useContext)(P),c=(0,i.useContext)(l).strict;v.visualElement&&(m=v.visualElement.loadFeatures(f,c,t,n))}return i.createElement(o.Provider,{value:v},m&&v.visualElement?i.createElement(m,{visualElement:v.visualElement,...f}):null,n(h,d,function(t,e,n){return(0,i.useCallback)((i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):c(n)&&(n.current=i))}),[e])}(x,v.visualElement,p),x,y,v.visualElement))}));return d[E]=h,d}function T({layoutId:t}){const e=(0,i.useContext)(w.p).id;return e&&void 0!==t?e+"-"+t:t}function A(t){function e(e,n={}){return S(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const C=["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 V(t){return"string"==typeof t&&!t.includes("-")&&!!(C.indexOf(t)>-1||/[A-Z]/.test(t))}const k={};const D=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],M=new Set(D);function L(t,{layout:e,layoutId:n}){return M.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!k[t]||"opacity"===t)}const j=t=>Boolean(t&&t.getVelocity),R={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},B=D.length;const F=t=>e=>"string"==typeof e&&e.startsWith(t),O=F("--"),I=F("var(--"),N=(t,e)=>e&&"number"==typeof t?e.transform(t):t,W=(t,e,n)=>Math.min(Math.max(n,t),e),U={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},z={...U,transform:t=>W(0,1,t)},H={...U,default:1},G=t=>Math.round(1e5*t)/1e5,Y=/(-)?([\d]*\.?[\d])+/g,X=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Z=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function q(t){return"string"==typeof t}const $=t=>({test:e=>q(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),K=$("deg"),Q=$("%"),J=$("px"),_=$("vh"),tt=$("vw"),et={...Q,parse:t=>Q.parse(t)/100,transform:t=>Q.transform(100*t)},nt={...U,transform:Math.round},it={borderWidth:J,borderTopWidth:J,borderRightWidth:J,borderBottomWidth:J,borderLeftWidth:J,borderRadius:J,radius:J,borderTopLeftRadius:J,borderTopRightRadius:J,borderBottomRightRadius:J,borderBottomLeftRadius:J,width:J,maxWidth:J,height:J,maxHeight:J,size:J,top:J,right:J,bottom:J,left:J,padding:J,paddingTop:J,paddingRight:J,paddingBottom:J,paddingLeft:J,margin:J,marginTop:J,marginRight:J,marginBottom:J,marginLeft:J,rotate:K,rotateX:K,rotateY:K,rotateZ:K,scale:H,scaleX:H,scaleY:H,scaleZ:H,skew:K,skewX:K,skewY:K,distance:J,translateX:J,translateY:J,translateZ:J,x:J,y:J,z:J,perspective:J,transformPerspective:J,opacity:z,originX:et,originY:et,originZ:J,zIndex:nt,fillOpacity:z,strokeOpacity:z,numOctaves:nt};function st(t,e,n,i){const{style:s,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const h in e){const t=e[h];if(O(h)){o[h]=t;continue}const n=it[h],i=N(t,n);if(M.has(h)){if(l=!0,r[h]=i,!u)continue;t!==(n.default||0)&&(u=!1)}else h.startsWith("origin")?(c=!0,a[h]=i):s[h]=i}if(e.transform||(l||i?s.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},i,s){let o="";for(let r=0;r({style:{},transform:{},transformOrigin:{},vars:{}});function rt(t,e,n){for(const i in e)j(e[i])||L(i,n)||(t[i]=e[i])}function at(t,e,n){const s={};return rt(s,t.style||{},t),Object.assign(s,function({transformTemplate:t},e,n){return(0,i.useMemo)((()=>{const i=ot();return st(i,e,{enableHardwareAcceleration:!n},t),Object.assign({},i.vars,i.style)}),[e])}(t,e,n)),t.transformValues?t.transformValues(s):s}function lt(t,e,n){const i={},s=at(t,e,n);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=s,i}const ct=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function ut(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||ct.has(t)}let ht=t=>!ut(t);try{(dt=require("@emotion/is-prop-valid").default)&&(ht=t=>t.startsWith("on")?!ut(t):dt(t))}catch(er){}var dt;function pt(t,e,n){return"string"==typeof t?t:J.transform(e+n*t)}const mt={offset:"stroke-dashoffset",array:"stroke-dasharray"},ft={offset:"strokeDashoffset",array:"strokeDasharray"};function gt(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,h,d){if(st(t,c,u,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:m,dimensions:f}=t;p.transform&&(f&&(m.transform=p.transform),delete p.transform),f&&(void 0!==s||void 0!==o||m.transform)&&(m.transformOrigin=function(t,e,n){return`${pt(e,t.x,t.width)} ${pt(n,t.y,t.height)}`}(f,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(p.x=e),void 0!==n&&(p.y=n),void 0!==i&&(p.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?mt:ft;t[o.offset]=J.transform(-i);const r=J.transform(e),a=J.transform(n);t[o.array]=`${r} ${a}`}(p,r,a,l,!1)}const yt=()=>({...ot(),attrs:{}}),vt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function xt(t,e,n,s){const o=(0,i.useMemo)((()=>{const n=yt();return gt(n,e,{enableHardwareAcceleration:!1},vt(s),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};rt(e,t.style,t),o.style={...e,...o.style}}return o}function bt(t=!1){return(e,n,s,{latestValues:o},r)=>{const a=(V(e)?xt:lt)(n,o,r,e),l=function(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(ht(s)||!0===n&&ut(s)||!e&&!ut(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}(n,"string"==typeof e,t),c={...l,...a,ref:s},{children:u}=n,h=(0,i.useMemo)((()=>j(u)?u.get():u),[u]);return(0,i.createElement)(e,{...c,children:h})}}const wt=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Pt(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const o in n)t.style.setProperty(o,n[o])}const Et=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function St(t,e,n,i){Pt(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(Et.has(s)?s:wt(s),e.attrs[s])}function Tt(t,e){const{style:n}=t,i={};for(const s in n)(j(n[s])||e.style&&j(e.style[s])||L(s,t))&&(i[s]=n[s]);return i}function At(t,e){const n=Tt(t,e);for(const i in t)if(j(t[i])||j(e[i])){n[-1!==D.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]}return n}function Ct(t,e,n,i={},s={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),e}var Vt=n(8515);const kt=t=>Array.isArray(t),Dt=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),Mt=t=>kt(t)?t[t.length-1]||0:t;function Lt(t){const e=j(t)?t.get():t;return Dt(e)?e.toValue():e}const jt=t=>(e,n)=>{const s=(0,i.useContext)(o),a=(0,i.useContext)(r.O),l=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,s,o){const r={latestValues:Rt(i,s,o,t),renderState:e()};return n&&(r.mount=t=>n(i,t,r)),r}(t,e,s,a);return n?l():(0,Vt.h)(l)};function Rt(t,e,n,i){const s={},o=i(t,{});for(const h in o)s[h]=Lt(o[h]);let{initial:r,animate:a}=t;const l=m(t),c=f(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===r;const d=u?a:r;if(d&&"boolean"!=typeof d&&!h(d)){(Array.isArray(d)?d:[d]).forEach((e=>{const n=Ct(t,e);if(!n)return;const{transitionEnd:i,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(s[t]=e)}for(const t in i)s[t]=i[t]}))}return s}var Bt=n(77);const Ft={useVisualState:jt({scrapeMotionValuesFromProps:At,createRenderState:yt,onMount:(t,e,{renderState:n,latestValues:i})=>{Bt.Wi.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}})),Bt.Wi.render((()=>{gt(n,i,{enableHardwareAcceleration:!1},vt(e.tagName),t.transformTemplate),St(e,n)}))}})},Ot={useVisualState:jt({scrapeMotionValuesFromProps:Tt,createRenderState:ot})};function It(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Nt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Wt(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Ut=t=>e=>Nt(e)&&t(e,Wt(e));function zt(t,e,n,i){return It(t,e,Ut(n),i)}const Ht=(t,e)=>n=>e(t(n)),Gt=(...t)=>t.reduce(Ht);function Yt(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Xt=Yt("dragHorizontal"),Zt=Yt("dragVertical");function qt(t){let e=!1;if("y"===t)e=Zt();else if("x"===t)e=Xt();else{const t=Xt(),n=Zt();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function $t(){const t=qt(!0);return!t||(t(),!1)}class Kt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Qt(t,e){const n="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End");return zt(t.current,n,((n,s)=>{if("touch"===n.type||$t())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[i]&&Bt.Wi.update((()=>o[i](n,s)))}),{passive:!t.getProps()[i]})}const Jt=(t,e)=>!!e&&(t===e||Jt(t,e.parentElement));var _t=n(6404);function te(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Wt(n))}const ee=new WeakMap,ne=new WeakMap,ie=t=>{const e=ee.get(t.target);e&&e(t)},se=t=>{t.forEach(ie)};function oe(t,e,n){const i=function({root:t,...e}){const n=t||document;ne.has(n)||ne.set(n,{});const i=ne.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(se,{root:t,...e})),i[s]}(e);return ee.set(t,n),i.observe(t),()=>{ee.delete(t),i.unobserve(t)}}const re={some:0,all:1};const ae={inView:{Feature:class extends Kt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:re[i]};return oe(this.node.current,o,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Kt{constructor(){super(...arguments),this.removeStartListeners=_t.Z,this.removeEndListeners=_t.Z,this.removeAccessibleListeners=_t.Z,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),i=zt(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i}=this.node.getProps();Bt.Wi.update((()=>{Jt(this.node.current,t.target)?n&&n(t,e):i&&i(t,e)}))}),{passive:!(n.onTap||n.onPointerUp)}),s=zt(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Gt(i,s),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=It(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=It(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&te("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&Bt.Wi.update((()=>n(t,e)))}))})),te("down",((t,e)=>{this.startPress(t,e)}))})),e=It(this.node.current,"blur",(()=>{this.isPressing&&te("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=Gt(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Bt.Wi.update((()=>n(t,e)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!$t()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Bt.Wi.update((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=zt(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=It(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Gt(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Kt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Gt(It(this.node.current,"focus",(()=>this.onFocus())),It(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Kt{mount(){this.unmount=Gt(Qt(this.node,!0),Qt(this.node,!1))}unmount(){}}}};function le(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;ie[n]=t.get())),e}(t),function(t){const e={};return t.values.forEach(((t,n)=>e[n]=t.getVelocity())),e}(t))}const ue="data-"+wt("framerAppearId");var he=n(8243);const de=t=>1e3*t,pe=t=>t/1e3,me=!1,fe=t=>Array.isArray(t)&&"number"==typeof t[0];function ge(t){return Boolean(!t||"string"==typeof t&&ve[t]||fe(t)||Array.isArray(t)&&t.every(ge))}const ye=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,ve={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ye([0,.65,.55,1]),circOut:ye([.55,0,1,.45]),backIn:ye([.31,.01,.66,-.59]),backOut:ye([.33,1.53,.69,.99])};function xe(t){if(t)return fe(t)?ye(t):Array.isArray(t)?t.map(xe):ve[t]}const be=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,we=1e-7,Pe=12;function Ee(t,e,n,i){if(t===e&&n===i)return _t.Z;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=be(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>we&&++a0===t||1===t?t:be(s(t),e,i)}const Se=Ee(.42,0,1,1),Te=Ee(0,0,.58,1),Ae=Ee(.42,0,.58,1),Ce=t=>Array.isArray(t)&&"number"!=typeof t[0],Ve=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ke=t=>e=>1-t(1-e),De=t=>1-Math.sin(Math.acos(t)),Me=ke(De),Le=Ve(Me),je=Ee(.33,1.53,.69,.99),Re=ke(je),Be=Ve(Re),Fe={linear:_t.Z,easeIn:Se,easeInOut:Ae,easeOut:Te,circIn:De,circInOut:Le,circOut:Me,backIn:Re,backInOut:Be,backOut:je,anticipate:t=>(t*=2)<1?.5*Re(t):.5*(2-Math.pow(2,-10*(t-1)))},Oe=t=>{if(Array.isArray(t)){(0,he.k)(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,s]=t;return Ee(e,n,i,s)}return"string"==typeof t?((0,he.k)(void 0!==Fe[t],`Invalid easing type '${t}'`),Fe[t]):t},Ie=(t,e)=>n=>Boolean(q(n)&&Z.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ne=(t,e,n)=>i=>{if(!q(i))return i;const[s,o,r,a]=i.match(Y);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},We={...U,transform:t=>Math.round((t=>W(0,255,t))(t))},Ue={test:Ie("rgb","red"),parse:Ne("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+We.transform(t)+", "+We.transform(e)+", "+We.transform(n)+", "+G(z.transform(i))+")"};const ze={test:Ie("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Ue.transform},He={test:Ie("hsl","hue"),parse:Ne("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Q.transform(G(e))+", "+Q.transform(G(n))+", "+G(z.transform(i))+")"},Ge={test:t=>Ue.test(t)||ze.test(t)||He.test(t),parse:t=>Ue.test(t)?Ue.parse(t):He.test(t)?He.parse(t):ze.parse(t),transform:t=>q(t)?t:t.hasOwnProperty("red")?Ue.transform(t):He.transform(t)},Ye=(t,e,n)=>-n*t+n*e+t;function Xe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}const Ze=(t,e,n)=>{const i=t*t;return Math.sqrt(Math.max(0,n*(e*e-i)+i))},qe=[ze,Ue,He];function $e(t){const e=(n=t,qe.find((t=>t.test(n))));var n;(0,he.k)(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`);let i=e.parse(t);return e===He&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Xe(a,i,t+1/3),o=Xe(a,i,t),r=Xe(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const Ke=(t,e)=>{const n=$e(t),i=$e(e),s={...n};return t=>(s.red=Ze(n.red,i.red,t),s.green=Ze(n.green,i.green,t),s.blue=Ze(n.blue,i.blue,t),s.alpha=Ye(n.alpha,i.alpha,t),Ue.transform(s))};const Qe={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:_t.Z},Je={regex:X,countKey:"Colors",token:"${c}",parse:Ge.parse},_e={regex:Y,countKey:"Numbers",token:"${n}",parse:U.parse};function tn(t,{regex:e,countKey:n,token:i,parse:s}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,i),t.values.push(...o.map(s)))}function en(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&tn(n,Qe),tn(n,Je),tn(n,_e),n}function nn(t){return en(t).values}function sn(t){const{values:e,numColors:n,numVars:i,tokenised:s}=en(t),o=e.length;return t=>{let e=s;for(let s=0;s"number"==typeof t?0:t;const rn={test:function(t){var e,n;return isNaN(t)&&q(t)&&((null===(e=t.match(Y))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(X))||void 0===n?void 0:n.length)||0)>0},parse:nn,createTransformer:sn,getAnimatableNone:function(t){const e=nn(t);return sn(t)(e.map(on))}},an=(t,e)=>n=>`${n>0?e:t}`;function ln(t,e){return"number"==typeof t?n=>Ye(t,e,n):Ge.test(t)?Ke(t,e):t.startsWith("var(")?an(t,e):hn(t,e)}const cn=(t,e)=>{const n=[...t],i=n.length,s=t.map(((t,n)=>ln(t,e[n])));return t=>{for(let e=0;e{const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=ln(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}},hn=(t,e)=>{const n=rn.createTransformer(e),i=en(t),s=en(e);return i.numVars===s.numVars&&i.numColors===s.numColors&&i.numNumbers>=s.numNumbers?Gt(cn(i.values,s.values),n):((0,he.K)(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),an(t,e))},dn=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},pn=(t,e)=>n=>Ye(t,e,n);function mn(t,e,n){const i=[],s=n||("number"==typeof(o=t[0])?pn:"string"==typeof o?Ge.test(o)?Ke:hn:Array.isArray(o)?cn:"object"==typeof o?un:pn);var o;const r=t.length-1;for(let a=0;ae[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=mn(e,i,s),a=r.length,l=e=>{let n=0;if(a>1)for(;nl(W(t[0],t[o-1],e)):l}function gn(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=dn(0,e,i);t.push(Ye(n,1,s))}}(e,t.length-1),e}function yn({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Ce(i)?i.map(Oe):Oe(i),o={done:!1,value:e[0]},r=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:gn(e),t),a=fn(r,e,{ease:Array.isArray(s)?s:(l=e,c=s,l.map((()=>c||Ae)).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}function vn(t,e){return e?t*(1e3/e):0}const xn=5;function bn(t,e,n){const i=Math.max(e-xn,0);return vn(n-t(i),e-i)}const wn=.001,Pn=.01,En=10,Sn=.05,Tn=1;function An({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let s,o;(0,he.K)(t<=de(En),"Spring duration must be 10 seconds or less");let r=1-e;r=W(Sn,Tn,r),t=W(Pn,En,pe(t)),r<1?(s=e=>{const i=e*r,s=i*t,o=i-n,a=Vn(e,r),l=Math.exp(-s);return wn-o/a*l},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=Vn(Math.pow(e,2),r);return(-s(e)+wn>0?-1:1)*((o-a)*l)/c}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-wn,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let s=1;svoid 0!==t[e]))}function Ln({keyframes:t,restDelta:e,restSpeed:n,...i}){const s=t[0],o=t[t.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:c,velocity:u,duration:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Mn(t,Dn)&&Mn(t,kn)){const n=An(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(i),p=u?-pe(u):0,m=l/(2*Math.sqrt(a*c)),f=o-s,g=pe(Math.sqrt(a/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),m<1){const t=Vn(g,m);v=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)v=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);v=e=>{const n=Math.exp(-m*g*e),i=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:d&&h||null,next:t=>{const i=v(t);if(d)r.done=t>=h;else{let s=p;0!==t&&(s=m<1?bn(v,t,i):0);const a=Math.abs(s)<=n,l=Math.abs(o-i)<=e;r.done=a&&l}return r.value=r.done?o:i,r}}}function jn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?g:n};let b,w;const P=t=>{var e;(e=d.value,void 0!==a&&el)&&(b=t,w=Ln({keyframes:[d.value,p(d.value)],velocity:bn(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return P(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==b||(e=!0,x(t),P(t)),void 0!==b&&t>b?w.next(t-b):(!e&&x(t),d)}}}const Rn=t=>{const e=({timestamp:e})=>t(e);return{start:()=>Bt.Wi.update(e,!0),stop:()=>(0,Bt.Pn)(e),now:()=>Bt.frameData.isProcessing?Bt.frameData.timestamp:performance.now()}},Bn=2e4;function Fn(t){let e=0;let n=t.next(e);for(;!n.done&&e=Bn?1/0:e}const On={decay:jn,inertia:jn,tween:yn,keyframes:yn,spring:Ln};function In({autoplay:t=!0,delay:e=0,driver:n=Rn,keyframes:i,type:s="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:h,...d}){let p,m,f=1,g=!1;const y=()=>{m=new Promise((t=>{p=t}))};let v;y();const x=On[s]||yn;let b;x!==yn&&"number"!=typeof i[0]&&(b=fn([0,100],i,{clamp:!1}),i=[0,100]);const w=x({...d,keyframes:i});let P;"mirror"===a&&(P=x({...d,keyframes:[...i].reverse(),velocity:-(d.velocity||0)}));let E="idle",S=null,T=null,A=null;null===w.calculatedDuration&&o&&(w.calculatedDuration=Fn(w));const{calculatedDuration:C}=w;let V=1/0,k=1/0;null!==C&&(V=C+r,k=V*(o+1)-r);let D=0;const M=t=>{if(null===T)return;f>0&&(T=Math.min(T,t)),f<0&&(T=Math.min(t-k/f,T)),D=null!==S?S:Math.round(t-T)*f;const n=D-e*(f>=0?1:-1),s=f>=0?n<0:n>k;D=Math.max(n,0),"finished"===E&&null===S&&(D=k);let l=D,c=w;if(o){const t=D/V;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,o+1);const i=Boolean(e%2);i&&("reverse"===a?(n=1-n,r&&(n-=r/V)):"mirror"===a&&(c=P));let s=W(0,1,n);D>k&&(s="reverse"===a&&i?1:0),l=s*V}const u=s?{done:!1,value:i[0]}:c.next(l);b&&(u.value=b(u.value));let{done:d}=u;s||null===C||(d=f>=0?D>=k:D<=0);const p=null===S&&("finished"===E||"running"===E&&d);return h&&h(u.value),p&&R(),u},L=()=>{v&&v.stop(),v=void 0},j=()=>{E="idle",L(),p(),y(),T=A=null},R=()=>{E="finished",u&&u(),L(),p()},B=()=>{if(g)return;v||(v=n(M));const t=v.now();l&&l(),null!==S?T=t-S:T&&"finished"!==E||(T=t),"finished"===E&&y(),A=T,S=null,E="running",v.start()};t&&B();const F={then(t,e){return m.then(t,e)},get time(){return pe(D)},set time(t){t=de(t),D=t,null===S&&v&&0!==f?T=v.now()-t/f:S=t},get duration(){const t=null===w.calculatedDuration?Fn(w):w.calculatedDuration;return pe(t)},get speed(){return f},set speed(t){t!==f&&v&&(f=t,F.time=pe(D))},get state(){return E},play:B,pause:()=>{E="paused",S=D},stop:()=>{g=!0,"idle"!==E&&(E="idle",c&&c(),j())},cancel:()=>{null!==A&&M(A),j()},complete:()=>{E="finished"},sample:t=>(T=0,M(t))};return F}const Nn=function(t){let e;return()=>(void 0===e&&(e=t()),e)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),Wn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function Un(t,e,{onUpdate:n,onComplete:i,...s}){if(!(Nn()&&Wn.has(e)&&!s.repeatDelay&&"mirror"!==s.repeatType&&0!==s.damping&&"inertia"!==s.type))return!1;let o,r,a=!1;const l=()=>{r=new Promise((t=>{o=t}))};l();let{keyframes:c,duration:u=300,ease:h,times:d}=s;if(((t,e)=>"spring"===e.type||"backgroundColor"===t||!ge(e.ease))(e,s)){const t=In({...s,repeat:0,delay:0});let e={done:!1,value:c[0]};const n=[];let i=0;for(;!e.done&&i<2e4;)e=t.sample(i),n.push(e.value),i+=10;d=void 0,c=n,u=i-10,h="linear"}const p=function(t,e,n,{delay:i=0,duration:s,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=xe(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:i,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}(t.owner.current,e,c,{...s,duration:u,ease:h,times:d});s.syncStart&&(p.startTime=Bt.frameData.isProcessing?Bt.frameData.timestamp:document.timeline?document.timeline.currentTime:performance.now());const m=()=>p.cancel(),f=()=>{Bt.Wi.update(m),o(),l()};p.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(c,s)),i&&i(),f()};return{then(t,e){return r.then(t,e)},attachTimeline(t){return p.timeline=t,p.onfinish=null,_t.Z},get time(){return pe(p.currentTime||0)},set time(t){p.currentTime=de(t)},get speed(){return p.playbackRate},set speed(t){p.playbackRate=t},get duration(){return pe(u)},play:()=>{a||(p.play(),(0,Bt.Pn)(m))},pause:()=>p.pause(),stop:()=>{if(a=!0,"idle"===p.playState)return;const{currentTime:e}=p;if(e){const n=In({...s,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}f()},complete:()=>p.finish(),cancel:f}}const zn={type:"spring",stiffness:500,damping:25,restSpeed:10},Hn={type:"keyframes",duration:.8},Gn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yn=(t,{keyframes:e})=>e.length>2?Hn:M.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:zn:Gn,Xn=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!rn.test(e)&&"0"!==e||e.startsWith("url("))),Zn=new Set(["brightness","contrast","saturate","opacity"]);function qn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Y)||[];if(!i)return t;const s=n.replace(i,"");let o=Zn.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const $n=/([a-z-]*)\(.*?\)/g,Kn={...rn,getAnimatableNone:t=>{const e=t.match($n);return e?e.map(qn).join(" "):t}},Qn={...it,color:Ge,backgroundColor:Ge,outlineColor:Ge,fill:Ge,stroke:Ge,borderColor:Ge,borderTopColor:Ge,borderRightColor:Ge,borderBottomColor:Ge,borderLeftColor:Ge,filter:Kn,WebkitFilter:Kn},Jn=t=>Qn[t];function _n(t,e){let n=Jn(t);return n!==Kn&&(n=rn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ti=t=>/^0[^.\s]+$/.test(t);function ei(t){return"number"==typeof t?0===t:null!==t?"none"===t||"0"===t||ti(t):void 0}function ni(t,e){return t[e]||t.default||t}const ii=(t,e,n,i={})=>s=>{const o=ni(i,t)||{},r=o.delay||i.delay||0;let{elapsed:a=0}=i;a-=de(r);const l=function(t,e,n,i){const s=Xn(e,n);let o;o=Array.isArray(n)?[...n]:[null,n];const r=void 0!==i.from?i.from:t.get();let a;const l=[];for(let c=0;c{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{s(),o.onComplete&&o.onComplete()}};if(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(o)||(p={...p,...Yn(t,p)}),p.duration&&(p.duration=de(p.duration)),p.repeatDelay&&(p.repeatDelay=de(p.repeatDelay)),!h||!d||me||!1===o.type)return function({keyframes:t,delay:e,onUpdate:n,onComplete:i}){const s=()=>(n&&n(t[t.length-1]),i&&i(),{time:0,speed:1,duration:0,play:_t.Z,pause:_t.Z,stop:_t.Z,then:t=>(t(),Promise.resolve()),cancel:_t.Z,complete:_t.Z});return e?In({keyframes:[0,1],duration:0,delay:e,onComplete:s}):s()}(me?{...p,delay:0}:p);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=Un(e,t,p);if(n)return n}return In(p)};function si(t){return Boolean(j(t)&&t.add)}const oi=t=>/^\-?\d*\.?\d+$/.test(t);function ri(t,e){-1===t.indexOf(e)&&t.push(e)}function ai(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class li{constructor(){this.subscriptions=[]}add(t){return ri(this.subscriptions,t),()=>ai(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s{this.prev=this.current,this.current=t;const{delta:n,timestamp:i}=Bt.frameData;this.lastUpdated!==i&&(this.timeDelta=n,this.lastUpdated=i,Bt.Wi.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Bt.Wi.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new li);const n=this.events[t].add(e);return"change"===t?()=>{n(),Bt.Wi.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return ci.current&&ci.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?vn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function hi(t,e){return new ui(t,e)}const di=t=>e=>e.test(t),pi=[U,J,Q,K,tt,_,{test:t=>"auto"===t,parse:t=>t}],mi=t=>pi.find(di(t)),fi=[...pi,Ge,rn];function gi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,hi(n))}function yi(t,e){const n=ce(t,e);let{transitionEnd:i={},transition:s={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...i};for(const r in o){gi(t,r,Mt(o[r]))}}function vi(t,e){if(!e)return;return(e[t]||e.default||e).from}function xi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function bi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");i&&(o=i);const c=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const h in a){const e=t.getValue(h),i=a[h];if(!e||void 0===i||u&&xi(u,h))continue;const s={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!e.hasAnimated){const n=t.getProps()[ue];n&&(s.elapsed=window.HandoffAppearAnimations(n,h,e,Bt.Wi),s.syncStart=!0)}e.start(ii(h,e,i,t.shouldReduceMotion&&M.has(h)?{type:!1}:s));const r=e.animation;si(l)&&(l.add(h),r.then((()=>l.remove(h)))),c.push(r)}return r&&Promise.all(c).then((()=>{r&&yi(t,r)})),c}function wi(t,e,n={}){const i=ce(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(bi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(Pi).forEach(((t,i)=>{t.notify("AnimationStart",e),r.push(wi(t,e,{...o,delay:n+l(i)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then((()=>e()))}return Promise.all([o(),r(n.delay)])}function Pi(t,e){return t.sortNodePosition(e)}const Ei=[...d].reverse(),Si=d.length;function Ti(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map((e=>wi(t,e,n)));i=Promise.all(s)}else if("string"==typeof e)i=wi(t,e,n);else{const s="function"==typeof e?ce(t,e,n.custom):e;i=Promise.all(bi(t,s,n))}return i.then((()=>t.notify("AnimationComplete",e)))}(t,e,n))))}function Ai(t){let e=Ti(t);const n={animate:Vi(!0),whileInView:Vi(),whileHover:Vi(),whileTap:Vi(),whileDrag:Vi(),whileFocus:Vi(),exit:Vi()};let i=!0;const s=(e,n)=>{const i=ce(t,n);if(i){const{transition:t,transitionEnd:n,...s}=i;e={...e,...s,...n}}return e};function o(o,r){const a=t.getProps(),l=t.getVariantContext(!0)||{},c=[],d=new Set;let p={},m=1/0;for(let e=0;em&&v;const E=Array.isArray(y)?y:[y];let S=E.reduce(s,{});!1===x&&(S={});const{prevResolvedValues:T={}}=g,A={...T,...S},C=t=>{P=!0,d.delete(t),g.needsAnimating[t]=!0};for(const t in A){const e=S[t],n=T[t];p.hasOwnProperty(t)||(e!==n?kt(e)&&kt(n)?!le(e,n)||w?C(t):g.protectedKeys[t]=!0:void 0!==e?C(t):d.add(t):void 0!==e&&d.has(t)?C(t):g.protectedKeys[t]=!0)}g.prevProp=y,g.prevResolvedValues=S,g.isActive&&(p={...p,...S}),i&&t.blockInitialAnimation&&(P=!1),P&&!b&&c.push(...E.map((t=>({animation:t,options:{type:f,...o}}))))}if(d.size){const e={};d.forEach((n=>{const i=t.getBaseTarget(n);void 0!==i&&(e[n]=i)})),c.push({animation:e})}let f=Boolean(c.length);return i&&!1===a.initial&&!t.manuallyAnimateOnMount&&(f=!1),i=!1,f?e(c):Promise.resolve()}return{animateChanges:o,setActive:function(e,i,s){var r;if(n[e].isActive===i)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)})),n[e].isActive=i;const a=o(s,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Ci(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!le(e,t)}function Vi(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let ki=0;const Di={animation:{Feature:class extends Kt{constructor(t){super(t),t.animationState||(t.animationState=Ai(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),h(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends Kt{constructor(){super(...arguments),this.id=ki++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&s.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Mi=(t,e)=>Math.abs(t-e);class Li{constructor(t,e,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Bi(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=Mi(t.x,e.x),i=Mi(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=Bt.frameData;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=ji(e,this.transformPagePoint),Bt.Wi.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:i}=this.handlers,s=Bi("pointercancel"===t.type?this.lastMoveEventInfo:ji(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,s),i&&i(t,s)},!Nt(t))return;this.handlers=e,this.transformPagePoint=n;const i=ji(Wt(t),this.transformPagePoint),{point:s}=i,{timestamp:o}=Bt.frameData;this.history=[{...s,timestamp:o}];const{onSessionStart:r}=e;r&&r(t,Bi(i,this.history)),this.removeListeners=Gt(zt(window,"pointermove",this.handlePointerMove),zt(window,"pointerup",this.handlePointerUp),zt(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),(0,Bt.Pn)(this.updatePoint)}}function ji(t,e){return e?{point:e(t.point)}:t}function Ri(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Bi({point:t},e){return{point:t,delta:Ri(t,Oi(e)),offset:Ri(t,Fi(e)),velocity:Ii(e,.1)}}function Fi(t){return t[0]}function Oi(t){return t[t.length-1]}function Ii(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Oi(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>de(e)));)n--;if(!i)return{x:0,y:0};const o=pe(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ni(t){return t.max-t.min}function Wi(t,e=0,n=.01){return Math.abs(t-e)<=n}function Ui(t,e,n,i=.5){t.origin=i,t.originPoint=Ye(e.min,e.max,t.origin),t.scale=Ni(n)/Ni(e),(Wi(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ye(n.min,n.max,t.origin)-t.originPoint,(Wi(t.translate)||isNaN(t.translate))&&(t.translate=0)}function zi(t,e,n,i){Ui(t.x,e.x,n.x,i?i.originX:void 0),Ui(t.y,e.y,n.y,i?i.originY:void 0)}function Hi(t,e,n){t.min=n.min+e.min,t.max=t.min+Ni(e)}function Gi(t,e,n){t.min=e.min-n.min,t.max=t.min+Ni(e)}function Yi(t,e,n){Gi(t.x,e.x,n.x),Gi(t.y,e.y,n.y)}function Xi(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Zi(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Ji=()=>({x:{min:0,max:0},y:{min:0,max:0}});function _i(t){return[t("x"),t("y")]}function ts({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function es(t){return void 0===t||1===t}function ns({scale:t,scaleX:e,scaleY:n}){return!es(t)||!es(e)||!es(n)}function is(t){return ns(t)||ss(t)||t.z||t.rotate||t.rotateX||t.rotateY}function ss(t){return os(t.x)||os(t.y)}function os(t){return t&&"0%"!==t}function rs(t,e,n){return n+e*(t-n)}function as(t,e,n,i,s){return void 0!==s&&(t=rs(t,s,i)),rs(t,n,i)+e}function ls(t,e=0,n=1,i,s){t.min=as(t.min,e,n,i,s),t.max=as(t.max,e,n,i,s)}function cs(t,{x:e,y:n}){ls(t.x,e.translate,e.scale,e.originPoint),ls(t.y,n.translate,n.scale,n.originPoint)}function us(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function hs(t,e){t.min=t.min+e,t.max=t.max+e}function ds(t,e,[n,i,s]){const o=void 0!==e[s]?e[s]:.5,r=Ye(t.min,t.max,o);ls(t,e[n],e[i],r,e.scale)}const ps=["x","scaleX","originX"],ms=["y","scaleY","originY"];function fs(t,e){ds(t.x,e,ps),ds(t.y,e,ms)}function gs(t,e){return ts(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const ys=new WeakMap;class vs{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ji(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new Li(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(Wt(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=qt(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_i((t=>{let e=this.getAxisMotionValue(t).get()||0;if(Q.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Ni(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),s&&Bt.Wi.update((()=>s(t,e)),!1,!0);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Bt.Wi.update((()=>s(t,e)))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!xs(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&tn&&(t=i?Ye(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;t&&c(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Xi(t.x,n,s),y:Xi(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=qi){return!1===t?t=0:!0===t&&(t=qi),{x:$i(t,"left","right"),y:$i(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&_i((t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!c(t))return!1;const n=t.current;(0,he.k)(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=gs(t,n),{scroll:s}=e;return s&&(hs(i.x,s.offset.x),hs(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Zi(t.x,e.x),y:Zi(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=ts(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=_i((r=>{if(!xs(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const c=i?200:1e6,u=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)}));return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(ii(t,n,0,e))}stopAnimation(){_i((t=>this.getAxisMotionValue(t).stop()))}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){_i((e=>{const{drag:n}=this.getProps();if(!xs(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Ye(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!c(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};_i((t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();i[t]=function(t,e){let n=.5;const i=Ni(t),s=Ni(e);return s>i?n=dn(e.min,e.max-i,t.min):i>s&&(n=dn(t.min,t.max-s,e.min)),W(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),_i((e=>{if(!xs(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Ye(s,o,i[e]))}))}addListeners(){if(!this.visualElement.current)return;ys.set(this.visualElement,this);const t=zt(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();c(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const s=It(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(_i((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=qi,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function xs(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const bs=t=>(e,n)=>{t&&Bt.Wi.update((()=>t(e,n)))};const ws={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ps(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Es={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!J.test(t))return t;t=parseFloat(t)}return`${Ps(t,e.target.x)}% ${Ps(t,e.target.y)}%`}},Ss={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=rn.parse(t);if(s.length>5)return i;const o=rn.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Ye(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}};class Ts extends i.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;var o;o=Cs,Object.assign(k,o),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(()=>{this.safeToRemove()})),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ws.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Bt.Wi.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function As(t){const[e,n]=function(){const t=(0,i.useContext)(r.O);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,o=(0,i.useId)();return(0,i.useEffect)((()=>s(o)),[]),!e&&n?[!1,()=>n&&n(o)]:[!0]}(),s=(0,i.useContext)(w.p);return i.createElement(Ts,{...t,layoutGroup:s,switchLayoutGroup:(0,i.useContext)(P),isPresent:e,safeToRemove:n})}const Cs={borderRadius:{...Es,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Es,borderTopRightRadius:Es,borderBottomLeftRadius:Es,borderBottomRightRadius:Es,boxShadow:Ss},Vs=["TopLeft","TopRight","BottomLeft","BottomRight"],ks=Vs.length,Ds=t=>"string"==typeof t?parseFloat(t):t,Ms=t=>"number"==typeof t||J.test(t);function Ls(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const js=Bs(0,.5,Me),Rs=Bs(.5,.95,_t.Z);function Bs(t,e,n){return i=>ie?1:n(dn(t,e,i))}function Fs(t,e){t.min=e.min,t.max=e.max}function Os(t,e){Fs(t.x,e.x),Fs(t.y,e.y)}function Is(t,e,n,i,s){return t=rs(t-=e,1/n,i),void 0!==s&&(t=rs(t,1/s,i)),t}function Ns(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){Q.test(e)&&(e=parseFloat(e),e=Ye(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=Ye(o.min,o.max,i);t===o&&(a-=e),t.min=Is(t.min,e,n,a,s),t.max=Is(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Ws=["x","scaleX","originX"],Us=["y","scaleY","originY"];function zs(t,e,n,i){Ns(t.x,e,Ws,n?n.x:void 0,i?i.x:void 0),Ns(t.y,e,Us,n?n.y:void 0,i?i.y:void 0)}function Hs(t){return 0===t.translate&&1===t.scale}function Gs(t){return Hs(t.x)&&Hs(t.y)}function Ys(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Xs(t){return Ni(t.x)/Ni(t.y)}class Zs{constructor(){this.members=[]}add(t){ri(this.members,t),t.scheduleRender()}remove(t){if(ai(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex((e=>t===e));if(0===e)return!1;let n;for(let i=e;i>=0;i--){const t=this.members[i];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach((t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function qs(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y;if((s||o)&&(i=`translate3d(${s}px, ${o}px, 0) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:s}=n;t&&(i+=`rotate(${t}deg) `),e&&(i+=`rotateX(${e}deg) `),s&&(i+=`rotateY(${s}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(i+=`scale(${r}, ${a})`),i||"none"}const $s=(t,e)=>t.depth-e.depth;class Ks{constructor(){this.children=[],this.isDirty=!1}add(t){ri(this.children,t),this.isDirty=!0}remove(t){ai(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($s),this.isDirty=!1,this.children.forEach(t)}}const Qs=["","X","Y","Z"];let Js=0;const _s={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function to({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=Js++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;_s.totalNodes=_s.resolvedTargetDeltas=_s.recalculatedProjection=0,this.nodes.forEach(io),this.nodes.forEach(uo),this.nodes.forEach(ho),this.nodes.forEach(so),t=_s,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;ethis.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=performance.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&((0,Bt.Pn)(i),t(o-e))};return Bt.Wi.read(i,!0),()=>(0,Bt.Pn)(i)}(i,250),ws.hasAnimatedSinceResize&&(ws.hasAnimatedSinceResize=!1,this.nodes.forEach(co))}))}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&r&&(s||o)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||r.getDefaultTransition()||vo,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=r.getProps(),l=!this.targetLayout||!Ys(this.targetLayout,i)||n,c=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,c);const e={...ni(s,"layout"),onPlay:o,onComplete:a};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||co(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,(0,Bt.Pn)(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(po),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let s=0;sthis.update())))}clearAllSnapshots(){this.nodes.forEach(oo),this.sharedNodes.forEach(mo)}scheduleUpdateProjection(){Bt.Wi.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Bt.Wi.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n{const n=e/1e3;var l,d,p,m,f,g;fo(o.x,t.x,n),fo(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Yi(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=r,g=n,go(p.x,m.x,f.x,g),go(p.y,m.y,f.y,g),h&&(l=this.relativeTarget,d=h,l.x.min===d.x.min&&l.x.max===d.x.max&&l.y.min===d.y.min&&l.y.max===d.y.max)&&(this.isProjectionDirty=!1),h||(h=Ji()),Os(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Ye(0,void 0!==n.opacity?n.opacity:1,js(i)),t.opacityExit=Ye(void 0!==e.opacity?e.opacity:1,0,Rs(i))):o&&(t.opacity=Ye(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let r=0;r{ws.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const i=j(t)?t:hi(t);return i.start(ii("",i,e,n)),i.animation}(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Po(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||Ji();const e=Ni(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Ni(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Os(e,n),fs(e,s),zi(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Zs);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const i={};for(let s=0;s{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(ro),this.root.sharedNodes.clear()}}}function eo(t){t.updateLayout()}function no(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?_i((t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=Ni(i);i.min=e[t].min,i.max=i.min+s})):Po(s,n.layoutBox,e)&&_i((i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=Ni(e[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)}));const r=Qi();zi(r,e,n.layoutBox);const a=Qi();o?zi(a,t.applyTransform(i,!0),n.measuredBox):zi(a,e,n.layoutBox);const l=!Gs(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=Ji();Yi(r,n.layoutBox,s.layoutBox);const a=Ji();Yi(a,e,o.layoutBox),Ys(r,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function io(t){_s.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function so(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function oo(t){t.clearSnapshot()}function ro(t){t.clearMeasurements()}function ao(t){t.isLayoutDirty=!1}function lo(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function co(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function uo(t){t.resolveTargetDelta()}function ho(t){t.calcProjection()}function po(t){t.resetRotation()}function mo(t){t.removeLeadSnapshot()}function fo(t,e,n){t.translate=Ye(e.translate,0,n),t.scale=Ye(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function go(t,e,n,i){t.min=Ye(e.min,n.min,i),t.max=Ye(e.max,n.max,i)}function yo(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const vo={duration:.45,ease:[.4,0,.1,1]},xo=t=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(t),bo=xo("applewebkit/")&&!xo("chrome/")?Math.round:_t.Z;function wo(t){t.min=bo(t.min),t.max=bo(t.max)}function Po(t,e,n){return"position"===t||"preserve-aspect"===t&&!Wi(Xs(e),Xs(n),.2)}const Eo=to({attachResizeListener:(t,e)=>It(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),So={current:void 0},To=to({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!So.current){const t=new Eo({});t.mount(window),t.setOptions({layoutScroll:!0}),So.current=t}return So.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ao={pan:{Feature:class extends Kt{constructor(){super(...arguments),this.removePointerDownListener=_t.Z}onPointerDown(t){this.session=new Li(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:bs(t),onStart:bs(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&Bt.Wi.update((()=>i(t,e)))}}}mount(){this.removePointerDownListener=zt(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Kt{constructor(t){super(t),this.removeGroupControls=_t.Z,this.removeListeners=_t.Z,this.controls=new vs(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_t.Z}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:To,MeasureLayout:As}},Co=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;const Vo=4;function ko(t,e,n=1){(0,he.k)(n<=Vo,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[i,s]=function(t){const e=Co.exec(t);if(!e)return[,];const[,n,i]=e;return[n,i]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return oi(t)?parseFloat(t):t}return I(s)?ko(s,e,n+1):s}const Do=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Mo=t=>Do.has(t),Lo=t=>t===U||t===J,jo=(t,e)=>parseFloat(t.split(", ")[e]),Ro=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/);if(s)return jo(s[1],e);{const e=i.match(/^matrix\((.+)\)$/);return e?jo(e[1],t):0}},Bo=new Set(["x","y","z"]),Fo=D.filter((t=>!Bo.has(t)));const Oo={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Ro(4,13),y:Ro(5,14)};Oo.translateX=Oo.x,Oo.translateY=Oo.y;const Io=(t,e,n={},i={})=>{e={...e},i={...i};const s=Object.keys(e).filter(Mo);let o=[],r=!1;const a=[];if(s.forEach((s=>{const l=t.getValue(s);if(!t.hasValue(s))return;let c=n[s],u=mi(c);const h=e[s];let d;if(kt(h)){const t=h.length,e=null===h[0]?1:0;c=h[e],u=mi(c);for(let n=e;n{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),e.length&&t.render(),e}(t),r=!0),a.push(s),i[s]=void 0!==i[s]?i[s]:e[s],l.jump(h))})),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,s=((t,e,n)=>{const i=e.measureViewportBox(),s=e.current,o=getComputedStyle(s),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach((t=>{a[t]=Oo[t](i,o)})),e.render();const l=e.measureViewportBox();return n.forEach((n=>{const i=e.getValue(n);i&&i.jump(a[n]),t[n]=Oo[n](l,o)})),t})(e,t,a);return o.length&&o.forEach((([e,n])=>{t.getValue(e).set(n)})),t.render(),b.j&&null!==n&&window.scrollTo({top:n}),{target:s,transitionEnd:i}}return{target:e,transitionEnd:i}};function No(t,e,n,i){return(t=>Object.keys(t).some(Mo))(e)?Io(t,e,n,i):{target:e,transitionEnd:i}}const Wo=(t,e,n,i)=>{const s=function(t,{...e},n){const i=t.current;if(!(i instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach((t=>{const e=t.get();if(!I(e))return;const n=ko(e,i);n&&t.set(n)}));for(const s in e){const t=e[s];if(!I(t))continue;const o=ko(t,i);o&&(e[s]=o,n||(n={}),void 0===n[s]&&(n[s]=t))}return{target:e,transitionEnd:n}}(t,e,i);return No(t,e=s.target,n,i=s.transitionEnd)},Uo={current:null},zo={current:!1};const Ho=new WeakMap,Go=Object.keys(x),Yo=Go.length,Xo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Zo=p.length;class qo{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Bt.Wi.render(this.render,!1,!0);const{latestValues:r,renderState:a}=s;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=m(e),this.isVariantNode=f(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(e,{});for(const u in c){const t=c[u];void 0!==r[u]&&j(t)&&(t.set(r[u],!1),si(l)&&l.add(u))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,Ho.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),zo.current||function(){if(zo.current=!0,b.j)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Uo.current=t.matches;t.addListener(e),e()}else Uo.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Uo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ho.delete(this.current),this.projection&&this.projection.unmount(),(0,Bt.Pn)(this.notifyUpdate),(0,Bt.Pn)(this.render),this.valueSubscriptions.forEach((t=>t())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=M.has(t),i=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&Bt.Wi.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),s=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,(()=>{i(),s()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,i,s){let o,r;for(let a=0;athis.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,layoutScroll:a,layoutRoot:l})}return r}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ji()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;ne.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=hi(e,{owner:this}),this.addValue(t,n)),n}readValue(t){var e;return void 0===this.latestValues[t]&&this.current?null!==(e=this.getBaseTargetFromProps(this.props,t))&&void 0!==e?e:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,i="string"==typeof n||"object"==typeof n?null===(e=Ct(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||j(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new li),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class $o extends qo{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:i},s){let o=function(t,e,n){const i={};for(const s in t){const t=vi(s,e);if(void 0!==t)i[s]=t;else{const t=n.getValue(s);t&&(i[s]=t.get())}}return i}(n,t||{},this);if(i&&(e&&(e=i(e)),n&&(n=i(n)),o&&(o=i(o))),s){!function(t,e,n){var i,s;const o=Object.keys(e).filter((e=>!t.hasValue(e))),r=o.length;var a;if(r)for(let l=0;l{this.current&&(this.current.textContent=`${t}`)})))}renderInstance(t,e,n,i){Pt(t,e,n,i)}}class Qo extends $o{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(M.has(e)){const t=Jn(e);return t&&t.default||0}return e=Et.has(e)?e:wt(e),t.getAttribute(e)}measureInstanceViewportBox(){return Ji()}scrapeMotionValuesFromProps(t,e){return At(t,e)}build(t,e,n,i){gt(t,e,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,e,n,i){St(t,e,0,i)}mount(t){this.isSVGTag=vt(t.tagName),super.mount(t)}}const Jo=(t,e)=>V(t)?new Qo(e,{enableHardwareAcceleration:!1}):new Ko(e,{enableHardwareAcceleration:!0}),_o={...Di,...ae,...Ao,...{layout:{ProjectionNode:To,MeasureLayout:As}}},tr=A(((t,e)=>function(t,{forwardMotionProps:e=!1},n,i){return{...V(t)?Ft:Ot,preloadedFeatures:n,useRender:bt(e),createVisualElement:i,Component:t}}(t,e,_o,Jo)))},6369:function(t){"use strict";t.exports=JSON.parse('{"layout":"fixed","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsSAAALEgHS3X78AAAE5klEQVR42m2UCUxUVxSG7wwMMMMssroVpCJBrbY1mroRsSyzMygUUXAFoVi11lZrq21cUlq7YZVobLU1Vo0NGpdoqHaL2Gq0iYUYqyEa1+IaVECGmXnL18zgmniS93KTe96X/9z331+IZwrtcIEuuCoqqgsrG3ExfebQlhJHjO99R6zvQ3e8f7YnqXPEjMxLUcGeTEF4kSBMPL/Qdj9C5PXuyLWa5MN5cd6uGemtOI2obouKywI2kyrbzdIpV88HZUVFdRFCoFn+8LunYZrge2rujWhXnG9TTgSUDbqlHl7/DXnxXnW8DiUrAjkzDDVHD3YTqtME9lhfQ3H6vZTQRE+UdsMqh7cYnD389S4T5OqRPAleeVFWEzl6mcI+95nSv42l9mMUJD7ApkWxGRXJEQkOk3yhoH9bWpDxUGm3XFe8f6NDDzkGAjajSq5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Gawm6WWSamttkdh+/xMfPlGtDve95HNrNzI1sGbr3SqJ3cd5XpjPVsWncCuD92qdkdMYHN+qjfpGWXPSW2NEMtDmyVD78fk9/IVjtPxRba+fefExCt1GWHU2mP95QWD7vZ70t8t5FH9D6/cF9kYlgBTAAAAAElFTkSuQmCC"},"images":{"fallback":{"src":"/blog/static/94eb39c58147f048d2b7747e975eab86/cf150/icon.png","srcSet":"/blog/static/94eb39c58147f048d2b7747e975eab86/cf150/icon.png 35w,\\n/blog/static/94eb39c58147f048d2b7747e975eab86/145fc/icon.png 70w","sizes":"35px"},"sources":[{"srcSet":"/blog/static/94eb39c58147f048d2b7747e975eab86/f721d/icon.avif 35w,\\n/blog/static/94eb39c58147f048d2b7747e975eab86/821ec/icon.avif 70w","type":"image/avif","sizes":"35px"},{"srcSet":"/blog/static/94eb39c58147f048d2b7747e975eab86/991ad/icon.webp 35w,\\n/blog/static/94eb39c58147f048d2b7747e975eab86/55c64/icon.webp 70w","type":"image/webp","sizes":"35px"}]},"width":35,"height":35}')}}]); -//# sourceMappingURL=commons-288422f67b1a4d800aad.js.map \ No newline at end of file +(self.webpackChunkgatsby_blog=self.webpackChunkgatsby_blog||[]).push([[351],{5787:function(t){"use strict";const e=/[\p{Lu}]/u,n=/[\p{Ll}]/u,i=/^[\p{Lu}](?![\p{Lu}])/gu,s=/([\p{Alpha}\p{N}_]|$)/u,o=/[_.\- ]+/,r=new RegExp("^"+o.source),a=new RegExp(o.source+s.source,"gu"),l=new RegExp("\\d+"+s.source,"gu"),c=(t,s)=>{if("string"!=typeof t&&!Array.isArray(t))throw new TypeError("Expected the input to be `string | string[]`");if(s={pascalCase:!1,preserveConsecutiveUppercase:!1,...s},0===(t=Array.isArray(t)?t.map((t=>t.trim())).filter((t=>t.length)).join("-"):t.trim()).length)return"";const o=!1===s.locale?t=>t.toLowerCase():t=>t.toLocaleLowerCase(s.locale),c=!1===s.locale?t=>t.toUpperCase():t=>t.toLocaleUpperCase(s.locale);if(1===t.length)return s.pascalCase?c(t):o(t);return t!==o(t)&&(t=((t,i,s)=>{let o=!1,r=!1,a=!1;for(let l=0;l(i.lastIndex=0,t.replace(i,(t=>e(t)))))(t,o):o(t),s.pascalCase&&(t=c(t.charAt(0))+t.slice(1)),((t,e)=>(a.lastIndex=0,l.lastIndex=0,t.replace(a,((t,n)=>e(n))).replace(l,(t=>e(t)))))(t,c)};t.exports=c,t.exports.default=c},8738:function(t,e,n){"use strict";n.d(e,{L:function(){return m},M:function(){return P},P:function(){return w},S:function(){return U},_:function(){return a},a:function(){return r},b:function(){return u},g:function(){return h},h:function(){return l}});var i=n(3236),s=(n(5787),n(507)),o=n.n(s);function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(s[n]=t[n]);return s}const l=()=>"undefined"!=typeof HTMLImageElement&&"loading"in HTMLImageElement.prototype;function c(t,e,n){const i={};let s="gatsby-image-wrapper";return"fixed"===n?(i.width=t,i.height=e):"constrained"===n&&(s="gatsby-image-wrapper gatsby-image-wrapper-constrained"),{className:s,"data-gatsby-image-wrapper":"",style:i}}function u(t,e,n,i,s){return void 0===s&&(s={}),r({},n,{loading:i,shouldLoad:t,"data-main-image":"",style:r({},s,{opacity:e?1:0})})}function h(t,e,n,i,s,o,a,l){const c={};o&&(c.backgroundColor=o,"fixed"===n?(c.width=i,c.height=s,c.backgroundColor=o,c.position="relative"):("constrained"===n||"fullWidth"===n)&&(c.position="absolute",c.top=0,c.left=0,c.bottom=0,c.right=0)),a&&(c.objectFit=a),l&&(c.objectPosition=l);const u=r({},t,{"aria-hidden":!0,"data-placeholder-image":"",style:r({opacity:e?0:1,transition:"opacity 500ms linear"},c)});return u}const d=["children"],p=function(t){let{layout:e,width:n,height:s}=t;return"fullWidth"===e?i.createElement("div",{"aria-hidden":!0,style:{paddingTop:s/n*100+"%"}}):"constrained"===e?i.createElement("div",{style:{maxWidth:n,display:"block"}},i.createElement("img",{alt:"",role:"presentation","aria-hidden":"true",src:"data:image/svg+xml;charset=utf-8,%3Csvg%20height='"+s+"'%20width='"+n+"'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%3E%3C/svg%3E",style:{maxWidth:"100%",display:"block",position:"static"}})):null},m=function(t){let{children:e}=t,n=a(t,d);return i.createElement(i.Fragment,null,i.createElement(p,r({},n)),e,null)},f=["src","srcSet","loading","alt","shouldLoad"],g=["fallback","sources","shouldLoad"],y=function(t){let{src:e,srcSet:n,loading:s,alt:o="",shouldLoad:l}=t,c=a(t,f);return i.createElement("img",r({},c,{decoding:"async",loading:s,src:l?e:void 0,"data-src":l?void 0:e,srcSet:l?n:void 0,"data-srcset":l?void 0:n,alt:o}))},v=function(t){let{fallback:e,sources:n=[],shouldLoad:s=!0}=t,o=a(t,g);const l=o.sizes||(null==e?void 0:e.sizes),c=i.createElement(y,r({},o,e,{sizes:l,shouldLoad:s}));return n.length?i.createElement("picture",null,n.map((t=>{let{media:e,srcSet:n,type:o}=t;return i.createElement("source",{key:e+"-"+o+"-"+n,type:o,media:e,srcSet:s?n:void 0,"data-srcset":s?void 0:n,sizes:l})})),c):c};var x;y.propTypes={src:s.string.isRequired,alt:s.string.isRequired,sizes:s.string,srcSet:s.string,shouldLoad:s.bool},v.displayName="Picture",v.propTypes={alt:s.string.isRequired,shouldLoad:s.bool,fallback:s.exact({src:s.string.isRequired,srcSet:s.string,sizes:s.string}),sources:s.arrayOf(s.oneOfType([s.exact({media:s.string.isRequired,type:s.string,sizes:s.string,srcSet:s.string.isRequired}),s.exact({media:s.string,type:s.string.isRequired,sizes:s.string,srcSet:s.string.isRequired})]))};const b=["fallback"],w=function(t){let{fallback:e}=t,n=a(t,b);return e?i.createElement(v,r({},n,{fallback:{src:e},"aria-hidden":!0,alt:""})):i.createElement("div",r({},n))};w.displayName="Placeholder",w.propTypes={fallback:s.string,sources:null==(x=v.propTypes)?void 0:x.sources,alt:function(t,e,n){return t[e]?new Error("Invalid prop `"+e+"` supplied to `"+n+"`. Validation failed."):null}};const P=function(t){return i.createElement(i.Fragment,null,i.createElement(v,r({},t)),i.createElement("noscript",null,i.createElement(v,r({},t,{shouldLoad:!0}))))};P.displayName="MainImage",P.propTypes=v.propTypes;const E=["as","className","class","style","image","loading","imgClassName","imgStyle","backgroundColor","objectFit","objectPosition"],S=["style","className"],T=t=>t.replace(/\n/g,""),A=function(t,e,n){for(var i=arguments.length,s=new Array(i>3?i-3:0),r=3;rJSON.stringify(s.images)),[s.images]);d&&(h=d);const A=function(t,e,n){let i="";return"fullWidth"===t&&(i=''),"constrained"===t&&(i='
"),i}(x,y,v);return(0,i.useEffect)((()=>{M||(M=n.e(856).then(n.bind(n,4856)).then((t=>{let{renderImageToString:e,swapPlaceholderImage:n}=t;return L=e,{renderImageToString:e,swapPlaceholderImage:n}})));const t=S.current.querySelector("[data-gatsby-image-ssr]");if(t&&l())return t.complete?(null==p||p({wasCached:!0}),null==m||m({wasCached:!0}),setTimeout((()=>{t.removeAttribute("data-gatsby-image-ssr")}),0)):(null==p||p({wasCached:!0}),t.addEventListener("load",(function e(){t.removeEventListener("load",e),null==m||m({wasCached:!0}),setTimeout((()=>{t.removeAttribute("data-gatsby-image-ssr")}),0)}))),void D.add(T);if(L&&D.has(T))return;let e,i;return M.then((t=>{let{renderImageToString:n,swapPlaceholderImage:a}=t;S.current&&(S.current.innerHTML=n(r({isLoading:!0,isLoaded:D.has(T),image:s},g)),D.has(T)||(e=requestAnimationFrame((()=>{S.current&&(i=a(S.current,T,D,o,p,m,f))}))))})),()=>{e&&cancelAnimationFrame(e),i&&i()}}),[s]),(0,i.useLayoutEffect)((()=>{D.has(T)&&L&&(S.current.innerHTML=L(r({isLoading:D.has(T),isLoaded:D.has(T),image:s},g)),null==p||p({wasCached:!0}),null==m||m({wasCached:!0}))}),[s]),(0,i.createElement)(e,r({},E,{style:r({},w,o,{backgroundColor:u}),className:P+(h?" "+h:""),ref:S,dangerouslySetInnerHTML:{__html:A},suppressHydrationWarning:!0}))},R=(0,i.memo)((function(t){return t.image?(0,i.createElement)(j,t):null}));R.propTypes=C,R.displayName="GatsbyImage";const B=["src","__imageData","__error","width","height","aspectRatio","tracedSVGOptions","placeholder","formats","quality","transformOptions","jpgOptions","pngOptions","webpOptions","avifOptions","blurredOptions","breakpoints","outputPixelDensities"];function F(t){return function(e){let{src:n,__imageData:s,__error:o}=e,l=a(e,B);return o&&console.warn(o),s?i.createElement(t,r({image:s},l)):(console.warn("Image not loaded",n),null)}}const O=F((function(t){let{as:e="div",className:n,class:s,style:o,image:l,loading:d="lazy",imgClassName:p,imgStyle:f,backgroundColor:g,objectFit:y,objectPosition:v}=t,x=a(t,E);if(!l)return console.warn("[gatsby-plugin-image] Missing image prop"),null;s&&(n=s),f=r({objectFit:y,objectPosition:v,backgroundColor:g},f);const{width:b,height:A,layout:C,images:V,placeholder:k,backgroundColor:D}=l,M=c(b,A,C),{style:L,className:j}=M,R=a(M,S),B={fallback:void 0,sources:[]};return V.fallback&&(B.fallback=r({},V.fallback,{srcSet:V.fallback.srcSet?T(V.fallback.srcSet):void 0})),V.sources&&(B.sources=V.sources.map((t=>r({},t,{srcSet:T(t.srcSet)})))),i.createElement(e,r({},R,{style:r({},L,o,{backgroundColor:g}),className:j+(n?" "+n:"")}),i.createElement(m,{layout:C,width:b,height:A},i.createElement(w,r({},h(k,!1,C,b,A,D,y,v))),i.createElement(P,r({"data-gatsby-image-ssr":"",className:p},x,u("eager"===d,!1,B,d,f)))))})),I=function(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s{if(void 0!==t.layout&&!N.has(t.layout))return new Error("Invalid value "+t.layout+'" provided for prop "layout". Defaulting to "constrained". Valid values are "fixed", "fullWidth" or "constrained".')}};O.displayName="StaticImage",O.propTypes=W;const U=F(R);U.displayName="StaticImage",U.propTypes=W},354:function(t,e,n){"use strict";n.d(e,{Z:function(){return v}});var i=n(3236),s=n(2143);function o(t){var e,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;ei.createElement(c.M,{key:e+n},i.createElement(u.E.div,{initial:{opacity:1},animate:{opacity:1},exit:{opacity:0},className:"split-text-module--container--38c69"},i.createElement("div",{className:"split-text-module--wrapper--636e1"},i.createElement(u.E.div,{initial:{y:"100%"},animate:"visible",variants:{visible:t=>({y:0,transition:{delay:.1*t}})},className:l("split-text-module--motion-div--9a9fd"," "===t&&"split-text-module--spacing--7be47"),custom:n},t))))))}function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{0:t,1:e}=(0,i.useState)(!0),{0:o,1:r}=(0,i.useState)(0);return(0,i.useEffect)((()=>{const t=f()((()=>{const t=window.scrollY;e(o>t),r(t)}),300);return"undefined"!=typeof window&&(r(window.scrollY),window.addEventListener("scroll",t)),()=>{"undefined"!=typeof window&&window.removeEventListener("scroll",t)}}),[o]),i.createElement("nav",{className:l("navigation-module--wrapper--2382f",!t&&"navigation-module--hide--a9821")},i.createElement("ul",{className:"navigation-module--inner--e3a96"},i.createElement("li",null,i.createElement(s.Link,{to:"/home/page/1"},i.createElement(g.S,{className:"navigation-module--logo--ffe4d",layout:"fixed",formats:["auto","webp","avif"],placeholder:"blurred",src:"../../images/icon.png",width:35,height:35,quality:95,alt:"logo",__imageData:n(5742)}),i.createElement(h,{words:"Suu3 Blog"}))),i.createElement("li",null,i.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/suu3"},i.createElement(p,{className:"navigation-module--icon--bf065"})))))};var v=t=>{let{location:e,children:n}=t;const s="/blog"===e.pathname;return i.createElement("div",{className:"global-wrapper","data-is-root-path":s},i.createElement("header",{className:"global-header"},i.createElement(y,null)),n,i.createElement("footer",null,"© ",(new Date).getFullYear(),", Built with"," ",i.createElement("a",{href:"https://www.gatsbyjs.com"},"Gatsby")))}},3283:function(t,e,n){"use strict";var i=n(3236),s=n(2143);e.Z=t=>{var e,n,o;let{description:r,title:a,children:l}=t;const{site:c}=(0,s.useStaticQuery)("2841359383"),u=r||c.siteMetadata.description,h=null===(e=c.siteMetadata)||void 0===e?void 0:e.title;return i.createElement(i.Fragment,null,i.createElement("title",null,h?a+" | "+h:a),i.createElement("meta",{name:"description",content:u}),i.createElement("meta",{property:"og:title",content:a}),i.createElement("meta",{property:"og:description",content:u}),i.createElement("meta",{property:"og:type",content:"website"}),i.createElement("meta",{name:"twitter:card",content:"summary"}),i.createElement("meta",{name:"twitter:creator",content:(null===(n=c.siteMetadata)||void 0===n||null===(o=n.social)||void 0===o?void 0:o.twitter)||""}),i.createElement("meta",{name:"twitter:title",content:a}),i.createElement("meta",{name:"twitter:description",content:u}),l)}},4396:function(t,e,n){var i=n(9165).Symbol;t.exports=i},732:function(t,e,n){var i=n(4396),s=n(1239),o=n(7058),r=i?i.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":r&&r in Object(t)?s(t):o(t)}},3124:function(t,e,n){var i=n(2996),s=/^\s+/;t.exports=function(t){return t?t.slice(0,i(t)+1).replace(s,""):t}},6476:function(t,e,n){var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=i},1239:function(t,e,n){var i=n(4396),s=Object.prototype,o=s.hasOwnProperty,r=s.toString,a=i?i.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var i=!0}catch(l){}var s=r.call(t);return i&&(e?t[a]=n:delete t[a]),s}},7058:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},9165:function(t,e,n){var i=n(6476),s="object"==typeof self&&self&&self.Object===Object&&self,o=i||s||Function("return this")();t.exports=o},2996:function(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},6292:function(t,e,n){var i=n(6838),s=n(6668),o=n(2448),r=Math.max,a=Math.min;t.exports=function(t,e,n){var l,c,u,h,d,p,m=0,f=!1,g=!1,y=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function v(e){var n=l,i=c;return l=c=void 0,m=e,h=t.apply(i,n)}function x(t){var n=t-p;return void 0===p||n>=e||n<0||g&&t-m>=u}function b(){var t=s();if(x(t))return w(t);d=setTimeout(b,function(t){var n=e-(t-p);return g?a(n,u-(t-m)):n}(t))}function w(t){return d=void 0,y&&l?v(t):(l=c=void 0,h)}function P(){var t=s(),n=x(t);if(l=arguments,c=this,p=t,n){if(void 0===d)return function(t){return m=t,d=setTimeout(b,e),f?v(t):h}(p);if(g)return clearTimeout(d),d=setTimeout(b,e),v(p)}return void 0===d&&(d=setTimeout(b,e)),h}return e=o(e)||0,i(n)&&(f=!!n.leading,u=(g="maxWait"in n)?r(o(n.maxWait)||0,e):u,y="trailing"in n?!!n.trailing:y),P.cancel=function(){void 0!==d&&clearTimeout(d),m=0,l=p=c=d=void 0},P.flush=function(){return void 0===d?h:w(s())},P}},6838:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},5073:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},6764:function(t,e,n){var i=n(732),s=n(5073);t.exports=function(t){return"symbol"==typeof t||s(t)&&"[object Symbol]"==i(t)}},6668:function(t,e,n){var i=n(9165);t.exports=function(){return i.Date.now()}},8209:function(t,e,n){var i=n(6292),s=n(6838);t.exports=function(t,e,n){var o=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return s(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),i(t,e,{leading:o,maxWait:e,trailing:r})}},2448:function(t,e,n){var i=n(3124),s=n(6838),o=n(6764),r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(s(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=s(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=i(t);var n=a.test(t);return n||l.test(t)?c(t.slice(2),n?2:8):r.test(t)?NaN:+t}},7538:function(t,e,n){"use strict";n.d(e,{E:function(){return tr}});var i=n(3236);const s=(0,i.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),o=(0,i.createContext)({});var r=n(8203),a=n(7337);const l=(0,i.createContext)({strict:!1});function c(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function u(t){return"string"==typeof t||Array.isArray(t)}function h(t){return"object"==typeof t&&"function"==typeof t.start}const d=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],p=["initial",...d];function m(t){return h(t.animate)||p.some((e=>u(t[e])))}function f(t){return Boolean(m(t)||t.variants)}function g(t){const{initial:e,animate:n}=function(t,e){if(m(t)){const{initial:e,animate:n}=t;return{initial:!1===e||u(e)?e:void 0,animate:u(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,(0,i.useContext)(o));return(0,i.useMemo)((()=>({initial:e,animate:n})),[y(e),y(n)])}function y(t){return Array.isArray(t)?t.join(" "):t}const v={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"]},x={};for(const nr in v)x[nr]={isEnabled:t=>v[nr].some((e=>!!t[e]))};var b=n(4786),w=n(7658);const P=(0,i.createContext)({}),E=Symbol.for("motionComponentSymbol");function S({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:u,Component:h}){t&&function(t){for(const e in t)x[e]={...x[e],...t[e]}}(t);const d=(0,i.forwardRef)((function(d,p){let m;const f={...(0,i.useContext)(s),...d,layoutId:T(d)},{isStatic:y}=f,v=g(d),x=u(d,y);if(!y&&b.j){v.visualElement=function(t,e,n,c){const{visualElement:u}=(0,i.useContext)(o),h=(0,i.useContext)(l),d=(0,i.useContext)(r.O),p=(0,i.useContext)(s).reducedMotion,m=(0,i.useRef)();c=c||h.renderer,!m.current&&c&&(m.current=c(t,{visualState:e,parent:u,props:n,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:p}));const f=m.current;(0,i.useInsertionEffect)((()=>{f&&f.update(n,d)}));const g=(0,i.useRef)(Boolean(window.HandoffAppearAnimations));return(0,a.L)((()=>{f&&(f.render(),g.current&&f.animationState&&f.animationState.animateChanges())})),(0,i.useEffect)((()=>{f&&(f.updateFeatures(),!g.current&&f.animationState&&f.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,g.current=!1)})),f}(h,x,f,e);const n=(0,i.useContext)(P),c=(0,i.useContext)(l).strict;v.visualElement&&(m=v.visualElement.loadFeatures(f,c,t,n))}return i.createElement(o.Provider,{value:v},m&&v.visualElement?i.createElement(m,{visualElement:v.visualElement,...f}):null,n(h,d,function(t,e,n){return(0,i.useCallback)((i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):c(n)&&(n.current=i))}),[e])}(x,v.visualElement,p),x,y,v.visualElement))}));return d[E]=h,d}function T({layoutId:t}){const e=(0,i.useContext)(w.p).id;return e&&void 0!==t?e+"-"+t:t}function A(t){function e(e,n={}){return S(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const C=["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 V(t){return"string"==typeof t&&!t.includes("-")&&!!(C.indexOf(t)>-1||/[A-Z]/.test(t))}const k={};const D=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],M=new Set(D);function L(t,{layout:e,layoutId:n}){return M.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!k[t]||"opacity"===t)}const j=t=>Boolean(t&&t.getVelocity),R={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},B=D.length;const F=t=>e=>"string"==typeof e&&e.startsWith(t),O=F("--"),I=F("var(--"),N=(t,e)=>e&&"number"==typeof t?e.transform(t):t,W=(t,e,n)=>Math.min(Math.max(n,t),e),U={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},z={...U,transform:t=>W(0,1,t)},H={...U,default:1},G=t=>Math.round(1e5*t)/1e5,Y=/(-)?([\d]*\.?[\d])+/g,X=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Z=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function q(t){return"string"==typeof t}const $=t=>({test:e=>q(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),K=$("deg"),Q=$("%"),J=$("px"),_=$("vh"),tt=$("vw"),et={...Q,parse:t=>Q.parse(t)/100,transform:t=>Q.transform(100*t)},nt={...U,transform:Math.round},it={borderWidth:J,borderTopWidth:J,borderRightWidth:J,borderBottomWidth:J,borderLeftWidth:J,borderRadius:J,radius:J,borderTopLeftRadius:J,borderTopRightRadius:J,borderBottomRightRadius:J,borderBottomLeftRadius:J,width:J,maxWidth:J,height:J,maxHeight:J,size:J,top:J,right:J,bottom:J,left:J,padding:J,paddingTop:J,paddingRight:J,paddingBottom:J,paddingLeft:J,margin:J,marginTop:J,marginRight:J,marginBottom:J,marginLeft:J,rotate:K,rotateX:K,rotateY:K,rotateZ:K,scale:H,scaleX:H,scaleY:H,scaleZ:H,skew:K,skewX:K,skewY:K,distance:J,translateX:J,translateY:J,translateZ:J,x:J,y:J,z:J,perspective:J,transformPerspective:J,opacity:z,originX:et,originY:et,originZ:J,zIndex:nt,fillOpacity:z,strokeOpacity:z,numOctaves:nt};function st(t,e,n,i){const{style:s,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const h in e){const t=e[h];if(O(h)){o[h]=t;continue}const n=it[h],i=N(t,n);if(M.has(h)){if(l=!0,r[h]=i,!u)continue;t!==(n.default||0)&&(u=!1)}else h.startsWith("origin")?(c=!0,a[h]=i):s[h]=i}if(e.transform||(l||i?s.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},i,s){let o="";for(let r=0;r({style:{},transform:{},transformOrigin:{},vars:{}});function rt(t,e,n){for(const i in e)j(e[i])||L(i,n)||(t[i]=e[i])}function at(t,e,n){const s={};return rt(s,t.style||{},t),Object.assign(s,function({transformTemplate:t},e,n){return(0,i.useMemo)((()=>{const i=ot();return st(i,e,{enableHardwareAcceleration:!n},t),Object.assign({},i.vars,i.style)}),[e])}(t,e,n)),t.transformValues?t.transformValues(s):s}function lt(t,e,n){const i={},s=at(t,e,n);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=s,i}const ct=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function ut(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||ct.has(t)}let ht=t=>!ut(t);try{(dt=require("@emotion/is-prop-valid").default)&&(ht=t=>t.startsWith("on")?!ut(t):dt(t))}catch(er){}var dt;function pt(t,e,n){return"string"==typeof t?t:J.transform(e+n*t)}const mt={offset:"stroke-dashoffset",array:"stroke-dasharray"},ft={offset:"strokeDashoffset",array:"strokeDasharray"};function gt(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,h,d){if(st(t,c,u,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:m,dimensions:f}=t;p.transform&&(f&&(m.transform=p.transform),delete p.transform),f&&(void 0!==s||void 0!==o||m.transform)&&(m.transformOrigin=function(t,e,n){return`${pt(e,t.x,t.width)} ${pt(n,t.y,t.height)}`}(f,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(p.x=e),void 0!==n&&(p.y=n),void 0!==i&&(p.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?mt:ft;t[o.offset]=J.transform(-i);const r=J.transform(e),a=J.transform(n);t[o.array]=`${r} ${a}`}(p,r,a,l,!1)}const yt=()=>({...ot(),attrs:{}}),vt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function xt(t,e,n,s){const o=(0,i.useMemo)((()=>{const n=yt();return gt(n,e,{enableHardwareAcceleration:!1},vt(s),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};rt(e,t.style,t),o.style={...e,...o.style}}return o}function bt(t=!1){return(e,n,s,{latestValues:o},r)=>{const a=(V(e)?xt:lt)(n,o,r,e),l=function(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(ht(s)||!0===n&&ut(s)||!e&&!ut(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}(n,"string"==typeof e,t),c={...l,...a,ref:s},{children:u}=n,h=(0,i.useMemo)((()=>j(u)?u.get():u),[u]);return(0,i.createElement)(e,{...c,children:h})}}const wt=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Pt(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const o in n)t.style.setProperty(o,n[o])}const Et=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function St(t,e,n,i){Pt(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(Et.has(s)?s:wt(s),e.attrs[s])}function Tt(t,e){const{style:n}=t,i={};for(const s in n)(j(n[s])||e.style&&j(e.style[s])||L(s,t))&&(i[s]=n[s]);return i}function At(t,e){const n=Tt(t,e);for(const i in t)if(j(t[i])||j(e[i])){n[-1!==D.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]}return n}function Ct(t,e,n,i={},s={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),e}var Vt=n(8515);const kt=t=>Array.isArray(t),Dt=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),Mt=t=>kt(t)?t[t.length-1]||0:t;function Lt(t){const e=j(t)?t.get():t;return Dt(e)?e.toValue():e}const jt=t=>(e,n)=>{const s=(0,i.useContext)(o),a=(0,i.useContext)(r.O),l=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,s,o){const r={latestValues:Rt(i,s,o,t),renderState:e()};return n&&(r.mount=t=>n(i,t,r)),r}(t,e,s,a);return n?l():(0,Vt.h)(l)};function Rt(t,e,n,i){const s={},o=i(t,{});for(const h in o)s[h]=Lt(o[h]);let{initial:r,animate:a}=t;const l=m(t),c=f(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===r;const d=u?a:r;if(d&&"boolean"!=typeof d&&!h(d)){(Array.isArray(d)?d:[d]).forEach((e=>{const n=Ct(t,e);if(!n)return;const{transitionEnd:i,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(s[t]=e)}for(const t in i)s[t]=i[t]}))}return s}var Bt=n(77);const Ft={useVisualState:jt({scrapeMotionValuesFromProps:At,createRenderState:yt,onMount:(t,e,{renderState:n,latestValues:i})=>{Bt.Wi.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}})),Bt.Wi.render((()=>{gt(n,i,{enableHardwareAcceleration:!1},vt(e.tagName),t.transformTemplate),St(e,n)}))}})},Ot={useVisualState:jt({scrapeMotionValuesFromProps:Tt,createRenderState:ot})};function It(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Nt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Wt(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Ut=t=>e=>Nt(e)&&t(e,Wt(e));function zt(t,e,n,i){return It(t,e,Ut(n),i)}const Ht=(t,e)=>n=>e(t(n)),Gt=(...t)=>t.reduce(Ht);function Yt(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Xt=Yt("dragHorizontal"),Zt=Yt("dragVertical");function qt(t){let e=!1;if("y"===t)e=Zt();else if("x"===t)e=Xt();else{const t=Xt(),n=Zt();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function $t(){const t=qt(!0);return!t||(t(),!1)}class Kt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Qt(t,e){const n="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End");return zt(t.current,n,((n,s)=>{if("touch"===n.type||$t())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[i]&&Bt.Wi.update((()=>o[i](n,s)))}),{passive:!t.getProps()[i]})}const Jt=(t,e)=>!!e&&(t===e||Jt(t,e.parentElement));var _t=n(6404);function te(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Wt(n))}const ee=new WeakMap,ne=new WeakMap,ie=t=>{const e=ee.get(t.target);e&&e(t)},se=t=>{t.forEach(ie)};function oe(t,e,n){const i=function({root:t,...e}){const n=t||document;ne.has(n)||ne.set(n,{});const i=ne.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(se,{root:t,...e})),i[s]}(e);return ee.set(t,n),i.observe(t),()=>{ee.delete(t),i.unobserve(t)}}const re={some:0,all:1};const ae={inView:{Feature:class extends Kt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:re[i]};return oe(this.node.current,o,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Kt{constructor(){super(...arguments),this.removeStartListeners=_t.Z,this.removeEndListeners=_t.Z,this.removeAccessibleListeners=_t.Z,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),i=zt(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i}=this.node.getProps();Bt.Wi.update((()=>{Jt(this.node.current,t.target)?n&&n(t,e):i&&i(t,e)}))}),{passive:!(n.onTap||n.onPointerUp)}),s=zt(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Gt(i,s),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=It(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=It(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&te("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&Bt.Wi.update((()=>n(t,e)))}))})),te("down",((t,e)=>{this.startPress(t,e)}))})),e=It(this.node.current,"blur",(()=>{this.isPressing&&te("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=Gt(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Bt.Wi.update((()=>n(t,e)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!$t()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Bt.Wi.update((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=zt(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=It(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Gt(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Kt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Gt(It(this.node.current,"focus",(()=>this.onFocus())),It(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Kt{mount(){this.unmount=Gt(Qt(this.node,!0),Qt(this.node,!1))}unmount(){}}}};function le(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;ie[n]=t.get())),e}(t),function(t){const e={};return t.values.forEach(((t,n)=>e[n]=t.getVelocity())),e}(t))}const ue="data-"+wt("framerAppearId");var he=n(8243);const de=t=>1e3*t,pe=t=>t/1e3,me=!1,fe=t=>Array.isArray(t)&&"number"==typeof t[0];function ge(t){return Boolean(!t||"string"==typeof t&&ve[t]||fe(t)||Array.isArray(t)&&t.every(ge))}const ye=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,ve={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ye([0,.65,.55,1]),circOut:ye([.55,0,1,.45]),backIn:ye([.31,.01,.66,-.59]),backOut:ye([.33,1.53,.69,.99])};function xe(t){if(t)return fe(t)?ye(t):Array.isArray(t)?t.map(xe):ve[t]}const be=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,we=1e-7,Pe=12;function Ee(t,e,n,i){if(t===e&&n===i)return _t.Z;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=be(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>we&&++a0===t||1===t?t:be(s(t),e,i)}const Se=Ee(.42,0,1,1),Te=Ee(0,0,.58,1),Ae=Ee(.42,0,.58,1),Ce=t=>Array.isArray(t)&&"number"!=typeof t[0],Ve=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ke=t=>e=>1-t(1-e),De=t=>1-Math.sin(Math.acos(t)),Me=ke(De),Le=Ve(Me),je=Ee(.33,1.53,.69,.99),Re=ke(je),Be=Ve(Re),Fe={linear:_t.Z,easeIn:Se,easeInOut:Ae,easeOut:Te,circIn:De,circInOut:Le,circOut:Me,backIn:Re,backInOut:Be,backOut:je,anticipate:t=>(t*=2)<1?.5*Re(t):.5*(2-Math.pow(2,-10*(t-1)))},Oe=t=>{if(Array.isArray(t)){(0,he.k)(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,s]=t;return Ee(e,n,i,s)}return"string"==typeof t?((0,he.k)(void 0!==Fe[t],`Invalid easing type '${t}'`),Fe[t]):t},Ie=(t,e)=>n=>Boolean(q(n)&&Z.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ne=(t,e,n)=>i=>{if(!q(i))return i;const[s,o,r,a]=i.match(Y);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},We={...U,transform:t=>Math.round((t=>W(0,255,t))(t))},Ue={test:Ie("rgb","red"),parse:Ne("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+We.transform(t)+", "+We.transform(e)+", "+We.transform(n)+", "+G(z.transform(i))+")"};const ze={test:Ie("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Ue.transform},He={test:Ie("hsl","hue"),parse:Ne("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Q.transform(G(e))+", "+Q.transform(G(n))+", "+G(z.transform(i))+")"},Ge={test:t=>Ue.test(t)||ze.test(t)||He.test(t),parse:t=>Ue.test(t)?Ue.parse(t):He.test(t)?He.parse(t):ze.parse(t),transform:t=>q(t)?t:t.hasOwnProperty("red")?Ue.transform(t):He.transform(t)},Ye=(t,e,n)=>-n*t+n*e+t;function Xe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}const Ze=(t,e,n)=>{const i=t*t;return Math.sqrt(Math.max(0,n*(e*e-i)+i))},qe=[ze,Ue,He];function $e(t){const e=(n=t,qe.find((t=>t.test(n))));var n;(0,he.k)(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`);let i=e.parse(t);return e===He&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Xe(a,i,t+1/3),o=Xe(a,i,t),r=Xe(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const Ke=(t,e)=>{const n=$e(t),i=$e(e),s={...n};return t=>(s.red=Ze(n.red,i.red,t),s.green=Ze(n.green,i.green,t),s.blue=Ze(n.blue,i.blue,t),s.alpha=Ye(n.alpha,i.alpha,t),Ue.transform(s))};const Qe={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:_t.Z},Je={regex:X,countKey:"Colors",token:"${c}",parse:Ge.parse},_e={regex:Y,countKey:"Numbers",token:"${n}",parse:U.parse};function tn(t,{regex:e,countKey:n,token:i,parse:s}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,i),t.values.push(...o.map(s)))}function en(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&tn(n,Qe),tn(n,Je),tn(n,_e),n}function nn(t){return en(t).values}function sn(t){const{values:e,numColors:n,numVars:i,tokenised:s}=en(t),o=e.length;return t=>{let e=s;for(let s=0;s"number"==typeof t?0:t;const rn={test:function(t){var e,n;return isNaN(t)&&q(t)&&((null===(e=t.match(Y))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(X))||void 0===n?void 0:n.length)||0)>0},parse:nn,createTransformer:sn,getAnimatableNone:function(t){const e=nn(t);return sn(t)(e.map(on))}},an=(t,e)=>n=>`${n>0?e:t}`;function ln(t,e){return"number"==typeof t?n=>Ye(t,e,n):Ge.test(t)?Ke(t,e):t.startsWith("var(")?an(t,e):hn(t,e)}const cn=(t,e)=>{const n=[...t],i=n.length,s=t.map(((t,n)=>ln(t,e[n])));return t=>{for(let e=0;e{const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=ln(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}},hn=(t,e)=>{const n=rn.createTransformer(e),i=en(t),s=en(e);return i.numVars===s.numVars&&i.numColors===s.numColors&&i.numNumbers>=s.numNumbers?Gt(cn(i.values,s.values),n):((0,he.K)(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),an(t,e))},dn=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},pn=(t,e)=>n=>Ye(t,e,n);function mn(t,e,n){const i=[],s=n||("number"==typeof(o=t[0])?pn:"string"==typeof o?Ge.test(o)?Ke:hn:Array.isArray(o)?cn:"object"==typeof o?un:pn);var o;const r=t.length-1;for(let a=0;ae[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=mn(e,i,s),a=r.length,l=e=>{let n=0;if(a>1)for(;nl(W(t[0],t[o-1],e)):l}function gn(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=dn(0,e,i);t.push(Ye(n,1,s))}}(e,t.length-1),e}function yn({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Ce(i)?i.map(Oe):Oe(i),o={done:!1,value:e[0]},r=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:gn(e),t),a=fn(r,e,{ease:Array.isArray(s)?s:(l=e,c=s,l.map((()=>c||Ae)).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}function vn(t,e){return e?t*(1e3/e):0}const xn=5;function bn(t,e,n){const i=Math.max(e-xn,0);return vn(n-t(i),e-i)}const wn=.001,Pn=.01,En=10,Sn=.05,Tn=1;function An({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let s,o;(0,he.K)(t<=de(En),"Spring duration must be 10 seconds or less");let r=1-e;r=W(Sn,Tn,r),t=W(Pn,En,pe(t)),r<1?(s=e=>{const i=e*r,s=i*t,o=i-n,a=Vn(e,r),l=Math.exp(-s);return wn-o/a*l},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=Vn(Math.pow(e,2),r);return(-s(e)+wn>0?-1:1)*((o-a)*l)/c}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-wn,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let s=1;svoid 0!==t[e]))}function Ln({keyframes:t,restDelta:e,restSpeed:n,...i}){const s=t[0],o=t[t.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:c,velocity:u,duration:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Mn(t,Dn)&&Mn(t,kn)){const n=An(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(i),p=u?-pe(u):0,m=l/(2*Math.sqrt(a*c)),f=o-s,g=pe(Math.sqrt(a/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),m<1){const t=Vn(g,m);v=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)v=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);v=e=>{const n=Math.exp(-m*g*e),i=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:d&&h||null,next:t=>{const i=v(t);if(d)r.done=t>=h;else{let s=p;0!==t&&(s=m<1?bn(v,t,i):0);const a=Math.abs(s)<=n,l=Math.abs(o-i)<=e;r.done=a&&l}return r.value=r.done?o:i,r}}}function jn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?g:n};let b,w;const P=t=>{var e;(e=d.value,void 0!==a&&el)&&(b=t,w=Ln({keyframes:[d.value,p(d.value)],velocity:bn(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return P(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==b||(e=!0,x(t),P(t)),void 0!==b&&t>b?w.next(t-b):(!e&&x(t),d)}}}const Rn=t=>{const e=({timestamp:e})=>t(e);return{start:()=>Bt.Wi.update(e,!0),stop:()=>(0,Bt.Pn)(e),now:()=>Bt.frameData.isProcessing?Bt.frameData.timestamp:performance.now()}},Bn=2e4;function Fn(t){let e=0;let n=t.next(e);for(;!n.done&&e=Bn?1/0:e}const On={decay:jn,inertia:jn,tween:yn,keyframes:yn,spring:Ln};function In({autoplay:t=!0,delay:e=0,driver:n=Rn,keyframes:i,type:s="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:h,...d}){let p,m,f=1,g=!1;const y=()=>{m=new Promise((t=>{p=t}))};let v;y();const x=On[s]||yn;let b;x!==yn&&"number"!=typeof i[0]&&(b=fn([0,100],i,{clamp:!1}),i=[0,100]);const w=x({...d,keyframes:i});let P;"mirror"===a&&(P=x({...d,keyframes:[...i].reverse(),velocity:-(d.velocity||0)}));let E="idle",S=null,T=null,A=null;null===w.calculatedDuration&&o&&(w.calculatedDuration=Fn(w));const{calculatedDuration:C}=w;let V=1/0,k=1/0;null!==C&&(V=C+r,k=V*(o+1)-r);let D=0;const M=t=>{if(null===T)return;f>0&&(T=Math.min(T,t)),f<0&&(T=Math.min(t-k/f,T)),D=null!==S?S:Math.round(t-T)*f;const n=D-e*(f>=0?1:-1),s=f>=0?n<0:n>k;D=Math.max(n,0),"finished"===E&&null===S&&(D=k);let l=D,c=w;if(o){const t=D/V;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,o+1);const i=Boolean(e%2);i&&("reverse"===a?(n=1-n,r&&(n-=r/V)):"mirror"===a&&(c=P));let s=W(0,1,n);D>k&&(s="reverse"===a&&i?1:0),l=s*V}const u=s?{done:!1,value:i[0]}:c.next(l);b&&(u.value=b(u.value));let{done:d}=u;s||null===C||(d=f>=0?D>=k:D<=0);const p=null===S&&("finished"===E||"running"===E&&d);return h&&h(u.value),p&&R(),u},L=()=>{v&&v.stop(),v=void 0},j=()=>{E="idle",L(),p(),y(),T=A=null},R=()=>{E="finished",u&&u(),L(),p()},B=()=>{if(g)return;v||(v=n(M));const t=v.now();l&&l(),null!==S?T=t-S:T&&"finished"!==E||(T=t),"finished"===E&&y(),A=T,S=null,E="running",v.start()};t&&B();const F={then(t,e){return m.then(t,e)},get time(){return pe(D)},set time(t){t=de(t),D=t,null===S&&v&&0!==f?T=v.now()-t/f:S=t},get duration(){const t=null===w.calculatedDuration?Fn(w):w.calculatedDuration;return pe(t)},get speed(){return f},set speed(t){t!==f&&v&&(f=t,F.time=pe(D))},get state(){return E},play:B,pause:()=>{E="paused",S=D},stop:()=>{g=!0,"idle"!==E&&(E="idle",c&&c(),j())},cancel:()=>{null!==A&&M(A),j()},complete:()=>{E="finished"},sample:t=>(T=0,M(t))};return F}const Nn=function(t){let e;return()=>(void 0===e&&(e=t()),e)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),Wn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function Un(t,e,{onUpdate:n,onComplete:i,...s}){if(!(Nn()&&Wn.has(e)&&!s.repeatDelay&&"mirror"!==s.repeatType&&0!==s.damping&&"inertia"!==s.type))return!1;let o,r,a=!1;const l=()=>{r=new Promise((t=>{o=t}))};l();let{keyframes:c,duration:u=300,ease:h,times:d}=s;if(((t,e)=>"spring"===e.type||"backgroundColor"===t||!ge(e.ease))(e,s)){const t=In({...s,repeat:0,delay:0});let e={done:!1,value:c[0]};const n=[];let i=0;for(;!e.done&&i<2e4;)e=t.sample(i),n.push(e.value),i+=10;d=void 0,c=n,u=i-10,h="linear"}const p=function(t,e,n,{delay:i=0,duration:s,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=xe(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:i,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}(t.owner.current,e,c,{...s,duration:u,ease:h,times:d});s.syncStart&&(p.startTime=Bt.frameData.isProcessing?Bt.frameData.timestamp:document.timeline?document.timeline.currentTime:performance.now());const m=()=>p.cancel(),f=()=>{Bt.Wi.update(m),o(),l()};p.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(c,s)),i&&i(),f()};return{then(t,e){return r.then(t,e)},attachTimeline(t){return p.timeline=t,p.onfinish=null,_t.Z},get time(){return pe(p.currentTime||0)},set time(t){p.currentTime=de(t)},get speed(){return p.playbackRate},set speed(t){p.playbackRate=t},get duration(){return pe(u)},play:()=>{a||(p.play(),(0,Bt.Pn)(m))},pause:()=>p.pause(),stop:()=>{if(a=!0,"idle"===p.playState)return;const{currentTime:e}=p;if(e){const n=In({...s,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}f()},complete:()=>p.finish(),cancel:f}}const zn={type:"spring",stiffness:500,damping:25,restSpeed:10},Hn={type:"keyframes",duration:.8},Gn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yn=(t,{keyframes:e})=>e.length>2?Hn:M.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:zn:Gn,Xn=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!rn.test(e)&&"0"!==e||e.startsWith("url("))),Zn=new Set(["brightness","contrast","saturate","opacity"]);function qn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Y)||[];if(!i)return t;const s=n.replace(i,"");let o=Zn.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const $n=/([a-z-]*)\(.*?\)/g,Kn={...rn,getAnimatableNone:t=>{const e=t.match($n);return e?e.map(qn).join(" "):t}},Qn={...it,color:Ge,backgroundColor:Ge,outlineColor:Ge,fill:Ge,stroke:Ge,borderColor:Ge,borderTopColor:Ge,borderRightColor:Ge,borderBottomColor:Ge,borderLeftColor:Ge,filter:Kn,WebkitFilter:Kn},Jn=t=>Qn[t];function _n(t,e){let n=Jn(t);return n!==Kn&&(n=rn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ti=t=>/^0[^.\s]+$/.test(t);function ei(t){return"number"==typeof t?0===t:null!==t?"none"===t||"0"===t||ti(t):void 0}function ni(t,e){return t[e]||t.default||t}const ii=(t,e,n,i={})=>s=>{const o=ni(i,t)||{},r=o.delay||i.delay||0;let{elapsed:a=0}=i;a-=de(r);const l=function(t,e,n,i){const s=Xn(e,n);let o;o=Array.isArray(n)?[...n]:[null,n];const r=void 0!==i.from?i.from:t.get();let a;const l=[];for(let c=0;c{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{s(),o.onComplete&&o.onComplete()}};if(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(o)||(p={...p,...Yn(t,p)}),p.duration&&(p.duration=de(p.duration)),p.repeatDelay&&(p.repeatDelay=de(p.repeatDelay)),!h||!d||me||!1===o.type)return function({keyframes:t,delay:e,onUpdate:n,onComplete:i}){const s=()=>(n&&n(t[t.length-1]),i&&i(),{time:0,speed:1,duration:0,play:_t.Z,pause:_t.Z,stop:_t.Z,then:t=>(t(),Promise.resolve()),cancel:_t.Z,complete:_t.Z});return e?In({keyframes:[0,1],duration:0,delay:e,onComplete:s}):s()}(me?{...p,delay:0}:p);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=Un(e,t,p);if(n)return n}return In(p)};function si(t){return Boolean(j(t)&&t.add)}const oi=t=>/^\-?\d*\.?\d+$/.test(t);function ri(t,e){-1===t.indexOf(e)&&t.push(e)}function ai(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class li{constructor(){this.subscriptions=[]}add(t){return ri(this.subscriptions,t),()=>ai(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s{this.prev=this.current,this.current=t;const{delta:n,timestamp:i}=Bt.frameData;this.lastUpdated!==i&&(this.timeDelta=n,this.lastUpdated=i,Bt.Wi.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Bt.Wi.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new li);const n=this.events[t].add(e);return"change"===t?()=>{n(),Bt.Wi.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return ci.current&&ci.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?vn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function hi(t,e){return new ui(t,e)}const di=t=>e=>e.test(t),pi=[U,J,Q,K,tt,_,{test:t=>"auto"===t,parse:t=>t}],mi=t=>pi.find(di(t)),fi=[...pi,Ge,rn];function gi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,hi(n))}function yi(t,e){const n=ce(t,e);let{transitionEnd:i={},transition:s={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...i};for(const r in o){gi(t,r,Mt(o[r]))}}function vi(t,e){if(!e)return;return(e[t]||e.default||e).from}function xi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function bi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");i&&(o=i);const c=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const h in a){const e=t.getValue(h),i=a[h];if(!e||void 0===i||u&&xi(u,h))continue;const s={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!e.hasAnimated){const n=t.getProps()[ue];n&&(s.elapsed=window.HandoffAppearAnimations(n,h,e,Bt.Wi),s.syncStart=!0)}e.start(ii(h,e,i,t.shouldReduceMotion&&M.has(h)?{type:!1}:s));const r=e.animation;si(l)&&(l.add(h),r.then((()=>l.remove(h)))),c.push(r)}return r&&Promise.all(c).then((()=>{r&&yi(t,r)})),c}function wi(t,e,n={}){const i=ce(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(bi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(Pi).forEach(((t,i)=>{t.notify("AnimationStart",e),r.push(wi(t,e,{...o,delay:n+l(i)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then((()=>e()))}return Promise.all([o(),r(n.delay)])}function Pi(t,e){return t.sortNodePosition(e)}const Ei=[...d].reverse(),Si=d.length;function Ti(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map((e=>wi(t,e,n)));i=Promise.all(s)}else if("string"==typeof e)i=wi(t,e,n);else{const s="function"==typeof e?ce(t,e,n.custom):e;i=Promise.all(bi(t,s,n))}return i.then((()=>t.notify("AnimationComplete",e)))}(t,e,n))))}function Ai(t){let e=Ti(t);const n={animate:Vi(!0),whileInView:Vi(),whileHover:Vi(),whileTap:Vi(),whileDrag:Vi(),whileFocus:Vi(),exit:Vi()};let i=!0;const s=(e,n)=>{const i=ce(t,n);if(i){const{transition:t,transitionEnd:n,...s}=i;e={...e,...s,...n}}return e};function o(o,r){const a=t.getProps(),l=t.getVariantContext(!0)||{},c=[],d=new Set;let p={},m=1/0;for(let e=0;em&&v;const E=Array.isArray(y)?y:[y];let S=E.reduce(s,{});!1===x&&(S={});const{prevResolvedValues:T={}}=g,A={...T,...S},C=t=>{P=!0,d.delete(t),g.needsAnimating[t]=!0};for(const t in A){const e=S[t],n=T[t];p.hasOwnProperty(t)||(e!==n?kt(e)&&kt(n)?!le(e,n)||w?C(t):g.protectedKeys[t]=!0:void 0!==e?C(t):d.add(t):void 0!==e&&d.has(t)?C(t):g.protectedKeys[t]=!0)}g.prevProp=y,g.prevResolvedValues=S,g.isActive&&(p={...p,...S}),i&&t.blockInitialAnimation&&(P=!1),P&&!b&&c.push(...E.map((t=>({animation:t,options:{type:f,...o}}))))}if(d.size){const e={};d.forEach((n=>{const i=t.getBaseTarget(n);void 0!==i&&(e[n]=i)})),c.push({animation:e})}let f=Boolean(c.length);return i&&!1===a.initial&&!t.manuallyAnimateOnMount&&(f=!1),i=!1,f?e(c):Promise.resolve()}return{animateChanges:o,setActive:function(e,i,s){var r;if(n[e].isActive===i)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)})),n[e].isActive=i;const a=o(s,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Ci(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!le(e,t)}function Vi(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let ki=0;const Di={animation:{Feature:class extends Kt{constructor(t){super(t),t.animationState||(t.animationState=Ai(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),h(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends Kt{constructor(){super(...arguments),this.id=ki++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&s.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Mi=(t,e)=>Math.abs(t-e);class Li{constructor(t,e,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Bi(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=Mi(t.x,e.x),i=Mi(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=Bt.frameData;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=ji(e,this.transformPagePoint),Bt.Wi.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:i}=this.handlers,s=Bi("pointercancel"===t.type?this.lastMoveEventInfo:ji(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,s),i&&i(t,s)},!Nt(t))return;this.handlers=e,this.transformPagePoint=n;const i=ji(Wt(t),this.transformPagePoint),{point:s}=i,{timestamp:o}=Bt.frameData;this.history=[{...s,timestamp:o}];const{onSessionStart:r}=e;r&&r(t,Bi(i,this.history)),this.removeListeners=Gt(zt(window,"pointermove",this.handlePointerMove),zt(window,"pointerup",this.handlePointerUp),zt(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),(0,Bt.Pn)(this.updatePoint)}}function ji(t,e){return e?{point:e(t.point)}:t}function Ri(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Bi({point:t},e){return{point:t,delta:Ri(t,Oi(e)),offset:Ri(t,Fi(e)),velocity:Ii(e,.1)}}function Fi(t){return t[0]}function Oi(t){return t[t.length-1]}function Ii(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Oi(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>de(e)));)n--;if(!i)return{x:0,y:0};const o=pe(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ni(t){return t.max-t.min}function Wi(t,e=0,n=.01){return Math.abs(t-e)<=n}function Ui(t,e,n,i=.5){t.origin=i,t.originPoint=Ye(e.min,e.max,t.origin),t.scale=Ni(n)/Ni(e),(Wi(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ye(n.min,n.max,t.origin)-t.originPoint,(Wi(t.translate)||isNaN(t.translate))&&(t.translate=0)}function zi(t,e,n,i){Ui(t.x,e.x,n.x,i?i.originX:void 0),Ui(t.y,e.y,n.y,i?i.originY:void 0)}function Hi(t,e,n){t.min=n.min+e.min,t.max=t.min+Ni(e)}function Gi(t,e,n){t.min=e.min-n.min,t.max=t.min+Ni(e)}function Yi(t,e,n){Gi(t.x,e.x,n.x),Gi(t.y,e.y,n.y)}function Xi(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Zi(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Ji=()=>({x:{min:0,max:0},y:{min:0,max:0}});function _i(t){return[t("x"),t("y")]}function ts({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function es(t){return void 0===t||1===t}function ns({scale:t,scaleX:e,scaleY:n}){return!es(t)||!es(e)||!es(n)}function is(t){return ns(t)||ss(t)||t.z||t.rotate||t.rotateX||t.rotateY}function ss(t){return os(t.x)||os(t.y)}function os(t){return t&&"0%"!==t}function rs(t,e,n){return n+e*(t-n)}function as(t,e,n,i,s){return void 0!==s&&(t=rs(t,s,i)),rs(t,n,i)+e}function ls(t,e=0,n=1,i,s){t.min=as(t.min,e,n,i,s),t.max=as(t.max,e,n,i,s)}function cs(t,{x:e,y:n}){ls(t.x,e.translate,e.scale,e.originPoint),ls(t.y,n.translate,n.scale,n.originPoint)}function us(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function hs(t,e){t.min=t.min+e,t.max=t.max+e}function ds(t,e,[n,i,s]){const o=void 0!==e[s]?e[s]:.5,r=Ye(t.min,t.max,o);ls(t,e[n],e[i],r,e.scale)}const ps=["x","scaleX","originX"],ms=["y","scaleY","originY"];function fs(t,e){ds(t.x,e,ps),ds(t.y,e,ms)}function gs(t,e){return ts(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const ys=new WeakMap;class vs{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ji(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new Li(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(Wt(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=qt(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_i((t=>{let e=this.getAxisMotionValue(t).get()||0;if(Q.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Ni(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),s&&Bt.Wi.update((()=>s(t,e)),!1,!0);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Bt.Wi.update((()=>s(t,e)))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!xs(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&tn&&(t=i?Ye(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;t&&c(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Xi(t.x,n,s),y:Xi(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=qi){return!1===t?t=0:!0===t&&(t=qi),{x:$i(t,"left","right"),y:$i(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&_i((t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!c(t))return!1;const n=t.current;(0,he.k)(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=gs(t,n),{scroll:s}=e;return s&&(hs(i.x,s.offset.x),hs(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Zi(t.x,e.x),y:Zi(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=ts(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=_i((r=>{if(!xs(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const c=i?200:1e6,u=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)}));return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(ii(t,n,0,e))}stopAnimation(){_i((t=>this.getAxisMotionValue(t).stop()))}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){_i((e=>{const{drag:n}=this.getProps();if(!xs(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Ye(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!c(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};_i((t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();i[t]=function(t,e){let n=.5;const i=Ni(t),s=Ni(e);return s>i?n=dn(e.min,e.max-i,t.min):i>s&&(n=dn(t.min,t.max-s,e.min)),W(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),_i((e=>{if(!xs(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Ye(s,o,i[e]))}))}addListeners(){if(!this.visualElement.current)return;ys.set(this.visualElement,this);const t=zt(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();c(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const s=It(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(_i((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=qi,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function xs(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const bs=t=>(e,n)=>{t&&Bt.Wi.update((()=>t(e,n)))};const ws={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ps(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Es={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!J.test(t))return t;t=parseFloat(t)}return`${Ps(t,e.target.x)}% ${Ps(t,e.target.y)}%`}},Ss={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=rn.parse(t);if(s.length>5)return i;const o=rn.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Ye(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}};class Ts extends i.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;var o;o=Cs,Object.assign(k,o),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(()=>{this.safeToRemove()})),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ws.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Bt.Wi.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function As(t){const[e,n]=function(){const t=(0,i.useContext)(r.O);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,o=(0,i.useId)();return(0,i.useEffect)((()=>s(o)),[]),!e&&n?[!1,()=>n&&n(o)]:[!0]}(),s=(0,i.useContext)(w.p);return i.createElement(Ts,{...t,layoutGroup:s,switchLayoutGroup:(0,i.useContext)(P),isPresent:e,safeToRemove:n})}const Cs={borderRadius:{...Es,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Es,borderTopRightRadius:Es,borderBottomLeftRadius:Es,borderBottomRightRadius:Es,boxShadow:Ss},Vs=["TopLeft","TopRight","BottomLeft","BottomRight"],ks=Vs.length,Ds=t=>"string"==typeof t?parseFloat(t):t,Ms=t=>"number"==typeof t||J.test(t);function Ls(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const js=Bs(0,.5,Me),Rs=Bs(.5,.95,_t.Z);function Bs(t,e,n){return i=>ie?1:n(dn(t,e,i))}function Fs(t,e){t.min=e.min,t.max=e.max}function Os(t,e){Fs(t.x,e.x),Fs(t.y,e.y)}function Is(t,e,n,i,s){return t=rs(t-=e,1/n,i),void 0!==s&&(t=rs(t,1/s,i)),t}function Ns(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){Q.test(e)&&(e=parseFloat(e),e=Ye(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=Ye(o.min,o.max,i);t===o&&(a-=e),t.min=Is(t.min,e,n,a,s),t.max=Is(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Ws=["x","scaleX","originX"],Us=["y","scaleY","originY"];function zs(t,e,n,i){Ns(t.x,e,Ws,n?n.x:void 0,i?i.x:void 0),Ns(t.y,e,Us,n?n.y:void 0,i?i.y:void 0)}function Hs(t){return 0===t.translate&&1===t.scale}function Gs(t){return Hs(t.x)&&Hs(t.y)}function Ys(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Xs(t){return Ni(t.x)/Ni(t.y)}class Zs{constructor(){this.members=[]}add(t){ri(this.members,t),t.scheduleRender()}remove(t){if(ai(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex((e=>t===e));if(0===e)return!1;let n;for(let i=e;i>=0;i--){const t=this.members[i];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach((t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function qs(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y;if((s||o)&&(i=`translate3d(${s}px, ${o}px, 0) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:s}=n;t&&(i+=`rotate(${t}deg) `),e&&(i+=`rotateX(${e}deg) `),s&&(i+=`rotateY(${s}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(i+=`scale(${r}, ${a})`),i||"none"}const $s=(t,e)=>t.depth-e.depth;class Ks{constructor(){this.children=[],this.isDirty=!1}add(t){ri(this.children,t),this.isDirty=!0}remove(t){ai(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($s),this.isDirty=!1,this.children.forEach(t)}}const Qs=["","X","Y","Z"];let Js=0;const _s={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function to({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=Js++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;_s.totalNodes=_s.resolvedTargetDeltas=_s.recalculatedProjection=0,this.nodes.forEach(io),this.nodes.forEach(uo),this.nodes.forEach(ho),this.nodes.forEach(so),t=_s,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;ethis.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=performance.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&((0,Bt.Pn)(i),t(o-e))};return Bt.Wi.read(i,!0),()=>(0,Bt.Pn)(i)}(i,250),ws.hasAnimatedSinceResize&&(ws.hasAnimatedSinceResize=!1,this.nodes.forEach(co))}))}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&r&&(s||o)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||r.getDefaultTransition()||vo,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=r.getProps(),l=!this.targetLayout||!Ys(this.targetLayout,i)||n,c=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,c);const e={...ni(s,"layout"),onPlay:o,onComplete:a};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||co(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,(0,Bt.Pn)(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(po),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let s=0;sthis.update())))}clearAllSnapshots(){this.nodes.forEach(oo),this.sharedNodes.forEach(mo)}scheduleUpdateProjection(){Bt.Wi.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Bt.Wi.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n{const n=e/1e3;var l,d,p,m,f,g;fo(o.x,t.x,n),fo(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Yi(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=r,g=n,go(p.x,m.x,f.x,g),go(p.y,m.y,f.y,g),h&&(l=this.relativeTarget,d=h,l.x.min===d.x.min&&l.x.max===d.x.max&&l.y.min===d.y.min&&l.y.max===d.y.max)&&(this.isProjectionDirty=!1),h||(h=Ji()),Os(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Ye(0,void 0!==n.opacity?n.opacity:1,js(i)),t.opacityExit=Ye(void 0!==e.opacity?e.opacity:1,0,Rs(i))):o&&(t.opacity=Ye(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let r=0;r{ws.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const i=j(t)?t:hi(t);return i.start(ii("",i,e,n)),i.animation}(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Po(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||Ji();const e=Ni(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Ni(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Os(e,n),fs(e,s),zi(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Zs);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const i={};for(let s=0;s{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(ro),this.root.sharedNodes.clear()}}}function eo(t){t.updateLayout()}function no(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?_i((t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=Ni(i);i.min=e[t].min,i.max=i.min+s})):Po(s,n.layoutBox,e)&&_i((i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=Ni(e[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)}));const r=Qi();zi(r,e,n.layoutBox);const a=Qi();o?zi(a,t.applyTransform(i,!0),n.measuredBox):zi(a,e,n.layoutBox);const l=!Gs(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=Ji();Yi(r,n.layoutBox,s.layoutBox);const a=Ji();Yi(a,e,o.layoutBox),Ys(r,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function io(t){_s.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function so(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function oo(t){t.clearSnapshot()}function ro(t){t.clearMeasurements()}function ao(t){t.isLayoutDirty=!1}function lo(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function co(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function uo(t){t.resolveTargetDelta()}function ho(t){t.calcProjection()}function po(t){t.resetRotation()}function mo(t){t.removeLeadSnapshot()}function fo(t,e,n){t.translate=Ye(e.translate,0,n),t.scale=Ye(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function go(t,e,n,i){t.min=Ye(e.min,n.min,i),t.max=Ye(e.max,n.max,i)}function yo(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const vo={duration:.45,ease:[.4,0,.1,1]},xo=t=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(t),bo=xo("applewebkit/")&&!xo("chrome/")?Math.round:_t.Z;function wo(t){t.min=bo(t.min),t.max=bo(t.max)}function Po(t,e,n){return"position"===t||"preserve-aspect"===t&&!Wi(Xs(e),Xs(n),.2)}const Eo=to({attachResizeListener:(t,e)=>It(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),So={current:void 0},To=to({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!So.current){const t=new Eo({});t.mount(window),t.setOptions({layoutScroll:!0}),So.current=t}return So.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ao={pan:{Feature:class extends Kt{constructor(){super(...arguments),this.removePointerDownListener=_t.Z}onPointerDown(t){this.session=new Li(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:bs(t),onStart:bs(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&Bt.Wi.update((()=>i(t,e)))}}}mount(){this.removePointerDownListener=zt(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Kt{constructor(t){super(t),this.removeGroupControls=_t.Z,this.removeListeners=_t.Z,this.controls=new vs(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_t.Z}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:To,MeasureLayout:As}},Co=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;const Vo=4;function ko(t,e,n=1){(0,he.k)(n<=Vo,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[i,s]=function(t){const e=Co.exec(t);if(!e)return[,];const[,n,i]=e;return[n,i]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return oi(t)?parseFloat(t):t}return I(s)?ko(s,e,n+1):s}const Do=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Mo=t=>Do.has(t),Lo=t=>t===U||t===J,jo=(t,e)=>parseFloat(t.split(", ")[e]),Ro=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/);if(s)return jo(s[1],e);{const e=i.match(/^matrix\((.+)\)$/);return e?jo(e[1],t):0}},Bo=new Set(["x","y","z"]),Fo=D.filter((t=>!Bo.has(t)));const Oo={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Ro(4,13),y:Ro(5,14)};Oo.translateX=Oo.x,Oo.translateY=Oo.y;const Io=(t,e,n={},i={})=>{e={...e},i={...i};const s=Object.keys(e).filter(Mo);let o=[],r=!1;const a=[];if(s.forEach((s=>{const l=t.getValue(s);if(!t.hasValue(s))return;let c=n[s],u=mi(c);const h=e[s];let d;if(kt(h)){const t=h.length,e=null===h[0]?1:0;c=h[e],u=mi(c);for(let n=e;n{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),e.length&&t.render(),e}(t),r=!0),a.push(s),i[s]=void 0!==i[s]?i[s]:e[s],l.jump(h))})),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,s=((t,e,n)=>{const i=e.measureViewportBox(),s=e.current,o=getComputedStyle(s),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach((t=>{a[t]=Oo[t](i,o)})),e.render();const l=e.measureViewportBox();return n.forEach((n=>{const i=e.getValue(n);i&&i.jump(a[n]),t[n]=Oo[n](l,o)})),t})(e,t,a);return o.length&&o.forEach((([e,n])=>{t.getValue(e).set(n)})),t.render(),b.j&&null!==n&&window.scrollTo({top:n}),{target:s,transitionEnd:i}}return{target:e,transitionEnd:i}};function No(t,e,n,i){return(t=>Object.keys(t).some(Mo))(e)?Io(t,e,n,i):{target:e,transitionEnd:i}}const Wo=(t,e,n,i)=>{const s=function(t,{...e},n){const i=t.current;if(!(i instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach((t=>{const e=t.get();if(!I(e))return;const n=ko(e,i);n&&t.set(n)}));for(const s in e){const t=e[s];if(!I(t))continue;const o=ko(t,i);o&&(e[s]=o,n||(n={}),void 0===n[s]&&(n[s]=t))}return{target:e,transitionEnd:n}}(t,e,i);return No(t,e=s.target,n,i=s.transitionEnd)},Uo={current:null},zo={current:!1};const Ho=new WeakMap,Go=Object.keys(x),Yo=Go.length,Xo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Zo=p.length;class qo{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Bt.Wi.render(this.render,!1,!0);const{latestValues:r,renderState:a}=s;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=m(e),this.isVariantNode=f(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(e,{});for(const u in c){const t=c[u];void 0!==r[u]&&j(t)&&(t.set(r[u],!1),si(l)&&l.add(u))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,Ho.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),zo.current||function(){if(zo.current=!0,b.j)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Uo.current=t.matches;t.addListener(e),e()}else Uo.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Uo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ho.delete(this.current),this.projection&&this.projection.unmount(),(0,Bt.Pn)(this.notifyUpdate),(0,Bt.Pn)(this.render),this.valueSubscriptions.forEach((t=>t())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=M.has(t),i=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&Bt.Wi.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),s=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,(()=>{i(),s()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,i,s){let o,r;for(let a=0;athis.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,layoutScroll:a,layoutRoot:l})}return r}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ji()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;ne.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=hi(e,{owner:this}),this.addValue(t,n)),n}readValue(t){var e;return void 0===this.latestValues[t]&&this.current?null!==(e=this.getBaseTargetFromProps(this.props,t))&&void 0!==e?e:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,i="string"==typeof n||"object"==typeof n?null===(e=Ct(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||j(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new li),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class $o extends qo{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:i},s){let o=function(t,e,n){const i={};for(const s in t){const t=vi(s,e);if(void 0!==t)i[s]=t;else{const t=n.getValue(s);t&&(i[s]=t.get())}}return i}(n,t||{},this);if(i&&(e&&(e=i(e)),n&&(n=i(n)),o&&(o=i(o))),s){!function(t,e,n){var i,s;const o=Object.keys(e).filter((e=>!t.hasValue(e))),r=o.length;var a;if(r)for(let l=0;l{this.current&&(this.current.textContent=`${t}`)})))}renderInstance(t,e,n,i){Pt(t,e,n,i)}}class Qo extends $o{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(M.has(e)){const t=Jn(e);return t&&t.default||0}return e=Et.has(e)?e:wt(e),t.getAttribute(e)}measureInstanceViewportBox(){return Ji()}scrapeMotionValuesFromProps(t,e){return At(t,e)}build(t,e,n,i){gt(t,e,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,e,n,i){St(t,e,0,i)}mount(t){this.isSVGTag=vt(t.tagName),super.mount(t)}}const Jo=(t,e)=>V(t)?new Qo(e,{enableHardwareAcceleration:!1}):new Ko(e,{enableHardwareAcceleration:!0}),_o={...Di,...ae,...Ao,...{layout:{ProjectionNode:To,MeasureLayout:As}}},tr=A(((t,e)=>function(t,{forwardMotionProps:e=!1},n,i){return{...V(t)?Ft:Ot,preloadedFeatures:n,useRender:bt(e),createVisualElement:i,Component:t}}(t,e,_o,Jo)))},5742:function(t){"use strict";t.exports=JSON.parse('{"layout":"fixed","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsSAAALEgHS3X78AAAE5klEQVR42m2UCUxUVxSG7wwMMMMssroVpCJBrbY1mroRsSyzMygUUXAFoVi11lZrq21cUlq7YZVobLU1Vo0NGpdoqHaL2Gq0iYUYqyEa1+IaVECGmXnL18zgmniS93KTe96X/9z331+IZwrtcIEuuCoqqgsrG3ExfebQlhJHjO99R6zvQ3e8f7YnqXPEjMxLUcGeTEF4kSBMPL/Qdj9C5PXuyLWa5MN5cd6uGemtOI2obouKywI2kyrbzdIp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Iu797Fpg/uMe01KE5qYanrOH/u+JygZ20hq8nykqzzTB/YdnVEFEnPhENR/7vJdjPNU3o8YO7AZmnVtFb1lzqVyQNlhgmwGe6xbWUzJ3ZvZ5xGwWZCthkgS4f3dTPWp8IhGD11oehx9W1Ls1o4EWx8XdOlzh/b5T995KqvZk67v2wY/mtnGnyflvztGytQ3Gawm6WWSamttkdh+/xMfPlGtDve95HNrNzI1sGbr3SqJ3cd5XpjPVsWncCuD92qdkdMYHN+qjfpGWXPSW2NEMtDmyVD78fk9/IVjtPxRba+fefExCt1GWHU2mP95QWD7vZ70t8t5FH9D6/cF9kYlgBTAAAAAElFTkSuQmCC"},"images":{"fallback":{"src":"/blog/static/94eb39c58147f048d2b7747e975eab86/cf150/icon.png","srcSet":"/blog/static/94eb39c58147f048d2b7747e975eab86/cf150/icon.png 35w,\\n/blog/static/94eb39c58147f048d2b7747e975eab86/145fc/icon.png 70w","sizes":"35px"},"sources":[{"srcSet":"/blog/static/94eb39c58147f048d2b7747e975eab86/f721d/icon.avif 35w,\\n/blog/static/94eb39c58147f048d2b7747e975eab86/821ec/icon.avif 70w","type":"image/avif","sizes":"35px"},{"srcSet":"/blog/static/94eb39c58147f048d2b7747e975eab86/991ad/icon.webp 35w,\\n/blog/static/94eb39c58147f048d2b7747e975eab86/55c64/icon.webp 70w","type":"image/webp","sizes":"35px"}]},"width":35,"height":35}')}}]); +//# sourceMappingURL=commons-dc874e109473e818028c.js.map \ No newline at end of file diff --git a/commons-288422f67b1a4d800aad.js.map b/commons-dc874e109473e818028c.js.map similarity index 99% rename from commons-288422f67b1a4d800aad.js.map rename to commons-dc874e109473e818028c.js.map index 925fe236..7c2e5337 100644 --- a/commons-288422f67b1a4d800aad.js.map +++ b/commons-dc874e109473e818028c.js.map @@ -1 +1 @@ -{"version":3,"file":"commons-288422f67b1a4d800aad.js","mappings":"2GAEA,MAAMA,EAAY,YACZC,EAAY,YACZC,EAAkB,0BAClBC,EAAa,yBACbC,EAAa,WAEbC,EA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AO,GAA4BnY,EAAOmY,EAC9C,CACA,KAAAipC,CAAMrpC,EAAanF,EAAclgB,EAASsN,GACtCsV,GAAcyC,EAAanF,EAAclgB,EAASoN,KAAKgW,SAAU9V,EAAM6S,kBAC3E,CACA,cAAA+sC,CAAexzC,EAAU2L,EAAaN,EAAWC,GAC7CI,GAAU1L,EAAU2L,EAAaN,EAAWC,EAChD,CACA,KAAArL,CAAMD,GACFtM,KAAKgW,SAAWA,GAAS1J,EAASkO,SAClCoE,MAAMrS,MAAMD,EAChB,ECtCJ,MAAM,GAAyB,CAACjC,EAAWzX,IAChC0a,EAAejD,GAChB,IAAIo5C,GAAiB7wD,EAAS,CAAE2gB,4BAA4B,IAC5D,IAAI6vC,GAAkBxwD,EAAS,CAAE2gB,4BAA4B,ICEjEtJ,GAAoB,IACnB4xB,MACAld,MACArV,MCTQ,CACXlS,OAAQ,CACJglD,eAAgBd,GAChB3wC,cAAa,MDef5L,GAAuB6N,GAAkB,CAACvC,EAAW+O,IEhB3D,SAA+B/O,GAAW,mBAAE0M,GAAqB,GAAS9M,EAAmBC,GAIzF,MAAO,IAHYoD,EAAejD,GAC5B+P,GACAK,GAGFxQ,oBACAE,UAAW2M,GAAgBC,GAC3B7M,sBACAG,YAER,CFKsE,CAAsBA,EAAW+O,EAAQnP,GAAmB,K","sources":["webpack://gatsby-blog/./node_modules/.pnpm/camelcase@6.3.0/node_modules/camelcase/index.js","webpack://gatsby-blog/../src/image-utils.ts","webpack://gatsby-blog/../src/components/hooks.ts","webpack://gatsby-blog/../src/components/layout-wrapper.tsx","webpack://gatsby-blog/../src/components/picture.tsx","webpack://gatsby-blog/../src/components/placeholder.tsx","webpack://gatsby-blog/../src/components/main-image.tsx","webpack://gatsby-blog/../src/components/gatsby-image.server.tsx","webpack://gatsby-blog/../src/components/gatsby-image.browser.tsx","webpack://gatsby-blog/../src/components/static-image.server.tsx","webpack://gatsby-blog/../src/components/static-image.tsx","webpack://gatsby-blog/./node_modules/.pnpm/clsx@2.0.0/node_modules/clsx/dist/clsx.mjs","webpack://gatsby-blog/./static/images/github.svg","webpack://gatsby-blog/./src/components/split-text.tsx","webpack://gatsby-blog/./src/components/split-text.module.css","webpack://gatsby-blog/./src/components/@layout/navigation.tsx","webpack://gatsby-blog/./src/components/@layout/navigation.module.css","webpack://gatsby-blog/./src/components/@core/layout.tsx","webpack://gatsby-blog/./src/components/@core/seo.tsx","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/debounce.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/now.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/context/LazyContext.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/variant-props.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/definitions.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/load-features.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/utils/transform.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/clamp.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/numbers/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/utils.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/numbers/units.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/use-props.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/use-props.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/use-render.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/utils/render.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/resolve-value.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/config-motion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/events/add-dom-event.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/events/utils/is-primary-pointer.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/events/event-info.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/pipe.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/Feature.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/hover.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/press.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/gestures.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/focus.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/time-conversion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/waapi/easing.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/cubic-bezier.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/ease.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/utils/is-easing-array.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/modifiers/mirror.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/modifiers/reverse.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/circ.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/back.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/utils/map.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/anticipate.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/color/utils.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/color/rgba.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/color/hex.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/color/hsla.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/color/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/mix.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/hsla-to-rgba.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/mix-color.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/complex/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/mix-complex.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/progress.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/interpolate.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/offsets/default.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/offsets/fill.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/generators/keyframes.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/offsets/time.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/velocity-per-second.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/generators/utils/velocity.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/generators/spring/find.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/generators/spring/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/generators/inertia.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/js/driver-frameloop.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/js/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/waapi/create-accelerated-animation.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/memo.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/waapi/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/complex/filter.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/is-none.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/transitions.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/keyframes.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/instant.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/use-will-change/is.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/array.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/subscription-manager.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/setters.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/animations.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/distance.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/models.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/utils/measure.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/pan/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/node/state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/shared/stack.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/styles/transform.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/debug/record.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/delay.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/interfaces/single-value.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/drag.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/drag/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/store.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/VisualElement.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/motion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/layout.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs"],"sourcesContent":["'use strict';\n\nconst UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\n\tfor (let i = 0; i < string.length; i++) {\n\t\tconst character = string[i];\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i) + '-' + string.slice(i);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\ti++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i - 1) + '-' + string.slice(i - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replace(LEADING_CAPITAL, m1 => toLowerCase(m1));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier))\n\t\t.replace(NUMBERS_AND_IDENTIFIER, m => toUpperCase(m));\n};\n\nconst camelCase = (input, options) => {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false ?\n\t\tstring => string.toLowerCase() :\n\t\tstring => string.toLocaleLowerCase(options.locale);\n\tconst toUpperCase = options.locale === false ?\n\t\tstring => string.toUpperCase() :\n\t\tstring => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\n\tif (options.preserveConsecutiveUppercase) {\n\t\tinput = preserveConsecutiveUppercase(input, toLowerCase);\n\t} else {\n\t\tinput = toLowerCase(input);\n\t}\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n};\n\nmodule.exports = camelCase;\n// TODO: Remove this for the next major release\nmodule.exports.default = camelCase;\n","import camelCase from \"camelcase\"\nimport type { IGatsbyImageData } from \"./index\"\n\nconst DEFAULT_PIXEL_DENSITIES = [0.25, 0.5, 1, 2]\nexport const DEFAULT_BREAKPOINTS = [750, 1080, 1366, 1920]\nexport const EVERY_BREAKPOINT = [\n 320, 654, 768, 1024, 1366, 1600, 1920, 2048, 2560, 3440, 3840, 4096,\n]\nconst DEFAULT_FLUID_WIDTH = 800\nconst DEFAULT_FIXED_WIDTH = 800\nconst DEFAULT_ASPECT_RATIO = 4 / 3\n\nexport type Fit = \"cover\" | \"fill\" | \"inside\" | \"outside\" | \"contain\"\n\nexport type Layout = \"fixed\" | \"fullWidth\" | \"constrained\"\nexport type ImageFormat = \"jpg\" | \"png\" | \"webp\" | \"avif\" | \"auto\" | \"\"\n\n/**\n * The minimal required reporter, as we don't want to import it from gatsby-cli\n */\nexport interface IReporter {\n warn(message: string): void\n}\n\nexport interface ISharpGatsbyImageArgs {\n layout?: Layout\n formats?: Array\n placeholder?: \"tracedSVG\" | \"dominantColor\" | \"blurred\" | \"none\"\n tracedSVGOptions?: Record\n width?: number\n height?: number\n aspectRatio?: number\n sizes?: string\n quality?: number\n transformOptions?: {\n fit?: Fit\n cropFocus?: number | string\n duotone?: {\n highlight: string\n shadow: string\n opacity?: number\n }\n grayscale?: boolean\n rotate?: number\n trim?: number\n }\n jpgOptions?: Record\n pngOptions?: Record\n webpOptions?: Record\n avifOptions?: Record\n blurredOptions?: { width?: number; toFormat?: ImageFormat }\n breakpoints?: Array\n outputPixelDensities?: Array\n backgroundColor?: string\n}\n\nexport interface IImageSizeArgs {\n width?: number\n height?: number\n layout?: Layout\n filename: string\n outputPixelDensities?: Array\n breakpoints?: Array\n fit?: Fit\n reporter?: IReporter\n sourceMetadata: { width: number; height: number }\n}\n\nexport interface IImageSizes {\n sizes: Array\n presentationWidth: number\n presentationHeight: number\n aspectRatio: number\n unscaledWidth: number\n}\n\nexport interface IImage {\n src: string\n width: number\n height: number\n format: ImageFormat\n}\n\nexport interface IGatsbyImageHelperArgs {\n pluginName: string\n generateImageSource: (\n filename: string,\n width: number,\n height: number,\n format: ImageFormat,\n fit?: Fit,\n options?: Record\n ) => IImage\n layout?: Layout\n formats?: Array\n filename: string\n placeholderURL?: string\n width?: number\n height?: number\n sizes?: string\n reporter?: IReporter\n sourceMetadata?: { width: number; height: number; format: ImageFormat }\n fit?: Fit\n options?: Record\n breakpoints?: Array\n backgroundColor?: string\n aspectRatio?: number\n}\n\nconst warn = (message: string): void => console.warn(message)\n\nconst sortNumeric = (a: number, b: number): number => a - b\n\nexport const getSizes = (width: number, layout: Layout): string | undefined => {\n switch (layout) {\n // If screen is wider than the max size, image width is the max size,\n // otherwise it's the width of the screen\n case `constrained`:\n return `(min-width: ${width}px) ${width}px, 100vw`\n\n // Image is always the same width, whatever the size of the screen\n case `fixed`:\n return `${width}px`\n\n // Image is always the width of the screen\n case `fullWidth`:\n return `100vw`\n\n default:\n return undefined\n }\n}\n\nexport const getSrcSet = (images: Array): string =>\n images.map(image => `${image.src} ${image.width}w`).join(`,\\n`)\n\nexport function formatFromFilename(filename: string): ImageFormat | undefined {\n const dot = filename.lastIndexOf(`.`)\n if (dot !== -1) {\n const ext = filename.slice(dot + 1)\n if (ext === `jpeg`) {\n return `jpg`\n }\n if (ext.length === 3 || ext.length === 4) {\n return ext as ImageFormat\n }\n }\n return undefined\n}\n\nexport function setDefaultDimensions(\n args: IGatsbyImageHelperArgs\n): IGatsbyImageHelperArgs {\n let {\n layout = `constrained`,\n width,\n height,\n sourceMetadata,\n breakpoints,\n aspectRatio,\n formats = [`auto`, `webp`],\n } = args\n formats = formats.map(format => format.toLowerCase() as ImageFormat)\n layout = camelCase(layout) as Layout\n\n if (width && height) {\n return { ...args, formats, layout, aspectRatio: width / height }\n }\n if (sourceMetadata.width && sourceMetadata.height && !aspectRatio) {\n aspectRatio = sourceMetadata.width / sourceMetadata.height\n }\n\n if (layout === `fullWidth`) {\n width = width || sourceMetadata.width || breakpoints[breakpoints.length - 1]\n height = height || Math.round(width / (aspectRatio || DEFAULT_ASPECT_RATIO))\n } else {\n if (!width) {\n if (height && aspectRatio) {\n width = height * aspectRatio\n } else if (sourceMetadata.width) {\n width = sourceMetadata.width\n } else if (height) {\n width = Math.round(height / DEFAULT_ASPECT_RATIO)\n } else {\n width = DEFAULT_FIXED_WIDTH\n }\n }\n\n if (aspectRatio && !height) {\n height = Math.round(width / aspectRatio)\n } else if (!aspectRatio) {\n aspectRatio = width / height\n }\n }\n return { ...args, width, height, aspectRatio, layout, formats }\n}\n\n/**\n * Use this for getting an image for the blurred placeholder. This ensures the\n * aspect ratio and crop match the main image\n */\nexport function getLowResolutionImageURL(\n args: IGatsbyImageHelperArgs,\n width = 20\n): string {\n args = setDefaultDimensions(args)\n const { generateImageSource, filename, aspectRatio } = args\n return generateImageSource(\n filename,\n width,\n Math.round(width / aspectRatio),\n args.sourceMetadata.format || `jpg`,\n args.fit,\n args.options\n )?.src\n}\n\nexport function generateImageData(\n args: IGatsbyImageHelperArgs\n): IGatsbyImageData {\n args = setDefaultDimensions(args)\n\n let {\n pluginName,\n sourceMetadata,\n generateImageSource,\n layout,\n fit,\n options,\n width,\n height,\n filename,\n reporter = { warn },\n backgroundColor,\n placeholderURL,\n } = args\n\n if (!pluginName) {\n reporter.warn(\n `[gatsby-plugin-image] \"generateImageData\" was not passed a plugin name`\n )\n }\n\n if (typeof generateImageSource !== `function`) {\n throw new Error(`generateImageSource must be a function`)\n }\n\n if (!sourceMetadata || (!sourceMetadata.width && !sourceMetadata.height)) {\n // No metadata means we let the CDN handle max size etc, aspect ratio etc\n sourceMetadata = {\n width,\n height,\n format: sourceMetadata?.format || formatFromFilename(filename) || `auto`,\n }\n } else if (!sourceMetadata.format) {\n sourceMetadata.format = formatFromFilename(filename)\n }\n\n const formats = new Set(args.formats)\n\n if (formats.size === 0 || formats.has(`auto`) || formats.has(``)) {\n formats.delete(`auto`)\n formats.delete(``)\n formats.add(sourceMetadata.format)\n }\n\n if (formats.has(`jpg`) && formats.has(`png`)) {\n reporter.warn(\n `[${pluginName}] Specifying both 'jpg' and 'png' formats is not supported. Using 'auto' instead`\n )\n if (sourceMetadata.format === `jpg`) {\n formats.delete(`png`)\n } else {\n formats.delete(`jpg`)\n }\n }\n\n const imageSizes = calculateImageSizes({ ...args, sourceMetadata })\n\n const result: IGatsbyImageData[\"images\"] = {\n sources: [],\n }\n\n let sizes = args.sizes\n if (!sizes) {\n sizes = getSizes(imageSizes.presentationWidth, layout)\n }\n\n formats.forEach(format => {\n const images = imageSizes.sizes\n .map(size => {\n const imageSrc = generateImageSource(\n filename,\n size,\n Math.round(size / imageSizes.aspectRatio),\n format,\n fit,\n options\n )\n if (\n !imageSrc?.width ||\n !imageSrc.height ||\n !imageSrc.src ||\n !imageSrc.format\n ) {\n reporter.warn(\n `[${pluginName}] The resolver for image ${filename} returned an invalid value.`\n )\n return undefined\n }\n return imageSrc\n })\n .filter(Boolean)\n\n if (format === `jpg` || format === `png` || format === `auto`) {\n const unscaled =\n images.find(img => img.width === imageSizes.unscaledWidth) || images[0]\n\n if (unscaled) {\n result.fallback = {\n src: unscaled.src,\n srcSet: getSrcSet(images),\n sizes,\n }\n }\n } else {\n result.sources?.push({\n srcSet: getSrcSet(images),\n sizes,\n type: `image/${format}`,\n })\n }\n })\n\n const imageProps: Partial = {\n images: result,\n layout,\n backgroundColor,\n }\n\n if (placeholderURL) {\n imageProps.placeholder = { fallback: placeholderURL }\n }\n\n switch (layout) {\n case `fixed`:\n imageProps.width = imageSizes.presentationWidth\n imageProps.height = imageSizes.presentationHeight\n break\n\n case `fullWidth`:\n imageProps.width = 1\n imageProps.height = 1 / imageSizes.aspectRatio\n break\n\n case `constrained`:\n imageProps.width = args.width || imageSizes.presentationWidth || 1\n imageProps.height = (imageProps.width || 1) / imageSizes.aspectRatio\n }\n\n return imageProps as IGatsbyImageData\n}\n\nconst dedupeAndSortDensities = (values: Array): Array =>\n Array.from(new Set([1, ...values])).sort(sortNumeric)\n\nexport function calculateImageSizes(args: IImageSizeArgs): IImageSizes {\n const {\n width,\n height,\n filename,\n layout = `constrained`,\n sourceMetadata: imgDimensions,\n reporter = { warn },\n breakpoints = DEFAULT_BREAKPOINTS,\n } = args\n\n // check that all dimensions provided are positive\n const userDimensions = { width, height }\n const erroneousUserDimensions = Object.entries(userDimensions).filter(\n ([_, size]) => typeof size === `number` && size < 1\n )\n if (erroneousUserDimensions.length) {\n throw new Error(\n `Specified dimensions for images must be positive numbers (> 0). Problem dimensions you have are ${erroneousUserDimensions\n .map(dim => dim.join(`: `))\n .join(`, `)}`\n )\n }\n\n if (layout === `fixed`) {\n return fixedImageSizes(args)\n } else if (layout === `constrained`) {\n return responsiveImageSizes(args)\n } else if (layout === `fullWidth`) {\n return responsiveImageSizes({ breakpoints, ...args })\n } else {\n reporter.warn(\n `No valid layout was provided for the image at ${filename}. Valid image layouts are fixed, fullWidth, and constrained. Found ${layout}`\n )\n return {\n sizes: [imgDimensions.width],\n presentationWidth: imgDimensions.width,\n presentationHeight: imgDimensions.height,\n aspectRatio: imgDimensions.width / imgDimensions.height,\n unscaledWidth: imgDimensions.width,\n }\n }\n}\nexport function fixedImageSizes({\n filename,\n sourceMetadata: imgDimensions,\n width,\n height,\n fit = `cover`,\n outputPixelDensities = DEFAULT_PIXEL_DENSITIES,\n reporter = { warn },\n}: IImageSizeArgs): IImageSizes {\n let aspectRatio = imgDimensions.width / imgDimensions.height\n // Sort, dedupe and ensure there's a 1\n const densities = dedupeAndSortDensities(outputPixelDensities)\n\n // If both are provided then we need to check the fit\n if (width && height) {\n const calculated = getDimensionsAndAspectRatio(imgDimensions, {\n width,\n height,\n fit,\n })\n width = calculated.width\n height = calculated.height\n aspectRatio = calculated.aspectRatio\n }\n\n if (!width) {\n if (!height) {\n width = DEFAULT_FIXED_WIDTH\n } else {\n width = Math.round(height * aspectRatio)\n }\n } else if (!height) {\n height = Math.round(width / aspectRatio)\n }\n\n const originalWidth = width // will use this for presentationWidth, don't want to lose it\n const isTopSizeOverriden =\n imgDimensions.width < width || imgDimensions.height < (height as number)\n\n // If the image is smaller than requested, warn the user that it's being processed as such\n // print out this message with the necessary information before we overwrite it for sizing\n if (isTopSizeOverriden) {\n const fixedDimension = imgDimensions.width < width ? `width` : `height`\n reporter.warn(`\nThe requested ${fixedDimension} \"${\n fixedDimension === `width` ? width : height\n }px\" for the image ${filename} was larger than the actual image ${fixedDimension} of ${\n imgDimensions[fixedDimension]\n }px. If possible, replace the current image with a larger one.`)\n\n if (fixedDimension === `width`) {\n width = imgDimensions.width\n height = Math.round(width / aspectRatio)\n } else {\n height = imgDimensions.height\n width = height * aspectRatio\n }\n }\n\n const sizes = densities\n .filter(size => size >= 1) // remove smaller densities because fixed images don't need them\n .map(density => Math.round(density * (width as number)))\n .filter(size => size <= imgDimensions.width)\n\n return {\n sizes,\n aspectRatio,\n presentationWidth: originalWidth,\n presentationHeight: Math.round(originalWidth / aspectRatio),\n unscaledWidth: width,\n }\n}\n\nexport function responsiveImageSizes({\n sourceMetadata: imgDimensions,\n width,\n height,\n fit = `cover`,\n outputPixelDensities = DEFAULT_PIXEL_DENSITIES,\n breakpoints,\n layout,\n}: IImageSizeArgs): IImageSizes {\n let sizes\n let aspectRatio = imgDimensions.width / imgDimensions.height\n // Sort, dedupe and ensure there's a 1\n const densities = dedupeAndSortDensities(outputPixelDensities)\n\n // If both are provided then we need to check the fit\n if (width && height) {\n const calculated = getDimensionsAndAspectRatio(imgDimensions, {\n width,\n height,\n fit,\n })\n width = calculated.width\n height = calculated.height\n aspectRatio = calculated.aspectRatio\n }\n\n // Case 1: width of height were passed in, make sure it isn't larger than the actual image\n width = width && Math.min(width, imgDimensions.width)\n height = height && Math.min(height, imgDimensions.height)\n\n // Case 2: neither width or height were passed in, use default size\n if (!width && !height) {\n width = Math.min(DEFAULT_FLUID_WIDTH, imgDimensions.width)\n height = width / aspectRatio\n }\n\n // if it still hasn't been found, calculate width from the derived height.\n // TS isn't smart enough to realise the type for height has been narrowed here\n if (!width) {\n width = (height as number) * aspectRatio\n }\n\n const originalWidth = width\n const isTopSizeOverriden =\n imgDimensions.width < width || imgDimensions.height < (height as number)\n if (isTopSizeOverriden) {\n width = imgDimensions.width\n height = imgDimensions.height\n }\n\n width = Math.round(width)\n\n if (breakpoints?.length > 0) {\n sizes = breakpoints.filter(size => size <= imgDimensions.width)\n\n // If a larger breakpoint has been filtered-out, add the actual image width instead\n if (\n sizes.length < breakpoints.length &&\n !sizes.includes(imgDimensions.width)\n ) {\n sizes.push(imgDimensions.width)\n }\n } else {\n sizes = densities.map(density => Math.round(density * (width as number)))\n sizes = sizes.filter(size => size <= imgDimensions.width)\n }\n\n // ensure that the size passed in is included in the final output\n if (layout === `constrained` && !sizes.includes(width)) {\n sizes.push(width)\n }\n sizes = sizes.sort(sortNumeric)\n return {\n sizes,\n aspectRatio,\n presentationWidth: originalWidth,\n presentationHeight: Math.round(originalWidth / aspectRatio),\n unscaledWidth: width,\n }\n}\n\nexport function getDimensionsAndAspectRatio(\n dimensions,\n options\n): { width: number; height: number; aspectRatio: number } {\n // Calculate the eventual width/height of the image.\n const imageAspectRatio = dimensions.width / dimensions.height\n\n let width = options.width\n let height = options.height\n\n switch (options.fit) {\n case `fill`: {\n width = options.width ? options.width : dimensions.width\n height = options.height ? options.height : dimensions.height\n break\n }\n case `inside`: {\n const widthOption = options.width\n ? options.width\n : Number.MAX_SAFE_INTEGER\n const heightOption = options.height\n ? options.height\n : Number.MAX_SAFE_INTEGER\n\n width = Math.min(widthOption, Math.round(heightOption * imageAspectRatio))\n height = Math.min(\n heightOption,\n Math.round(widthOption / imageAspectRatio)\n )\n break\n }\n case `outside`: {\n const widthOption = options.width ? options.width : 0\n const heightOption = options.height ? options.height : 0\n\n width = Math.max(widthOption, Math.round(heightOption * imageAspectRatio))\n height = Math.max(\n heightOption,\n Math.round(widthOption / imageAspectRatio)\n )\n break\n }\n\n default: {\n if (options.width && !options.height) {\n width = options.width\n height = Math.round(options.width / imageAspectRatio)\n }\n\n if (options.height && !options.width) {\n width = Math.round(options.height * imageAspectRatio)\n height = options.height\n }\n }\n }\n\n return {\n width,\n height,\n aspectRatio: width / height,\n }\n}\n","/* global GATSBY___IMAGE */\nimport { generateImageData, EVERY_BREAKPOINT } from \"../image-utils\"\nimport type { CSSProperties, HTMLAttributes, ImgHTMLAttributes } from \"react\"\nimport type { Node } from \"gatsby\"\nimport type { PlaceholderProps } from \"./placeholder\"\nimport type { MainImageProps } from \"./main-image\"\nimport type { IGatsbyImageData } from \"./gatsby-image.browser\"\nimport type {\n IGatsbyImageHelperArgs,\n Layout,\n IImage,\n ImageFormat,\n} from \"../image-utils\"\n\n// Native lazy-loading support: https://addyosmani.com/blog/lazy-loading/\nexport const hasNativeLazyLoadSupport = (): boolean =>\n typeof HTMLImageElement !== `undefined` &&\n `loading` in HTMLImageElement.prototype\n\nexport function gatsbyImageIsInstalled(): boolean {\n return typeof GATSBY___IMAGE !== `undefined` && GATSBY___IMAGE\n}\n\nexport type IGatsbyImageDataParent = T & {\n gatsbyImageData: IGatsbyImageData\n}\nexport type IGatsbyImageParent = T & {\n gatsbyImage: IGatsbyImageData\n}\nexport type FileNode = Partial & {\n childImageSharp?: IGatsbyImageDataParent>\n}\n\nconst isGatsbyImageData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node: IGatsbyImageData | any\n): node is IGatsbyImageData =>\n // 🦆 check for a deep prop to be sure this is a valid gatsbyImageData object\n Boolean(node?.images?.fallback?.src)\n\nconst isGatsbyImageDataParent = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node: IGatsbyImageDataParent | any\n): node is IGatsbyImageDataParent => Boolean(node?.gatsbyImageData)\n\nconst isGatsbyImageParent = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node: IGatsbyImageParent | any\n): node is IGatsbyImageParent => Boolean(node?.gatsbyImage)\n\nexport type ImageDataLike =\n | FileNode\n | IGatsbyImageDataParent\n | IGatsbyImageParent\n | IGatsbyImageData\n\nexport const getImage = (\n node: ImageDataLike | null\n): IGatsbyImageData | undefined => {\n // This checks both for gatsbyImageData and gatsbyImage\n if (isGatsbyImageData(node)) {\n return node\n }\n // gatsbyImageData GraphQL field\n if (isGatsbyImageDataParent(node)) {\n return node.gatsbyImageData\n }\n // gatsbyImage GraphQL field for Gatsby's Image CDN service\n if (isGatsbyImageParent(node)) {\n return node.gatsbyImage\n }\n return node?.childImageSharp?.gatsbyImageData\n}\n\nexport const getSrc = (node: ImageDataLike): string | undefined =>\n getImage(node)?.images?.fallback?.src\n\nexport const getSrcSet = (node: ImageDataLike): string | undefined =>\n getImage(node)?.images?.fallback?.srcSet\n\nexport function getWrapperProps(\n width: number,\n height: number,\n layout: Layout\n): Pick, \"className\" | \"style\"> & {\n \"data-gatsby-image-wrapper\": string\n} {\n const wrapperStyle: CSSProperties = {}\n\n let className = `gatsby-image-wrapper`\n\n // If the plugin isn't installed we need to apply the styles inline\n if (!gatsbyImageIsInstalled()) {\n wrapperStyle.position = `relative`\n wrapperStyle.overflow = `hidden`\n }\n\n if (layout === `fixed`) {\n wrapperStyle.width = width\n wrapperStyle.height = height\n } else if (layout === `constrained`) {\n if (!gatsbyImageIsInstalled()) {\n wrapperStyle.display = `inline-block`\n wrapperStyle.verticalAlign = `top`\n }\n className = `gatsby-image-wrapper gatsby-image-wrapper-constrained`\n }\n\n return {\n className,\n \"data-gatsby-image-wrapper\": ``,\n style: wrapperStyle,\n }\n}\n\nexport interface IUrlBuilderArgs {\n width: number\n height: number\n baseUrl: string\n format: ImageFormat\n options: OptionsType\n}\nexport interface IGetImageDataArgs> {\n baseUrl: string\n /**\n * For constrained and fixed images, the size of the image element\n */\n width?: number\n height?: number\n /**\n * If available, pass the source image width and height\n */\n sourceWidth?: number\n sourceHeight?: number\n /**\n * If only one dimension is passed, then this will be used to calculate the other.\n */\n aspectRatio?: number\n layout?: Layout\n /**\n * Returns a URL based on the passed arguments. Should be a pure function\n */\n urlBuilder: (args: IUrlBuilderArgs) => string\n\n /**\n * Should be a data URI\n */\n placeholderURL?: string\n backgroundColor?: string\n /**\n * Used in error messages etc\n */\n pluginName?: string\n\n /**\n * If you do not support auto-format, pass an array of image types here\n */\n formats?: Array\n\n breakpoints?: Array\n\n /**\n * Passed to the urlBuilder function\n */\n options?: OptionsType\n}\n\n/**\n * Use this hook to generate gatsby-plugin-image data in the browser.\n */\nexport function getImageData({\n baseUrl,\n urlBuilder,\n sourceWidth,\n sourceHeight,\n pluginName = `getImageData`,\n formats = [`auto`],\n breakpoints,\n options,\n ...props\n}: IGetImageDataArgs): IGatsbyImageData {\n if (\n !breakpoints?.length &&\n (props.layout === `fullWidth` || (props.layout as string) === `FULL_WIDTH`)\n ) {\n breakpoints = EVERY_BREAKPOINT\n }\n const generateImageSource = (\n baseUrl: string,\n width: number,\n height?: number,\n format?: ImageFormat\n ): IImage => {\n return {\n width,\n height,\n format,\n src: urlBuilder({ baseUrl, width, height, options, format }),\n }\n }\n\n const sourceMetadata: IGatsbyImageHelperArgs[\"sourceMetadata\"] = {\n width: sourceWidth,\n height: sourceHeight,\n format: `auto`,\n }\n\n const args: IGatsbyImageHelperArgs = {\n ...props,\n pluginName,\n generateImageSource,\n filename: baseUrl,\n formats,\n breakpoints,\n sourceMetadata,\n }\n return generateImageData(args)\n}\n\nexport function getMainProps(\n isLoading: boolean,\n isLoaded: boolean,\n images: IGatsbyImageData[\"images\"],\n loading?: \"eager\" | \"lazy\",\n style: CSSProperties = {}\n): Partial {\n // fallback when it's not configured in gatsby-config.\n if (!gatsbyImageIsInstalled()) {\n style = {\n height: `100%`,\n left: 0,\n position: `absolute`,\n top: 0,\n transform: `translateZ(0)`,\n transition: `opacity 250ms linear`,\n width: `100%`,\n willChange: `opacity`,\n ...style,\n }\n }\n\n const result = {\n ...images,\n loading,\n shouldLoad: isLoading,\n \"data-main-image\": ``,\n style: {\n ...style,\n opacity: isLoaded ? 1 : 0,\n },\n }\n\n return result\n}\n\nexport type PlaceholderImageAttrs = ImgHTMLAttributes &\n Pick & {\n \"data-placeholder-image\"?: string\n }\n\nexport function getPlaceholderProps(\n placeholder: PlaceholderImageAttrs | undefined,\n isLoaded: boolean,\n layout: Layout,\n width?: number,\n height?: number,\n backgroundColor?: string,\n objectFit?: CSSProperties[\"objectFit\"],\n objectPosition?: CSSProperties[\"objectPosition\"]\n): PlaceholderImageAttrs {\n const wrapperStyle: CSSProperties = {}\n\n if (backgroundColor) {\n wrapperStyle.backgroundColor = backgroundColor\n\n if (layout === `fixed`) {\n wrapperStyle.width = width\n wrapperStyle.height = height\n wrapperStyle.backgroundColor = backgroundColor\n wrapperStyle.position = `relative`\n } else if (layout === `constrained`) {\n wrapperStyle.position = `absolute`\n wrapperStyle.top = 0\n wrapperStyle.left = 0\n wrapperStyle.bottom = 0\n wrapperStyle.right = 0\n } else if (layout === `fullWidth`) {\n wrapperStyle.position = `absolute`\n wrapperStyle.top = 0\n wrapperStyle.left = 0\n wrapperStyle.bottom = 0\n wrapperStyle.right = 0\n }\n }\n\n if (objectFit) {\n wrapperStyle.objectFit = objectFit\n }\n\n if (objectPosition) {\n wrapperStyle.objectPosition = objectPosition\n }\n const result: PlaceholderImageAttrs = {\n ...placeholder,\n \"aria-hidden\": true,\n \"data-placeholder-image\": ``,\n style: {\n opacity: isLoaded ? 0 : 1,\n transition: `opacity 500ms linear`,\n ...wrapperStyle,\n },\n }\n\n // fallback when it's not configured in gatsby-config.\n if (!gatsbyImageIsInstalled()) {\n result.style = {\n height: `100%`,\n left: 0,\n position: `absolute`,\n top: 0,\n width: `100%`,\n }\n }\n\n return result\n}\n\nexport interface IArtDirectedImage {\n media: string\n image: IGatsbyImageData\n}\n\n/**\n * Generate a Gatsby image data object with multiple, art-directed images that display at different\n * resolutions.\n *\n * @param defaultImage The image displayed when no media query matches.\n * It is also used for all other settings applied to the image, such as width, height and layout.\n * You should pass a className to the component with media queries to adjust the size of the container,\n * as this cannot be adjusted automatically.\n * @param artDirected Array of objects which each contains a `media` string which is a media query\n * such as `(min-width: 320px)`, and the image object to use when that query matches.\n */\nexport function withArtDirection(\n defaultImage: IGatsbyImageData,\n artDirected: Array\n): IGatsbyImageData {\n const { images, placeholder, ...props } = defaultImage\n const output: IGatsbyImageData = {\n ...props,\n images: {\n ...images,\n sources: [],\n },\n placeholder: placeholder && {\n ...placeholder,\n sources: [],\n },\n }\n\n artDirected.forEach(({ media, image }) => {\n if (!media) {\n if (process.env.NODE_ENV === `development`) {\n console.warn(\n \"[gatsby-plugin-image] All art-directed images passed to must have a value set for `media`. Skipping.\"\n )\n }\n return\n }\n\n if (\n image.layout !== defaultImage.layout &&\n process.env.NODE_ENV === `development`\n ) {\n console.warn(\n `[gatsby-plugin-image] Mismatched image layout: expected \"${defaultImage.layout}\" but received \"${image.layout}\". All art-directed images use the same layout as the default image`\n )\n }\n\n output.images.sources.push(\n ...image.images.sources.map(source => {\n return { ...source, media }\n }),\n {\n media,\n srcSet: image.images.fallback.srcSet,\n }\n )\n\n if (!output.placeholder) {\n return\n }\n\n output.placeholder.sources.push({\n media,\n srcSet: image.placeholder.fallback,\n })\n })\n output.images.sources.push(...images.sources)\n if (placeholder?.sources) {\n output.placeholder?.sources.push(...placeholder.sources)\n }\n return output\n}\n","import React, { Fragment, FunctionComponent, PropsWithChildren } from \"react\"\nimport terserMacro from \"../../macros/terser.macro\"\nimport { Layout } from \"../image-utils\"\n\nexport interface ILayoutWrapperProps {\n layout: Layout\n width: number\n height: number\n}\n\nconst NativeScriptLoading: FunctionComponent = () => (\n \n)\n\nexport function getSizer(\n layout: Layout,\n width: number,\n height: number\n): string {\n let sizer = ``\n if (layout === `fullWidth`) {\n sizer = `
`\n }\n\n if (layout === `constrained`) {\n sizer = `
\"\"
`\n }\n\n return sizer\n}\n\nconst Sizer: FunctionComponent = function Sizer({\n layout,\n width,\n height,\n}) {\n if (layout === `fullWidth`) {\n return (\n
\n )\n }\n\n if (layout === `constrained`) {\n return (\n
\n \n
\n )\n }\n\n return null\n}\n\nexport const LayoutWrapper: FunctionComponent<\n PropsWithChildren\n> = function LayoutWrapper({ children, ...props }) {\n return (\n \n \n {children}\n\n {SERVER ? : null}\n \n )\n}\n","import React, { FunctionComponent, ImgHTMLAttributes } from \"react\"\nimport * as PropTypes from \"prop-types\"\n\nexport interface IResponsiveImageProps {\n sizes?: string\n srcSet: string\n}\n\nexport type SourceProps = IResponsiveImageProps &\n (\n | {\n media: string\n type?: string\n }\n | {\n media?: string\n type: string\n }\n )\n\ntype FallbackProps = { src: string } & Partial\n\ntype ImageProps = ImgHTMLAttributes & {\n src: string\n alt: string\n shouldLoad: boolean\n}\n\nexport type PictureProps = ImgHTMLAttributes & {\n fallback?: FallbackProps\n sources?: Array\n alt: string\n shouldLoad?: boolean\n}\n\nconst Image: FunctionComponent = function Image({\n src,\n srcSet,\n loading,\n alt = ``,\n shouldLoad,\n ...props\n}) {\n return (\n \n )\n}\n\nexport const Picture: React.FC = function Picture({\n fallback,\n sources = [],\n shouldLoad = true,\n ...props\n}) {\n const sizes = props.sizes || fallback?.sizes\n const fallbackImage = (\n \n )\n\n if (!sources.length) {\n return fallbackImage\n }\n\n return (\n \n {sources.map(({ media, srcSet, type }) => (\n \n ))}\n {fallbackImage}\n \n )\n}\n\nImage.propTypes = {\n src: PropTypes.string.isRequired,\n alt: PropTypes.string.isRequired,\n sizes: PropTypes.string,\n srcSet: PropTypes.string,\n shouldLoad: PropTypes.bool,\n}\n\nPicture.displayName = `Picture`\nPicture.propTypes = {\n alt: PropTypes.string.isRequired,\n shouldLoad: PropTypes.bool,\n fallback: PropTypes.exact({\n src: PropTypes.string.isRequired,\n srcSet: PropTypes.string,\n sizes: PropTypes.string,\n }),\n sources: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.exact({\n media: PropTypes.string.isRequired,\n type: PropTypes.string,\n sizes: PropTypes.string,\n srcSet: PropTypes.string.isRequired,\n }),\n PropTypes.exact({\n media: PropTypes.string,\n type: PropTypes.string.isRequired,\n sizes: PropTypes.string,\n srcSet: PropTypes.string.isRequired,\n }),\n ])\n ),\n}\n","import React, { FunctionComponent, ImgHTMLAttributes } from \"react\"\nimport * as PropTypes from \"prop-types\"\nimport { Picture, SourceProps } from \"./picture\"\n\nexport type PlaceholderProps = ImgHTMLAttributes & {\n fallback?: string\n sources?: Array\n}\n\nexport const Placeholder: FunctionComponent =\n function Placeholder({ fallback, ...props }) {\n if (fallback) {\n return (\n \n )\n } else {\n return
\n }\n }\n\nPlaceholder.displayName = `Placeholder`\nPlaceholder.propTypes = {\n fallback: PropTypes.string,\n sources: Picture.propTypes?.sources,\n alt: function (props, propName, componentName): Error | null {\n if (!props[propName]) {\n return null\n }\n\n return new Error(\n `Invalid prop \\`${propName}\\` supplied to \\`${componentName}\\`. Validation failed.`\n )\n },\n}\n","import React from \"react\"\nimport { Picture, PictureProps } from \"./picture\"\n\nexport type MainImageProps = PictureProps\n\nexport const MainImage: React.FC = function MainImage(props) {\n return (\n <>\n \n \n \n )\n}\n\nMainImage.displayName = `MainImage`\nMainImage.propTypes = Picture.propTypes\n","import React from \"react\"\nimport { getWrapperProps, getMainProps, getPlaceholderProps } from \"./hooks\"\nimport { Placeholder } from \"./placeholder\"\nimport { MainImage, MainImageProps } from \"./main-image\"\nimport { LayoutWrapper } from \"./layout-wrapper\"\nimport PropTypes from \"prop-types\"\nimport type { FunctionComponent, WeakValidationMap } from \"react\"\nimport type { GatsbyImageProps, IGatsbyImageData } from \"./gatsby-image.browser\"\n\nconst removeNewLines = (str: string): string => str.replace(/\\n/g, ``)\n\nexport const GatsbyImage: FunctionComponent =\n function GatsbyImage({\n as = `div`,\n className,\n class: preactClass,\n style,\n image,\n loading = `lazy`,\n imgClassName,\n imgStyle,\n backgroundColor,\n objectFit,\n objectPosition,\n ...props\n }) {\n if (!image) {\n console.warn(`[gatsby-plugin-image] Missing image prop`)\n return null\n }\n\n if (preactClass) {\n className = preactClass\n }\n\n imgStyle = {\n objectFit,\n objectPosition,\n backgroundColor,\n ...imgStyle,\n }\n\n const {\n width,\n height,\n layout,\n images,\n placeholder,\n backgroundColor: placeholderBackgroundColor,\n } = image\n\n const {\n style: wStyle,\n className: wClass,\n ...wrapperProps\n } = getWrapperProps(width, height, layout)\n\n const cleanedImages: IGatsbyImageData[\"images\"] = {\n fallback: undefined,\n sources: [],\n }\n if (images.fallback) {\n cleanedImages.fallback = {\n ...images.fallback,\n srcSet: images.fallback.srcSet\n ? removeNewLines(images.fallback.srcSet)\n : undefined,\n }\n }\n\n if (images.sources) {\n cleanedImages.sources = images.sources.map(source => {\n return {\n ...source,\n srcSet: removeNewLines(source.srcSet),\n }\n })\n }\n\n return React.createElement(\n as,\n {\n ...wrapperProps,\n style: {\n ...wStyle,\n ...style,\n backgroundColor,\n },\n className: `${wClass}${className ? ` ${className}` : ``}`,\n },\n \n \n\n )}\n // When eager is set we want to start the isLoading state on true (we want to load the img without react)\n {...getMainProps(\n loading === `eager`,\n false,\n cleanedImages,\n loading,\n imgStyle\n )}\n />\n \n )\n }\n\nexport const altValidator: PropTypes.Validator = (\n props: GatsbyImageProps,\n propName,\n componentName,\n ...rest\n): Error | undefined => {\n if (!props.alt && props.alt !== ``) {\n return new Error(\n `The \"alt\" prop is required in ${componentName}. If the image is purely presentational then pass an empty string: e.g. alt=\"\". Learn more: https://a11y-style-guide.com/style-guide/section-media.html`\n )\n }\n\n return PropTypes.string(props, propName, componentName, ...rest)\n}\n\nexport const propTypes = {\n image: PropTypes.object.isRequired,\n alt: altValidator,\n} as WeakValidationMap\n","import {\n createElement,\n memo,\n useMemo,\n useEffect,\n useLayoutEffect,\n useRef,\n} from \"react\"\nimport {\n getWrapperProps,\n gatsbyImageIsInstalled,\n hasNativeLazyLoadSupport,\n} from \"./hooks\"\nimport { getSizer } from \"./layout-wrapper\"\nimport { propTypes } from \"./gatsby-image.server\"\nimport type {\n FC,\n ElementType,\n FunctionComponent,\n ImgHTMLAttributes,\n CSSProperties,\n ReactEventHandler,\n} from \"react\"\nimport type { renderImageToString } from \"./lazy-hydrate\"\nimport type { PlaceholderProps } from \"./placeholder\"\nimport type { MainImageProps } from \"./main-image\"\nimport type { Layout } from \"../image-utils\"\n\nconst imageCache = new Set()\nlet renderImageToStringPromise\nlet renderImage: typeof renderImageToString | undefined\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface GatsbyImageProps\n extends Omit<\n ImgHTMLAttributes,\n \"placeholder\" | \"onLoad\" | \"src\" | \"srcSet\" | \"width\" | \"height\"\n > {\n alt: string\n as?: ElementType\n className?: string\n class?: string\n imgClassName?: string\n image: IGatsbyImageData\n imgStyle?: CSSProperties\n backgroundColor?: string\n objectFit?: CSSProperties[\"objectFit\"]\n objectPosition?: CSSProperties[\"objectPosition\"]\n onLoad?: (props: { wasCached: boolean }) => void\n onError?: ReactEventHandler\n onStartLoad?: (props: { wasCached: boolean }) => void\n}\n\nexport interface IGatsbyImageData {\n layout: Layout\n width: number\n height: number\n backgroundColor?: string\n images: Pick\n placeholder?: Pick\n}\n\nconst GatsbyImageHydrator: FC = function GatsbyImageHydrator({\n as = `div`,\n image,\n style,\n backgroundColor,\n className,\n class: preactClass,\n onStartLoad,\n onLoad,\n onError,\n ...props\n}) {\n const { width, height, layout } = image\n const {\n style: wStyle,\n className: wClass,\n ...wrapperProps\n } = getWrapperProps(width, height, layout)\n const root = useRef()\n const cacheKey = useMemo(() => JSON.stringify(image.images), [image.images])\n\n // Preact uses class instead of className so we need to check for both\n if (preactClass) {\n className = preactClass\n }\n\n const sizer = getSizer(layout, width, height)\n\n useEffect(() => {\n if (!renderImageToStringPromise) {\n renderImageToStringPromise = import(`./lazy-hydrate`).then(\n ({ renderImageToString, swapPlaceholderImage }) => {\n renderImage = renderImageToString\n\n return {\n renderImageToString,\n swapPlaceholderImage,\n }\n }\n )\n }\n\n // The plugin image component is a bit special where if it's server-side rendered, we add extra script tags to support lazy-loading without\n // In this case we stop hydration but fire the correct events.\n const ssrImage = root.current.querySelector(\n `[data-gatsby-image-ssr]`\n ) as HTMLImageElement\n if (ssrImage && hasNativeLazyLoadSupport()) {\n if (ssrImage.complete) {\n // Trigger onStartload and onLoad events\n onStartLoad?.({\n wasCached: true,\n })\n onLoad?.({\n wasCached: true,\n })\n\n // remove ssr key for state updates but add delay to not fight with native code snippt of gatsby-ssr\n setTimeout(() => {\n ssrImage.removeAttribute(`data-gatsby-image-ssr`)\n }, 0)\n } else {\n onStartLoad?.({\n wasCached: true,\n })\n\n ssrImage.addEventListener(`load`, function onLoadListener() {\n ssrImage.removeEventListener(`load`, onLoadListener)\n\n onLoad?.({\n wasCached: true,\n })\n // remove ssr key for state updates but add delay to not fight with native code snippt of gatsby-ssr\n setTimeout(() => {\n ssrImage.removeAttribute(`data-gatsby-image-ssr`)\n }, 0)\n })\n }\n\n imageCache.add(cacheKey)\n\n return\n }\n\n if (renderImage && imageCache.has(cacheKey)) {\n return\n }\n\n let animationFrame\n let cleanupCallback\n renderImageToStringPromise.then(\n ({ renderImageToString, swapPlaceholderImage }) => {\n if (!root.current) {\n return\n }\n\n root.current.innerHTML = renderImageToString({\n isLoading: true,\n isLoaded: imageCache.has(cacheKey),\n image,\n ...props,\n })\n\n if (!imageCache.has(cacheKey)) {\n animationFrame = requestAnimationFrame(() => {\n if (root.current) {\n cleanupCallback = swapPlaceholderImage(\n root.current,\n cacheKey,\n imageCache,\n style,\n onStartLoad,\n onLoad,\n onError\n )\n }\n })\n }\n }\n )\n\n // eslint-disable-next-line consistent-return\n return (): void => {\n if (animationFrame) {\n cancelAnimationFrame(animationFrame)\n }\n if (cleanupCallback) {\n cleanupCallback()\n }\n }\n }, [image])\n\n // useLayoutEffect is ran before React commits to the DOM. This allows us to make sure our HTML is using our cached image version\n useLayoutEffect(() => {\n if (imageCache.has(cacheKey) && renderImage) {\n root.current.innerHTML = renderImage({\n isLoading: imageCache.has(cacheKey),\n isLoaded: imageCache.has(cacheKey),\n image,\n ...props,\n })\n\n // Trigger onStartload and onLoad events\n onStartLoad?.({\n wasCached: true,\n })\n onLoad?.({\n wasCached: true,\n })\n }\n }, [image])\n\n // By keeping all props equal React will keep the component in the DOM\n return createElement(as, {\n ...wrapperProps,\n style: {\n ...wStyle,\n ...style,\n backgroundColor,\n },\n className: `${wClass}${className ? ` ${className}` : ``}`,\n ref: root,\n dangerouslySetInnerHTML: {\n __html: sizer,\n },\n suppressHydrationWarning: true,\n })\n}\n\nexport const GatsbyImage: FunctionComponent = memo(\n function GatsbyImage(props) {\n if (!props.image) {\n if (process.env.NODE_ENV === `development`) {\n console.warn(`[gatsby-plugin-image] Missing image prop`)\n }\n\n return null\n }\n\n if (!gatsbyImageIsInstalled() && process.env.NODE_ENV === `development`) {\n console.warn(\n `[gatsby-plugin-image] You're missing out on some cool performance features. Please add \"gatsby-plugin-image\" to your gatsby-config.js`\n )\n }\n\n return createElement(GatsbyImageHydrator, props)\n }\n)\n\nGatsbyImage.propTypes = propTypes\nGatsbyImage.displayName = `GatsbyImage`\n","import React, { FunctionComponent, ReactElement } from \"react\"\nimport {\n altValidator,\n GatsbyImage as GatsbyImageServer,\n} from \"./gatsby-image.server\"\nimport { GatsbyImageProps, IGatsbyImageData } from \"./gatsby-image.browser\"\nimport PropTypes from \"prop-types\"\nimport { ISharpGatsbyImageArgs } from \"../image-utils\"\n\nexport interface IStaticImageProps\n extends Omit,\n Omit {\n src: string\n filename?: string\n}\n\n// These values are added by Babel. Do not add them manually\ninterface IPrivateProps {\n __imageData?: IGatsbyImageData\n __error?: string\n}\n\nexport function _getStaticImage(\n GatsbyImage: FunctionComponent\n): React.FC {\n return function StaticImage({\n src,\n __imageData: imageData,\n __error,\n // We extract these because they're not meant to be passed-down to GatsbyImage\n /* eslint-disable @typescript-eslint/no-unused-vars */\n width,\n height,\n aspectRatio,\n tracedSVGOptions,\n placeholder,\n formats,\n quality,\n transformOptions,\n jpgOptions,\n pngOptions,\n webpOptions,\n avifOptions,\n blurredOptions,\n breakpoints,\n outputPixelDensities,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...props\n }): ReactElement {\n if (__error) {\n console.warn(__error)\n }\n\n if (imageData) {\n return \n }\n console.warn(`Image not loaded`, src)\n if (!__error && process.env.NODE_ENV === `development`) {\n console.warn(\n `Please ensure that \"gatsby-plugin-image\" is included in the plugins array in gatsby-config.js, and that your version of gatsby is at least 2.24.78`\n )\n }\n return null\n }\n}\n\nconst StaticImage: React.FC =\n _getStaticImage(GatsbyImageServer)\n\nconst checkDimensionProps: PropTypes.Validator = (\n props: IStaticImageProps & IPrivateProps,\n propName: keyof IStaticImageProps & IPrivateProps,\n ...rest\n) => {\n if (\n props.layout === `fullWidth` &&\n (propName === `width` || propName === `height`) &&\n props[propName]\n ) {\n return new Error(\n `\"${propName}\" ${props[propName]} may not be passed when layout is fullWidth.`\n )\n }\n return PropTypes.number(props, propName, ...rest)\n}\n\nconst validLayouts = new Set([`fixed`, `fullWidth`, `constrained`])\n\nexport const propTypes = {\n src: PropTypes.string.isRequired,\n alt: altValidator,\n width: checkDimensionProps,\n height: checkDimensionProps,\n sizes: PropTypes.string,\n layout: (props: IStaticImageProps & IPrivateProps): Error | undefined => {\n if (props.layout === undefined) {\n return undefined\n }\n if (validLayouts.has(props.layout)) {\n return undefined\n }\n\n return new Error(\n `Invalid value ${props.layout}\" provided for prop \"layout\". Defaulting to \"constrained\". Valid values are \"fixed\", \"fullWidth\" or \"constrained\".`\n )\n },\n}\n\nStaticImage.displayName = `StaticImage`\nStaticImage.propTypes = propTypes\n\nexport { StaticImage }\n","import {\n GatsbyImage as GatsbyImageBrowser,\n IGatsbyImageData,\n} from \"./gatsby-image.browser\"\nimport React from \"react\"\nimport {\n _getStaticImage,\n propTypes,\n IStaticImageProps,\n} from \"./static-image.server\"\n// These values are added by Babel. Do not add them manually\ninterface IPrivateProps {\n __imageData?: IGatsbyImageData\n __error?: string\n}\n\nconst StaticImage: React.FC =\n _getStaticImage(GatsbyImageBrowser)\n\nStaticImage.displayName = `StaticImage`\nStaticImage.propTypes = propTypes\n\nexport { StaticImage }\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t (\n \n \n
\n ({\n y: 0,\n transition: {\n delay: i * 0.1,\n },\n }),\n }}\n className={clsx(motionDiv, word === \" \" && spacing)}\n custom={i}\n >\n {word}\n \n
\n \n
\n ))\n}\n","// extracted by mini-css-extract-plugin\nexport var container = \"split-text-module--container--38c69\";\nexport var motionDiv = \"split-text-module--motion-div--9a9fd\";\nexport var spacing = \"split-text-module--spacing--7be47\";\nexport var wrapper = \"split-text-module--wrapper--636e1\";","import React, { useEffect, useState } from \"react\"\nimport { wrapper, inner, hide, icon, logo } from \"./navigation.module.css\"\nimport { Link } from \"gatsby\"\nimport { SplitText } from \"../split-text\"\nimport clsx from \"clsx\"\nimport { ReactComponent as Github } from \"/static/images/github.svg\"\nimport throttle from \"lodash/throttle\"\nimport { StaticImage } from \"gatsby-plugin-image\"\n\nconst Navigation = () => {\n const [showNavigation, setShowNavigation] = useState(true)\n const [prevScrollPos, setPrevScrollPos] = useState(0)\n\n useEffect(() => {\n const handleScroll = throttle(() => {\n const currentScrollPos = window.scrollY\n\n if (prevScrollPos > currentScrollPos) {\n setShowNavigation(true)\n } else {\n setShowNavigation(false)\n }\n\n setPrevScrollPos(currentScrollPos)\n }, 300)\n\n if (typeof window !== \"undefined\") {\n setPrevScrollPos(window.scrollY)\n window.addEventListener(\"scroll\", handleScroll)\n }\n\n return () => {\n if (typeof window !== \"undefined\") {\n window.removeEventListener(\"scroll\", handleScroll)\n }\n }\n }, [prevScrollPos])\n\n return (\n
\n )\n}\n\nexport default Navigation\n","// extracted by mini-css-extract-plugin\nexport var hide = \"navigation-module--hide--a9821\";\nexport var icon = \"navigation-module--icon--bf065\";\nexport var inner = \"navigation-module--inner--e3a96\";\nexport var logo = \"navigation-module--logo--ffe4d\";\nexport var wrapper = \"navigation-module--wrapper--2382f\";","import * as React from \"react\"\nimport Navigation from \"../@layout/navigation\"\n\nconst Layout = ({ location, children }) => {\n const rootPath = `${__PATH_PREFIX__}`\n const isRootPath = location.pathname === rootPath\n\n return (\n
\n
\n \n
\n {children}\n
\n © {new Date().getFullYear()}, Built with\n {` `}\n Gatsby\n
\n
\n )\n}\n\nexport default Layout\n","/**\n * SEO component that queries for data with\n * Gatsby's useStaticQuery React hook\n *\n * See: https://www.gatsbyjs.com/docs/how-to/querying-data/use-static-query/\n */\n\nimport * as React from \"react\"\nimport { useStaticQuery, graphql } from \"gatsby\"\n\nconst Seo = ({ description, title, children }) => {\n const { site } = useStaticQuery(\n graphql`\n query {\n site {\n siteMetadata {\n title\n description\n social {\n twitter\n }\n }\n }\n }\n `\n )\n\n const metaDescription = description || site.siteMetadata.description\n const defaultTitle = site.siteMetadata?.title\n\n return (\n <>\n {defaultTitle ? `${title} | ${defaultTitle}` : title}\n \n \n \n \n \n \n \n \n {children}\n \n )\n}\n\nexport default Seo\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nconst MotionConfigContext = createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n","import { createContext } from 'react';\n\nconst MotionContext = createContext({});\n\nexport { MotionContext };\n","import { createContext } from 'react';\n\nconst LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\n","function isRefObject(ref) {\n return (typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n\nexport { isRefObject };\n","/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || Array.isArray(v);\n}\n\nexport { isVariantLabel };\n","function isAnimationControls(v) {\n return typeof v === \"object\" && typeof v.start === \"function\";\n}\n\nexport { isAnimationControls };\n","const variantPriorityOrder = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\",\n];\nconst variantProps = [\"initial\", ...variantPriorityOrder];\n\nexport { variantPriorityOrder, variantProps };\n","import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n return (isAnimationControls(props.animate) ||\n variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n","import { useContext, useMemo } from 'react';\nimport { MotionContext } from './index.mjs';\nimport { getCurrentTreeVariants } from './utils.mjs';\n\nfunction useCreateMotionContext(props) {\n const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext));\n return useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n","import { isVariantLabel } from '../../render/utils/is-variant-label.mjs';\nimport { isControllingVariants } from '../../render/utils/is-controlling-variants.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n if (isControllingVariants(props)) {\n const { initial, animate } = props;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n","const featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\",\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n};\nconst featureDefinitions = {};\nfor (const key in featureProps) {\n featureDefinitions[key] = {\n isEnabled: (props) => featureProps[key].some((name) => !!props[name]),\n };\n}\n\nexport { featureDefinitions };\n","import { createContext } from 'react';\n\n/**\n * Internal, exported only for usage in Framer\n */\nconst SwitchLayoutGroupContext = createContext({});\n\nexport { SwitchLayoutGroupContext };\n","const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\");\n\nexport { motionComponentSymbol };\n","import * as React from 'react';\nimport { forwardRef, useContext } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { loadFeatures } from './features/load-features.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { LazyContext } from '../context/LazyContext.mjs';\nimport { SwitchLayoutGroupContext } from '../context/SwitchLayoutGroupContext.mjs';\nimport { motionComponentSymbol } from './utils/symbol.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nfunction createMotionComponent({ preloadedFeatures, createVisualElement, useRender, useVisualState, Component, }) {\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout;\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n };\n const { isStatic } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState(props, isStatic);\n if (!isStatic && isBrowser) {\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement);\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext);\n const isStrict = useContext(LazyContext).strict;\n if (context.visualElement) {\n MeasureLayout = context.visualElement.loadFeatures(\n // Note: Pass the full new combined props to correctly re-render dynamic feature components.\n configAndProps, isStrict, preloadedFeatures, initialLayoutGroupConfig);\n }\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (React.createElement(MotionContext.Provider, { value: context },\n MeasureLayout && context.visualElement ? (React.createElement(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null,\n useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)));\n }\n const ForwardRefComponent = forwardRef(MotionComponent);\n ForwardRefComponent[motionComponentSymbol] = Component;\n return ForwardRefComponent;\n}\nfunction useLayoutId({ layoutId }) {\n const layoutGroupId = useContext(LayoutGroupContext).id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\n\nexport { createMotionComponent };\n","import { featureDefinitions } from './definitions.mjs';\n\nfunction loadFeatures(features) {\n for (const key in features) {\n featureDefinitions[key] = {\n ...featureDefinitions[key],\n ...features[key],\n };\n }\n}\n\nexport { loadFeatures };\n","import { useContext, useRef, useInsertionEffect, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\n\nfunction useVisualElement(Component, visualState, props, createVisualElement) {\n const { visualElement: parent } = useContext(MotionContext);\n const lazyContext = useContext(LazyContext);\n const presenceContext = useContext(PresenceContext);\n const reducedMotionConfig = useContext(MotionConfigContext).reducedMotion;\n const visualElementRef = useRef();\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n createVisualElement = createVisualElement || lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState,\n parent,\n props,\n presenceContext,\n blockInitialAnimation: presenceContext\n ? presenceContext.initial === false\n : false,\n reducedMotionConfig,\n });\n }\n const visualElement = visualElementRef.current;\n useInsertionEffect(() => {\n visualElement && visualElement.update(props, presenceContext);\n });\n /**\n * Cache this value as we want to know whether HandoffAppearAnimations\n * was present on initial render - it will be deleted after this.\n */\n const canHandoff = useRef(Boolean(window.HandoffAppearAnimations));\n useIsomorphicLayoutEffect(() => {\n if (!visualElement)\n return;\n visualElement.render();\n /**\n * Ideally this function would always run in a useEffect.\n *\n * However, if we have optimised appear animations to handoff from,\n * it needs to happen synchronously to ensure there's no flash of\n * incorrect styles in the event of a hydration error.\n *\n * So if we detect a situtation where optimised appear animations\n * are running, we use useLayoutEffect to trigger animations.\n */\n if (canHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n });\n useEffect(() => {\n if (!visualElement)\n return;\n visualElement.updateFeatures();\n if (!canHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n /**\n * Once we've handed off animations we can delete HandoffAppearAnimations\n * so components added after the initial render can animate changes\n * in useEffect vs useLayoutEffect.\n */\n window.HandoffAppearAnimations = undefined;\n canHandoff.current = false;\n });\n return visualElement;\n}\n\nexport { useVisualElement };\n","import { useCallback } from 'react';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nfunction useMotionRef(visualState, visualElement, externalRef) {\n return useCallback((instance) => {\n instance && visualState.mount && visualState.mount(instance);\n if (visualElement) {\n instance\n ? visualElement.mount(instance)\n : visualElement.unmount();\n }\n if (externalRef) {\n if (typeof externalRef === \"function\") {\n externalRef(instance);\n }\n else if (isRefObject(externalRef)) {\n externalRef.current = instance;\n }\n }\n }, \n /**\n * Only pass a new ref callback to React if we've received a visual element\n * factory. Otherwise we'll be mounting/remounting every time externalRef\n * or other dependencies change.\n */\n [visualElement]);\n}\n\nexport { useMotionRef };\n","import { createMotionComponent } from '../../motion/index.mjs';\n\n/**\n * Convert any React component into a `motion` component. The provided component\n * **must** use `React.forwardRef` to the underlying DOM component you want to animate.\n *\n * ```jsx\n * const Component = React.forwardRef((props, ref) => {\n * return
\n * })\n *\n * const MotionComponent = motion(Component)\n * ```\n *\n * @public\n */\nfunction createMotionProxy(createConfig) {\n function custom(Component, customMotionComponentConfig = {}) {\n return createMotionComponent(createConfig(Component, customMotionComponentConfig));\n }\n if (typeof Proxy === \"undefined\") {\n return custom;\n }\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n const componentCache = new Map();\n return new Proxy(custom, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: (_target, key) => {\n /**\n * If this element doesn't exist in the component cache, create it and cache.\n */\n if (!componentCache.has(key)) {\n componentCache.set(key, custom(key));\n }\n return componentCache.get(key);\n },\n });\n}\n\nexport { createMotionProxy };\n","/**\n * We keep these listed seperately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nconst lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"switch\",\n \"symbol\",\n \"svg\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n];\n\nexport { lowercaseSVGElements };\n","import { lowercaseSVGElements } from '../../svg/lowercase-elements.mjs';\n\nfunction isSVGComponent(Component) {\n if (\n /**\n * If it's not a string, it's a custom React component. Currently we only support\n * HTML custom React components.\n */\n typeof Component !== \"string\" ||\n /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component.includes(\"-\")) {\n return false;\n }\n else if (\n /**\n * If it's in our list of lowercase SVG tags, it's an SVG component\n */\n lowercaseSVGElements.indexOf(Component) > -1 ||\n /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/.test(Component)) {\n return true;\n }\n return false;\n}\n\nexport { isSVGComponent };\n","const scaleCorrectors = {};\nfunction addScaleCorrector(correctors) {\n Object.assign(scaleCorrectors, correctors);\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n","/**\n * Generate a list of every possible transform key.\n */\nconst transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n */\nconst transformProps = new Set(transformPropOrder);\n\nexport { transformPropOrder, transformProps };\n","import { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nimport { transformProps } from '../../render/html/utils/transform.mjs';\n\nfunction isForcedMotionValue(key, { layout, layoutId }) {\n return (transformProps.has(key) ||\n key.startsWith(\"origin\") ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue };\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\n","import { transformPropOrder } from './transform.mjs';\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(transform, { enableHardwareAcceleration = true, allowTransformNone = true, }, transformIsDefault, transformTemplate) {\n // The transform string we're going to build into.\n let transformString = \"\";\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n if (transform[key] !== undefined) {\n const transformName = translateAlias[key] || key;\n transformString += `${transformName}(${transform[key]}) `;\n }\n }\n if (enableHardwareAcceleration && !transform.z) {\n transformString += \"translateZ(0)\";\n }\n transformString = transformString.trim();\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n }\n else if (allowTransformNone && transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n\nexport { buildTransform };\n","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = checkStringStartsWith(\"--\");\nconst isCSSVariableToken = checkStringStartsWith(\"var(--\");\nconst cssVariableRegex = /var\\s*\\(\\s*--[\\w-]+(\\s*,\\s*(?:(?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)+)?\\s*\\)/g;\n\nexport { cssVariableRegex, isCSSVariableName, isCSSVariableToken };\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nconst getValueAsType = (value, type) => {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n\nexport { getValueAsType };\n","const clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nexport { clamp };\n","import { clamp } from '../../../utils/clamp.mjs';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n","/**\n * TODO: When we move from string as a source of truth to data models\n * everything in this folder should probably be referred to as models vs types\n */\n// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\nconst floatRegex = /(-)?([\\d]*\\.?[\\d])+/g;\nconst colorRegex = /(#[0-9a-f]{3,8}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2}(-?[\\d\\.]+%?)\\s*[\\,\\/]?\\s*[\\d\\.]*%?\\))/gi;\nconst singleColorRegex = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2}(-?[\\d\\.]+%?)\\s*[\\,\\/]?\\s*[\\d\\.]*%?\\))$/i;\nfunction isString(v) {\n return typeof v === \"string\";\n}\n\nexport { colorRegex, floatRegex, isString, sanitize, singleColorRegex };\n","import { isString } from '../utils.mjs';\n\nconst createUnitType = (unit) => ({\n test: (v) => isString(v) && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = createUnitType(\"deg\");\nconst percent = createUnitType(\"%\");\nconst px = createUnitType(\"px\");\nconst vh = createUnitType(\"vh\");\nconst vw = createUnitType(\"vw\");\nconst progressPercentage = {\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n};\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n","import { number } from '../../../value/types/numbers/index.mjs';\n\nconst int = {\n ...number,\n transform: Math.round,\n};\n\nexport { int };\n","import { scale, alpha } from '../../../value/types/numbers/index.mjs';\nimport { px, degrees, progressPercentage } from '../../../value/types/numbers/units.mjs';\nimport { int } from './type-int.mjs';\n\nconst numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n radius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n size: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n // Transform props\n rotate: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n // Misc\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n","import { buildTransform } from './build-transform.mjs';\nimport { isCSSVariableName } from '../../dom/utils/is-css-variable.mjs';\nimport { transformProps } from './transform.mjs';\nimport { getValueAsType } from '../../dom/value-types/get-as-type.mjs';\nimport { numberValueTypes } from '../../dom/value-types/number.mjs';\n\nfunction buildHTMLStyles(state, latestValues, options, transformTemplate) {\n const { style, vars, transform, transformOrigin } = state;\n // Track whether we encounter any transform or transformOrigin values.\n let hasTransform = false;\n let hasTransformOrigin = false;\n // Does the calculated transform essentially equal \"none\"?\n let transformIsNone = true;\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept seperately for further processing.\n */\n for (const key in latestValues) {\n const value = latestValues[key];\n /**\n * If this is a CSS variable we don't do any further processing.\n */\n if (isCSSVariableName(key)) {\n vars[key] = value;\n continue;\n }\n // Convert the value to its default value type, ie 0 -> \"0px\"\n const valueType = numberValueTypes[key];\n const valueAsType = getValueAsType(value, valueType);\n if (transformProps.has(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n transform[key] = valueAsType;\n // If we already know we have a non-default transform, early return\n if (!transformIsNone)\n continue;\n // Otherwise check to see if this is a default transform\n if (value !== (valueType.default || 0))\n transformIsNone = false;\n }\n else if (key.startsWith(\"origin\")) {\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n transformOrigin[key] = valueAsType;\n }\n else {\n style[key] = valueAsType;\n }\n }\n if (!latestValues.transform) {\n if (hasTransform || transformTemplate) {\n style.transform = buildTransform(state.transform, options, transformIsNone, transformTemplate);\n }\n else if (style.transform) {\n /**\n * If we have previously created a transform but currently don't have any,\n * reset transform style to none.\n */\n style.transform = \"none\";\n }\n }\n /**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n if (hasTransformOrigin) {\n const { originX = \"50%\", originY = \"50%\", originZ = 0, } = transformOrigin;\n style.transformOrigin = `${originX} ${originY} ${originZ}`;\n }\n}\n\nexport { buildHTMLStyles };\n","const createHtmlRenderState = () => ({\n style: {},\n transform: {},\n transformOrigin: {},\n vars: {},\n});\n\nexport { createHtmlRenderState };\n","import { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nfunction copyRawValuesOnly(target, source, props) {\n for (const key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues({ transformTemplate }, visualState, isStatic) {\n return useMemo(() => {\n const state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);\n return Object.assign({}, state.vars, state.style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState, isStatic) {\n const styleProp = props.style || {};\n const style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState, isStatic));\n return props.transformValues ? props.transformValues(style) : style;\n}\nfunction useHTMLProps(props, visualState, isStatic) {\n // The `any` isn't ideal but it is the type of createElement props argument\n const htmlProps = {};\n const style = useStyle(props, visualState, isStatic);\n if (props.drag && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false;\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\";\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : `pan-${props.drag === \"x\" ? \"y\" : \"x\"}`;\n }\n if (props.tabIndex === undefined &&\n (props.onTap || props.onTapStart || props.whileTap)) {\n htmlProps.tabIndex = 0;\n }\n htmlProps.style = style;\n return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps };\n","/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nconst validMotionProps = new Set([\n \"animate\",\n \"exit\",\n \"variants\",\n \"initial\",\n \"style\",\n \"values\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"transformValues\",\n \"custom\",\n \"inherit\",\n \"onLayoutAnimationStart\",\n \"onLayoutAnimationComplete\",\n \"onLayoutMeasure\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"_dragX\",\n \"_dragY\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"ignoreStrict\",\n \"viewport\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nfunction isValidMotionProp(key) {\n return (key.startsWith(\"while\") ||\n (key.startsWith(\"drag\") && key !== \"draggable\") ||\n key.startsWith(\"layout\") ||\n key.startsWith(\"onTap\") ||\n key.startsWith(\"onPan\") ||\n validMotionProps.has(key));\n}\n\nexport { isValidMotionProp };\n","import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nlet shouldForward = (key) => !isValidMotionProp(key);\nfunction loadExternalIsValidProp(isValidProp) {\n if (!isValidProp)\n return;\n // Explicitly filter our events\n shouldForward = (key) => key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n */\n loadExternalIsValidProp(require(\"@emotion/is-prop-valid\").default);\n}\ncatch (_a) {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n const filteredProps = {};\n for (const key in props) {\n /**\n * values is considered a valid prop by Emotion, so if it's present\n * this will be rendered out to the DOM unless explicitly filtered.\n *\n * We check the type as it could be used with the `feColorMatrix`\n * element, which we support.\n */\n if (key === \"values\" && typeof props.values === \"object\")\n continue;\n if (shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\"] && key.startsWith(\"onDrag\"))) {\n filteredProps[key] = props[key];\n }\n }\n return filteredProps;\n}\n\nexport { filterProps, loadExternalIsValidProp };\n","import { px } from '../../../value/types/numbers/units.mjs';\n\nfunction calcOrigin(origin, offset, size) {\n return typeof origin === \"string\"\n ? origin\n : px.transform(offset + size * origin);\n}\n/**\n * The SVG transform origin defaults are different to CSS and is less intuitive,\n * so we use the measured dimensions of the SVG to reconcile these.\n */\nfunction calcSVGTransformOrigin(dimensions, originX, originY) {\n const pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);\n const pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);\n return `${pxOriginX} ${pxOriginY}`;\n}\n\nexport { calcSVGTransformOrigin };\n","import { px } from '../../../value/types/numbers/units.mjs';\n\nconst dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nconst camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n */\nfunction buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n const keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = px.transform(-offset);\n // Build the dash array\n const pathLength = px.transform(length);\n const pathSpacing = px.transform(spacing);\n attrs[keys.array] = `${pathLength} ${pathSpacing}`;\n}\n\nexport { buildSVGPath };\n","import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { calcSVGTransformOrigin } from './transform-origin.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * Build SVG visual attrbutes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, originX, originY, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, options, isSVGTag, transformTemplate) {\n buildHTMLStyles(state, latest, options, transformTemplate);\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox;\n }\n return;\n }\n state.attrs = state.style;\n state.style = {};\n const { attrs, style, dimensions } = state;\n /**\n * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs\n * and copy it into style.\n */\n if (attrs.transform) {\n if (dimensions)\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n // Parse transformOrigin\n if (dimensions &&\n (originX !== undefined || originY !== undefined || style.transform)) {\n style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);\n }\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n if (attrScale !== undefined)\n attrs.scale = attrScale;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };\n","import { createHtmlRenderState } from '../../html/utils/create-render-state.mjs';\n\nconst createSvgRenderState = () => ({\n ...createHtmlRenderState(),\n attrs: {},\n});\n\nexport { createSvgRenderState };\n","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\n","import { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\n\nfunction useSVGProps(props, visualState, _isStatic, Component) {\n const visualProps = useMemo(() => {\n const state = createSvgRenderState();\n buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, isSVGTag(Component), props.transformTemplate);\n return {\n ...state.attrs,\n style: { ...state.style },\n };\n }, [visualState]);\n if (props.style) {\n const rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = { ...rawStyles, ...visualProps.style };\n }\n return visualProps;\n}\n\nexport { useSVGProps };\n","import { useMemo, createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.mjs';\nimport { filterProps } from './utils/filter-props.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\nimport { useSVGProps } from '../svg/use-props.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction createUseRender(forwardMotionProps = false) {\n const useRender = (Component, props, ref, { latestValues }, isStatic) => {\n const useVisualProps = isSVGComponent(Component)\n ? useSVGProps\n : useHTMLProps;\n const visualProps = useVisualProps(props, latestValues, isStatic, Component);\n const filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n const elementProps = {\n ...filteredProps,\n ...visualProps,\n ref,\n };\n /**\n * If component has been handed a motion value as its child,\n * memoise its initial value and render that. Subsequent updates\n * will be handled by the onChange handler\n */\n const { children } = props;\n const renderedChildren = useMemo(() => (isMotionValue(children) ? children.get() : children), [children]);\n return createElement(Component, {\n ...elementProps,\n children: renderedChildren,\n });\n };\n return useRender;\n}\n\nexport { createUseRender };\n","/**\n * Convert camelCase to dash-case properties.\n */\nconst camelToDash = (str) => str.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n\nexport { camelToDash };\n","function renderHTML(element, { style, vars }, styleProp, projection) {\n Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));\n // Loop over any CSS variables and assign those.\n for (const key in vars) {\n element.style.setProperty(key, vars[key]);\n }\n}\n\nexport { renderHTML };\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nconst camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n \"startOffset\",\n \"textLength\",\n \"lengthAdjust\",\n]);\n\nexport { camelCaseAttributes };\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState, _styleProp, projection) {\n renderHTML(element, renderState, undefined, projection);\n for (const key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\nexport { renderSVG };\n","import { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps) {\n const { style } = props;\n const newValues = {};\n for (const key in style) {\n if (isMotionValue(style[key]) ||\n (prevProps.style && isMotionValue(prevProps.style[key])) ||\n isForcedMotionValue(key, props)) {\n newValues[key] = style[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\nimport { transformPropOrder } from '../../html/utils/transform.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps) {\n const newValues = scrapeMotionValuesFromProps$1(props, prevProps);\n for (const key in props) {\n if (isMotionValue(props[key]) || isMotionValue(prevProps[key])) {\n const targetKey = transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","function resolveVariantFromProps(props, definition, custom, currentValues = {}, currentVelocity = {}) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n definition = definition(custom !== undefined ? custom : props.custom, currentValues, currentVelocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n definition = definition(custom !== undefined ? custom : props.custom, currentValues, currentVelocity);\n }\n return definition;\n}\n\nexport { resolveVariantFromProps };\n","const isKeyframesTarget = (v) => {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n","import { isKeyframesTarget } from '../animation/utils/is-keyframes-target.mjs';\n\nconst isCustomValue = (v) => {\n return Boolean(v && typeof v === \"object\" && v.mix && v.toValue);\n};\nconst resolveFinalValueInKeyframes = (v) => {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n};\n\nexport { isCustomValue, resolveFinalValueInKeyframes };\n","import { isCustomValue } from '../../utils/resolve-value.mjs';\nimport { isMotionValue } from './is-motion-value.mjs';\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n *\n * TODO: Remove and move to library\n */\nfunction resolveMotionValue(value) {\n const unwrappedValue = isMotionValue(value) ? value.get() : value;\n return isCustomValue(unwrappedValue)\n ? unwrappedValue.toValue()\n : unwrappedValue;\n}\n\nexport { resolveMotionValue };\n","import { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { resolveVariantFromProps } from '../../render/utils/resolve-variants.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { isControllingVariants, isVariantNode } from '../../render/utils/is-controlling-variants.mjs';\n\nfunction makeState({ scrapeMotionValuesFromProps, createRenderState, onMount, }, props, context, presenceContext) {\n const state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n if (onMount) {\n state.mount = (instance) => onMount(props, instance, state);\n }\n return state;\n}\nconst makeUseVisualState = (config) => (props, isStatic) => {\n const context = useContext(MotionContext);\n const presenceContext = useContext(PresenceContext);\n const make = () => makeState(config, props, context, presenceContext);\n return isStatic ? make() : useConstant(make);\n};\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n const values = {};\n const motionValues = scrapeMotionValues(props, {});\n for (const key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n let { initial, animate } = props;\n const isControllingVariants$1 = isControllingVariants(props);\n const isVariantNode$1 = isVariantNode(props);\n if (context &&\n isVariantNode$1 &&\n !isControllingVariants$1 &&\n props.inherit !== false) {\n if (initial === undefined)\n initial = context.initial;\n if (animate === undefined)\n animate = context.animate;\n }\n let isInitialAnimationBlocked = presenceContext\n ? presenceContext.initial === false\n : false;\n isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;\n const variantToSet = isInitialAnimationBlocked ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n list.forEach((definition) => {\n const resolved = resolveVariantFromProps(props, definition);\n if (!resolved)\n return;\n const { transitionEnd, transition, ...target } = resolved;\n for (const key in target) {\n let valueTarget = target[key];\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n const index = isInitialAnimationBlocked\n ? valueTarget.length - 1\n : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (const key in transitionEnd)\n values[key] = transitionEnd[key];\n });\n }\n return values;\n}\n\nexport { makeUseVisualState };\n","import { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst svgMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n onMount: (props, instance, { renderState, latestValues }) => {\n frame.read(() => {\n try {\n renderState.dimensions =\n typeof instance.getBBox ===\n \"function\"\n ? instance.getBBox()\n : instance.getBoundingClientRect();\n }\n catch (e) {\n // Most likely trying to measure an unrendered element under Firefox\n renderState.dimensions = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n });\n frame.render(() => {\n buildSVGAttrs(renderState, latestValues, { enableHardwareAcceleration: false }, isSVGTag(instance.tagName), props.transformTemplate);\n renderSVG(instance, renderState);\n });\n },\n }),\n};\n\nexport { svgMotionConfig };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nconst htmlMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n }),\n};\n\nexport { htmlMotionConfig };\n","function addDomEvent(target, eventName, handler, options = { passive: true }) {\n target.addEventListener(eventName, handler, options);\n return () => target.removeEventListener(eventName, handler);\n}\n\nexport { addDomEvent };\n","const isPrimaryPointer = (event) => {\n if (event.pointerType === \"mouse\") {\n return typeof event.button !== \"number\" || event.button <= 0;\n }\n else {\n /**\n * isPrimary is true for all mice buttons, whereas every touch point\n * is regarded as its own input. So subsequent concurrent touch points\n * will be false.\n *\n * Specifically match against false here as incomplete versions of\n * PointerEvents in very old browser might have it set as undefined.\n */\n return event.isPrimary !== false;\n }\n};\n\nexport { isPrimaryPointer };\n","import { isPrimaryPointer } from './utils/is-primary-pointer.mjs';\n\nfunction extractEventInfo(event, pointType = \"page\") {\n return {\n point: {\n x: event[pointType + \"X\"],\n y: event[pointType + \"Y\"],\n },\n };\n}\nconst addPointerInfo = (handler) => {\n return (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event));\n};\n\nexport { addPointerInfo, extractEventInfo };\n","import { addDomEvent } from './add-dom-event.mjs';\nimport { addPointerInfo } from './event-info.mjs';\n\nfunction addPointerEvent(target, eventName, handler, options) {\n return addDomEvent(target, eventName, addPointerInfo(handler), options);\n}\n\nexport { addPointerEvent };\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\n","function createLock(name) {\n let lock = null;\n return () => {\n const openLock = () => {\n lock = null;\n };\n if (lock === null) {\n lock = name;\n return openLock;\n }\n return false;\n };\n}\nconst globalHorizontalLock = createLock(\"dragHorizontal\");\nconst globalVerticalLock = createLock(\"dragVertical\");\nfunction getGlobalLock(drag) {\n let lock = false;\n if (drag === \"y\") {\n lock = globalVerticalLock();\n }\n else if (drag === \"x\") {\n lock = globalHorizontalLock();\n }\n else {\n const openHorizontal = globalHorizontalLock();\n const openVertical = globalVerticalLock();\n if (openHorizontal && openVertical) {\n lock = () => {\n openHorizontal();\n openVertical();\n };\n }\n else {\n // Release the locks because we don't use them\n if (openHorizontal)\n openHorizontal();\n if (openVertical)\n openVertical();\n }\n }\n return lock;\n}\nfunction isDragActive() {\n // Check the gesture lock - if we get it, it means no drag gesture is active\n // and we can safely fire the tap gesture.\n const openGestureLock = getGlobalLock(true);\n if (!openGestureLock)\n return true;\n openGestureLock();\n return false;\n}\n\nexport { createLock, getGlobalLock, isDragActive };\n","class Feature {\n constructor(node) {\n this.isMounted = false;\n this.node = node;\n }\n update() { }\n}\n\nexport { Feature };\n","import { addPointerEvent } from '../events/add-pointer-event.mjs';\nimport { pipe } from '../utils/pipe.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction addHoverEvent(node, isActive) {\n const eventName = \"pointer\" + (isActive ? \"enter\" : \"leave\");\n const callbackName = \"onHover\" + (isActive ? \"Start\" : \"End\");\n const handleEvent = (event, info) => {\n if (event.type === \"touch\" || isDragActive())\n return;\n const props = node.getProps();\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", isActive);\n }\n if (props[callbackName]) {\n frame.update(() => props[callbackName](event, info));\n }\n };\n return addPointerEvent(node.current, eventName, handleEvent, {\n passive: !node.getProps()[callbackName],\n });\n}\nclass HoverGesture extends Feature {\n mount() {\n this.unmount = pipe(addHoverEvent(this.node, true), addHoverEvent(this.node, false));\n }\n unmount() { }\n}\n\nexport { HoverGesture };\n","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nconst isNodeOrChild = (parent, child) => {\n if (!child) {\n return false;\n }\n else if (parent === child) {\n return true;\n }\n else {\n return isNodeOrChild(parent, child.parentElement);\n }\n};\n\nexport { isNodeOrChild };\n","import { extractEventInfo } from '../events/event-info.mjs';\nimport { addDomEvent } from '../events/add-dom-event.mjs';\nimport { addPointerEvent } from '../events/add-pointer-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { pipe } from '../utils/pipe.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\nimport { isNodeOrChild } from './utils/is-node-or-child.mjs';\nimport { noop } from '../utils/noop.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction fireSyntheticPointerEvent(name, handler) {\n if (!handler)\n return;\n const syntheticPointerEvent = new PointerEvent(\"pointer\" + name);\n handler(syntheticPointerEvent, extractEventInfo(syntheticPointerEvent));\n}\nclass PressGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removeStartListeners = noop;\n this.removeEndListeners = noop;\n this.removeAccessibleListeners = noop;\n this.startPointerPress = (startEvent, startInfo) => {\n this.removeEndListeners();\n if (this.isPressing)\n return;\n const props = this.node.getProps();\n const endPointerPress = (endEvent, endInfo) => {\n if (!this.checkPressEnd())\n return;\n const { onTap, onTapCancel } = this.node.getProps();\n frame.update(() => {\n /**\n * We only count this as a tap gesture if the event.target is the same\n * as, or a child of, this component's element\n */\n !isNodeOrChild(this.node.current, endEvent.target)\n ? onTapCancel && onTapCancel(endEvent, endInfo)\n : onTap && onTap(endEvent, endInfo);\n });\n };\n const removePointerUpListener = addPointerEvent(window, \"pointerup\", endPointerPress, { passive: !(props.onTap || props[\"onPointerUp\"]) });\n const removePointerCancelListener = addPointerEvent(window, \"pointercancel\", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo), { passive: !(props.onTapCancel || props[\"onPointerCancel\"]) });\n this.removeEndListeners = pipe(removePointerUpListener, removePointerCancelListener);\n this.startPress(startEvent, startInfo);\n };\n this.startAccessiblePress = () => {\n const handleKeydown = (keydownEvent) => {\n if (keydownEvent.key !== \"Enter\" || this.isPressing)\n return;\n const handleKeyup = (keyupEvent) => {\n if (keyupEvent.key !== \"Enter\" || !this.checkPressEnd())\n return;\n fireSyntheticPointerEvent(\"up\", (event, info) => {\n const { onTap } = this.node.getProps();\n if (onTap) {\n frame.update(() => onTap(event, info));\n }\n });\n };\n this.removeEndListeners();\n this.removeEndListeners = addDomEvent(this.node.current, \"keyup\", handleKeyup);\n fireSyntheticPointerEvent(\"down\", (event, info) => {\n this.startPress(event, info);\n });\n };\n const removeKeydownListener = addDomEvent(this.node.current, \"keydown\", handleKeydown);\n const handleBlur = () => {\n if (!this.isPressing)\n return;\n fireSyntheticPointerEvent(\"cancel\", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo));\n };\n const removeBlurListener = addDomEvent(this.node.current, \"blur\", handleBlur);\n this.removeAccessibleListeners = pipe(removeKeydownListener, removeBlurListener);\n };\n }\n startPress(event, info) {\n this.isPressing = true;\n const { onTapStart, whileTap } = this.node.getProps();\n /**\n * Ensure we trigger animations before firing event callback\n */\n if (whileTap && this.node.animationState) {\n this.node.animationState.setActive(\"whileTap\", true);\n }\n if (onTapStart) {\n frame.update(() => onTapStart(event, info));\n }\n }\n checkPressEnd() {\n this.removeEndListeners();\n this.isPressing = false;\n const props = this.node.getProps();\n if (props.whileTap && this.node.animationState) {\n this.node.animationState.setActive(\"whileTap\", false);\n }\n return !isDragActive();\n }\n cancelPress(event, info) {\n if (!this.checkPressEnd())\n return;\n const { onTapCancel } = this.node.getProps();\n if (onTapCancel) {\n frame.update(() => onTapCancel(event, info));\n }\n }\n mount() {\n const props = this.node.getProps();\n const removePointerListener = addPointerEvent(this.node.current, \"pointerdown\", this.startPointerPress, { passive: !(props.onTapStart || props[\"onPointerStart\"]) });\n const removeFocusListener = addDomEvent(this.node.current, \"focus\", this.startAccessiblePress);\n this.removeStartListeners = pipe(removePointerListener, removeFocusListener);\n }\n unmount() {\n this.removeStartListeners();\n this.removeEndListeners();\n this.removeAccessibleListeners();\n }\n}\n\nexport { PressGesture };\n","/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap();\nconst fireObserverCallback = (entry) => {\n const callback = observerCallbacks.get(entry.target);\n callback && callback(entry);\n};\nconst fireAllObserverCallbacks = (entries) => {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver({ root, ...options }) {\n const lookupRoot = root || document;\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n const rootObservers = observers.get(lookupRoot);\n const key = JSON.stringify(options);\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n const rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return () => {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\nexport { observeIntersection };\n","import { Feature } from '../Feature.mjs';\nimport { observeIntersection } from './observers.mjs';\n\nconst thresholdNames = {\n some: 0,\n all: 1,\n};\nclass InViewFeature extends Feature {\n constructor() {\n super(...arguments);\n this.hasEnteredView = false;\n this.isInView = false;\n }\n startObserver() {\n this.unmount();\n const { viewport = {} } = this.node.getProps();\n const { root, margin: rootMargin, amount = \"some\", once } = viewport;\n const options = {\n root: root ? root.current : undefined,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n const onIntersectionUpdate = (entry) => {\n const { isIntersecting } = entry;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (this.isInView === isIntersecting)\n return;\n this.isInView = isIntersecting;\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && this.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n this.hasEnteredView = true;\n }\n if (this.node.animationState) {\n this.node.animationState.setActive(\"whileInView\", isIntersecting);\n }\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n const { onViewportEnter, onViewportLeave } = this.node.getProps();\n const callback = isIntersecting ? onViewportEnter : onViewportLeave;\n callback && callback(entry);\n };\n return observeIntersection(this.node.current, options, onIntersectionUpdate);\n }\n mount() {\n this.startObserver();\n }\n update() {\n if (typeof IntersectionObserver === \"undefined\")\n return;\n const { props, prevProps } = this.node;\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(hasViewportOptionChanged(props, prevProps));\n if (hasOptionsChanged) {\n this.startObserver();\n }\n }\n unmount() { }\n}\nfunction hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {\n return (name) => viewport[name] !== prevViewport[name];\n}\n\nexport { InViewFeature };\n","import { HoverGesture } from '../../gestures/hover.mjs';\nimport { FocusGesture } from '../../gestures/focus.mjs';\nimport { PressGesture } from '../../gestures/press.mjs';\nimport { InViewFeature } from './viewport/index.mjs';\n\nconst gestureAnimations = {\n inView: {\n Feature: InViewFeature,\n },\n tap: {\n Feature: PressGesture,\n },\n focus: {\n Feature: FocusGesture,\n },\n hover: {\n Feature: HoverGesture,\n },\n};\n\nexport { gestureAnimations };\n","import { addDomEvent } from '../events/add-dom-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { pipe } from '../utils/pipe.mjs';\n\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n\nexport { FocusGesture };\n","function shallowCompare(next, prev) {\n if (!Array.isArray(prev))\n return false;\n const prevLength = prev.length;\n if (prevLength !== next.length)\n return false;\n for (let i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i])\n return false;\n }\n return true;\n}\n\nexport { shallowCompare };\n","import { resolveVariantFromProps } from './resolve-variants.mjs';\n\n/**\n * Creates an object containing the latest state of every MotionValue on a VisualElement\n */\nfunction getCurrent(visualElement) {\n const current = {};\n visualElement.values.forEach((value, key) => (current[key] = value.get()));\n return current;\n}\n/**\n * Creates an object containing the latest velocity of every MotionValue on a VisualElement\n */\nfunction getVelocity(visualElement) {\n const velocity = {};\n visualElement.values.forEach((value, key) => (velocity[key] = value.getVelocity()));\n return velocity;\n}\nfunction resolveVariant(visualElement, definition, custom) {\n const props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, getCurrent(visualElement), getVelocity(visualElement));\n}\n\nexport { resolveVariant };\n","import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\n\nconst optimizedAppearDataId = \"framerAppearId\";\nconst optimizedAppearDataAttribute = \"data-\" + camelToDash(optimizedAppearDataId);\n\nexport { optimizedAppearDataAttribute, optimizedAppearDataId };\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n","const instantAnimationState = {\n current: false,\n};\n\nexport { instantAnimationState };\n","const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n","import { isBezierDefinition } from '../../../easing/utils/is-bezier-definition.mjs';\n\nfunction isWaapiSupportedEasing(easing) {\n return Boolean(!easing ||\n (typeof easing === \"string\" && supportedWaapiEasing[easing]) ||\n isBezierDefinition(easing) ||\n (Array.isArray(easing) && easing.every(isWaapiSupportedEasing)));\n}\nconst cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\nconst supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\nfunction mapEasingToNativeEasing(easing) {\n if (!easing)\n return undefined;\n return isBezierDefinition(easing)\n ? cubicBezierAsString(easing)\n : Array.isArray(easing)\n ? easing.map(mapEasingToNativeEasing)\n : supportedWaapiEasing[easing];\n}\n\nexport { cubicBezierAsString, isWaapiSupportedEasing, mapEasingToNativeEasing, supportedWaapiEasing };\n","import { noop } from '../utils/noop.mjs';\n\n/*\n Bezier function generator\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticiably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0.0) {\n upperBound = currentT;\n }\n else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2)\n return noop;\n const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n // If animation is at start/end, return t without easing\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n","import { cubicBezier } from './cubic-bezier.mjs';\n\nconst easeIn = cubicBezier(0.42, 0, 1, 1);\nconst easeOut = cubicBezier(0, 0, 0.58, 1);\nconst easeInOut = cubicBezier(0.42, 0, 0.58, 1);\n\nexport { easeIn, easeInOut, easeOut };\n","const isEasingArray = (ease) => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\n","// Accepts an easing function and returns a new one that outputs mirrored values for\n// the second half of the animation. Turns easeIn into easeInOut.\nconst mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\nexport { mirrorEasing };\n","// Accepts an easing function and returns a new one that outputs reversed values.\n// Turns easeIn into easeOut.\nconst reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\nexport { reverseEasing };\n","import { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst circIn = (p) => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circOut);\n\nexport { circIn, circInOut, circOut };\n","import { cubicBezier } from './cubic-bezier.mjs';\nimport { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst backOut = cubicBezier(0.33, 1.53, 0.69, 0.99);\nconst backIn = reverseEasing(backOut);\nconst backInOut = mirrorEasing(backIn);\n\nexport { backIn, backInOut, backOut };\n","import { invariant } from '../../utils/errors.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { easeIn, easeInOut, easeOut } from '../ease.mjs';\nimport { circIn, circInOut, circOut } from '../circ.mjs';\nimport { backIn, backInOut, backOut } from '../back.mjs';\nimport { anticipate } from '../anticipate.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst easingDefinitionToFunction = (definition) => {\n if (Array.isArray(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`);\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (typeof definition === \"string\") {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`);\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n","import { backIn } from './back.mjs';\n\nconst anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n\nexport { anticipate };\n","import { isString, singleColorRegex, floatRegex } from '../utils.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((isString(v) && singleColorRegex.test(v) && v.startsWith(type)) ||\n (testProp && Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (!isString(v))\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n","import { clamp } from '../../../utils/clamp.mjs';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: isColorString(\"rgb\", \"red\"),\n parse: splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\",\n};\n\nexport { rgbUnit, rgba };\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst hsla = {\n test: isColorString(\"hsl\", \"hue\"),\n parse: splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return (\"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\");\n },\n};\n\nexport { hsla };\n","import { isString } from '../utils.mjs';\nimport { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return isString(v)\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n};\n\nexport { color };\n","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mix = (from, to, progress) => -progress * from + progress * to + from;\n\nexport { mix };\n","// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n","import { mix } from './mix.mjs';\nimport { invariant } from './errors.mjs';\nimport { hslaToRgba } from './hsla-to-rgba.mjs';\nimport { hex } from '../value/types/color/hex.mjs';\nimport { rgba } from '../value/types/color/rgba.mjs';\nimport { hsla } from '../value/types/color/hsla.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n return Math.sqrt(Math.max(0, v * (to * to - fromExpo) + fromExpo));\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n invariant(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`);\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Framer Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mix(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n","import { cssVariableRegex } from '../../../render/dom/utils/is-css-variable.mjs';\nimport { noop } from '../../../utils/noop.mjs';\nimport { color } from '../color/index.mjs';\nimport { number } from '../numbers/index.mjs';\nimport { colorRegex, floatRegex, isString, sanitize } from '../utils.mjs';\n\nfunction test(v) {\n var _a, _b;\n return (isNaN(v) &&\n isString(v) &&\n (((_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) || 0) +\n (((_b = v.match(colorRegex)) === null || _b === void 0 ? void 0 : _b.length) || 0) >\n 0);\n}\nconst cssVarTokeniser = {\n regex: cssVariableRegex,\n countKey: \"Vars\",\n token: \"${v}\",\n parse: noop,\n};\nconst colorTokeniser = {\n regex: colorRegex,\n countKey: \"Colors\",\n token: \"${c}\",\n parse: color.parse,\n};\nconst numberTokeniser = {\n regex: floatRegex,\n countKey: \"Numbers\",\n token: \"${n}\",\n parse: number.parse,\n};\nfunction tokenise(info, { regex, countKey, token, parse }) {\n const matches = info.tokenised.match(regex);\n if (!matches)\n return;\n info[\"num\" + countKey] = matches.length;\n info.tokenised = info.tokenised.replace(regex, token);\n info.values.push(...matches.map(parse));\n}\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const info = {\n value: originalValue,\n tokenised: originalValue,\n values: [],\n numVars: 0,\n numColors: 0,\n numNumbers: 0,\n };\n if (info.value.includes(\"var(--\"))\n tokenise(info, cssVarTokeniser);\n tokenise(info, colorTokeniser);\n tokenise(info, numberTokeniser);\n return info;\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction createTransformer(source) {\n const { values, numColors, numVars, tokenised } = analyseComplexValue(source);\n const numValues = values.length;\n return (v) => {\n let output = tokenised;\n for (let i = 0; i < numValues; i++) {\n if (i < numVars) {\n output = output.replace(cssVarTokeniser.token, v[i]);\n }\n else if (i < numVars + numColors) {\n output = output.replace(colorTokeniser.token, color.transform(v[i]));\n }\n else {\n output = output.replace(numberTokeniser.token, sanitize(v[i]));\n }\n }\n return output;\n };\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : v;\nfunction getAnimatableNone(v) {\n const parsed = parseComplexValue(v);\n const transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n","import { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { pipe } from './pipe.mjs';\nimport { warning } from './errors.mjs';\nimport { color } from '../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../value/types/complex/index.mjs';\n\nconst mixImmediate = (origin, target) => (p) => `${p > 0 ? target : origin}`;\nfunction getMixer(origin, target) {\n if (typeof origin === \"number\") {\n return (v) => mix(origin, target, v);\n }\n else if (color.test(origin)) {\n return mixColor(origin, target);\n }\n else {\n return origin.startsWith(\"var(\")\n ? mixImmediate(origin, target)\n : mixComplex(origin, target);\n }\n}\nconst mixArray = (from, to) => {\n const output = [...from];\n const numValues = output.length;\n const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i]));\n return (v) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](v);\n }\n return output;\n };\n};\nconst mixObject = (origin, target) => {\n const output = { ...origin, ...target };\n const blendValue = {};\n for (const key in output) {\n if (origin[key] !== undefined && target[key] !== undefined) {\n blendValue[key] = getMixer(origin[key], target[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n};\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.numVars === targetStats.numVars &&\n originStats.numColors === targetStats.numColors &&\n originStats.numNumbers >= targetStats.numNumbers;\n if (canInterpolate) {\n return pipe(mixArray(originStats.values, targetStats.values), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);\n return mixImmediate(origin, target);\n }\n};\n\nexport { mixArray, mixComplex, mixObject };\n","/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n\n @param [number]: Lower limit\n @param [number]: Upper limit\n @param [number]: Value to find progress within given range\n @return [number]: Progress of value within range as expressed 0-1\n*/\nconst progress = (from, to, value) => {\n const toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\n","import { invariant } from './errors.mjs';\nimport { color } from '../value/types/color/index.mjs';\nimport { clamp } from './clamp.mjs';\nimport { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { mixComplex, mixArray, mixObject } from './mix-complex.mjs';\nimport { pipe } from './pipe.mjs';\nimport { progress } from './progress.mjs';\nimport { noop } from './noop.mjs';\n\nconst mixNumber = (from, to) => (p) => mix(from, to, p);\nfunction detectMixerFactory(v) {\n if (typeof v === \"number\") {\n return mixNumber;\n }\n else if (typeof v === \"string\") {\n return color.test(v) ? mixColor : mixComplex;\n }\n else if (Array.isArray(v)) {\n return mixArray;\n }\n else if (typeof v === \"object\") {\n return mixObject;\n }\n return mixNumber;\n}\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || detectMixerFactory(output[0]);\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revist this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n","import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\nexport { defaultOffset };\n","import { mix } from '../mix.mjs';\nimport { progress } from '../progress.mjs';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mix(min, 1, offsetProgress));\n }\n}\n\nexport { fillOffset };\n","import { easeInOut } from '../../easing/ease.mjs';\nimport { isEasingArray } from '../../easing/utils/is-easing-array.mjs';\nimport { easingDefinitionToFunction } from '../../easing/utils/map.mjs';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../../utils/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../../utils/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n","function convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\n","/*\n Convert velocity into velocity per second\n\n @param [number]: Unit per frame\n @param [number]: Frame duration in ms\n*/\nfunction velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n","import { velocityPerSecond } from '../../../utils/velocity-per-second.mjs';\n\nconst velocitySampleDuration = 5; // ms\nfunction calcGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { calcGeneratorVelocity };\n","import { warning } from '../../../utils/errors.mjs';\nimport { clamp } from '../../../utils/clamp.mjs';\nimport { secondsToMilliseconds, millisecondsToSeconds } from '../../../utils/time-conversion.mjs';\n\nconst safeMin = 0.001;\nconst minDuration = 0.01;\nconst maxDuration = 10.0;\nconst minDamping = 0.05;\nconst maxDamping = 1;\nfunction findSpring({ duration = 800, bounce = 0.25, velocity = 0, mass = 1, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(maxDuration), \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(minDamping, maxDamping, dampingRatio);\n duration = clamp(minDuration, maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: 100,\n damping: 10,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring, maxDamping, maxDuration, minDamping, minDuration };\n","import { millisecondsToSeconds } from '../../../utils/time-conversion.mjs';\nimport { calcGeneratorVelocity } from '../utils/velocity.mjs';\nimport { findSpring, calcAngularFreq } from './find.mjs';\n\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = {\n velocity: 0.0,\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n isResolvedFromDuration: false,\n ...options,\n };\n // stiffness/damping/mass overrides duration/bounce\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n const derived = findSpring(options);\n springOptions = {\n ...springOptions,\n ...derived,\n velocity: 0.0,\n mass: 1.0,\n };\n springOptions.isResolvedFromDuration = true;\n }\n return springOptions;\n}\nfunction spring({ keyframes, restDelta, restSpeed, ...options }) {\n const origin = keyframes[0];\n const target = keyframes[keyframes.length - 1];\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = { done: false, value: origin };\n const { stiffness, damping, mass, velocity, duration, isResolvedFromDuration, } = getSpringOptions(options);\n const initialVelocity = velocity ? -millisecondsToSeconds(velocity) : 0.0;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const initialDelta = target - origin;\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5;\n restSpeed || (restSpeed = isGranularScale ? 0.01 : 2);\n restDelta || (restDelta = isGranularScale ? 0.005 : 0.5);\n let resolveSpring;\n if (dampingRatio < 1) {\n const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n // Underdamped spring\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (target -\n envelope *\n (((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq) *\n Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t);\n }\n else {\n // Overdamped spring\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (target -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n }\n return {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n next: (t) => {\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n let currentVelocity = initialVelocity;\n if (t !== 0) {\n /**\n * We only need to calculate velocity for under-damped springs\n * as over- and critically-damped springs can't overshoot, so\n * checking only for displacement is enough.\n */\n if (dampingRatio < 1) {\n currentVelocity = calcGeneratorVelocity(resolveSpring, t, current);\n }\n else {\n currentVelocity = 0;\n }\n }\n const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;\n const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;\n state.done =\n isBelowVelocityThreshold && isBelowDisplacementThreshold;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? target : current;\n return state;\n },\n };\n}\n\nexport { spring };\n","import { spring } from './spring/index.mjs';\nimport { calcGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: calcGeneratorVelocity(calcLatest, t, state.value),\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t > timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n","import { frame, cancelFrame, frameData } from '../../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: () => frame.update(passTimestamp, true),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => frameData.isProcessing ? frameData.timestamp : performance.now(),\n };\n};\n\nexport { frameloopDriver };\n","/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n","import { keyframes } from '../../generators/keyframes.mjs';\nimport { spring } from '../../generators/spring/index.mjs';\nimport { inertia } from '../../generators/inertia.mjs';\nimport { frameloopDriver } from './driver-frameloop.mjs';\nimport { interpolate } from '../../../utils/interpolate.mjs';\nimport { clamp } from '../../../utils/clamp.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../../utils/time-conversion.mjs';\nimport { calcGeneratorDuration } from '../../generators/utils/calc-duration.mjs';\n\nconst types = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes: keyframes,\n spring,\n};\n/**\n * Animate a single value on the main thread.\n *\n * This function is written, where functionality overlaps,\n * to be largely spec-compliant with WAAPI to allow fungibility\n * between the two.\n */\nfunction animateValue({ autoplay = true, delay = 0, driver = frameloopDriver, keyframes: keyframes$1, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", onPlay, onStop, onComplete, onUpdate, ...options }) {\n let speed = 1;\n let hasStopped = false;\n let resolveFinishedPromise;\n let currentFinishedPromise;\n /**\n * Resolve the current Promise every time we enter the\n * finished state. This is WAAPI-compatible behaviour.\n */\n const updateFinishedPromise = () => {\n currentFinishedPromise = new Promise((resolve) => {\n resolveFinishedPromise = resolve;\n });\n };\n // Create the first finished promise\n updateFinishedPromise();\n let animationDriver;\n const generatorFactory = types[type] || keyframes;\n /**\n * If this isn't the keyframes generator and we've been provided\n * strings as keyframes, we need to interpolate these.\n * TODO: Support velocity for units and complex value types/\n */\n let mapNumbersToKeyframes;\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n mapNumbersToKeyframes = interpolate([0, 100], keyframes$1, {\n clamp: false,\n });\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n let mirroredGenerator;\n if (repeatType === \"mirror\") {\n mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -(options.velocity || 0),\n });\n }\n let playState = \"idle\";\n let holdTime = null;\n let startTime = null;\n let cancelTime = null;\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null && repeat) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n let resolvedDuration = Infinity;\n let totalDuration = Infinity;\n if (calculatedDuration !== null) {\n resolvedDuration = calculatedDuration + repeatDelay;\n totalDuration = resolvedDuration * (repeat + 1) - repeatDelay;\n }\n let currentTime = 0;\n const tick = (timestamp) => {\n if (startTime === null)\n return;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (speed > 0)\n startTime = Math.min(startTime, timestamp);\n if (speed < 0)\n startTime = Math.min(timestamp - totalDuration / speed, startTime);\n if (holdTime !== null) {\n currentTime = holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n currentTime = Math.round(timestamp - startTime) * speed;\n }\n // Rebase on delay\n const timeWithoutDelay = currentTime - delay * (speed >= 0 ? 1 : -1);\n const isInDelayPhase = speed >= 0 ? timeWithoutDelay < 0 : timeWithoutDelay > totalDuration;\n currentTime = Math.max(timeWithoutDelay, 0);\n /**\n * If this animation has finished, set the current time\n * to the total duration.\n */\n if (playState === \"finished\" && holdTime === null) {\n currentTime = totalDuration;\n }\n let elapsed = currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = currentTime / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const iterationIsOdd = Boolean(currentIteration % 2);\n if (iterationIsOdd) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n let p = clamp(0, 1, iterationProgress);\n if (currentTime > totalDuration) {\n p = repeatType === \"reverse\" && iterationIsOdd ? 1 : 0;\n }\n elapsed = p * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n const state = isInDelayPhase\n ? { done: false, value: keyframes$1[0] }\n : frameGenerator.next(elapsed);\n if (mapNumbersToKeyframes) {\n state.value = mapNumbersToKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done = speed >= 0 ? currentTime >= totalDuration : currentTime <= 0;\n }\n const isAnimationFinished = holdTime === null &&\n (playState === \"finished\" || (playState === \"running\" && done));\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n finish();\n }\n return state;\n };\n const stopAnimationDriver = () => {\n animationDriver && animationDriver.stop();\n animationDriver = undefined;\n };\n const cancel = () => {\n playState = \"idle\";\n stopAnimationDriver();\n resolveFinishedPromise();\n updateFinishedPromise();\n startTime = cancelTime = null;\n };\n const finish = () => {\n playState = \"finished\";\n onComplete && onComplete();\n stopAnimationDriver();\n resolveFinishedPromise();\n };\n const play = () => {\n if (hasStopped)\n return;\n if (!animationDriver)\n animationDriver = driver(tick);\n const now = animationDriver.now();\n onPlay && onPlay();\n if (holdTime !== null) {\n startTime = now - holdTime;\n }\n else if (!startTime || playState === \"finished\") {\n startTime = now;\n }\n if (playState === \"finished\") {\n updateFinishedPromise();\n }\n cancelTime = startTime;\n holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n playState = \"running\";\n animationDriver.start();\n };\n if (autoplay) {\n play();\n }\n const controls = {\n then(resolve, reject) {\n return currentFinishedPromise.then(resolve, reject);\n },\n get time() {\n return millisecondsToSeconds(currentTime);\n },\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n currentTime = newTime;\n if (holdTime !== null || !animationDriver || speed === 0) {\n holdTime = newTime;\n }\n else {\n startTime = animationDriver.now() - newTime / speed;\n }\n },\n get duration() {\n const duration = generator.calculatedDuration === null\n ? calcGeneratorDuration(generator)\n : generator.calculatedDuration;\n return millisecondsToSeconds(duration);\n },\n get speed() {\n return speed;\n },\n set speed(newSpeed) {\n if (newSpeed === speed || !animationDriver)\n return;\n speed = newSpeed;\n controls.time = millisecondsToSeconds(currentTime);\n },\n get state() {\n return playState;\n },\n play,\n pause: () => {\n playState = \"paused\";\n holdTime = currentTime;\n },\n stop: () => {\n hasStopped = true;\n if (playState === \"idle\")\n return;\n playState = \"idle\";\n onStop && onStop();\n cancel();\n },\n cancel: () => {\n if (cancelTime !== null)\n tick(cancelTime);\n cancel();\n },\n complete: () => {\n playState = \"finished\";\n },\n sample: (elapsed) => {\n startTime = 0;\n return tick(elapsed);\n },\n };\n return controls;\n}\n\nexport { animateValue };\n","import { animateStyle } from './index.mjs';\nimport { isWaapiSupportedEasing } from './easing.mjs';\nimport { getFinalKeyframe } from './utils/get-final-keyframe.mjs';\nimport { animateValue } from '../js/index.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../../utils/time-conversion.mjs';\nimport { memo } from '../../../utils/memo.mjs';\nimport { noop } from '../../../utils/noop.mjs';\nimport { frameData, frame, cancelFrame } from '../../../frameloop/frame.mjs';\n\nconst supportsWaapi = memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\n/**\n * A list of values that can be hardware-accelerated.\n */\nconst acceleratedValues = new Set([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\",\n \"backgroundColor\",\n]);\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\n/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxDuration = 20000;\nconst requiresPregeneratedKeyframes = (valueName, options) => options.type === \"spring\" ||\n valueName === \"backgroundColor\" ||\n !isWaapiSupportedEasing(options.ease);\nfunction createAcceleratedAnimation(value, valueName, { onUpdate, onComplete, ...options }) {\n const canAccelerateAnimation = supportsWaapi() &&\n acceleratedValues.has(valueName) &&\n !options.repeatDelay &&\n options.repeatType !== \"mirror\" &&\n options.damping !== 0 &&\n options.type !== \"inertia\";\n if (!canAccelerateAnimation)\n return false;\n /**\n * TODO: Unify with js/index\n */\n let hasStopped = false;\n let resolveFinishedPromise;\n let currentFinishedPromise;\n /**\n * Resolve the current Promise every time we enter the\n * finished state. This is WAAPI-compatible behaviour.\n */\n const updateFinishedPromise = () => {\n currentFinishedPromise = new Promise((resolve) => {\n resolveFinishedPromise = resolve;\n });\n };\n // Create the first finished promise\n updateFinishedPromise();\n let { keyframes, duration = 300, ease, times } = options;\n /**\n * If this animation needs pre-generated keyframes then generate.\n */\n if (requiresPregeneratedKeyframes(valueName, options)) {\n const sampleAnimation = animateValue({\n ...options,\n repeat: 0,\n delay: 0,\n });\n let state = { done: false, value: keyframes[0] };\n const pregeneratedKeyframes = [];\n /**\n * Bail after 20 seconds of pre-generated keyframes as it's likely\n * we're heading for an infinite loop.\n */\n let t = 0;\n while (!state.done && t < maxDuration) {\n state = sampleAnimation.sample(t);\n pregeneratedKeyframes.push(state.value);\n t += sampleDelta;\n }\n times = undefined;\n keyframes = pregeneratedKeyframes;\n duration = t - sampleDelta;\n ease = \"linear\";\n }\n const animation = animateStyle(value.owner.current, valueName, keyframes, {\n ...options,\n duration,\n /**\n * This function is currently not called if ease is provided\n * as a function so the cast is safe.\n *\n * However it would be possible for a future refinement to port\n * in easing pregeneration from Motion One for browsers that\n * support the upcoming `linear()` easing function.\n */\n ease: ease,\n times,\n });\n /**\n * WAAPI animations don't resolve startTime synchronously. But a blocked\n * thread could delay the startTime resolution by a noticeable amount.\n * For synching handoff animations with the new Motion animation we want\n * to ensure startTime is synchronously set.\n */\n if (options.syncStart) {\n animation.startTime = frameData.isProcessing\n ? frameData.timestamp\n : document.timeline\n ? document.timeline.currentTime\n : performance.now();\n }\n const cancelAnimation = () => animation.cancel();\n const safeCancel = () => {\n frame.update(cancelAnimation);\n resolveFinishedPromise();\n updateFinishedPromise();\n };\n /**\n * Prefer the `onfinish` prop as it's more widely supported than\n * the `finished` promise.\n *\n * Here, we synchronously set the provided MotionValue to the end\n * keyframe. If we didn't, when the WAAPI animation is finished it would\n * be removed from the element which would then revert to its old styles.\n */\n animation.onfinish = () => {\n value.set(getFinalKeyframe(keyframes, options));\n onComplete && onComplete();\n safeCancel();\n };\n /**\n * Animation interrupt callback.\n */\n const controls = {\n then(resolve, reject) {\n return currentFinishedPromise.then(resolve, reject);\n },\n attachTimeline(timeline) {\n animation.timeline = timeline;\n animation.onfinish = null;\n return noop;\n },\n get time() {\n return millisecondsToSeconds(animation.currentTime || 0);\n },\n set time(newTime) {\n animation.currentTime = secondsToMilliseconds(newTime);\n },\n get speed() {\n return animation.playbackRate;\n },\n set speed(newSpeed) {\n animation.playbackRate = newSpeed;\n },\n get duration() {\n return millisecondsToSeconds(duration);\n },\n play: () => {\n if (hasStopped)\n return;\n animation.play();\n /**\n * Cancel any pending cancel tasks\n */\n cancelFrame(cancelAnimation);\n },\n pause: () => animation.pause(),\n stop: () => {\n hasStopped = true;\n if (animation.playState === \"idle\")\n return;\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read commited styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n const { currentTime } = animation;\n if (currentTime) {\n const sampleAnimation = animateValue({\n ...options,\n autoplay: false,\n });\n value.setWithVelocity(sampleAnimation.sample(currentTime - sampleDelta).value, sampleAnimation.sample(currentTime).value, sampleDelta);\n }\n safeCancel();\n },\n complete: () => animation.finish(),\n cancel: safeCancel,\n };\n return controls;\n}\n\nexport { createAcceleratedAnimation };\n","function memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n","import { mapEasingToNativeEasing } from './easing.mjs';\n\nfunction animateStyle(element, valueName, keyframes, { delay = 0, duration, repeat = 0, repeatType = \"loop\", ease, times, } = {}) {\n const keyframeOptions = { [valueName]: keyframes };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease);\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n return element.animate(keyframeOptions, {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n });\n}\n\nexport { animateStyle };\n","function getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }) {\n const index = repeat && repeatType !== \"loop\" && repeat % 2 === 1\n ? 0\n : keyframes.length - 1;\n return keyframes[index];\n}\n\nexport { getFinalKeyframe };\n","import { transformProps } from '../../render/html/utils/transform.mjs';\n\nconst underDampedSpring = {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n};\nconst criticallyDampedSpring = (target) => ({\n type: \"spring\",\n stiffness: 550,\n damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n});\nconst keyframesTransition = {\n type: \"keyframes\",\n duration: 0.8,\n};\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease = {\n type: \"keyframes\",\n ease: [0.25, 0.1, 0.35, 1],\n duration: 0.3,\n};\nconst getDefaultTransition = (valueKey, { keyframes }) => {\n if (keyframes.length > 2) {\n return keyframesTransition;\n }\n else if (transformProps.has(valueKey)) {\n return valueKey.startsWith(\"scale\")\n ? criticallyDampedSpring(keyframes[1])\n : underDampedSpring;\n }\n return ease;\n};\n\nexport { getDefaultTransition };\n","import { complex } from '../../value/types/complex/index.mjs';\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nconst isAnimatable = (key, value) => {\n // If the list of keys tat might be non-animatable grows, replace with Set\n if (key === \"zIndex\")\n return false;\n // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n if (typeof value === \"number\" || Array.isArray(value))\n return true;\n if (typeof value === \"string\" && // It's animatable if we have a string\n (complex.test(value) || value === \"0\") && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true;\n }\n return false;\n};\n\nexport { isAnimatable };\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils.mjs';\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"]);\nfunction applyDefaultFilter(v) {\n const [name, value] = v.slice(0, -1).split(\"(\");\n if (name === \"drop-shadow\")\n return v;\n const [number] = value.match(floatRegex) || [];\n if (!number)\n return v;\n const unit = value.replace(number, \"\");\n let defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number !== value)\n defaultValue *= 100;\n return name + \"(\" + defaultValue + unit + \")\";\n}\nconst functionRegex = /([a-z-]*)\\(.*?\\)/g;\nconst filter = {\n ...complex,\n getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v;\n },\n};\n\nexport { filter };\n","import { color } from '../../../value/types/color/index.mjs';\nimport { filter } from '../../../value/types/complex/filter.mjs';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nconst defaultValueTypes = {\n ...numberValueTypes,\n // Color props\n color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n filter,\n WebkitFilter: filter,\n};\n/**\n * Gets the default ValueType for the provided value key\n */\nconst getDefaultValueType = (key) => defaultValueTypes[key];\n\nexport { defaultValueTypes, getDefaultValueType };\n","import { complex } from '../../../value/types/complex/index.mjs';\nimport { filter } from '../../../value/types/complex/filter.mjs';\nimport { getDefaultValueType } from './defaults.mjs';\n\nfunction getAnimatableNone(key, value) {\n let defaultValueType = getDefaultValueType(key);\n if (defaultValueType !== filter)\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined;\n}\n\nexport { getAnimatableNone };\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nconst isZeroValueString = (v) => /^0[^.\\s]+$/.test(v);\n\nexport { isZeroValueString };\n","import { isZeroValueString } from '../../utils/is-zero-value-string.mjs';\n\nfunction isNone(value) {\n if (typeof value === \"number\") {\n return value === 0;\n }\n else if (value !== null) {\n return value === \"none\" || value === \"0\" || isZeroValueString(value);\n }\n}\n\nexport { isNone };\n","/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nfunction isTransitionDefined({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, elapsed, ...transition }) {\n return !!Object.keys(transition).length;\n}\nfunction getValueTransition(transition, key) {\n return transition[key] || transition[\"default\"] || transition;\n}\n\nexport { getValueTransition, isTransitionDefined };\n","import { warning } from '../../utils/errors.mjs';\nimport { secondsToMilliseconds } from '../../utils/time-conversion.mjs';\nimport { instantAnimationState } from '../../utils/use-instant-transition-state.mjs';\nimport { createAcceleratedAnimation } from '../animators/waapi/create-accelerated-animation.mjs';\nimport { createInstantAnimation } from '../animators/instant.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { isAnimatable } from '../utils/is-animatable.mjs';\nimport { getKeyframes } from '../utils/keyframes.mjs';\nimport { getValueTransition, isTransitionDefined } from '../utils/transitions.mjs';\nimport { animateValue } from '../animators/js/index.mjs';\n\nconst animateMotionValue = (valueName, value, target, transition = {}) => {\n return (onComplete) => {\n const valueTransition = getValueTransition(transition, valueName) || {};\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0;\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition;\n elapsed = elapsed - secondsToMilliseconds(delay);\n const keyframes = getKeyframes(value, valueName, target, valueTransition);\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0];\n const targetKeyframe = keyframes[keyframes.length - 1];\n const isOriginAnimatable = isAnimatable(valueName, originKeyframe);\n const isTargetAnimatable = isAnimatable(valueName, targetKeyframe);\n warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${valueName} from \"${originKeyframe}\" to \"${targetKeyframe}\". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \\`style\\` property.`);\n let options = {\n keyframes,\n velocity: value.getVelocity(),\n ease: \"easeOut\",\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v);\n valueTransition.onUpdate && valueTransition.onUpdate(v);\n },\n onComplete: () => {\n onComplete();\n valueTransition.onComplete && valueTransition.onComplete();\n },\n };\n /**\n * If there's no transition defined for this value, we can generate\n * unqiue transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n options = {\n ...options,\n ...getDefaultTransition(valueName, options),\n };\n }\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n if (options.duration) {\n options.duration = secondsToMilliseconds(options.duration);\n }\n if (options.repeatDelay) {\n options.repeatDelay = secondsToMilliseconds(options.repeatDelay);\n }\n if (!isOriginAnimatable ||\n !isTargetAnimatable ||\n instantAnimationState.current ||\n valueTransition.type === false) {\n /**\n * If we can't animate this value, or the global instant animation flag is set,\n * or this is simply defined as an instant transition, return an instant transition.\n */\n return createInstantAnimation(instantAnimationState.current\n ? { ...options, delay: 0 }\n : options);\n }\n /**\n * Animate via WAAPI if possible.\n */\n if (value.owner &&\n value.owner.current instanceof HTMLElement &&\n !value.owner.getProps().onUpdate) {\n const acceleratedAnimation = createAcceleratedAnimation(value, valueName, options);\n if (acceleratedAnimation)\n return acceleratedAnimation;\n }\n /**\n * If we didn't create an accelerated animation, create a JS animation\n */\n return animateValue(options);\n };\n};\n\nexport { animateMotionValue };\n","import { getAnimatableNone } from '../../render/dom/value-types/animatable-none.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\nimport { isNone } from './is-none.mjs';\n\nfunction getKeyframes(value, valueName, target, transition) {\n const isTargetAnimatable = isAnimatable(valueName, target);\n let keyframes;\n if (Array.isArray(target)) {\n keyframes = [...target];\n }\n else {\n keyframes = [null, target];\n }\n const defaultOrigin = transition.from !== undefined ? transition.from : value.get();\n let animatableTemplateValue = undefined;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < keyframes.length; i++) {\n /**\n * Fill null/wildcard keyframes\n */\n if (keyframes[i] === null) {\n keyframes[i] = i === 0 ? defaultOrigin : keyframes[i - 1];\n }\n if (isNone(keyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n // TODO: Clean this conditional, it works for now\n if (typeof keyframes[i] === \"string\" &&\n keyframes[i] !== \"none\" &&\n keyframes[i] !== \"0\") {\n animatableTemplateValue = keyframes[i];\n }\n }\n if (isTargetAnimatable &&\n noneKeyframeIndexes.length &&\n animatableTemplateValue) {\n for (let i = 0; i < noneKeyframeIndexes.length; i++) {\n const index = noneKeyframeIndexes[i];\n keyframes[index] = getAnimatableNone(valueName, animatableTemplateValue);\n }\n }\n return keyframes;\n}\n\nexport { getKeyframes };\n","import { animateValue } from './js/index.mjs';\nimport { noop } from '../../utils/noop.mjs';\n\nfunction createInstantAnimation({ keyframes, delay, onUpdate, onComplete, }) {\n const setValue = () => {\n onUpdate && onUpdate(keyframes[keyframes.length - 1]);\n onComplete && onComplete();\n /**\n * TODO: As this API grows it could make sense to always return\n * animateValue. This will be a bigger project as animateValue\n * is frame-locked whereas this function resolves instantly.\n * This is a behavioural change and also has ramifications regarding\n * assumptions within tests.\n */\n return {\n time: 0,\n speed: 1,\n duration: 0,\n play: (noop),\n pause: (noop),\n stop: (noop),\n then: (resolve) => {\n resolve();\n return Promise.resolve();\n },\n cancel: (noop),\n complete: (noop),\n };\n };\n return delay\n ? animateValue({\n keyframes: [0, 1],\n duration: 0,\n delay,\n onComplete: setValue,\n })\n : setValue();\n}\n\nexport { createInstantAnimation };\n","import { isMotionValue } from '../utils/is-motion-value.mjs';\n\nfunction isWillChangeMotionValue(value) {\n return Boolean(isMotionValue(value) && value.add);\n}\n\nexport { isWillChangeMotionValue };\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nconst isNumericalString = (v) => /^\\-?\\d*\\.?\\d+$/.test(v);\n\nexport { isNumericalString };\n","function addUniqueItem(arr, item) {\n if (arr.indexOf(item) === -1)\n arr.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n if (index > -1)\n arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem([...arr], fromIndex, toIndex) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n const [item] = arr.splice(fromIndex, 1);\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nclass SubscriptionManager {\n constructor() {\n this.subscriptions = [];\n }\n add(handler) {\n addUniqueItem(this.subscriptions, handler);\n return () => removeItem(this.subscriptions, handler);\n }\n notify(a, b, c) {\n const numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n }\n else {\n for (let i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n const handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n }\n getSize() {\n return this.subscriptions.length;\n }\n clear() {\n this.subscriptions.length = 0;\n }\n}\n\nexport { SubscriptionManager };\n","import { SubscriptionManager } from '../utils/subscription-manager.mjs';\nimport { velocityPerSecond } from '../utils/velocity-per-second.mjs';\nimport { warnOnce } from '../utils/warn-once.mjs';\nimport { frame, frameData } from '../frameloop/frame.mjs';\n\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n *\n * @internal\n */\n constructor(init, options = {}) {\n /**\n * This will be replaced by the build step with the latest version number.\n * When MotionValues are provided to motion components, warn if versions are mixed.\n */\n this.version = \"10.16.4\";\n /**\n * Duration, in milliseconds, since last updating frame.\n *\n * @internal\n */\n this.timeDelta = 0;\n /**\n * Timestamp of the last time this `MotionValue` was updated.\n *\n * @internal\n */\n this.lastUpdated = 0;\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = false;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v, render = true) => {\n this.prev = this.current;\n this.current = v;\n // Update timestamp\n const { delta, timestamp } = frameData;\n if (this.lastUpdated !== timestamp) {\n this.timeDelta = delta;\n this.lastUpdated = timestamp;\n frame.postRender(this.scheduleVelocityCheck);\n }\n // Update update subscribers\n if (this.prev !== this.current && this.events.change) {\n this.events.change.notify(this.current);\n }\n // Update velocity subscribers\n if (this.events.velocityChange) {\n this.events.velocityChange.notify(this.getVelocity());\n }\n // Update render subscribers\n if (render && this.events.renderRequest) {\n this.events.renderRequest.notify(this.current);\n }\n };\n /**\n * Schedule a velocity check for the next frame.\n *\n * This is an instanced and bound function to prevent generating a new\n * function once per frame.\n *\n * @internal\n */\n this.scheduleVelocityCheck = () => frame.postRender(this.velocityCheck);\n /**\n * Updates `prev` with `current` if the value hasn't been updated this frame.\n * This ensures velocity calculations return `0`.\n *\n * This is an instanced and bound function to prevent generating a new\n * function once per frame.\n *\n * @internal\n */\n this.velocityCheck = ({ timestamp }) => {\n if (timestamp !== this.lastUpdated) {\n this.prev = this.current;\n if (this.events.velocityChange) {\n this.events.velocityChange.notify(this.getVelocity());\n }\n }\n };\n this.hasAnimated = false;\n this.prev = this.current = init;\n this.canTrackVelocity = isFloat(this.current);\n this.owner = options.owner;\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return \n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n *\n * @internal\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v, render = true) {\n if (!render || !this.passiveEffect) {\n this.updateAndNotify(v, render);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = prev;\n this.timeDelta = delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v) {\n this.updateAndNotify(v);\n this.prev = v;\n this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n // This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful\n return this.canTrackVelocity\n ? // These casts could be avoided if parseFloat would be typed better\n velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prev), this.timeDelta)\n : 0;\n }\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n *\n * @internal\n */\n start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n delete this.animation;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n","/**\n * Tests a provided value against a ValueType\n */\nconst testValueType = (v) => (type) => type.test(v);\n\nexport { testValueType };\n","import { number } from '../../../value/types/numbers/index.mjs';\nimport { px, percent, degrees, vw, vh } from '../../../value/types/numbers/units.mjs';\nimport { testValueType } from './test.mjs';\nimport { auto } from './type-auto.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nconst dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nconst findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));\n\nexport { dimensionValueTypes, findDimensionValueType };\n","/**\n * ValueType for \"auto\"\n */\nconst auto = {\n test: (v) => v === \"auto\",\n parse: (v) => v,\n};\n\nexport { auto };\n","import { color } from '../../../value/types/color/index.mjs';\nimport { complex } from '../../../value/types/complex/index.mjs';\nimport { dimensionValueTypes } from './dimensions.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex];\n/**\n * Tests a value against the list of ValueTypes\n */\nconst findValueType = (v) => valueTypes.find(testValueType(v));\n\nexport { findValueType };\n","import { isNumericalString } from '../../utils/is-numerical-string.mjs';\nimport { isZeroValueString } from '../../utils/is-zero-value-string.mjs';\nimport { resolveFinalValueInKeyframes } from '../../utils/resolve-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { complex } from '../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../dom/value-types/animatable-none.mjs';\nimport { findValueType } from '../dom/value-types/find.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}\nfunction setTarget(visualElement, definition) {\n const resolved = resolveVariant(visualElement, definition);\n let { transitionEnd = {}, transition = {}, ...target } = resolved ? visualElement.makeTargetAnimatable(resolved, false) : {};\n target = { ...target, ...transitionEnd };\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\nfunction setVariants(visualElement, variantLabels) {\n const reversedLabels = [...variantLabels].reverse();\n reversedLabels.forEach((key) => {\n const variant = visualElement.getVariant(key);\n variant && setTarget(visualElement, variant);\n if (visualElement.variantChildren) {\n visualElement.variantChildren.forEach((child) => {\n setVariants(child, variantLabels);\n });\n }\n });\n}\nfunction setValues(visualElement, definition) {\n if (Array.isArray(definition)) {\n return setVariants(visualElement, definition);\n }\n else if (typeof definition === \"string\") {\n return setVariants(visualElement, [definition]);\n }\n else {\n setTarget(visualElement, definition);\n }\n}\nfunction checkTargetForNewValues(visualElement, target, origin) {\n var _a, _b;\n const newValueKeys = Object.keys(target).filter((key) => !visualElement.hasValue(key));\n const numNewValues = newValueKeys.length;\n if (!numNewValues)\n return;\n for (let i = 0; i < numNewValues; i++) {\n const key = newValueKeys[i];\n const targetValue = target[key];\n let value = null;\n /**\n * If the target is a series of keyframes, we can use the first value\n * in the array. If this first value is null, we'll still need to read from the DOM.\n */\n if (Array.isArray(targetValue)) {\n value = targetValue[0];\n }\n /**\n * If the target isn't keyframes, or the first keyframe was null, we need to\n * first check if an origin value was explicitly defined in the transition as \"from\",\n * if not read the value from the DOM. As an absolute fallback, take the defined target value.\n */\n if (value === null) {\n value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key];\n }\n /**\n * If value is still undefined or null, ignore it. Preferably this would throw,\n * but this was causing issues in Framer.\n */\n if (value === undefined || value === null)\n continue;\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(targetValue)) {\n value = getAnimatableNone(key, targetValue);\n }\n visualElement.addValue(key, motionValue(value, { owner: visualElement }));\n if (origin[key] === undefined) {\n origin[key] = value;\n }\n if (value !== null)\n visualElement.setBaseTarget(key, value);\n }\n}\nfunction getOriginFromTransition(key, transition) {\n if (!transition)\n return;\n const valueTransition = transition[key] || transition[\"default\"] || transition;\n return valueTransition.from;\n}\nfunction getOrigin(target, transition, visualElement) {\n const origin = {};\n for (const key in target) {\n const transitionOrigin = getOriginFromTransition(key, transition);\n if (transitionOrigin !== undefined) {\n origin[key] = transitionOrigin;\n }\n else {\n const value = visualElement.getValue(key);\n if (value) {\n origin[key] = value.get();\n }\n }\n }\n return origin;\n}\n\nexport { checkTargetForNewValues, getOrigin, getOriginFromTransition, setTarget, setValues };\n","import { transformProps } from '../../render/html/utils/transform.mjs';\nimport { optimizedAppearDataAttribute } from '../optimized-appear/data-id.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\nimport { isWillChangeMotionValue } from '../../value/use-will-change/is.mjs';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, definition, { delay = 0, transitionOverride, type } = {}) {\n let { transition = visualElement.getDefaultTransition(), transitionEnd, ...target } = visualElement.makeTargetAnimatable(definition);\n const willChange = visualElement.getValue(\"willChange\");\n if (transitionOverride)\n transition = transitionOverride;\n const animations = [];\n const animationTypeState = type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type];\n for (const key in target) {\n const value = visualElement.getValue(key);\n const valueTarget = target[key];\n if (!value ||\n valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n const valueTransition = {\n delay,\n elapsed: 0,\n ...transition,\n };\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n if (window.HandoffAppearAnimations && !value.hasAnimated) {\n const appearId = visualElement.getProps()[optimizedAppearDataAttribute];\n if (appearId) {\n valueTransition.elapsed = window.HandoffAppearAnimations(appearId, key, value, frame);\n valueTransition.syncStart = true;\n }\n }\n value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key)\n ? { type: false }\n : valueTransition));\n const animation = value.animation;\n if (isWillChangeMotionValue(willChange)) {\n willChange.add(key);\n animation.then(() => willChange.remove(key));\n }\n animations.push(animation);\n }\n if (transitionEnd) {\n Promise.all(animations).then(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n }\n return animations;\n}\n\nexport { animateTarget };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n const resolved = resolveVariant(visualElement, variant, options.custom);\n let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getAnimation = resolved\n ? () => Promise.all(animateTarget(visualElement, resolved, options))\n : () => Promise.resolve();\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size\n ? (forwardDelay = 0) => {\n const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;\n return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);\n }\n : () => Promise.resolve();\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n const { when } = transition;\n if (when) {\n const [first, last] = when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation];\n return first().then(() => last());\n }\n else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\nfunction animateChildren(visualElement, variant, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {\n const animations = [];\n const maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;\n const generateStaggerDuration = staggerDirection === 1\n ? (i = 0) => i * staggerChildren\n : (i = 0) => maxStaggerDuration - i * staggerChildren;\n Array.from(visualElement.variantChildren)\n .sort(sortByTreeOrder)\n .forEach((child, i) => {\n child.notify(\"AnimationStart\", variant);\n animations.push(animateVariant(child, variant, {\n ...options,\n delay: delayChildren + generateStaggerDuration(i),\n }).then(() => child.notify(\"AnimationComplete\", variant)));\n });\n return Promise.all(animations);\n}\nfunction sortByTreeOrder(a, b) {\n return a.sortNodePosition(b);\n}\n\nexport { animateVariant, sortByTreeOrder };\n","import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { shallowCompare } from '../../utils/shallow-compare.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { variantPriorityOrder } from './variant-props.mjs';\nimport { animateVisualElement } from '../../animation/interfaces/visual-element.mjs';\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse();\nconst numAnimationTypes = variantPriorityOrder.length;\nfunction animateList(visualElement) {\n return (animations) => Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n}\nfunction createAnimationState(visualElement) {\n let animate = animateList(visualElement);\n const state = createState();\n let isInitialRender = true;\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n const buildResolvedTypeValues = (acc, definition) => {\n const resolved = resolveVariant(visualElement, definition);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n acc = { ...acc, ...target, ...transitionEnd };\n }\n return acc;\n };\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(makeAnimator) {\n animate = makeAnimator(visualElement);\n }\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(options, changedActiveType) {\n const props = visualElement.getProps();\n const context = visualElement.getVariantContext(true) || {};\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n const animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n const removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n let encounteredKeys = {};\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n let removedVariantIndex = Infinity;\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (let i = 0; i < numAnimationTypes; i++) {\n const type = reversePriorityOrder[i];\n const typeState = state[type];\n const prop = props[type] !== undefined ? props[type] : context[type];\n const propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n const activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n let isInherited = prop === context[type] && prop !== props[type] && propIsVariant;\n /**\n *\n */\n if (isInherited &&\n isInitialRender &&\n visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = { ...encounteredKeys };\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n continue;\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n let shouldAnimateType = variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant);\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n const definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n let resolvedValues = definitionList.reduce(buildResolvedTypeValues, {});\n if (activeDelta === false)\n resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n const { prevResolvedValues = {} } = typeState;\n const allKeys = {\n ...prevResolvedValues,\n ...resolvedValues,\n };\n const markToAnimate = (key) => {\n shouldAnimateType = true;\n removedKeys.delete(key);\n typeState.needsAnimating[key] = true;\n };\n for (const key in allKeys) {\n const next = resolvedValues[key];\n const prev = prevResolvedValues[key];\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n /**\n * If the value has changed, we probably want to animate it.\n */\n if (next !== prev) {\n /**\n * If both values are keyframes, we need to shallow compare them to\n * detect whether any value has changed. If it has, we animate it.\n */\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n if (!shallowCompare(next, prev) || variantDidChange) {\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we want to ensure it doesn't animate by\n * adding it to the list of protected keys.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n else if (next !== undefined) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key);\n }\n else {\n // If it's undefined, it's been removed.\n removedKeys.add(key);\n }\n }\n else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n /**\n *\n */\n if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues };\n }\n if (isInitialRender && visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n /**\n * If this is an inherited prop we want to hard-block animations\n * TODO: Test as this should probably still handle animations triggered\n * by removed values?\n */\n if (shouldAnimateType && !isInherited) {\n animations.push(...definitionList.map((animation) => ({\n animation: animation,\n options: { type, ...options },\n })));\n }\n }\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n const fallbackAnimation = {};\n removedKeys.forEach((key) => {\n const fallbackTarget = visualElement.getBaseTarget(key);\n if (fallbackTarget !== undefined) {\n fallbackAnimation[key] = fallbackTarget;\n }\n });\n animations.push({ animation: fallbackAnimation });\n }\n let shouldAnimate = Boolean(animations.length);\n if (isInitialRender &&\n props.initial === false &&\n !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n return shouldAnimate ? animate(animations) : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type, isActive, options) {\n var _a;\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive)\n return Promise.resolve();\n // Propagate active change to children\n (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach((child) => { var _a; return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); });\n state[type].isActive = isActive;\n const animations = animateChanges(options, type);\n for (const key in state) {\n state[key].protectedKeys = {};\n }\n return animations;\n }\n return {\n animateChanges,\n setActive,\n setAnimateFunction,\n getState: () => state,\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n }\n else if (Array.isArray(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive = false) {\n return {\n isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n}\nfunction createState() {\n return {\n animate: createTypeState(true),\n whileInView: createTypeState(),\n whileHover: createTypeState(),\n whileTap: createTypeState(),\n whileDrag: createTypeState(),\n whileFocus: createTypeState(),\n exit: createTypeState(),\n };\n}\n\nexport { checkVariantsDidChange, createAnimationState };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n let animation;\n if (Array.isArray(definition)) {\n const animations = definition.map((variant) => animateVariant(visualElement, variant, options));\n animation = Promise.all(animations);\n }\n else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n }\n else {\n const resolvedDefinition = typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition;\n animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));\n }\n return animation.then(() => visualElement.notify(\"AnimationComplete\", definition));\n}\n\nexport { animateVisualElement };\n","import { Feature } from '../Feature.mjs';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent, onExitComplete, custom } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent, { custom: custom !== null && custom !== void 0 ? custom : this.node.getProps().custom });\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => onExitComplete(this.id));\n }\n }\n mount() {\n const { register } = this.node.presenceContext || {};\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() { }\n}\n\nexport { ExitAnimationFeature };\n","import { AnimationFeature } from './animation/index.mjs';\nimport { ExitAnimationFeature } from './animation/exit.mjs';\n\nconst animations = {\n animation: {\n Feature: AnimationFeature,\n },\n exit: {\n Feature: ExitAnimationFeature,\n },\n};\n\nexport { animations };\n","import { isAnimationControls } from '../../../animation/utils/is-animation-controls.mjs';\nimport { createAnimationState } from '../../../render/utils/animation-state.mjs';\nimport { Feature } from '../Feature.mjs';\n\nclass AnimationFeature extends Feature {\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n constructor(node) {\n super(node);\n node.animationState || (node.animationState = createAnimationState(node));\n }\n updateAnimationControlsSubscription() {\n const { animate } = this.node.getProps();\n this.unmount();\n if (isAnimationControls(animate)) {\n this.unmount = animate.subscribe(this.node);\n }\n }\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription();\n }\n update() {\n const { animate } = this.node.getProps();\n const { animate: prevAnimate } = this.node.prevProps || {};\n if (animate !== prevAnimate) {\n this.updateAnimationControlsSubscription();\n }\n }\n unmount() { }\n}\n\nexport { AnimationFeature };\n","const distance = (a, b) => Math.abs(a - b);\nfunction distance2D(a, b) {\n // Multi-dimensional\n const xDelta = distance(a.x, b.x);\n const yDelta = distance(a.y, b.y);\n return Math.sqrt(xDelta ** 2 + yDelta ** 2);\n}\n\nexport { distance, distance2D };\n","import { extractEventInfo } from '../../events/event-info.mjs';\nimport { secondsToMilliseconds, millisecondsToSeconds } from '../../utils/time-conversion.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { pipe } from '../../utils/pipe.mjs';\nimport { distance2D } from '../../utils/distance.mjs';\nimport { isPrimaryPointer } from '../../events/utils/is-primary-pointer.mjs';\nimport { frame, cancelFrame, frameData } from '../../frameloop/frame.mjs';\n\n/**\n * @internal\n */\nclass PanSession {\n constructor(event, handlers, { transformPagePoint } = {}) {\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursoe.\n const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info);\n };\n this.handlePointerMove = (event, info) => {\n this.lastMoveEvent = event;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const { onEnd, onSessionEnd } = this.handlers;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event))\n return;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(window, \"pointermove\", this.handlePointerMove), addPointerEvent(window, \"pointerup\", this.handlePointerUp), addPointerEvent(window, \"pointercancel\", this.handlePointerUp));\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n cancelFrame(this.updatePoint);\n }\n}\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point }, history) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n","import { mix } from '../../utils/mix.mjs';\n\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target = 0, maxDistance = 0.01) {\n return Math.abs(value - target) <= maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin = 0.5) {\n delta.origin = origin;\n delta.originPoint = mix(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n if (isNear(delta.scale, 1, 0.0001) || isNaN(delta.scale))\n delta.scale = 1;\n delta.translate =\n mix(target.min, target.max, delta.origin) - delta.originPoint;\n if (isNear(delta.translate) || isNaN(delta.translate))\n delta.translate = 0;\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined);\n calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined);\n}\nfunction calcRelativeAxis(target, relative, parent) {\n target.min = parent.min + relative.min;\n target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent) {\n calcRelativeAxis(target.x, relative.x, parent.x);\n calcRelativeAxis(target.y, relative.y, parent.y);\n}\nfunction calcRelativeAxisPosition(target, layout, parent) {\n target.min = layout.min - parent.min;\n target.max = target.min + calcLength(layout);\n}\nfunction calcRelativePosition(target, layout, parent) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x);\n calcRelativeAxisPosition(target.y, layout.y, parent.y);\n}\n\nexport { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };\n","import { progress } from '../../../utils/progress.mjs';\nimport { calcLength } from '../../../projection/geometry/delta-calc.mjs';\nimport { clamp } from '../../../utils/clamp.mjs';\nimport { mix } from '../../../utils/mix.mjs';\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nfunction applyConstraints(point, { min, max }, elastic) {\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic ? mix(min, point, elastic.min) : Math.max(point, min);\n }\n else if (max !== undefined && point > max) {\n // If we have a max point defined, and this is outside of that, constrain\n point = elastic ? mix(max, point, elastic.max) : Math.min(point, max);\n }\n return point;\n}\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nfunction calcRelativeAxisConstraints(axis, min, max) {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max: max !== undefined\n ? axis.max + max - (axis.max - axis.min)\n : undefined,\n };\n}\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nfunction calcRelativeConstraints(layoutBox, { top, left, bottom, right }) {\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nfunction calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n let min = constraintsAxis.min - layoutAxis.min;\n let max = constraintsAxis.max - layoutAxis.max;\n // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n if (constraintsAxis.max - constraintsAxis.min <\n layoutAxis.max - layoutAxis.min) {\n [min, max] = [max, min];\n }\n return { min, max };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nfunction calcViewportConstraints(layoutBox, constraintsBox) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n };\n}\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nfunction calcOrigin(source, target) {\n let origin = 0.5;\n const sourceLength = calcLength(source);\n const targetLength = calcLength(target);\n if (targetLength > sourceLength) {\n origin = progress(target.min, target.max - sourceLength, source.min);\n }\n else if (sourceLength > targetLength) {\n origin = progress(source.min, source.max - targetLength, target.min);\n }\n return clamp(0, 1, origin);\n}\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nfunction rebaseAxisConstraints(layout, constraints) {\n const relativeConstraints = {};\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min;\n }\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min;\n }\n return relativeConstraints;\n}\nconst defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nfunction resolveDragElastic(dragElastic = defaultElastic) {\n if (dragElastic === false) {\n dragElastic = 0;\n }\n else if (dragElastic === true) {\n dragElastic = defaultElastic;\n }\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n };\n}\nfunction resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel),\n };\n}\nfunction resolvePointElastic(dragElastic, label) {\n return typeof dragElastic === \"number\"\n ? dragElastic\n : dragElastic[label] || 0;\n}\n\nexport { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };\n","const createAxisDelta = () => ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n});\nconst createDelta = () => ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n});\nconst createAxis = () => ({ min: 0, max: 0 });\nconst createBox = () => ({\n x: createAxis(),\n y: createAxis(),\n});\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n","function eachAxis(callback) {\n return [callback(\"x\"), callback(\"y\")];\n}\n\nexport { eachAxis };\n","/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox({ top, left, right, bottom, }) {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox({ x, y }) {\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n if (!transformPoint)\n return point;\n const topLeft = transformPoint({ x: point.left, y: point.top });\n const bottomRight = transformPoint({ x: point.right, y: point.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n","function isIdentityScale(scale) {\n return scale === undefined || scale === 1;\n}\nfunction hasScale({ scale, scaleX, scaleY }) {\n return (!isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY));\n}\nfunction hasTransform(values) {\n return (hasScale(values) ||\n has2DTranslate(values) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY);\n}\nfunction has2DTranslate(values) {\n return is2DTranslate(values.x) || is2DTranslate(values.y);\n}\nfunction is2DTranslate(value) {\n return value && value !== \"0%\";\n}\n\nexport { has2DTranslate, hasScale, hasTransform };\n","import { mix } from '../../utils/mix.mjs';\nimport { hasTransform } from '../utils/has-transform.mjs';\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nfunction scalePoint(point, scale, originPoint) {\n const distanceFromOrigin = point - originPoint;\n const scaled = scale * distanceFromOrigin;\n return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint);\n }\n return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\nfunction applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {\n axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\nfunction applyBoxDelta(box, { x, y }) {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {\n const treeLength = treePath.length;\n if (!treeLength)\n return;\n // Reset the treeScale\n treeScale.x = treeScale.y = 1;\n let node;\n let delta;\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const instance = node.instance;\n if (instance &&\n instance.style &&\n instance.style.display === \"contents\") {\n continue;\n }\n if (isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(box, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y,\n });\n }\n if (delta) {\n // Incoporate each ancestor's scale into a culmulative treeScale for this component\n treeScale.x *= delta.x.scale;\n treeScale.y *= delta.y.scale;\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta);\n }\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues);\n }\n }\n /**\n * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n * This will help reduce useless scales getting rendered.\n */\n treeScale.x = snapToDefault(treeScale.x);\n treeScale.y = snapToDefault(treeScale.y);\n}\nfunction snapToDefault(scale) {\n if (Number.isInteger(scale))\n return scale;\n return scale > 1.0000000000001 || scale < 0.999999999999 ? scale : 1;\n}\nfunction translateAxis(axis, distance) {\n axis.min = axis.min + distance;\n axis.max = axis.max + distance;\n}\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nfunction transformAxis(axis, transforms, [key, scaleKey, originKey]) {\n const axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5;\n const originPoint = mix(axis.min, axis.max, axisOrigin);\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, transforms[key], transforms[scaleKey], originPoint, transforms.scale);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nfunction transformBox(box, transform) {\n transformAxis(box.x, transform, xKeys);\n transformAxis(box.y, transform, yKeys);\n}\n\nexport { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };\n","import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n const viewportBox = measureViewportBox(element, transformPagePoint);\n const { scroll } = rootProjectionNode;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x);\n translateAxis(viewportBox.y, scroll.offset.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n","import { invariant } from '../../utils/errors.mjs';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { getGlobalLock } from './utils/lock.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, calcOrigin } from './utils/constraints.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { eachAxis } from '../../projection/utils/each-axis.mjs';\nimport { measurePageBox } from '../../projection/utils/measure.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\nimport { calcLength } from '../../projection/geometry/delta-calc.mjs';\nimport { mix } from '../../utils/mix.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { animateMotionValue } from '../../animation/interfaces/motion-value.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst elementDragControls = new WeakMap();\n/**\n *\n */\n// let latestPointerEvent: PointerEvent\nclass VisualElementDragControls {\n constructor(visualElement) {\n // This is a reference to the global drag gesture lock, ensuring only one component\n // can \"capture\" the drag of one or both axes.\n // TODO: Look into moving this into pansession?\n this.openGlobalLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n // Stop any animations on both axis values immediately. This allows the user to throw and catch\n // the component.\n this.stopAnimation();\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event, \"page\").point);\n }\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openGlobalLock)\n this.openGlobalLock();\n this.openGlobalLock = getGlobalLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openGlobalLock)\n return;\n }\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.update(() => onDragStart(event, info), false, true);\n }\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n // latestPointerEvent = event\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openGlobalLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n onDrag && onDrag(event, info);\n };\n const onSessionEnd = (event, info) => this.stop(event, info);\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n }, { transformPagePoint: this.visualElement.getTransformPagePoint() });\n }\n stop(event, info) {\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging)\n return;\n const { velocity } = info;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.update(() => onDragEnd(event, info));\n }\n }\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openGlobalLock) {\n this.openGlobalLock();\n this.openGlobalLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps();\n const { layout } = this.visualElement.projection || {};\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative.\n */\n if (prevConstraints !== this.constraints &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = \"_drag\" + axis.toUpperCase();\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, (props.initial ? props.initial[axis] : undefined) || 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n axisValue.set(point[axis] - mix(min, max, 0.5));\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mix(min, max, boxProgress[axis]));\n });\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n drag && dragListener && this.start(event);\n });\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints)) {\n this.constraints = this.resolveRefConstraints();\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n measureDragConstraints();\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n","import { PanSession } from './PanSession.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.update(() => handler(event, info));\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), { transformPagePoint: this.node.getTransformPagePoint() });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: onPan,\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.update(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n\nexport { PanGesture };\n","/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nconst globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false,\n};\n\nexport { globalProjectionState };\n","import { px } from '../../value/types/numbers/units.mjs';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nconst correctBorderRadius = {\n correct: (latest, node) => {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n","import { mix } from '../../utils/mix.mjs';\nimport { complex } from '../../value/types/complex/index.mjs';\n\nconst correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n const xScale = projectionDelta.x.scale * treeScale.x;\n const yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mix(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n return template(shadow);\n },\n};\n\nexport { correctBoxShadow };\n","import React__default, { useContext } from 'react';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';\nimport { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';\nimport { globalProjectionState } from '../../../projection/node/state.mjs';\nimport { correctBorderRadius } from '../../../projection/styles/scale-border-radius.mjs';\nimport { correctBoxShadow } from '../../../projection/styles/scale-box-shadow.mjs';\nimport { addScaleCorrector } from '../../../projection/styles/scale-correction.mjs';\nimport { frame } from '../../../frameloop/frame.mjs';\n\nclass MeasureLayoutWithContext extends React__default.Component {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;\n const { projection } = visualElement;\n addScaleCorrector(defaultScaleCorrectors);\n if (projection) {\n if (layoutGroup.group)\n layoutGroup.group.add(projection);\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection);\n }\n projection.root.didUpdate();\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove();\n });\n projection.setOptions({\n ...projection.options,\n onExitComplete: () => this.safeToRemove(),\n });\n }\n globalProjectionState.hasEverUpdated = true;\n }\n getSnapshotBeforeUpdate(prevProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props;\n const projection = visualElement.projection;\n if (!projection)\n return null;\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined) {\n projection.willUpdate();\n }\n else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote();\n }\n else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n frame.postRender(() => {\n const stack = projection.getStack();\n if (!stack || !stack.members.length) {\n this.safeToRemove();\n }\n });\n }\n }\n return null;\n }\n componentDidUpdate() {\n const { projection } = this.props.visualElement;\n if (projection) {\n projection.root.didUpdate();\n queueMicrotask(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n });\n }\n }\n componentWillUnmount() {\n const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props;\n const { projection } = visualElement;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n }\n safeToRemove() {\n const { safeToRemove } = this.props;\n safeToRemove && safeToRemove();\n }\n render() {\n return null;\n }\n}\nfunction MeasureLayout(props) {\n const [isPresent, safeToRemove] = usePresence();\n const layoutGroup = useContext(LayoutGroupContext);\n return (React__default.createElement(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove }));\n}\nconst defaultScaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\n\nexport { MeasureLayout };\n","import { useContext, useId, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return
\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed the tree, but\n * `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence() {\n const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent, onExitComplete, register } = context;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n const id = useId();\n useEffect(() => register(id), []);\n const safeToRemove = () => onExitComplete && onExitComplete(id);\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return
\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n","import { circOut } from '../../easing/circ.mjs';\nimport { progress } from '../../utils/progress.mjs';\nimport { mix } from '../../utils/mix.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { percent, px } from '../../value/types/numbers/units.mjs';\n\nconst borders = [\"TopLeft\", \"TopRight\", \"BottomLeft\", \"BottomRight\"];\nconst numBorders = borders.length;\nconst asNumber = (value) => typeof value === \"string\" ? parseFloat(value) : value;\nconst isPx = (value) => typeof value === \"number\" || px.test(value);\nfunction mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {\n if (shouldCrossfadeOpacity) {\n target.opacity = mix(0, \n // TODO Reinstate this if only child\n lead.opacity !== undefined ? lead.opacity : 1, easeCrossfadeIn(progress));\n target.opacityExit = mix(follow.opacity !== undefined ? follow.opacity : 1, 0, easeCrossfadeOut(progress));\n }\n else if (isOnlyMember) {\n target.opacity = mix(follow.opacity !== undefined ? follow.opacity : 1, lead.opacity !== undefined ? lead.opacity : 1, progress);\n }\n /**\n * Mix border radius\n */\n for (let i = 0; i < numBorders; i++) {\n const borderLabel = `border${borders[i]}Radius`;\n let followRadius = getRadius(follow, borderLabel);\n let leadRadius = getRadius(lead, borderLabel);\n if (followRadius === undefined && leadRadius === undefined)\n continue;\n followRadius || (followRadius = 0);\n leadRadius || (leadRadius = 0);\n const canMix = followRadius === 0 ||\n leadRadius === 0 ||\n isPx(followRadius) === isPx(leadRadius);\n if (canMix) {\n target[borderLabel] = Math.max(mix(asNumber(followRadius), asNumber(leadRadius), progress), 0);\n if (percent.test(leadRadius) || percent.test(followRadius)) {\n target[borderLabel] += \"%\";\n }\n }\n else {\n target[borderLabel] = leadRadius;\n }\n }\n /**\n * Mix rotation\n */\n if (follow.rotate || lead.rotate) {\n target.rotate = mix(follow.rotate || 0, lead.rotate || 0, progress);\n }\n}\nfunction getRadius(values, radiusName) {\n return values[radiusName] !== undefined\n ? values[radiusName]\n : values.borderRadius;\n}\n// /**\n// * We only want to mix the background color if there's a follow element\n// * that we're not crossfading opacity between. For instance with switch\n// * AnimateSharedLayout animations, this helps the illusion of a continuous\n// * element being animated but also cuts down on the number of paints triggered\n// * for elements where opacity is doing that work for us.\n// */\n// if (\n// !hasFollowElement &&\n// latestLeadValues.backgroundColor &&\n// latestFollowValues.backgroundColor\n// ) {\n// /**\n// * This isn't ideal performance-wise as mixColor is creating a new function every frame.\n// * We could probably create a mixer that runs at the start of the animation but\n// * the idea behind the crossfader is that it runs dynamically between two potentially\n// * changing targets (ie opacity or borderRadius may be animating independently via variants)\n// */\n// leadState.backgroundColor = followState.backgroundColor = mixColor(\n// latestFollowValues.backgroundColor as string,\n// latestLeadValues.backgroundColor as string\n// )(p)\n// }\nconst easeCrossfadeIn = compress(0, 0.5, circOut);\nconst easeCrossfadeOut = compress(0.5, 0.95, noop);\nfunction compress(min, max, easing) {\n return (p) => {\n // Could replace ifs with clamp\n if (p < min)\n return 0;\n if (p > max)\n return 1;\n return easing(progress(min, max, p));\n };\n}\n\nexport { mixValues };\n","/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisInto(axis, originAxis) {\n axis.min = originAxis.min;\n axis.max = originAxis.max;\n}\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyBoxInto(box, originBox) {\n copyAxisInto(box.x, originBox.x);\n copyAxisInto(box.y, originBox.y);\n}\n\nexport { copyAxisInto, copyBoxInto };\n","import { mix } from '../../utils/mix.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n const relativeProgress = mix(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n let originPoint = mix(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);\n removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n","import { calcLength } from './delta-calc.mjs';\n\nfunction isAxisDeltaZero(delta) {\n return delta.translate === 0 && delta.scale === 1;\n}\nfunction isDeltaZero(delta) {\n return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);\n}\nfunction boxEquals(a, b) {\n return (a.x.min === b.x.min &&\n a.x.max === b.x.max &&\n a.y.min === b.y.min &&\n a.y.max === b.y.max);\n}\nfunction boxEqualsRounded(a, b) {\n return (Math.round(a.x.min) === Math.round(b.x.min) &&\n Math.round(a.x.max) === Math.round(b.x.max) &&\n Math.round(a.y.min) === Math.round(b.y.min) &&\n Math.round(a.y.max) === Math.round(b.y.max));\n}\nfunction aspectRatio(box) {\n return calcLength(box.x) / calcLength(box.y);\n}\n\nexport { aspectRatio, boxEquals, boxEqualsRounded, isDeltaZero };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\n\nclass NodeStack {\n constructor() {\n this.members = [];\n }\n add(node) {\n addUniqueItem(this.members, node);\n node.scheduleRender();\n }\n remove(node) {\n removeItem(this.members, node);\n if (node === this.prevLead) {\n this.prevLead = undefined;\n }\n if (node === this.lead) {\n const prevLead = this.members[this.members.length - 1];\n if (prevLead) {\n this.promote(prevLead);\n }\n }\n }\n relegate(node) {\n const indexOfNode = this.members.findIndex((member) => node === member);\n if (indexOfNode === 0)\n return false;\n /**\n * Find the next projection node that is present\n */\n let prevLead;\n for (let i = indexOfNode; i >= 0; i--) {\n const member = this.members[i];\n if (member.isPresent !== false) {\n prevLead = member;\n break;\n }\n }\n if (prevLead) {\n this.promote(prevLead);\n return true;\n }\n else {\n return false;\n }\n }\n promote(node, preserveFollowOpacity) {\n const prevLead = this.lead;\n if (node === prevLead)\n return;\n this.prevLead = prevLead;\n this.lead = node;\n node.show();\n if (prevLead) {\n prevLead.instance && prevLead.scheduleRender();\n node.scheduleRender();\n node.resumeFrom = prevLead;\n if (preserveFollowOpacity) {\n node.resumeFrom.preserveOpacity = true;\n }\n if (prevLead.snapshot) {\n node.snapshot = prevLead.snapshot;\n node.snapshot.latestValues =\n prevLead.animationValues || prevLead.latestValues;\n }\n if (node.root && node.root.isUpdating) {\n node.isLayoutDirty = true;\n }\n const { crossfade } = node.options;\n if (crossfade === false) {\n prevLead.hide();\n }\n /**\n * TODO:\n * - Test border radius when previous node was deleted\n * - boxShadow mixing\n * - Shared between element A in scrolled container and element B (scroll stays the same or changes)\n * - Shared between element A in transformed container and element B (transform stays the same or changes)\n * - Shared between element A in scrolled page and element B (scroll stays the same or changes)\n * ---\n * - Crossfade opacity of root nodes\n * - layoutId changes after animation\n * - layoutId changes mid animation\n */\n }\n }\n exitAnimationComplete() {\n this.members.forEach((node) => {\n const { options, resumingFrom } = node;\n options.onExitComplete && options.onExitComplete();\n if (resumingFrom) {\n resumingFrom.options.onExitComplete &&\n resumingFrom.options.onExitComplete();\n }\n });\n }\n scheduleRender() {\n this.members.forEach((node) => {\n node.instance && node.scheduleRender(false);\n });\n }\n /**\n * Clear any leads that have been removed this render to prevent them from being\n * used in future animations and to prevent memory leaks\n */\n removeLeadSnapshot() {\n if (this.lead && this.lead.snapshot) {\n this.lead.snapshot = undefined;\n }\n }\n}\n\nexport { NodeStack };\n","function buildProjectionTransform(delta, treeScale, latestTransform) {\n let transform = \"\";\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n const xTranslate = delta.x.translate / treeScale.x;\n const yTranslate = delta.y.translate / treeScale.y;\n if (xTranslate || yTranslate) {\n transform = `translate3d(${xTranslate}px, ${yTranslate}px, 0) `;\n }\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;\n }\n if (latestTransform) {\n const { rotate, rotateX, rotateY } = latestTransform;\n if (rotate)\n transform += `rotate(${rotate}deg) `;\n if (rotateX)\n transform += `rotateX(${rotateX}deg) `;\n if (rotateY)\n transform += `rotateY(${rotateY}deg) `;\n }\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n const elementScaleX = delta.x.scale * treeScale.x;\n const elementScaleY = delta.y.scale * treeScale.y;\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform += `scale(${elementScaleX}, ${elementScaleY})`;\n }\n return transform || \"none\";\n}\n\nexport { buildProjectionTransform };\n","const compareByDepth = (a, b) => a.depth - b.depth;\n\nexport { compareByDepth };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\nimport { compareByDepth } from './compare-by-depth.mjs';\n\nclass FlatTree {\n constructor() {\n this.children = [];\n this.isDirty = false;\n }\n add(child) {\n addUniqueItem(this.children, child);\n this.isDirty = true;\n }\n remove(child) {\n removeItem(this.children, child);\n this.isDirty = true;\n }\n forEach(callback) {\n this.isDirty && this.children.sort(compareByDepth);\n this.isDirty = false;\n this.children.forEach(callback);\n }\n}\n\nexport { FlatTree };\n","import { SubscriptionManager } from '../../utils/subscription-manager.mjs';\nimport { mixValues } from '../animation/mix-values.mjs';\nimport { copyBoxInto } from '../geometry/copy.mjs';\nimport { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from '../geometry/delta-apply.mjs';\nimport { calcRelativePosition, calcRelativeBox, calcBoxDelta, calcLength, isNear } from '../geometry/delta-calc.mjs';\nimport { removeBoxTransforms } from '../geometry/delta-remove.mjs';\nimport { createBox, createDelta } from '../geometry/models.mjs';\nimport { getValueTransition } from '../../animation/utils/transitions.mjs';\nimport { boxEqualsRounded, isDeltaZero, aspectRatio, boxEquals } from '../geometry/utils.mjs';\nimport { NodeStack } from '../shared/stack.mjs';\nimport { scaleCorrectors } from '../styles/scale-correction.mjs';\nimport { buildProjectionTransform } from '../styles/transform.mjs';\nimport { eachAxis } from '../utils/each-axis.mjs';\nimport { hasTransform, hasScale, has2DTranslate } from '../utils/has-transform.mjs';\nimport { FlatTree } from '../../render/utils/flat-tree.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { globalProjectionState } from './state.mjs';\nimport { delay } from '../../utils/delay.mjs';\nimport { mix } from '../../utils/mix.mjs';\nimport { record } from '../../debug/record.mjs';\nimport { isSVGElement } from '../../render/dom/utils/is-svg-element.mjs';\nimport { animateSingleValue } from '../../animation/interfaces/single-value.mjs';\nimport { clamp } from '../../utils/clamp.mjs';\nimport { cancelFrame, frameData, steps, frame } from '../../frameloop/frame.mjs';\nimport { noop } from '../../utils/noop.mjs';\n\nconst transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nconst animationTarget = 1000;\nlet id = 0;\n/**\n * Use a mutable data object for debug data so as to not create a new\n * object every frame.\n */\nconst projectionFrameData = {\n type: \"projectionFrame\",\n totalNodes: 0,\n resolvedTargetDeltas: 0,\n recalculatedProjection: 0,\n};\nfunction createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) {\n return class ProjectionNode {\n constructor(latestValues = {}, parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent()) {\n /**\n * A unique ID generated for every projection node.\n */\n this.id = id++;\n /**\n * An id that represents a unique session instigated by startUpdate.\n */\n this.animationId = 0;\n /**\n * A Set containing all this component's children. This is used to iterate\n * through the children.\n *\n * TODO: This could be faster to iterate as a flat array stored on the root node.\n */\n this.children = new Set();\n /**\n * Options for the node. We use this to configure what kind of layout animations\n * we should perform (if any).\n */\n this.options = {};\n /**\n * We use this to detect when its safe to shut down part of a projection tree.\n * We have to keep projecting children for scale correction and relative projection\n * until all their parents stop performing layout animations.\n */\n this.isTreeAnimating = false;\n this.isAnimationBlocked = false;\n /**\n * Flag to true if we think this layout has been changed. We can't always know this,\n * currently we set it to true every time a component renders, or if it has a layoutDependency\n * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n * and if one node is dirtied, they all are.\n */\n this.isLayoutDirty = false;\n /**\n * Flag to true if we think the projection calculations for this node needs\n * recalculating as a result of an updated transform or layout animation.\n */\n this.isProjectionDirty = false;\n /**\n * Flag to true if the layout *or* transform has changed. This then gets propagated\n * throughout the projection tree, forcing any element below to recalculate on the next frame.\n */\n this.isSharedProjectionDirty = false;\n /**\n * Flag transform dirty. This gets propagated throughout the whole tree but is only\n * respected by shared nodes.\n */\n this.isTransformDirty = false;\n /**\n * Block layout updates for instant layout transitions throughout the tree.\n */\n this.updateManuallyBlocked = false;\n this.updateBlockedByResize = false;\n /**\n * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n * call.\n */\n this.isUpdating = false;\n /**\n * If this is an SVG element we currently disable projection transforms\n */\n this.isSVG = false;\n /**\n * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n * its projection styles.\n */\n this.needsReset = false;\n /**\n * Flags whether this node should have its transform reset prior to measuring.\n */\n this.shouldResetTransform = false;\n /**\n * An object representing the calculated contextual/accumulated/tree scale.\n * This will be used to scale calculcated projection transforms, as these are\n * calculated in screen-space but need to be scaled for elements to layoutly\n * make it to their calculated destinations.\n *\n * TODO: Lazy-init\n */\n this.treeScale = { x: 1, y: 1 };\n /**\n *\n */\n this.eventHandlers = new Map();\n this.hasTreeAnimated = false;\n // Note: Currently only running on root node\n this.updateScheduled = false;\n this.checkUpdateFailed = () => {\n if (this.isUpdating) {\n this.isUpdating = false;\n this.clearAllSnapshots();\n }\n };\n /**\n * This is a multi-step process as shared nodes might be of different depths. Nodes\n * are sorted by depth order, so we need to resolve the entire tree before moving to\n * the next step.\n */\n this.updateProjection = () => {\n /**\n * Reset debug counts. Manually resetting rather than creating a new\n * object each frame.\n */\n projectionFrameData.totalNodes =\n projectionFrameData.resolvedTargetDeltas =\n projectionFrameData.recalculatedProjection =\n 0;\n this.nodes.forEach(propagateDirtyNodes);\n this.nodes.forEach(resolveTargetDelta);\n this.nodes.forEach(calcProjection);\n this.nodes.forEach(cleanDirtyNodes);\n record(projectionFrameData);\n };\n this.hasProjected = false;\n this.isVisible = true;\n this.animationProgress = 0;\n /**\n * Shared layout\n */\n // TODO Only running on root node\n this.sharedNodes = new Map();\n this.latestValues = latestValues;\n this.root = parent ? parent.root || parent : this;\n this.path = parent ? [...parent.path, parent] : [];\n this.parent = parent;\n this.depth = parent ? parent.depth + 1 : 0;\n for (let i = 0; i < this.path.length; i++) {\n this.path[i].shouldResetTransform = true;\n }\n if (this.root === this)\n this.nodes = new FlatTree();\n }\n addEventListener(name, handler) {\n if (!this.eventHandlers.has(name)) {\n this.eventHandlers.set(name, new SubscriptionManager());\n }\n return this.eventHandlers.get(name).add(handler);\n }\n notifyListeners(name, ...args) {\n const subscriptionManager = this.eventHandlers.get(name);\n subscriptionManager && subscriptionManager.notify(...args);\n }\n hasListeners(name) {\n return this.eventHandlers.has(name);\n }\n /**\n * Lifecycles\n */\n mount(instance, isLayoutDirty = this.root.hasTreeAnimated) {\n if (this.instance)\n return;\n this.isSVG = isSVGElement(instance);\n this.instance = instance;\n const { layoutId, layout, visualElement } = this.options;\n if (visualElement && !visualElement.current) {\n visualElement.mount(instance);\n }\n this.root.nodes.add(this);\n this.parent && this.parent.children.add(this);\n if (isLayoutDirty && (layout || layoutId)) {\n this.isLayoutDirty = true;\n }\n if (attachResizeListener) {\n let cancelDelay;\n const resizeUnblockUpdate = () => (this.root.updateBlockedByResize = false);\n attachResizeListener(instance, () => {\n this.root.updateBlockedByResize = true;\n cancelDelay && cancelDelay();\n cancelDelay = delay(resizeUnblockUpdate, 250);\n if (globalProjectionState.hasAnimatedSinceResize) {\n globalProjectionState.hasAnimatedSinceResize = false;\n this.nodes.forEach(finishAnimation);\n }\n });\n }\n if (layoutId) {\n this.root.registerSharedNode(layoutId, this);\n }\n // Only register the handler if it requires layout animation\n if (this.options.animate !== false &&\n visualElement &&\n (layoutId || layout)) {\n this.addEventListener(\"didUpdate\", ({ delta, hasLayoutChanged, hasRelativeTargetChanged, layout: newLayout, }) => {\n if (this.isTreeAnimationBlocked()) {\n this.target = undefined;\n this.relativeTarget = undefined;\n return;\n }\n // TODO: Check here if an animation exists\n const layoutTransition = this.options.transition ||\n visualElement.getDefaultTransition() ||\n defaultLayoutTransition;\n const { onLayoutAnimationStart, onLayoutAnimationComplete, } = visualElement.getProps();\n /**\n * The target layout of the element might stay the same,\n * but its position relative to its parent has changed.\n */\n const targetChanged = !this.targetLayout ||\n !boxEqualsRounded(this.targetLayout, newLayout) ||\n hasRelativeTargetChanged;\n /**\n * If the layout hasn't seemed to have changed, it might be that the\n * element is visually in the same place in the document but its position\n * relative to its parent has indeed changed. So here we check for that.\n */\n const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;\n if (this.options.layoutRoot ||\n (this.resumeFrom && this.resumeFrom.instance) ||\n hasOnlyRelativeTargetChanged ||\n (hasLayoutChanged &&\n (targetChanged || !this.currentAnimation))) {\n if (this.resumeFrom) {\n this.resumingFrom = this.resumeFrom;\n this.resumingFrom.resumingFrom = undefined;\n }\n this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);\n const animationOptions = {\n ...getValueTransition(layoutTransition, \"layout\"),\n onPlay: onLayoutAnimationStart,\n onComplete: onLayoutAnimationComplete,\n };\n if (visualElement.shouldReduceMotion ||\n this.options.layoutRoot) {\n animationOptions.delay = 0;\n animationOptions.type = false;\n }\n this.startAnimation(animationOptions);\n }\n else {\n /**\n * If the layout hasn't changed and we have an animation that hasn't started yet,\n * finish it immediately. Otherwise it will be animating from a location\n * that was probably never commited to screen and look like a jumpy box.\n */\n if (!hasLayoutChanged) {\n finishAnimation(this);\n }\n if (this.isLead() && this.options.onExitComplete) {\n this.options.onExitComplete();\n }\n }\n this.targetLayout = newLayout;\n });\n }\n }\n unmount() {\n this.options.layoutId && this.willUpdate();\n this.root.nodes.remove(this);\n const stack = this.getStack();\n stack && stack.remove(this);\n this.parent && this.parent.children.delete(this);\n this.instance = undefined;\n cancelFrame(this.updateProjection);\n }\n // only on the root\n blockUpdate() {\n this.updateManuallyBlocked = true;\n }\n unblockUpdate() {\n this.updateManuallyBlocked = false;\n }\n isUpdateBlocked() {\n return this.updateManuallyBlocked || this.updateBlockedByResize;\n }\n isTreeAnimationBlocked() {\n return (this.isAnimationBlocked ||\n (this.parent && this.parent.isTreeAnimationBlocked()) ||\n false);\n }\n // Note: currently only running on root node\n startUpdate() {\n if (this.isUpdateBlocked())\n return;\n this.isUpdating = true;\n this.nodes && this.nodes.forEach(resetRotation);\n this.animationId++;\n }\n getTransformTemplate() {\n const { visualElement } = this.options;\n return visualElement && visualElement.getProps().transformTemplate;\n }\n willUpdate(shouldNotifyListeners = true) {\n this.root.hasTreeAnimated = true;\n if (this.root.isUpdateBlocked()) {\n this.options.onExitComplete && this.options.onExitComplete();\n return;\n }\n !this.root.isUpdating && this.root.startUpdate();\n if (this.isLayoutDirty)\n return;\n this.isLayoutDirty = true;\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.shouldResetTransform = true;\n node.updateScroll(\"snapshot\");\n if (node.options.layoutRoot) {\n node.willUpdate(false);\n }\n }\n const { layoutId, layout } = this.options;\n if (layoutId === undefined && !layout)\n return;\n const transformTemplate = this.getTransformTemplate();\n this.prevTransformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n this.updateSnapshot();\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\");\n }\n update() {\n this.updateScheduled = false;\n const updateWasBlocked = this.isUpdateBlocked();\n // When doing an instant transition, we skip the layout update,\n // but should still clean up the measurements so that the next\n // snapshot could be taken correctly.\n if (updateWasBlocked) {\n this.unblockUpdate();\n this.clearAllSnapshots();\n this.nodes.forEach(clearMeasurements);\n return;\n }\n if (!this.isUpdating) {\n this.nodes.forEach(clearIsLayoutDirty);\n }\n this.isUpdating = false;\n /**\n * Write\n */\n this.nodes.forEach(resetTransformStyle);\n /**\n * Read ==================\n */\n // Update layout measurements of updated children\n this.nodes.forEach(updateLayout);\n /**\n * Write\n */\n // Notify listeners that the layout is updated\n this.nodes.forEach(notifyLayoutUpdate);\n this.clearAllSnapshots();\n /**\n * Manually flush any pending updates. Ideally\n * we could leave this to the following requestAnimationFrame but this seems\n * to leave a flash of incorrectly styled content.\n */\n const now = performance.now();\n frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp);\n frameData.timestamp = now;\n frameData.isProcessing = true;\n steps.update.process(frameData);\n steps.preRender.process(frameData);\n steps.render.process(frameData);\n frameData.isProcessing = false;\n }\n didUpdate() {\n if (!this.updateScheduled) {\n this.updateScheduled = true;\n queueMicrotask(() => this.update());\n }\n }\n clearAllSnapshots() {\n this.nodes.forEach(clearSnapshot);\n this.sharedNodes.forEach(removeLeadSnapshots);\n }\n scheduleUpdateProjection() {\n frame.preRender(this.updateProjection, false, true);\n }\n scheduleCheckAfterUnmount() {\n /**\n * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n * we manually call didUpdate to give a chance to the siblings to animate.\n * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n */\n frame.postRender(() => {\n if (this.isLayoutDirty) {\n this.root.didUpdate();\n }\n else {\n this.root.checkUpdateFailed();\n }\n });\n }\n /**\n * Update measurements\n */\n updateSnapshot() {\n if (this.snapshot || !this.instance)\n return;\n this.snapshot = this.measure();\n }\n updateLayout() {\n if (!this.instance)\n return;\n // TODO: Incorporate into a forwarded scroll offset\n this.updateScroll();\n if (!(this.options.alwaysMeasureLayout && this.isLead()) &&\n !this.isLayoutDirty) {\n return;\n }\n /**\n * When a node is mounted, it simply resumes from the prevLead's\n * snapshot instead of taking a new one, but the ancestors scroll\n * might have updated while the prevLead is unmounted. We need to\n * update the scroll again to make sure the layout we measure is\n * up to date.\n */\n if (this.resumeFrom && !this.resumeFrom.instance) {\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.updateScroll();\n }\n }\n const prevLayout = this.layout;\n this.layout = this.measure(false);\n this.layoutCorrected = createBox();\n this.isLayoutDirty = false;\n this.projectionDelta = undefined;\n this.notifyListeners(\"measure\", this.layout.layoutBox);\n const { visualElement } = this.options;\n visualElement &&\n visualElement.notify(\"LayoutMeasure\", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined);\n }\n updateScroll(phase = \"measure\") {\n let needsMeasurement = Boolean(this.options.layoutScroll && this.instance);\n if (this.scroll &&\n this.scroll.animationId === this.root.animationId &&\n this.scroll.phase === phase) {\n needsMeasurement = false;\n }\n if (needsMeasurement) {\n this.scroll = {\n animationId: this.root.animationId,\n phase,\n isRoot: checkIsScrollRoot(this.instance),\n offset: measureScroll(this.instance),\n };\n }\n }\n resetTransform() {\n if (!resetTransform)\n return;\n const isResetRequested = this.isLayoutDirty || this.shouldResetTransform;\n const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);\n const transformTemplate = this.getTransformTemplate();\n const transformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;\n if (isResetRequested &&\n (hasProjection ||\n hasTransform(this.latestValues) ||\n transformTemplateHasChanged)) {\n resetTransform(this.instance, transformTemplateValue);\n this.shouldResetTransform = false;\n this.scheduleRender();\n }\n }\n measure(removeTransform = true) {\n const pageBox = this.measurePageBox();\n let layoutBox = this.removeElementScroll(pageBox);\n /**\n * Measurements taken during the pre-render stage\n * still have transforms applied so we remove them\n * via calculation.\n */\n if (removeTransform) {\n layoutBox = this.removeTransform(layoutBox);\n }\n roundBox(layoutBox);\n return {\n animationId: this.root.animationId,\n measuredBox: pageBox,\n layoutBox,\n latestValues: {},\n source: this.id,\n };\n }\n measurePageBox() {\n const { visualElement } = this.options;\n if (!visualElement)\n return createBox();\n const box = visualElement.measureViewportBox();\n // Remove viewport scroll to give page-relative coordinates\n const { scroll } = this.root;\n if (scroll) {\n translateAxis(box.x, scroll.offset.x);\n translateAxis(box.y, scroll.offset.y);\n }\n return box;\n }\n removeElementScroll(box) {\n const boxWithoutScroll = createBox();\n copyBoxInto(boxWithoutScroll, box);\n /**\n * Performance TODO: Keep a cumulative scroll offset down the tree\n * rather than loop back up the path.\n */\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n const { scroll, options } = node;\n if (node !== this.root && scroll && options.layoutScroll) {\n /**\n * If this is a new scroll root, we want to remove all previous scrolls\n * from the viewport box.\n */\n if (scroll.isRoot) {\n copyBoxInto(boxWithoutScroll, box);\n const { scroll: rootScroll } = this.root;\n /**\n * Undo the application of page scroll that was originally added\n * to the measured bounding box.\n */\n if (rootScroll) {\n translateAxis(boxWithoutScroll.x, -rootScroll.offset.x);\n translateAxis(boxWithoutScroll.y, -rootScroll.offset.y);\n }\n }\n translateAxis(boxWithoutScroll.x, scroll.offset.x);\n translateAxis(boxWithoutScroll.y, scroll.offset.y);\n }\n }\n return boxWithoutScroll;\n }\n applyTransform(box, transformOnly = false) {\n const withTransforms = createBox();\n copyBoxInto(withTransforms, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!transformOnly &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(withTransforms, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y,\n });\n }\n if (!hasTransform(node.latestValues))\n continue;\n transformBox(withTransforms, node.latestValues);\n }\n if (hasTransform(this.latestValues)) {\n transformBox(withTransforms, this.latestValues);\n }\n return withTransforms;\n }\n removeTransform(box) {\n const boxWithoutTransform = createBox();\n copyBoxInto(boxWithoutTransform, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!node.instance)\n continue;\n if (!hasTransform(node.latestValues))\n continue;\n hasScale(node.latestValues) && node.updateSnapshot();\n const sourceBox = createBox();\n const nodeBox = node.measurePageBox();\n copyBoxInto(sourceBox, nodeBox);\n removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot ? node.snapshot.layoutBox : undefined, sourceBox);\n }\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues);\n }\n return boxWithoutTransform;\n }\n setTargetDelta(delta) {\n this.targetDelta = delta;\n this.root.scheduleUpdateProjection();\n this.isProjectionDirty = true;\n }\n setOptions(options) {\n this.options = {\n ...this.options,\n ...options,\n crossfade: options.crossfade !== undefined ? options.crossfade : true,\n };\n }\n clearMeasurements() {\n this.scroll = undefined;\n this.layout = undefined;\n this.snapshot = undefined;\n this.prevTransformTemplateValue = undefined;\n this.targetDelta = undefined;\n this.target = undefined;\n this.isLayoutDirty = false;\n }\n forceRelativeParentToResolveTarget() {\n if (!this.relativeParent)\n return;\n /**\n * If the parent target isn't up-to-date, force it to update.\n * This is an unfortunate de-optimisation as it means any updating relative\n * projection will cause all the relative parents to recalculate back\n * up the tree.\n */\n if (this.relativeParent.resolvedRelativeTargetAt !==\n frameData.timestamp) {\n this.relativeParent.resolveTargetDelta(true);\n }\n }\n resolveTargetDelta(forceRecalculation = false) {\n var _a;\n /**\n * Once the dirty status of nodes has been spread through the tree, we also\n * need to check if we have a shared node of a different depth that has itself\n * been dirtied.\n */\n const lead = this.getLead();\n this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty);\n this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty);\n this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty);\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n /**\n * We don't use transform for this step of processing so we don't\n * need to check whether any nodes have changed transform.\n */\n const canSkip = !(forceRecalculation ||\n (isShared && this.isSharedProjectionDirty) ||\n this.isProjectionDirty ||\n ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty) ||\n this.attemptToResolveRelativeTarget);\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If we have no layout, we can't perform projection, so early return\n */\n if (!this.layout || !(layout || layoutId))\n return;\n this.resolvedRelativeTargetAt = frameData.timestamp;\n /**\n * If we don't have a targetDelta but do have a layout, we can attempt to resolve\n * a relativeParent. This will allow a component to perform scale correction\n * even if no animation has started.\n */\n // TODO If this is unsuccessful this currently happens every frame\n if (!this.targetDelta && !this.relativeTarget) {\n // TODO: This is a semi-repetition of further down this function, make DRY\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n relativeParent.layout &&\n this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.layout.layoutBox, relativeParent.layout.layoutBox);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\n }\n }\n /**\n * If we have no relative target or no target delta our target isn't valid\n * for this frame.\n */\n if (!this.relativeTarget && !this.targetDelta)\n return;\n /**\n * Lazy-init target data structure\n */\n if (!this.target) {\n this.target = createBox();\n this.targetWithTransforms = createBox();\n }\n /**\n * If we've got a relative box for this component, resolve it into a target relative to the parent.\n */\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.relativeParent &&\n this.relativeParent.target) {\n this.forceRelativeParentToResolveTarget();\n calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target);\n /**\n * If we've only got a targetDelta, resolve it into a target\n */\n }\n else if (this.targetDelta) {\n if (Boolean(this.resumingFrom)) {\n // TODO: This is creating a new object every frame\n this.target = this.applyTransform(this.layout.layoutBox);\n }\n else {\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n applyBoxDelta(this.target, this.targetDelta);\n }\n else {\n /**\n * If no target, use own layout as target\n */\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n /**\n * If we've been told to attempt to resolve a relative target, do so.\n */\n if (this.attemptToResolveRelativeTarget) {\n this.attemptToResolveRelativeTarget = false;\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n Boolean(relativeParent.resumingFrom) ===\n Boolean(this.resumingFrom) &&\n !relativeParent.options.layoutScroll &&\n relativeParent.target &&\n this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.target, relativeParent.target);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\n }\n }\n /**\n * Increase debug counter for resolved target deltas\n */\n projectionFrameData.resolvedTargetDeltas++;\n }\n getClosestProjectingParent() {\n if (!this.parent ||\n hasScale(this.parent.latestValues) ||\n has2DTranslate(this.parent.latestValues)) {\n return undefined;\n }\n if (this.parent.isProjecting()) {\n return this.parent;\n }\n else {\n return this.parent.getClosestProjectingParent();\n }\n }\n isProjecting() {\n return Boolean((this.relativeTarget ||\n this.targetDelta ||\n this.options.layoutRoot) &&\n this.layout);\n }\n calcProjection() {\n var _a;\n const lead = this.getLead();\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n let canSkip = true;\n /**\n * If this is a normal layout animation and neither this node nor its nearest projecting\n * is dirty then we can't skip.\n */\n if (this.isProjectionDirty || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty)) {\n canSkip = false;\n }\n /**\n * If this is a shared layout animation and this node's shared projection is dirty then\n * we can't skip.\n */\n if (isShared &&\n (this.isSharedProjectionDirty || this.isTransformDirty)) {\n canSkip = false;\n }\n /**\n * If we have resolved the target this frame we must recalculate the\n * projection to ensure it visually represents the internal calculations.\n */\n if (this.resolvedRelativeTargetAt === frameData.timestamp) {\n canSkip = false;\n }\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If this section of the tree isn't animating we can\n * delete our target sources for the following frame.\n */\n this.isTreeAnimating = Boolean((this.parent && this.parent.isTreeAnimating) ||\n this.currentAnimation ||\n this.pendingAnimation);\n if (!this.isTreeAnimating) {\n this.targetDelta = this.relativeTarget = undefined;\n }\n if (!this.layout || !(layout || layoutId))\n return;\n /**\n * Reset the corrected box with the latest values from box, as we're then going\n * to perform mutative operations on it.\n */\n copyBoxInto(this.layoutCorrected, this.layout.layoutBox);\n /**\n * Record previous tree scales before updating.\n */\n const prevTreeScaleX = this.treeScale.x;\n const prevTreeScaleY = this.treeScale.y;\n /**\n * Apply all the parent deltas to this box to produce the corrected box. This\n * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n */\n applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared);\n /**\n * If this layer needs to perform scale correction but doesn't have a target,\n * use the layout as the target.\n */\n if (lead.layout &&\n !lead.target &&\n (this.treeScale.x !== 1 || this.treeScale.y !== 1)) {\n lead.target = lead.layout.layoutBox;\n }\n const { target } = lead;\n if (!target) {\n /**\n * If we don't have a target to project into, but we were previously\n * projecting, we want to remove the stored transform and schedule\n * a render to ensure the elements reflect the removed transform.\n */\n if (this.projectionTransform) {\n this.projectionDelta = createDelta();\n this.projectionTransform = \"none\";\n this.scheduleRender();\n }\n return;\n }\n if (!this.projectionDelta) {\n this.projectionDelta = createDelta();\n this.projectionDeltaWithTransform = createDelta();\n }\n const prevProjectionTransform = this.projectionTransform;\n /**\n * Update the delta between the corrected box and the target box before user-set transforms were applied.\n * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n * for our layout reprojection, but still allow them to be scaled correctly by the user.\n * It might be that to simplify this we may want to accept that user-set scale is also corrected\n * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n * to allow people to choose whether these styles are corrected based on just the\n * layout reprojection or the final bounding box.\n */\n calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);\n this.projectionTransform = buildProjectionTransform(this.projectionDelta, this.treeScale);\n if (this.projectionTransform !== prevProjectionTransform ||\n this.treeScale.x !== prevTreeScaleX ||\n this.treeScale.y !== prevTreeScaleY) {\n this.hasProjected = true;\n this.scheduleRender();\n this.notifyListeners(\"projectionUpdate\", target);\n }\n /**\n * Increase debug counter for recalculated projections\n */\n projectionFrameData.recalculatedProjection++;\n }\n hide() {\n this.isVisible = false;\n // TODO: Schedule render\n }\n show() {\n this.isVisible = true;\n // TODO: Schedule render\n }\n scheduleRender(notifyAll = true) {\n this.options.scheduleRender && this.options.scheduleRender();\n if (notifyAll) {\n const stack = this.getStack();\n stack && stack.scheduleRender();\n }\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = undefined;\n }\n }\n setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false) {\n const snapshot = this.snapshot;\n const snapshotLatestValues = snapshot\n ? snapshot.latestValues\n : {};\n const mixedValues = { ...this.latestValues };\n const targetDelta = createDelta();\n if (!this.relativeParent ||\n !this.relativeParent.options.layoutRoot) {\n this.relativeTarget = this.relativeTargetOrigin = undefined;\n }\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;\n const relativeLayout = createBox();\n const snapshotSource = snapshot ? snapshot.source : undefined;\n const layoutSource = this.layout ? this.layout.source : undefined;\n const isSharedLayoutAnimation = snapshotSource !== layoutSource;\n const stack = this.getStack();\n const isOnlyMember = !stack || stack.members.length <= 1;\n const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation &&\n !isOnlyMember &&\n this.options.crossfade === true &&\n !this.path.some(hasOpacityCrossfade));\n this.animationProgress = 0;\n let prevRelativeTarget;\n this.mixTargetDelta = (latest) => {\n const progress = latest / 1000;\n mixAxisDelta(targetDelta.x, delta.x, progress);\n mixAxisDelta(targetDelta.y, delta.y, progress);\n this.setTargetDelta(targetDelta);\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.layout &&\n this.relativeParent &&\n this.relativeParent.layout) {\n calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox);\n mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress);\n /**\n * If this is an unchanged relative target we can consider the\n * projection not dirty.\n */\n if (prevRelativeTarget &&\n boxEquals(this.relativeTarget, prevRelativeTarget)) {\n this.isProjectionDirty = false;\n }\n if (!prevRelativeTarget)\n prevRelativeTarget = createBox();\n copyBoxInto(prevRelativeTarget, this.relativeTarget);\n }\n if (isSharedLayoutAnimation) {\n this.animationValues = mixedValues;\n mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);\n }\n this.root.scheduleUpdateProjection();\n this.scheduleRender();\n this.animationProgress = progress;\n };\n this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0);\n }\n startAnimation(options) {\n this.notifyListeners(\"animationStart\");\n this.currentAnimation && this.currentAnimation.stop();\n if (this.resumingFrom && this.resumingFrom.currentAnimation) {\n this.resumingFrom.currentAnimation.stop();\n }\n if (this.pendingAnimation) {\n cancelFrame(this.pendingAnimation);\n this.pendingAnimation = undefined;\n }\n /**\n * Start the animation in the next frame to have a frame with progress 0,\n * where the target is the same as when the animation started, so we can\n * calculate the relative positions correctly for instant transitions.\n */\n this.pendingAnimation = frame.update(() => {\n globalProjectionState.hasAnimatedSinceResize = true;\n this.currentAnimation = animateSingleValue(0, animationTarget, {\n ...options,\n onUpdate: (latest) => {\n this.mixTargetDelta(latest);\n options.onUpdate && options.onUpdate(latest);\n },\n onComplete: () => {\n options.onComplete && options.onComplete();\n this.completeAnimation();\n },\n });\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = this.currentAnimation;\n }\n this.pendingAnimation = undefined;\n });\n }\n completeAnimation() {\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = undefined;\n this.resumingFrom.preserveOpacity = undefined;\n }\n const stack = this.getStack();\n stack && stack.exitAnimationComplete();\n this.resumingFrom =\n this.currentAnimation =\n this.animationValues =\n undefined;\n this.notifyListeners(\"animationComplete\");\n }\n finishAnimation() {\n if (this.currentAnimation) {\n this.mixTargetDelta && this.mixTargetDelta(animationTarget);\n this.currentAnimation.stop();\n }\n this.completeAnimation();\n }\n applyTransformsToTarget() {\n const lead = this.getLead();\n let { targetWithTransforms, target, layout, latestValues } = lead;\n if (!targetWithTransforms || !target || !layout)\n return;\n /**\n * If we're only animating position, and this element isn't the lead element,\n * then instead of projecting into the lead box we instead want to calculate\n * a new target that aligns the two boxes but maintains the layout shape.\n */\n if (this !== lead &&\n this.layout &&\n layout &&\n shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) {\n target = this.target || createBox();\n const xLength = calcLength(this.layout.layoutBox.x);\n target.x.min = lead.target.x.min;\n target.x.max = target.x.min + xLength;\n const yLength = calcLength(this.layout.layoutBox.y);\n target.y.min = lead.target.y.min;\n target.y.max = target.y.min + yLength;\n }\n copyBoxInto(targetWithTransforms, target);\n /**\n * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n * This is the final box that we will then project into by calculating a transform delta and\n * applying it to the corrected box.\n */\n transformBox(targetWithTransforms, latestValues);\n /**\n * Update the delta between the corrected box and the final target box, after\n * user-set transforms are applied to it. This will be used by the renderer to\n * create a transform style that will reproject the element from its layout layout\n * into the desired bounding box.\n */\n calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);\n }\n registerSharedNode(layoutId, node) {\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack());\n }\n const stack = this.sharedNodes.get(layoutId);\n stack.add(node);\n const config = node.options.initialPromotionConfig;\n node.promote({\n transition: config ? config.transition : undefined,\n preserveFollowOpacity: config && config.shouldPreserveFollowOpacity\n ? config.shouldPreserveFollowOpacity(node)\n : undefined,\n });\n }\n isLead() {\n const stack = this.getStack();\n return stack ? stack.lead === this : true;\n }\n getLead() {\n var _a;\n const { layoutId } = this.options;\n return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;\n }\n getPrevLead() {\n var _a;\n const { layoutId } = this.options;\n return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined;\n }\n getStack() {\n const { layoutId } = this.options;\n if (layoutId)\n return this.root.sharedNodes.get(layoutId);\n }\n promote({ needsReset, transition, preserveFollowOpacity, } = {}) {\n const stack = this.getStack();\n if (stack)\n stack.promote(this, preserveFollowOpacity);\n if (needsReset) {\n this.projectionDelta = undefined;\n this.needsReset = true;\n }\n if (transition)\n this.setOptions({ transition });\n }\n relegate() {\n const stack = this.getStack();\n if (stack) {\n return stack.relegate(this);\n }\n else {\n return false;\n }\n }\n resetRotation() {\n const { visualElement } = this.options;\n if (!visualElement)\n return;\n // If there's no detected rotation values, we can early return without a forced render.\n let hasRotate = false;\n /**\n * An unrolled check for rotation values. Most elements don't have any rotation and\n * skipping the nested loop and new object creation is 50% faster.\n */\n const { latestValues } = visualElement;\n if (latestValues.rotate ||\n latestValues.rotateX ||\n latestValues.rotateY ||\n latestValues.rotateZ) {\n hasRotate = true;\n }\n // If there's no rotation values, we don't need to do any more.\n if (!hasRotate)\n return;\n const resetValues = {};\n // Check the rotate value of all axes and reset to 0\n for (let i = 0; i < transformAxes.length; i++) {\n const key = \"rotate\" + transformAxes[i];\n // Record the rotation and then temporarily set it to 0\n if (latestValues[key]) {\n resetValues[key] = latestValues[key];\n visualElement.setStaticValue(key, 0);\n }\n }\n // Force a render of this element to apply the transform with all rotations\n // set to 0.\n visualElement.render();\n // Put back all the values we reset\n for (const key in resetValues) {\n visualElement.setStaticValue(key, resetValues[key]);\n }\n // Schedule a render for the next frame. This ensures we won't visually\n // see the element with the reset rotate value applied.\n visualElement.scheduleRender();\n }\n getProjectionStyles(styleProp = {}) {\n var _a, _b;\n // TODO: Return lifecycle-persistent object\n const styles = {};\n if (!this.instance || this.isSVG)\n return styles;\n if (!this.isVisible) {\n return { visibility: \"hidden\" };\n }\n else {\n styles.visibility = \"\";\n }\n const transformTemplate = this.getTransformTemplate();\n if (this.needsReset) {\n this.needsReset = false;\n styles.opacity = \"\";\n styles.pointerEvents =\n resolveMotionValue(styleProp.pointerEvents) || \"\";\n styles.transform = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : \"none\";\n return styles;\n }\n const lead = this.getLead();\n if (!this.projectionDelta || !this.layout || !lead.target) {\n const emptyStyles = {};\n if (this.options.layoutId) {\n emptyStyles.opacity =\n this.latestValues.opacity !== undefined\n ? this.latestValues.opacity\n : 1;\n emptyStyles.pointerEvents =\n resolveMotionValue(styleProp.pointerEvents) || \"\";\n }\n if (this.hasProjected && !hasTransform(this.latestValues)) {\n emptyStyles.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n this.hasProjected = false;\n }\n return emptyStyles;\n }\n const valuesToRender = lead.animationValues || lead.latestValues;\n this.applyTransformsToTarget();\n styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);\n if (transformTemplate) {\n styles.transform = transformTemplate(valuesToRender, styles.transform);\n }\n const { x, y } = this.projectionDelta;\n styles.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;\n if (lead.animationValues) {\n /**\n * If the lead component is animating, assign this either the entering/leaving\n * opacity\n */\n styles.opacity =\n lead === this\n ? (_b = (_a = valuesToRender.opacity) !== null && _a !== void 0 ? _a : this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1\n : this.preserveOpacity\n ? this.latestValues.opacity\n : valuesToRender.opacityExit;\n }\n else {\n /**\n * Or we're not animating at all, set the lead component to its layout\n * opacity and other components to hidden.\n */\n styles.opacity =\n lead === this\n ? valuesToRender.opacity !== undefined\n ? valuesToRender.opacity\n : \"\"\n : valuesToRender.opacityExit !== undefined\n ? valuesToRender.opacityExit\n : 0;\n }\n /**\n * Apply scale correction\n */\n for (const key in scaleCorrectors) {\n if (valuesToRender[key] === undefined)\n continue;\n const { correct, applyTo } = scaleCorrectors[key];\n /**\n * Only apply scale correction to the value if we have an\n * active projection transform. Otherwise these values become\n * vulnerable to distortion if the element changes size without\n * a corresponding layout animation.\n */\n const corrected = styles.transform === \"none\"\n ? valuesToRender[key]\n : correct(valuesToRender[key], lead);\n if (applyTo) {\n const num = applyTo.length;\n for (let i = 0; i < num; i++) {\n styles[applyTo[i]] = corrected;\n }\n }\n else {\n styles[key] = corrected;\n }\n }\n /**\n * Disable pointer events on follow components. This is to ensure\n * that if a follow component covers a lead component it doesn't block\n * pointer events on the lead.\n */\n if (this.options.layoutId) {\n styles.pointerEvents =\n lead === this\n ? resolveMotionValue(styleProp.pointerEvents) || \"\"\n : \"none\";\n }\n return styles;\n }\n clearSnapshot() {\n this.resumeFrom = this.snapshot = undefined;\n }\n // Only run on root\n resetTree() {\n this.root.nodes.forEach((node) => { var _a; return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); });\n this.root.nodes.forEach(clearMeasurements);\n this.root.sharedNodes.clear();\n }\n };\n}\nfunction updateLayout(node) {\n node.updateLayout();\n}\nfunction notifyLayoutUpdate(node) {\n var _a;\n const snapshot = ((_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) || node.snapshot;\n if (node.isLead() &&\n node.layout &&\n snapshot &&\n node.hasListeners(\"didUpdate\")) {\n const { layoutBox: layout, measuredBox: measuredLayout } = node.layout;\n const { animationType } = node.options;\n const isShared = snapshot.source !== node.layout.source;\n // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n // animations for instance if layout=\"size\" and an element has only changed position\n if (animationType === \"size\") {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(axisSnapshot);\n axisSnapshot.min = layout[axis].min;\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(layout[axis]);\n axisSnapshot.max = axisSnapshot.min + length;\n /**\n * Ensure relative target gets resized and rerendererd\n */\n if (node.relativeTarget && !node.currentAnimation) {\n node.isProjectionDirty = true;\n node.relativeTarget[axis].max =\n node.relativeTarget[axis].min + length;\n }\n });\n }\n const layoutDelta = createDelta();\n calcBoxDelta(layoutDelta, layout, snapshot.layoutBox);\n const visualDelta = createDelta();\n if (isShared) {\n calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox);\n }\n else {\n calcBoxDelta(visualDelta, layout, snapshot.layoutBox);\n }\n const hasLayoutChanged = !isDeltaZero(layoutDelta);\n let hasRelativeTargetChanged = false;\n if (!node.resumeFrom) {\n const relativeParent = node.getClosestProjectingParent();\n /**\n * If the relativeParent is itself resuming from a different element then\n * the relative snapshot is not relavent\n */\n if (relativeParent && !relativeParent.resumeFrom) {\n const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent;\n if (parentSnapshot && parentLayout) {\n const relativeSnapshot = createBox();\n calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox);\n const relativeLayout = createBox();\n calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox);\n if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {\n hasRelativeTargetChanged = true;\n }\n if (relativeParent.options.layoutRoot) {\n node.relativeTarget = relativeLayout;\n node.relativeTargetOrigin = relativeSnapshot;\n node.relativeParent = relativeParent;\n }\n }\n }\n }\n node.notifyListeners(\"didUpdate\", {\n layout,\n snapshot,\n delta: visualDelta,\n layoutDelta,\n hasLayoutChanged,\n hasRelativeTargetChanged,\n });\n }\n else if (node.isLead()) {\n const { onExitComplete } = node.options;\n onExitComplete && onExitComplete();\n }\n /**\n * Clearing transition\n * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n * and why we need it at all\n */\n node.options.transition = undefined;\n}\nfunction propagateDirtyNodes(node) {\n /**\n * Increase debug counter for nodes encountered this frame\n */\n projectionFrameData.totalNodes++;\n if (!node.parent)\n return;\n /**\n * If this node isn't projecting, propagate isProjectionDirty. It will have\n * no performance impact but it will allow the next child that *is* projecting\n * but *isn't* dirty to just check its parent to see if *any* ancestor needs\n * correcting.\n */\n if (!node.isProjecting()) {\n node.isProjectionDirty = node.parent.isProjectionDirty;\n }\n /**\n * Propagate isSharedProjectionDirty and isTransformDirty\n * throughout the whole tree. A future revision can take another look at\n * this but for safety we still recalcualte shared nodes.\n */\n node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty ||\n node.parent.isProjectionDirty ||\n node.parent.isSharedProjectionDirty));\n node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty);\n}\nfunction cleanDirtyNodes(node) {\n node.isProjectionDirty =\n node.isSharedProjectionDirty =\n node.isTransformDirty =\n false;\n}\nfunction clearSnapshot(node) {\n node.clearSnapshot();\n}\nfunction clearMeasurements(node) {\n node.clearMeasurements();\n}\nfunction clearIsLayoutDirty(node) {\n node.isLayoutDirty = false;\n}\nfunction resetTransformStyle(node) {\n const { visualElement } = node.options;\n if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notify(\"BeforeLayoutMeasure\");\n }\n node.resetTransform();\n}\nfunction finishAnimation(node) {\n node.finishAnimation();\n node.targetDelta = node.relativeTarget = node.target = undefined;\n node.isProjectionDirty = true;\n}\nfunction resolveTargetDelta(node) {\n node.resolveTargetDelta();\n}\nfunction calcProjection(node) {\n node.calcProjection();\n}\nfunction resetRotation(node) {\n node.resetRotation();\n}\nfunction removeLeadSnapshots(stack) {\n stack.removeLeadSnapshot();\n}\nfunction mixAxisDelta(output, delta, p) {\n output.translate = mix(delta.translate, 0, p);\n output.scale = mix(delta.scale, 1, p);\n output.origin = delta.origin;\n output.originPoint = delta.originPoint;\n}\nfunction mixAxis(output, from, to, p) {\n output.min = mix(from.min, to.min, p);\n output.max = mix(from.max, to.max, p);\n}\nfunction mixBox(output, from, to, p) {\n mixAxis(output.x, from.x, to.x, p);\n mixAxis(output.y, from.y, to.y, p);\n}\nfunction hasOpacityCrossfade(node) {\n return (node.animationValues && node.animationValues.opacityExit !== undefined);\n}\nconst defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1],\n};\nconst userAgentContains = (string) => typeof navigator !== \"undefined\" &&\n navigator.userAgent.toLowerCase().includes(string);\n/**\n * Measured bounding boxes must be rounded in Safari and\n * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements\n * can appear to jump.\n */\nconst roundPoint = userAgentContains(\"applewebkit/\") && !userAgentContains(\"chrome/\")\n ? Math.round\n : noop;\nfunction roundAxis(axis) {\n // Round to the nearest .5 pixels to support subpixel layouts\n axis.min = roundPoint(axis.min);\n axis.max = roundPoint(axis.max);\n}\nfunction roundBox(box) {\n roundAxis(box.x);\n roundAxis(box.y);\n}\nfunction shouldAnimatePositionOnly(animationType, snapshot, layout) {\n return (animationType === \"position\" ||\n (animationType === \"preserve-aspect\" &&\n !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2)));\n}\n\nexport { cleanDirtyNodes, createProjectionNode, mixAxis, mixAxisDelta, mixBox, propagateDirtyNodes };\n","function record(data) {\n if (window.MotionDebug) {\n window.MotionDebug.record(data);\n }\n}\n\nexport { record };\n","function isSVGElement(element) {\n return element instanceof SVGElement && element.tagName !== \"svg\";\n}\n\nexport { isSVGElement };\n","import { frame, cancelFrame } from '../frameloop/frame.mjs';\n\n/**\n * Timeout defined in ms\n */\nfunction delay(callback, timeout) {\n const start = performance.now();\n const checkElapsed = ({ timestamp }) => {\n const elapsed = timestamp - start;\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed);\n callback(elapsed - timeout);\n }\n };\n frame.read(checkElapsed, true);\n return () => cancelFrame(checkElapsed);\n}\n\nexport { delay };\n","import { animateMotionValue } from './motion-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction animateSingleValue(value, keyframes, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes, options));\n return motionValue$1.animation;\n}\n\nexport { animateSingleValue };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\n\nconst DocumentProjectionNode = createProjectionNode({\n attachResizeListener: (ref, notify) => addDomEvent(ref, \"resize\", notify),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body.scrollLeft,\n y: document.documentElement.scrollTop || document.body.scrollTop,\n }),\n checkIsScrollRoot: () => true,\n});\n\nexport { DocumentProjectionNode };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { DocumentProjectionNode } from './DocumentProjectionNode.mjs';\n\nconst rootProjectionNode = {\n current: undefined,\n};\nconst HTMLProjectionNode = createProjectionNode({\n measureScroll: (instance) => ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }),\n defaultParent: () => {\n if (!rootProjectionNode.current) {\n const documentNode = new DocumentProjectionNode({});\n documentNode.mount(window);\n documentNode.setOptions({ layoutScroll: true });\n rootProjectionNode.current = documentNode;\n }\n return rootProjectionNode.current;\n },\n resetTransform: (instance, value) => {\n instance.style.transform = value !== undefined ? value : \"none\";\n },\n checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === \"fixed\"),\n});\n\nexport { HTMLProjectionNode, rootProjectionNode };\n","import { DragGesture } from '../../gestures/drag/index.mjs';\nimport { PanGesture } from '../../gestures/pan/index.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\nimport { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\n\nconst drag = {\n pan: {\n Feature: PanGesture,\n },\n drag: {\n Feature: DragGesture,\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { drag };\n","import { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\n\nclass DragGesture extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n }\n}\n\nexport { DragGesture };\n","import { invariant } from '../../../utils/errors.mjs';\nimport { isNumericalString } from '../../../utils/is-numerical-string.mjs';\nimport { isCSSVariableToken } from './is-css-variable.mjs';\n\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\nconst splitCSSVariableRegex = /var\\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\\)/;\nfunction parseCSSVariable(current) {\n const match = splitCSSVariableRegex.exec(current);\n if (!match)\n return [,];\n const [, token, fallback] = match;\n return [token, fallback];\n}\nconst maxDepth = 4;\nfunction getVariableValue(current, element, depth = 1) {\n invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`);\n const [token, fallback] = parseCSSVariable(current);\n // No CSS variable detected\n if (!token)\n return;\n // Attempt to read this CSS variable off the element\n const resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n const trimmed = resolved.trim();\n return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;\n }\n else if (isCSSVariableToken(fallback)) {\n // The fallback might itself be a CSS variable, in which case we attempt to resolve it too.\n return getVariableValue(fallback, element, depth + 1);\n }\n else {\n return fallback;\n }\n}\n/**\n * Resolve CSS variables from\n *\n * @internal\n */\nfunction resolveCSSVariables(visualElement, { ...target }, transitionEnd) {\n const element = visualElement.current;\n if (!(element instanceof Element))\n return { target, transitionEnd };\n // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`\n // only if they change but I think this reads clearer and this isn't a performance-critical path.\n if (transitionEnd) {\n transitionEnd = { ...transitionEnd };\n }\n // Go through existing `MotionValue`s and ensure any existing CSS variables are resolved\n visualElement.values.forEach((value) => {\n const current = value.get();\n if (!isCSSVariableToken(current))\n return;\n const resolved = getVariableValue(current, element);\n if (resolved)\n value.set(resolved);\n });\n // Cycle through every target property and resolve CSS variables. Currently\n // we only read single-var properties like `var(--foo)`, not `calc(var(--foo) + 20px)`\n for (const key in target) {\n const current = target[key];\n if (!isCSSVariableToken(current))\n continue;\n const resolved = getVariableValue(current, element);\n if (!resolved)\n continue;\n // Clone target if it hasn't already been\n target[key] = resolved;\n if (!transitionEnd)\n transitionEnd = {};\n // If the user hasn't already set this key on `transitionEnd`, set it to the unresolved\n // CSS variable. This will ensure that after the animation the component will reflect\n // changes in the value of the CSS variable.\n if (transitionEnd[key] === undefined) {\n transitionEnd[key] = current;\n }\n }\n return { target, transitionEnd };\n}\n\nexport { parseCSSVariable, resolveCSSVariables };\n","import { isKeyframesTarget } from '../../../animation/utils/is-keyframes-target.mjs';\nimport { invariant } from '../../../utils/errors.mjs';\nimport { transformPropOrder } from '../../html/utils/transform.mjs';\nimport { findDimensionValueType } from '../value-types/dimensions.mjs';\nimport { isBrowser } from '../../../utils/is-browser.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n \"x\",\n \"y\",\n \"translateX\",\n \"translateY\",\n]);\nconst isPositionalKey = (key) => positionalKeys.has(key);\nconst hasPositionalKey = (target) => {\n return Object.keys(target).some(isPositionalKey);\n};\nconst isNumOrPxType = (v) => v === number || v === px;\nconst getPosFromMatrix = (matrix, pos) => parseFloat(matrix.split(\", \")[pos]);\nconst getTranslateFromMatrix = (pos2, pos3) => (_bbox, { transform }) => {\n if (transform === \"none\" || !transform)\n return 0;\n const matrix3d = transform.match(/^matrix3d\\((.+)\\)$/);\n if (matrix3d) {\n return getPosFromMatrix(matrix3d[1], pos3);\n }\n else {\n const matrix = transform.match(/^matrix\\((.+)\\)$/);\n if (matrix) {\n return getPosFromMatrix(matrix[1], pos2);\n }\n else {\n return 0;\n }\n }\n};\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n // Apply changes to element before measurement\n if (removedTransforms.length)\n visualElement.render();\n return removedTransforms;\n}\nconst positionalValues = {\n // Dimensions\n width: ({ x }, { paddingLeft = \"0\", paddingRight = \"0\" }) => x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight),\n height: ({ y }, { paddingTop = \"0\", paddingBottom = \"0\" }) => y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom),\n top: (_bbox, { top }) => parseFloat(top),\n left: (_bbox, { left }) => parseFloat(left),\n bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min),\n right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min),\n // Transform\n x: getTranslateFromMatrix(4, 13),\n y: getTranslateFromMatrix(5, 14),\n};\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x;\npositionalValues.translateY = positionalValues.y;\nconst convertChangedValueTypes = (target, visualElement, changedKeys) => {\n const originBbox = visualElement.measureViewportBox();\n const element = visualElement.current;\n const elementComputedStyle = getComputedStyle(element);\n const { display } = elementComputedStyle;\n const origin = {};\n // If the element is currently set to display: \"none\", make it visible before\n // measuring the target bounding box\n if (display === \"none\") {\n visualElement.setStaticValue(\"display\", target.display || \"block\");\n }\n /**\n * Record origins before we render and update styles\n */\n changedKeys.forEach((key) => {\n origin[key] = positionalValues[key](originBbox, elementComputedStyle);\n });\n // Apply the latest values (as set in checkAndConvertChangedValueTypes)\n visualElement.render();\n const targetBbox = visualElement.measureViewportBox();\n changedKeys.forEach((key) => {\n // Restore styles to their **calculated computed style**, not their actual\n // originally set style. This allows us to animate between equivalent pixel units.\n const value = visualElement.getValue(key);\n value && value.jump(origin[key]);\n target[key] = positionalValues[key](targetBbox, elementComputedStyle);\n });\n return target;\n};\nconst checkAndConvertChangedValueTypes = (visualElement, target, origin = {}, transitionEnd = {}) => {\n target = { ...target };\n transitionEnd = { ...transitionEnd };\n const targetPositionalKeys = Object.keys(target).filter(isPositionalKey);\n // We want to remove any transform values that could affect the element's bounding box before\n // it's measured. We'll reapply these later.\n let removedTransformValues = [];\n let hasAttemptedToRemoveTransformValues = false;\n const changedValueTypeKeys = [];\n targetPositionalKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (!visualElement.hasValue(key))\n return;\n let from = origin[key];\n let fromType = findDimensionValueType(from);\n const to = target[key];\n let toType;\n // TODO: The current implementation of this basically throws an error\n // if you try and do value conversion via keyframes. There's probably\n // a way of doing this but the performance implications would need greater scrutiny,\n // as it'd be doing multiple resize-remeasure operations.\n if (isKeyframesTarget(to)) {\n const numKeyframes = to.length;\n const fromIndex = to[0] === null ? 1 : 0;\n from = to[fromIndex];\n fromType = findDimensionValueType(from);\n for (let i = fromIndex; i < numKeyframes; i++) {\n /**\n * Don't allow wildcard keyframes to be used to detect\n * a difference in value types.\n */\n if (to[i] === null)\n break;\n if (!toType) {\n toType = findDimensionValueType(to[i]);\n invariant(toType === fromType ||\n (isNumOrPxType(fromType) && isNumOrPxType(toType)), \"Keyframes must be of the same dimension as the current value\");\n }\n else {\n invariant(findDimensionValueType(to[i]) === toType, \"All keyframes must be of the same type\");\n }\n }\n }\n else {\n toType = findDimensionValueType(to);\n }\n if (fromType !== toType) {\n // If they're both just number or px, convert them both to numbers rather than\n // relying on resize/remeasure to convert (which is wasteful in this situation)\n if (isNumOrPxType(fromType) && isNumOrPxType(toType)) {\n const current = value.get();\n if (typeof current === \"string\") {\n value.set(parseFloat(current));\n }\n if (typeof to === \"string\") {\n target[key] = parseFloat(to);\n }\n else if (Array.isArray(to) && toType === px) {\n target[key] = to.map(parseFloat);\n }\n }\n else if ((fromType === null || fromType === void 0 ? void 0 : fromType.transform) &&\n (toType === null || toType === void 0 ? void 0 : toType.transform) &&\n (from === 0 || to === 0)) {\n // If one or the other value is 0, it's safe to coerce it to the\n // type of the other without measurement\n if (from === 0) {\n value.set(toType.transform(from));\n }\n else {\n target[key] = fromType.transform(to);\n }\n }\n else {\n // If we're going to do value conversion via DOM measurements, we first\n // need to remove non-positional transform values that could affect the bbox measurements.\n if (!hasAttemptedToRemoveTransformValues) {\n removedTransformValues =\n removeNonTranslationalTransform(visualElement);\n hasAttemptedToRemoveTransformValues = true;\n }\n changedValueTypeKeys.push(key);\n transitionEnd[key] =\n transitionEnd[key] !== undefined\n ? transitionEnd[key]\n : target[key];\n value.jump(to);\n }\n }\n });\n if (changedValueTypeKeys.length) {\n const scrollY = changedValueTypeKeys.indexOf(\"height\") >= 0\n ? window.pageYOffset\n : null;\n const convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys);\n // If we removed transform values, reapply them before the next render\n if (removedTransformValues.length) {\n removedTransformValues.forEach(([key, value]) => {\n visualElement.getValue(key).set(value);\n });\n }\n // Reapply original values\n visualElement.render();\n // Restore scroll position\n if (isBrowser && scrollY !== null) {\n window.scrollTo({ top: scrollY });\n }\n return { target: convertedTarget, transitionEnd };\n }\n else {\n return { target, transitionEnd };\n }\n};\n/**\n * Convert value types for x/y/width/height/top/left/bottom/right\n *\n * Allows animation between `'auto'` -> `'100%'` or `0` -> `'calc(50% - 10vw)'`\n *\n * @internal\n */\nfunction unitConversion(visualElement, target, origin, transitionEnd) {\n return hasPositionalKey(target)\n ? checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd)\n : { target, transitionEnd };\n}\n\nexport { positionalValues, unitConversion };\n","import { resolveCSSVariables } from './css-variables-conversion.mjs';\nimport { unitConversion } from './unit-conversion.mjs';\n\n/**\n * Parse a DOM variant to make it animatable. This involves resolving CSS variables\n * and ensuring animations like \"20%\" => \"calc(50vw)\" are performed in pixels.\n */\nconst parseDomVariant = (visualElement, target, origin, transitionEnd) => {\n const resolved = resolveCSSVariables(visualElement, target, transitionEnd);\n target = resolved.target;\n transitionEnd = resolved.transitionEnd;\n return unitConversion(visualElement, target, origin, transitionEnd);\n};\n\nexport { parseDomVariant };\n","// Does this device prefer reduced motion? Returns `null` server-side.\nconst prefersReducedMotion = { current: null };\nconst hasReducedMotionListener = { current: false };\n\nexport { hasReducedMotionListener, prefersReducedMotion };\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n","import { warning, invariant } from '../utils/errors.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { isRefObject } from '../utils/is-ref-object.mjs';\nimport { initPrefersReducedMotion } from '../utils/reduced-motion/index.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from '../utils/reduced-motion/state.mjs';\nimport { SubscriptionManager } from '../utils/subscription-manager.mjs';\nimport { motionValue } from '../value/index.mjs';\nimport { isWillChangeMotionValue } from '../value/use-will-change/is.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { transformProps } from './html/utils/transform.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { isVariantLabel } from './utils/is-variant-label.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\nimport { warnOnce } from '../utils/warn-once.mjs';\nimport { featureDefinitions } from '../motion/features/definitions.mjs';\nimport { variantProps } from './utils/variant-props.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nconst featureNames = Object.keys(featureDefinitions);\nconst numFeatures = featureNames.length;\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\nconst numVariantProps = variantProps.length;\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n constructor({ parent, props, presenceContext, reducedMotionConfig, visualState, }, options = {}) {\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n this.values = new Map();\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n this.prevMotionValues = {};\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.scheduleRender = () => frame.render(this.render, false, true);\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.options = options;\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't neccessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {});\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key], false);\n if (isWillChangeMotionValue(willChange)) {\n willChange.add(key);\n }\n }\n }\n }\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps) {\n return {};\n }\n mount(instance) {\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion =\n this.reducedMotionConfig === \"never\"\n ? false\n : this.reducedMotionConfig === \"always\"\n ? true\n : prefersReducedMotion.current;\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\");\n }\n if (this.parent)\n this.parent.children.add(this);\n this.update(this.props, this.presenceContext);\n }\n unmount() {\n visualElementStore.delete(this.current);\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent && this.parent.children.delete(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n this.features[key].unmount();\n }\n this.current = null;\n }\n bindToMotionValue(key, value) {\n const valueIsTransform = transformProps.has(key);\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate &&\n frame.update(this.notifyUpdate, false, true);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n });\n const removeOnRenderRequest = value.on(\"renderRequest\", this.scheduleRender);\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n removeOnRenderRequest();\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n loadFeatures({ children, ...renderedProps }, isStrict, preloadedFeatures, initialLayoutGroupConfig) {\n let ProjectionNodeConstructor;\n let MeasureLayout;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict) {\n const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n renderedProps.ignoreStrict\n ? warning(false, strictMessage)\n : invariant(false, strictMessage);\n }\n for (let i = 0; i < numFeatures; i++) {\n const name = featureNames[i];\n const { isEnabled, Feature: FeatureConstructor, ProjectionNode, MeasureLayout: MeasureLayoutComponent, } = featureDefinitions[name];\n if (ProjectionNode)\n ProjectionNodeConstructor = ProjectionNode;\n if (isEnabled(renderedProps)) {\n if (!this.features[name] && FeatureConstructor) {\n this.features[name] = new FeatureConstructor(this);\n }\n if (MeasureLayoutComponent) {\n MeasureLayout = MeasureLayoutComponent;\n }\n }\n }\n if (!this.projection && ProjectionNodeConstructor) {\n this.projection = new ProjectionNodeConstructor(this.latestValues, this.parent && this.parent.projection);\n const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, } = renderedProps;\n this.projection.setOptions({\n layoutId,\n layout,\n alwaysMeasureLayout: Boolean(drag) ||\n (dragConstraints && isRefObject(dragConstraints)),\n visualElement: this,\n scheduleRender: () => this.scheduleRender(),\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout === \"string\" ? layout : \"both\",\n initialPromotionConfig: initialLayoutGroupConfig,\n layoutScroll,\n layoutRoot,\n });\n }\n return MeasureLayout;\n }\n updateFeatures() {\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.options, this.props);\n }\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\n }\n /**\n * Make a target animatable by Popmotion. For instance, if we're\n * trying to animate width from 100px to 100vw we need to measure 100vw\n * in pixels to determine what we really need to animate to. This is also\n * pluggable to support Framer's custom value types like Color,\n * and CSS variables.\n */\n makeTargetAnimatable(target, canMutate = true) {\n return this.makeTargetAnimatableFromInstance(target, this.props, canMutate);\n }\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listener = props[\"on\" + key];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n getVariantContext(startAtParent = false) {\n if (startAtParent) {\n return this.parent ? this.parent.getVariantContext() : undefined;\n }\n if (!this.isControllingVariants) {\n const context = this.parent\n ? this.parent.getVariantContext() || {}\n : {};\n if (this.props.initial !== undefined) {\n context.initial = this.props.initial;\n }\n return context;\n }\n const context = {};\n for (let i = 0; i < numVariantProps; i++) {\n const name = variantProps[i];\n const prop = this.props[name];\n if (isVariantLabel(prop) || prop === false) {\n context[name] = prop;\n }\n }\n return context;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n if (value !== this.values.get(key)) {\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n }\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key) {\n var _a;\n return this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : (_a = this.getBaseTargetFromProps(this.props, key)) !== null && _a !== void 0 ? _a : this.readValueFromInstance(this.current, key, this.options);\n }\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n var _a;\n const { initial } = this.props;\n const valueFromInitial = typeof initial === \"string\" || typeof initial === \"object\"\n ? (_a = resolveVariantFromProps(this.props, initial)) === null || _a === void 0 ? void 0 : _a[key]\n : undefined;\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n}\n\nexport { VisualElement };\n","import { isBrowser } from '../is-browser.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\nfunction initPrefersReducedMotion() {\n hasReducedMotionListener.current = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);\n motionMediaQuery.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n\nexport { initPrefersReducedMotion };\n","import { isWillChangeMotionValue } from '../../value/use-will-change/is.mjs';\nimport { warnOnce } from '../../utils/warn-once.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction updateMotionValuesFromProps(element, next, prev) {\n const { willChange } = next;\n for (const key in next) {\n const nextValue = next[key];\n const prevValue = prev[key];\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue);\n if (isWillChangeMotionValue(willChange)) {\n willChange.add(key);\n }\n /**\n * Check the version of the incoming motion value with this version\n * and warn against mismatches.\n */\n if (process.env.NODE_ENV === \"development\") {\n warnOnce(nextValue.version === \"10.16.4\", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.16.4 may not work as expected.`);\n }\n }\n else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping from a motion value to a static value,\n * create a new motion value from that\n */\n element.addValue(key, motionValue(nextValue, { owner: element }));\n if (isWillChangeMotionValue(willChange)) {\n willChange.remove(key);\n }\n }\n else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n const existingValue = element.getValue(key);\n // TODO: Only update values that aren't being animated or even looked at\n !existingValue.hasAnimated && existingValue.set(nextValue);\n }\n else {\n const latestValue = element.getStaticValue(key);\n element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element }));\n }\n }\n }\n // Handle removed values\n for (const key in prev) {\n if (next[key] === undefined)\n element.removeValue(key);\n }\n return next;\n}\n\nexport { updateMotionValuesFromProps };\n","import { getOrigin, checkTargetForNewValues } from '../utils/setters.mjs';\nimport { parseDomVariant } from './utils/parse-dom-variant.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nclass DOMVisualElement extends VisualElement {\n sortInstanceNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n return props.style ? props.style[key] : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n makeTargetAnimatableFromInstance({ transition, transitionEnd, ...target }, { transformValues }, isMounted) {\n let origin = getOrigin(target, transition || {}, this);\n /**\n * If Framer has provided a function to convert `Color` etc value types, convert them\n */\n if (transformValues) {\n if (transitionEnd)\n transitionEnd = transformValues(transitionEnd);\n if (target)\n target = transformValues(target);\n if (origin)\n origin = transformValues(origin);\n }\n if (isMounted) {\n checkTargetForNewValues(this, target, origin);\n const parsed = parseDomVariant(this, target, origin, transitionEnd);\n transitionEnd = parsed.transitionEnd;\n target = parsed.target;\n }\n return {\n transition,\n transitionEnd,\n ...target,\n };\n }\n}\n\nexport { DOMVisualElement };\n","import { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { isCSSVariableName } from '../dom/utils/is-css-variable.mjs';\nimport { transformProps } from './utils/transform.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nclass HTMLVisualElement extends DOMVisualElement {\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n else {\n const computedStyle = getComputedStyle(instance);\n const value = (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0;\n return typeof value === \"string\" ? value.trim() : value;\n }\n }\n measureInstanceViewportBox(instance, { transformPagePoint }) {\n return measureViewportBox(instance, transformPagePoint);\n }\n build(renderState, latestValues, options, props) {\n buildHTMLStyles(renderState, latestValues, options, props.transformTemplate);\n }\n scrapeMotionValuesFromProps(props, prevProps) {\n return scrapeMotionValuesFromProps(props, prevProps);\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current)\n this.current.textContent = `${latest}`;\n });\n }\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderHTML(instance, renderState, styleProp, projection);\n }\n}\n\nexport { HTMLVisualElement, getComputedStyle };\n","import { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { transformProps } from '../html/utils/transform.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\n\nclass SVGVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.isSVGTag = false;\n }\n getBaseTargetFromProps(props, key) {\n return props[key];\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return instance.getAttribute(key);\n }\n measureInstanceViewportBox() {\n return createBox();\n }\n scrapeMotionValuesFromProps(props, prevProps) {\n return scrapeMotionValuesFromProps(props, prevProps);\n }\n build(renderState, latestValues, options, props) {\n buildSVGAttrs(renderState, latestValues, options, this.isSVGTag, props.transformTemplate);\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderSVG(instance, renderState, styleProp, projection);\n }\n mount(instance) {\n this.isSVGTag = isSVGTag(instance.tagName);\n super.mount(instance);\n }\n}\n\nexport { SVGVisualElement };\n","import { HTMLVisualElement } from '../html/HTMLVisualElement.mjs';\nimport { SVGVisualElement } from '../svg/SVGVisualElement.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nconst createDomVisualElement = (Component, options) => {\n return isSVGComponent(Component)\n ? new SVGVisualElement(options, { enableHardwareAcceleration: false })\n : new HTMLVisualElement(options, { enableHardwareAcceleration: true });\n};\n\nexport { createDomVisualElement };\n","import { createMotionComponent } from '../../motion/index.mjs';\nimport { createMotionProxy } from './motion-proxy.mjs';\nimport { createDomMotionConfig } from './utils/create-config.mjs';\nimport { gestureAnimations } from '../../motion/features/gestures.mjs';\nimport { animations } from '../../motion/features/animations.mjs';\nimport { drag } from '../../motion/features/drag.mjs';\nimport { createDomVisualElement } from './create-visual-element.mjs';\nimport { layout } from '../../motion/features/layout.mjs';\n\nconst preloadedFeatures = {\n ...animations,\n ...gestureAnimations,\n ...drag,\n ...layout,\n};\n/**\n * HTML & SVG components, optimised for use with gestures and animation. These can be used as\n * drop-in replacements for any HTML & SVG component, all CSS & SVG properties are supported.\n *\n * @public\n */\nconst motion = /*@__PURE__*/ createMotionProxy((Component, config) => createDomMotionConfig(Component, config, preloadedFeatures, createDomVisualElement));\n/**\n * Create a DOM `motion` component with the provided string. This is primarily intended\n * as a full alternative to `motion` for consumers who have to support environments that don't\n * support `Proxy`.\n *\n * ```javascript\n * import { createDomMotionComponent } from \"framer-motion\"\n *\n * const motion = {\n * div: createDomMotionComponent('div')\n * }\n * ```\n *\n * @public\n */\nfunction createDomMotionComponent(key) {\n return createMotionComponent(createDomMotionConfig(key, { forwardMotionProps: false }, preloadedFeatures, createDomVisualElement));\n}\n\nexport { createDomMotionComponent, motion };\n","import { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\n\nconst layout = {\n layout: {\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { layout };\n","import { isSVGComponent } from './is-svg-component.mjs';\nimport { createUseRender } from '../use-render.mjs';\nimport { svgMotionConfig } from '../../svg/config-motion.mjs';\nimport { htmlMotionConfig } from '../../html/config-motion.mjs';\n\nfunction createDomMotionConfig(Component, { forwardMotionProps = false }, preloadedFeatures, createVisualElement) {\n const baseConfig = isSVGComponent(Component)\n ? svgMotionConfig\n : htmlMotionConfig;\n return {\n ...baseConfig,\n preloadedFeatures,\n useRender: createUseRender(forwardMotionProps),\n createVisualElement,\n Component,\n };\n}\n\nexport { createDomMotionConfig };\n"],"names":["UPPERCASE","LOWERCASE","LEADING_CAPITAL","IDENTIFIER","SEPARATORS","LEADING_SEPARATORS","RegExp","source","SEPARATORS_AND_IDENTIFIER","NUMBERS_AND_IDENTIFIER","camelCase","input","options","Array","isArray","TypeError","pascalCase","preserveConsecutiveUppercase","map","x","trim","filter","length","join","toLowerCase","locale","string","toLocaleLowerCase","toUpperCase","toLocaleUpperCase","isLastCharLower","isLastCharUpper","isLastLastCharUpper","i","character","test","slice","preserveCamelCase","replace","lastIndex","m1","charAt","_","identifier","m","postProcess","module","exports","W","hasNativeLazyLoadSupport","HTMLImageElement","prototype","z","e","t","a","s","width","height","className","style","P","h","loading","shouldLoad","opacity","A","r","n","o","l","backgroundColor","position","top","left","bottom","right","objectFit","objectPosition","d","transition","H","F","_ref5","layout","paddingTop","maxWidth","display","alt","role","src","G","children","u","V","B","U","srcSet","decoding","Y","fallback","sources","sizes","_ref6","media","type","key","X","propTypes","isRequired","displayName","J","Z","Error","K","Q","ee","te","ae","_len","arguments","_key","c","apply","concat","ie","image","se","re","ne","Set","oe","le","de","as","class","g","onStartLoad","p","onLoad","onError","f","w","y","b","v","E","k","S","M","N","$","JSON","stringify","images","I","then","_ref7","renderImageToString","swapPlaceholderImage","current","querySelector","complete","wasCached","setTimeout","removeAttribute","addEventListener","removeEventListener","add","has","_ref8","innerHTML","isLoading","isLoaded","requestAnimationFrame","cancelAnimationFrame","ref","dangerouslySetInnerHTML","__html","suppressHydrationWarning","ce","he","ue","__imageData","__error","console","warn","ge","imgClassName","imgStyle","placeholder","pe","_len2","_key2","me","fe","we","_g","_defs","SplitText","_ref","words","rest","split","word","React","AnimatePresence","motion","div","initial","animate","exit","variants","visible","delay","clsx","custom","_extends","Object","assign","bind","target","hasOwnProperty","call","this","SvgGithub","props","fill","xmlns","clipPath","fillRule","clipRule","id","Navigation","showNavigation","setShowNavigation","useState","prevScrollPos","setPrevScrollPos","useEffect","handleScroll","throttle","currentScrollPos","window","scrollY","Link","to","StaticImage","formats","quality","require","rel","href","Github","location","isRootPath","__PATH_PREFIX__","pathname","Date","getFullYear","_site$siteMetadata","_site$siteMetadata2","_site$siteMetadata2$s","description","title","site","useStaticQuery","metaDescription","siteMetadata","defaultTitle","name","content","property","social","twitter","Symbol","getRawTag","objectToString","symToStringTag","toStringTag","undefined","value","trimmedEndIndex","reTrimStart","freeGlobal","objectProto","nativeObjectToString","toString","isOwn","tag","unmasked","result","freeSelf","self","root","Function","reWhitespace","index","isObject","now","toNumber","nativeMax","Math","max","nativeMin","min","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","leadingEdge","clearTimeout","cancel","flush","baseGetTag","isObjectLike","debounce","baseTrim","isSymbol","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","other","valueOf","isBinary","MotionConfigContext","createContext","transformPagePoint","isStatic","reducedMotion","MotionContext","LazyContext","strict","isRefObject","isVariantLabel","isAnimationControls","start","variantPriorityOrder","variantProps","isControllingVariants","some","isVariantNode","Boolean","useCreateMotionContext","context","inherit","getCurrentTreeVariants","useContext","useMemo","variantLabelsAsDependency","prop","featureProps","animation","drag","focus","hover","tap","pan","inView","featureDefinitions","isEnabled","SwitchLayoutGroupContext","motionComponentSymbol","for","preloadedFeatures","createVisualElement","useRender","useVisualState","Component","features","loadFeatures","ForwardRefComponent","forwardRef","externalRef","MeasureLayout","configAndProps","layoutId","useLayoutId","visualState","visualElement","parent","lazyContext","presenceContext","reducedMotionConfig","visualElementRef","useRef","renderer","blockInitialAnimation","useInsertionEffect","update","canHandoff","HandoffAppearAnimations","render","animationState","animateChanges","updateFeatures","useVisualElement","initialLayoutGroupConfig","isStrict","Provider","useCallback","instance","mount","unmount","useMotionRef","layoutGroupId","LayoutGroupContext","createMotionProxy","createConfig","customMotionComponentConfig","Proxy","componentCache","Map","get","_target","set","lowercaseSVGElements","isSVGComponent","includes","indexOf","scaleCorrectors","transformPropOrder","transformProps","isForcedMotionValue","startsWith","isMotionValue","getVelocity","translateAlias","transformPerspective","numTransforms","checkStringStartsWith","token","isCSSVariableName","isCSSVariableToken","getValueAsType","transform","clamp","number","parse","parseFloat","alpha","scale","default","sanitize","round","floatRegex","colorRegex","singleColorRegex","isString","createUnitType","unit","endsWith","degrees","percent","px","vh","vw","progressPercentage","numberValueTypes","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","maxHeight","size","padding","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","rotate","rotateX","rotateY","rotateZ","scaleX","scaleY","scaleZ","skew","skewX","skewY","distance","translateX","translateY","translateZ","perspective","originX","originY","originZ","zIndex","fillOpacity","strokeOpacity","numOctaves","buildHTMLStyles","state","latestValues","transformTemplate","vars","transformOrigin","hasTransform","hasTransformOrigin","transformIsNone","valueType","valueAsType","enableHardwareAcceleration","allowTransformNone","transformIsDefault","transformString","buildTransform","createHtmlRenderState","copyRawValuesOnly","useStyle","useInitialMotionValues","transformValues","useHTMLProps","htmlProps","dragListener","draggable","userSelect","WebkitUserSelect","WebkitTouchCallout","touchAction","tabIndex","onTap","onTapStart","whileTap","validMotionProps","isValidMotionProp","shouldForward","isValidProp","_a","calcOrigin","origin","offset","dashKeys","array","camelKeys","buildSVGAttrs","attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset","latest","isSVGTag","viewBox","attrs","dimensions","calcSVGTransformOrigin","spacing","useDashCase","keys","buildSVGPath","createSvgRenderState","useSVGProps","_isStatic","visualProps","rawStyles","createUseRender","forwardMotionProps","filteredProps","isDom","values","filterProps","elementProps","renderedChildren","createElement","camelToDash","str","renderHTML","element","styleProp","projection","getProjectionStyles","setProperty","camelCaseAttributes","renderSVG","renderState","_styleProp","setAttribute","scrapeMotionValuesFromProps","prevProps","newValues","substring","resolveVariantFromProps","definition","currentValues","currentVelocity","isKeyframesTarget","isCustomValue","mix","toValue","resolveFinalValueInKeyframes","resolveMotionValue","unwrappedValue","makeUseVisualState","config","make","createRenderState","onMount","makeLatestValues","makeState","scrapeMotionValues","motionValues","isControllingVariants$1","isVariantNode$1","isInitialAnimationBlocked","variantToSet","forEach","resolved","transitionEnd","valueTarget","svgMotionConfig","read","getBBox","getBoundingClientRect","tagName","htmlMotionConfig","addDomEvent","eventName","handler","passive","isPrimaryPointer","event","pointerType","button","isPrimary","extractEventInfo","pointType","point","addPointerInfo","addPointerEvent","combineFunctions","pipe","transformers","reduce","createLock","lock","openLock","globalHorizontalLock","globalVerticalLock","getGlobalLock","openHorizontal","openVertical","isDragActive","openGestureLock","Feature","constructor","node","isMounted","addHoverEvent","isActive","callbackName","info","getProps","whileHover","setActive","isNodeOrChild","child","parentElement","fireSyntheticPointerEvent","syntheticPointerEvent","PointerEvent","observerCallbacks","WeakMap","observers","fireObserverCallback","entry","callback","fireAllObserverCallbacks","entries","observeIntersection","rootInteresectionObserver","lookupRoot","document","rootObservers","IntersectionObserver","initIntersectionObserver","observe","delete","unobserve","thresholdNames","all","gestureAnimations","super","hasEnteredView","isInView","startObserver","viewport","rootMargin","amount","once","threshold","isIntersecting","onViewportEnter","onViewportLeave","prevViewport","hasViewportOptionChanged","removeStartListeners","noop","removeEndListeners","removeAccessibleListeners","startPointerPress","startEvent","startInfo","isPressing","removePointerUpListener","endEvent","endInfo","checkPressEnd","onTapCancel","removePointerCancelListener","cancelEvent","cancelInfo","cancelPress","startPress","startAccessiblePress","removeKeydownListener","keydownEvent","keyupEvent","removeBlurListener","removePointerListener","removeFocusListener","onFocus","isFocusVisible","matches","onBlur","shallowCompare","next","prev","prevLength","resolveVariant","getCurrent","velocity","optimizedAppearDataAttribute","secondsToMilliseconds","seconds","millisecondsToSeconds","milliseconds","instantAnimationState","isBezierDefinition","easing","isWaapiSupportedEasing","supportedWaapiEasing","every","cubicBezierAsString","linear","ease","easeIn","easeOut","easeInOut","circIn","circOut","backIn","backOut","mapEasingToNativeEasing","calcBezier","a1","a2","subdivisionPrecision","subdivisionMaxIterations","cubicBezier","mX1","mY1","mX2","mY2","getTForX","aX","lowerBound","upperBound","currentX","currentT","abs","binarySubdivide","isEasingArray","mirrorEasing","reverseEasing","sin","acos","circInOut","backInOut","easingLookup","anticipate","pow","easingDefinitionToFunction","x1","y1","x2","y2","isColorString","testProp","splitColor","aName","bName","cName","match","rgbUnit","clampRgbUnit","rgba","red","green","blue","alpha$1","hex","hsla","hue","saturation","lightness","color","from","progress","hueToRgb","q","mixLinearColor","fromExpo","sqrt","colorTypes","asRGBA","find","model","hslaToRgba","mixColor","fromRGBA","toRGBA","blended","cssVarTokeniser","regex","countKey","colorTokeniser","numberTokeniser","tokenise","tokenised","push","analyseComplexValue","originalValue","numVars","numColors","numNumbers","parseComplexValue","createTransformer","numValues","output","convertNumbersToZero","complex","_b","isNaN","getAnimatableNone","parsed","transformer","mixImmediate","getMixer","mixComplex","mixArray","blendValue","fromThis","mixObject","template","originStats","targetStats","toFromDifference","mixNumber","createMixers","customMixer","mixers","mixerFactory","numMixers","mixer","easingFunction","interpolate","isClamp","inputLength","reverse","interpolator","progressInRange","defaultOffset","arr","remaining","offsetProgress","fillOffset","keyframes","duration","keyframeValues","times","easingFunctions","done","absoluteTimes","convertOffsetToTimes","mapTimeToKeyframe","splice","calculatedDuration","velocityPerSecond","frameDuration","velocitySampleDuration","calcGeneratorVelocity","resolveValue","prevT","safeMin","minDuration","maxDuration","minDamping","maxDamping","findSpring","bounce","mass","envelope","derivative","dampingRatio","undampedFreq","exponentialDecay","delta","calcAngularFreq","exp","initialGuess","rootIterations","approximateRoot","stiffness","damping","durationKeys","physicsKeys","isSpringType","spring","restDelta","restSpeed","isResolvedFromDuration","springOptions","derived","getSpringOptions","initialVelocity","initialDelta","undampedAngularFreq","isGranularScale","resolveSpring","angularFreq","cos","dampedAngularFreq","freqForT","sinh","cosh","isBelowVelocityThreshold","isBelowDisplacementThreshold","inertia","power","timeConstant","bounceDamping","bounceStiffness","modifyTarget","nearestBoundary","amplitude","ideal","calcDelta","calcLatest","applyFriction","timeReachedBoundary","spring$1","checkCatchBoundary","hasUpdatedFrame","frameloopDriver","passTimestamp","timestamp","stop","frameData","isProcessing","performance","maxGeneratorDuration","calcGeneratorDuration","generator","Infinity","types","decay","tween","animateValue","autoplay","driver","keyframes$1","repeat","repeatDelay","repeatType","onPlay","onStop","onComplete","onUpdate","resolveFinishedPromise","currentFinishedPromise","speed","hasStopped","updateFinishedPromise","Promise","resolve","animationDriver","generatorFactory","mapNumbersToKeyframes","mirroredGenerator","playState","holdTime","startTime","cancelTime","resolvedDuration","totalDuration","currentTime","tick","timeWithoutDelay","isInDelayPhase","elapsed","frameGenerator","currentIteration","floor","iterationProgress","iterationIsOdd","isAnimationFinished","finish","stopAnimationDriver","play","controls","reject","newTime","newSpeed","pause","sample","supportsWaapi","memo","Element","acceleratedValues","createAcceleratedAnimation","valueName","requiresPregeneratedKeyframes","sampleAnimation","pregeneratedKeyframes","keyframeOptions","iterations","direction","animateStyle","owner","syncStart","timeline","cancelAnimation","safeCancel","onfinish","getFinalKeyframe","attachTimeline","playbackRate","setWithVelocity","underDampedSpring","keyframesTransition","getDefaultTransition","valueKey","isAnimatable","maxDefaults","applyDefaultFilter","defaultValue","functionRegex","functions","defaultValueTypes","outlineColor","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","WebkitFilter","getDefaultValueType","defaultValueType","isZeroValueString","isNone","getValueTransition","animateMotionValue","valueTransition","isTargetAnimatable","defaultOrigin","animatableTemplateValue","noneKeyframeIndexes","getKeyframes","originKeyframe","targetKeyframe","isOriginAnimatable","when","_delay","delayChildren","staggerChildren","staggerDirection","isTransitionDefined","setValue","createInstantAnimation","HTMLElement","acceleratedAnimation","isWillChangeMotionValue","isNumericalString","addUniqueItem","item","removeItem","SubscriptionManager","subscriptions","notify","numSubscriptions","getSize","clear","collectMotionValues","MotionValue","init","version","timeDelta","lastUpdated","canTrackVelocity","events","updateAndNotify","postRender","scheduleVelocityCheck","change","velocityChange","renderRequest","velocityCheck","hasAnimated","onChange","subscription","on","unsubscribe","clearListeners","eventManagers","attach","passiveEffect","stopPassiveEffect","jump","getPrevious","startAnimation","animationStart","animationComplete","clearAnimation","animationCancel","isAnimating","destroy","motionValue","testValueType","dimensionValueTypes","findDimensionValueType","valueTypes","setMotionValue","hasValue","getValue","addValue","setTarget","makeTargetAnimatable","getOriginFromTransition","shouldBlockAnimation","protectedKeys","needsAnimating","shouldBlock","animateTarget","transitionOverride","willChange","animations","animationTypeState","getState","appearId","shouldReduceMotion","remove","animateVariant","variant","getAnimation","getChildAnimations","variantChildren","forwardDelay","maxStaggerDuration","generateStaggerDuration","sort","sortByTreeOrder","animateChildren","first","last","sortNodePosition","reversePriorityOrder","numAnimationTypes","animateList","resolvedDefinition","animateVisualElement","createAnimationState","createTypeState","whileInView","whileDrag","whileFocus","isInitialRender","buildResolvedTypeValues","acc","changedActiveType","getVariantContext","removedKeys","encounteredKeys","removedVariantIndex","typeState","propIsVariant","activeDelta","isInherited","manuallyAnimateOnMount","prevProp","variantDidChange","checkVariantsDidChange","shouldAnimateType","definitionList","resolvedValues","prevResolvedValues","allKeys","markToAnimate","fallbackAnimation","fallbackTarget","getBaseTarget","shouldAnimate","setAnimateFunction","makeAnimator","updateAnimationControlsSubscription","subscribe","prevAnimate","isPresent","onExitComplete","prevIsPresent","prevPresenceContext","exitAnimation","register","PanSession","handlers","lastMoveEvent","lastMoveEventInfo","updatePoint","getPanInfo","history","isPanStarted","isDistancePastThreshold","xDelta","yDelta","distance2D","onStart","onMove","handlePointerMove","transformPoint","handlePointerUp","end","onEnd","onSessionEnd","panInfo","initialInfo","onSessionStart","removeListeners","updateHandlers","subtractPoint","lastDevicePoint","startDevicePoint","timestampedPoint","lastPoint","calcLength","axis","isNear","maxDistance","calcAxisDelta","originPoint","translate","calcBoxDelta","calcRelativeAxis","relative","calcRelativeAxisPosition","calcRelativePosition","calcRelativeAxisConstraints","calcViewportAxisConstraints","layoutAxis","constraintsAxis","defaultElastic","resolveAxisElastic","dragElastic","minLabel","maxLabel","resolvePointElastic","label","createDelta","createBox","eachAxis","convertBoundingBoxToBox","isIdentityScale","hasScale","has2DTranslate","is2DTranslate","scalePoint","applyPointDelta","boxScale","applyAxisDelta","applyBoxDelta","box","snapToDefault","Number","isInteger","translateAxis","transformAxis","transforms","scaleKey","originKey","axisOrigin","xKeys","yKeys","transformBox","measureViewportBox","topLeft","bottomRight","transformBoxPoints","elementDragControls","VisualElementDragControls","openGlobalLock","isDragging","currentDirection","constraints","hasMutatedConstraints","elastic","originEvent","snapToCursor","panSession","stopAnimation","dragPropagation","onDragStart","resolveConstraints","isAnimationBlocked","getAxisMotionValue","measuredAxis","layoutBox","dragDirectionLock","onDirectionLock","onDrag","lockThreshold","getCurrentDirection","updateAxis","getTransformPagePoint","onDragEnd","_point","shouldDrag","axisValue","applyConstraints","dragConstraints","prevConstraints","resolveRefConstraints","calcRelativeConstraints","resolveDragElastic","relativeConstraints","rebaseAxisConstraints","onMeasureDragConstraints","constraintsElement","constraintsBox","rootProjectionNode","viewportBox","scroll","measurePageBox","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","dragMomentum","dragTransition","dragSnapToOrigin","onDragTransitionEnd","momentumAnimations","startAxisValueAnimation","dragKey","externalMotionValue","scalePositionWithinConstraints","boxProgress","sourceLength","targetLength","updateScroll","updateLayout","addListeners","stopPointerListener","measureDragConstraints","stopMeasureLayoutListener","stopResizeListener","stopLayoutUpdateListener","hasLayoutChanged","asyncHandler","globalProjectionState","hasAnimatedSinceResize","hasEverUpdated","pixelsToPercent","pixels","correctBorderRadius","correct","correctBoxShadow","treeScale","projectionDelta","original","shadow","xScale","yScale","averageScale","MeasureLayoutWithContext","componentDidMount","layoutGroup","switchLayoutGroup","correctors","defaultScaleCorrectors","group","didUpdate","safeToRemove","setOptions","getSnapshotBeforeUpdate","layoutDependency","willUpdate","promote","relegate","stack","getStack","members","componentDidUpdate","queueMicrotask","currentAnimation","isLead","componentWillUnmount","promoteContext","scheduleCheckAfterUnmount","deregister","useId","usePresence","applyTo","boxShadow","borders","numBorders","asNumber","isPx","getRadius","radiusName","easeCrossfadeIn","compress","easeCrossfadeOut","copyAxisInto","originAxis","copyBoxInto","originBox","removePointDelta","removeAxisTransforms","sourceAxis","removeAxisDelta","removeBoxTransforms","sourceBox","isAxisDeltaZero","isDeltaZero","boxEqualsRounded","aspectRatio","NodeStack","scheduleRender","prevLead","lead","indexOfNode","findIndex","member","preserveFollowOpacity","show","resumeFrom","preserveOpacity","snapshot","animationValues","isUpdating","isLayoutDirty","crossfade","hide","exitAnimationComplete","resumingFrom","removeLeadSnapshot","buildProjectionTransform","latestTransform","xTranslate","yTranslate","elementScaleX","elementScaleY","compareByDepth","depth","FlatTree","isDirty","transformAxes","projectionFrameData","totalNodes","resolvedTargetDeltas","recalculatedProjection","createProjectionNode","attachResizeListener","defaultParent","measureScroll","checkIsScrollRoot","resetTransform","animationId","isTreeAnimating","isProjectionDirty","isSharedProjectionDirty","isTransformDirty","updateManuallyBlocked","updateBlockedByResize","isSVG","needsReset","shouldResetTransform","eventHandlers","hasTreeAnimated","updateScheduled","checkUpdateFailed","clearAllSnapshots","updateProjection","data","nodes","propagateDirtyNodes","resolveTargetDelta","calcProjection","cleanDirtyNodes","MotionDebug","record","hasProjected","isVisible","animationProgress","sharedNodes","path","notifyListeners","subscriptionManager","hasListeners","SVGElement","cancelDelay","resizeUnblockUpdate","timeout","checkElapsed","finishAnimation","registerSharedNode","hasRelativeTargetChanged","newLayout","isTreeAnimationBlocked","relativeTarget","layoutTransition","defaultLayoutTransition","onLayoutAnimationStart","onLayoutAnimationComplete","targetChanged","targetLayout","hasOnlyRelativeTargetChanged","layoutRoot","setAnimationOrigin","animationOptions","blockUpdate","unblockUpdate","isUpdateBlocked","startUpdate","resetRotation","getTransformTemplate","shouldNotifyListeners","prevTransformTemplateValue","updateSnapshot","clearMeasurements","clearIsLayoutDirty","resetTransformStyle","notifyLayoutUpdate","process","preRender","clearSnapshot","removeLeadSnapshots","scheduleUpdateProjection","measure","alwaysMeasureLayout","prevLayout","layoutCorrected","phase","needsMeasurement","layoutScroll","isRoot","isResetRequested","hasProjection","transformTemplateValue","transformTemplateHasChanged","removeTransform","pageBox","removeElementScroll","roundAxis","measuredBox","boxWithoutScroll","rootScroll","applyTransform","transformOnly","withTransforms","boxWithoutTransform","setTargetDelta","targetDelta","forceRelativeParentToResolveTarget","relativeParent","resolvedRelativeTargetAt","forceRecalculation","getLead","isShared","attemptToResolveRelativeTarget","getClosestProjectingParent","relativeTargetOrigin","targetWithTransforms","isProjecting","canSkip","pendingAnimation","prevTreeScaleX","prevTreeScaleY","treePath","isSharedTransition","treeLength","applyTreeDeltas","projectionTransform","projectionDeltaWithTransform","prevProjectionTransform","notifyAll","snapshotLatestValues","mixedValues","relativeLayout","isSharedLayoutAnimation","isOnlyMember","shouldCrossfadeOpacity","hasOpacityCrossfade","prevRelativeTarget","mixTargetDelta","mixAxisDelta","mixAxis","follow","opacityExit","borderLabel","followRadius","leadRadius","mixValues","motionValue$1","animateSingleValue","completeAnimation","applyTransformsToTarget","shouldAnimatePositionOnly","animationType","xLength","yLength","initialPromotionConfig","shouldPreserveFollowOpacity","getPrevLead","hasRotate","resetValues","setStaticValue","styles","visibility","pointerEvents","emptyStyles","valuesToRender","corrected","num","resetTree","measuredLayout","axisSnapshot","layoutDelta","visualDelta","parentSnapshot","parentLayout","relativeSnapshot","onBeforeLayoutMeasure","userAgentContains","navigator","userAgent","roundPoint","DocumentProjectionNode","documentElement","scrollLeft","body","scrollTop","HTMLProjectionNode","documentNode","getComputedStyle","removePointerDownListener","onPointerDown","pointerDownEvent","session","createPanHandlers","onPanSessionStart","onPanStart","onPan","onPanEnd","removeGroupControls","dragControls","ProjectionNode","splitCSSVariableRegex","maxDepth","getVariableValue","exec","parseCSSVariable","getPropertyValue","trimmed","positionalKeys","isPositionalKey","isNumOrPxType","getPosFromMatrix","matrix","pos","getTranslateFromMatrix","pos2","pos3","_bbox","matrix3d","transformKeys","nonTranslationalTransformKeys","positionalValues","checkAndConvertChangedValueTypes","targetPositionalKeys","removedTransformValues","hasAttemptedToRemoveTransformValues","changedValueTypeKeys","fromType","toType","numKeyframes","fromIndex","removedTransforms","removeNonTranslationalTransform","pageYOffset","convertedTarget","changedKeys","originBbox","elementComputedStyle","targetBbox","convertChangedValueTypes","scrollTo","unitConversion","hasPositionalKey","parseDomVariant","resolveCSSVariables","prefersReducedMotion","hasReducedMotionListener","visualElementStore","featureNames","numFeatures","propEventHandlers","numVariantProps","VisualElement","valueSubscriptions","prevMotionValues","propEventSubscriptions","notifyUpdate","triggerBuild","renderInstance","baseTarget","initialValues","initialMotionValues","_props","_prevProps","removeFromVariantTree","addVariantChild","bindToMotionValue","matchMedia","motionMediaQuery","setReducedMotionPreferences","addListener","initPrefersReducedMotion","valueIsTransform","removeOnChange","latestValue","removeOnRenderRequest","sortInstanceNodePosition","renderedProps","ProjectionNodeConstructor","FeatureConstructor","MeasureLayoutComponent","feature","build","measureInstanceViewportBox","getStaticValue","canMutate","makeTargetAnimatableFromInstance","listener","nextValue","prevValue","existingValue","removeValue","updateMotionValuesFromProps","handleChildMotionValue","getVariant","getClosestVariantNode","startAtParent","closestVariantNode","removeValueFromRenderState","readValue","getBaseTargetFromProps","readValueFromInstance","setBaseTarget","valueFromInitial","DOMVisualElement","compareDocumentPosition","transitionOrigin","getOrigin","newValueKeys","numNewValues","targetValue","checkTargetForNewValues","HTMLVisualElement","defaultType","computedStyle","childSubscription","textContent","SVGVisualElement","getAttribute"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"commons-dc874e109473e818028c.js","mappings":"2GAEA,MAAMA,EAAY,YACZC,EAAY,YACZC,EAAkB,0BAClBC,EAAa,yBACbC,EAAa,WAEbC,EAAqB,IAAIC,OAAO,IAAMF,EAAWG,QACjDC,EAA4B,IAAIF,OAAOF,EAAWG,OAASJ,EAAWI,OAAQ,MAC9EE,EAAyB,IAAIH,OAAO,OAASH,EAAWI,OAAQ,MA6ChEG,EAAY,CAACC,EAAOC,KACzB,GAAuB,iBAAVD,IAAsBE,MAAMC,QAAQH,GAChD,MAAM,IAAII,UAAU,gDAiBrB,GAdAH,EAAU,CACTI,YAAY,EACZC,8BAA8B,KAC3BL,GAWiB,KAPpBD,EADGE,MAAMC,QAAQH,GACTA,EAAMO,KAAIC,GAAKA,EAAEC,SACvBC,QAAOF,GAAKA,EAAEG,SACdC,KAAK,KAECZ,EAAMS,QAGLE,OACT,MAAO,GAGR,MAAME,GAAiC,IAAnBZ,EAAQa,OAC3BC,GAAUA,EAAOF,cACjBE,GAAUA,EAAOC,kBAAkBf,E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ACXlS,OAAQ,CACJglD,eAAgBd,GAChB3wC,cAAa,MDef5L,GAAuB6N,GAAkB,CAACvC,EAAW+O,IEhB3D,SAA+B/O,GAAW,mBAAE0M,GAAqB,GAAS9M,EAAmBC,GAIzF,MAAO,IAHYoD,EAAejD,GAC5B+P,GACAK,GAGFxQ,oBACAE,UAAW2M,GAAgBC,GAC3B7M,sBACAG,YAER,CFKsE,CAAsBA,EAAW+O,EAAQnP,GAAmB,K","sources":["webpack://gatsby-blog/./node_modules/.pnpm/camelcase@6.3.0/node_modules/camelcase/index.js","webpack://gatsby-blog/../src/image-utils.ts","webpack://gatsby-blog/../src/components/hooks.ts","webpack://gatsby-blog/../src/components/layout-wrapper.tsx","webpack://gatsby-blog/../src/components/picture.tsx","webpack://gatsby-blog/../src/components/placeholder.tsx","webpack://gatsby-blog/../src/components/main-image.tsx","webpack://gatsby-blog/../src/components/gatsby-image.server.tsx","webpack://gatsby-blog/../src/components/gatsby-image.browser.tsx","webpack://gatsby-blog/../src/components/static-image.server.tsx","webpack://gatsby-blog/../src/components/static-image.tsx","webpack://gatsby-blog/./node_modules/.pnpm/clsx@2.0.0/node_modules/clsx/dist/clsx.mjs","webpack://gatsby-blog/./static/images/github.svg","webpack://gatsby-blog/./src/components/split-text.tsx","webpack://gatsby-blog/./src/components/split-text.module.css","webpack://gatsby-blog/./src/components/@layout/navigation.tsx","webpack://gatsby-blog/./src/components/@layout/navigation.module.css","webpack://gatsby-blog/./src/components/@core/layout.tsx","webpack://gatsby-blog/./src/components/@core/seo.tsx","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/debounce.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/now.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js","webpack://gatsby-blog/./node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/context/LazyContext.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/variant-props.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/definitions.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/load-features.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/utils/transform.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/clamp.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/numbers/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/utils.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/numbers/units.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/use-props.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/use-props.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/use-render.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/utils/render.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/resolve-value.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/config-motion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/events/add-dom-event.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/events/utils/is-primary-pointer.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/events/event-info.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/pipe.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/Feature.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/hover.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/press.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/gestures.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/focus.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/time-conversion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/waapi/easing.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/cubic-bezier.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/ease.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/utils/is-easing-array.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/modifiers/mirror.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/modifiers/reverse.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/circ.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/back.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/utils/map.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/easing/anticipate.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/color/utils.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/color/rgba.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/color/hex.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/color/hsla.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/color/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/mix.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/hsla-to-rgba.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/mix-color.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/complex/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/mix-complex.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/progress.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/interpolate.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/offsets/default.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/offsets/fill.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/generators/keyframes.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/offsets/time.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/velocity-per-second.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/generators/utils/velocity.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/generators/spring/find.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/generators/spring/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/generators/inertia.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/js/driver-frameloop.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/js/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/waapi/create-accelerated-animation.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/memo.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/waapi/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/types/complex/filter.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/is-none.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/transitions.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/utils/keyframes.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/animators/instant.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/use-will-change/is.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/array.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/subscription-manager.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/value/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/setters.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/animations.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/distance.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/models.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/utils/measure.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/pan/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/node/state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/shared/stack.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/styles/transform.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/debug/record.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/delay.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/animation/interfaces/single-value.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/drag.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/gestures/drag/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/store.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/VisualElement.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/motion.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/motion/features/layout.mjs","webpack://gatsby-blog/./node_modules/.pnpm/framer-motion@10.16.4_react-dom@18.1.0_react@18.1.0/node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs"],"sourcesContent":["'use strict';\n\nconst UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\n\tfor (let i = 0; i < string.length; i++) {\n\t\tconst character = string[i];\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i) + '-' + string.slice(i);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\ti++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i - 1) + '-' + string.slice(i - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replace(LEADING_CAPITAL, m1 => toLowerCase(m1));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier))\n\t\t.replace(NUMBERS_AND_IDENTIFIER, m => toUpperCase(m));\n};\n\nconst camelCase = (input, options) => {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false ?\n\t\tstring => string.toLowerCase() :\n\t\tstring => string.toLocaleLowerCase(options.locale);\n\tconst toUpperCase = options.locale === false ?\n\t\tstring => string.toUpperCase() :\n\t\tstring => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\n\tif (options.preserveConsecutiveUppercase) {\n\t\tinput = preserveConsecutiveUppercase(input, toLowerCase);\n\t} else {\n\t\tinput = toLowerCase(input);\n\t}\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n};\n\nmodule.exports = camelCase;\n// TODO: Remove this for the next major release\nmodule.exports.default = camelCase;\n","import camelCase from \"camelcase\"\nimport type { IGatsbyImageData } from \"./index\"\n\nconst DEFAULT_PIXEL_DENSITIES = [0.25, 0.5, 1, 2]\nexport const DEFAULT_BREAKPOINTS = [750, 1080, 1366, 1920]\nexport const EVERY_BREAKPOINT = [\n 320, 654, 768, 1024, 1366, 1600, 1920, 2048, 2560, 3440, 3840, 4096,\n]\nconst DEFAULT_FLUID_WIDTH = 800\nconst DEFAULT_FIXED_WIDTH = 800\nconst DEFAULT_ASPECT_RATIO = 4 / 3\n\nexport type Fit = \"cover\" | \"fill\" | \"inside\" | \"outside\" | \"contain\"\n\nexport type Layout = \"fixed\" | \"fullWidth\" | \"constrained\"\nexport type ImageFormat = \"jpg\" | \"png\" | \"webp\" | \"avif\" | \"auto\" | \"\"\n\n/**\n * The minimal required reporter, as we don't want to import it from gatsby-cli\n */\nexport interface IReporter {\n warn(message: string): void\n}\n\nexport interface ISharpGatsbyImageArgs {\n layout?: Layout\n formats?: Array\n placeholder?: \"tracedSVG\" | \"dominantColor\" | \"blurred\" | \"none\"\n tracedSVGOptions?: Record\n width?: number\n height?: number\n aspectRatio?: number\n sizes?: string\n quality?: number\n transformOptions?: {\n fit?: Fit\n cropFocus?: number | string\n duotone?: {\n highlight: string\n shadow: string\n opacity?: number\n }\n grayscale?: boolean\n rotate?: number\n trim?: number\n }\n jpgOptions?: Record\n pngOptions?: Record\n webpOptions?: Record\n avifOptions?: Record\n blurredOptions?: { width?: number; toFormat?: ImageFormat }\n breakpoints?: Array\n outputPixelDensities?: Array\n backgroundColor?: string\n}\n\nexport interface IImageSizeArgs {\n width?: number\n height?: number\n layout?: Layout\n filename: string\n outputPixelDensities?: Array\n breakpoints?: Array\n fit?: Fit\n reporter?: IReporter\n sourceMetadata: { width: number; height: number }\n}\n\nexport interface IImageSizes {\n sizes: Array\n presentationWidth: number\n presentationHeight: number\n aspectRatio: number\n unscaledWidth: number\n}\n\nexport interface IImage {\n src: string\n width: number\n height: number\n format: ImageFormat\n}\n\nexport interface IGatsbyImageHelperArgs {\n pluginName: string\n generateImageSource: (\n filename: string,\n width: number,\n height: number,\n format: ImageFormat,\n fit?: Fit,\n options?: Record\n ) => IImage\n layout?: Layout\n formats?: Array\n filename: string\n placeholderURL?: string\n width?: number\n height?: number\n sizes?: string\n reporter?: IReporter\n sourceMetadata?: { width: number; height: number; format: ImageFormat }\n fit?: Fit\n options?: Record\n breakpoints?: Array\n backgroundColor?: string\n aspectRatio?: number\n}\n\nconst warn = (message: string): void => console.warn(message)\n\nconst sortNumeric = (a: number, b: number): number => a - b\n\nexport const getSizes = (width: number, layout: Layout): string | undefined => {\n switch (layout) {\n // If screen is wider than the max size, image width is the max size,\n // otherwise it's the width of the screen\n case `constrained`:\n return `(min-width: ${width}px) ${width}px, 100vw`\n\n // Image is always the same width, whatever the size of the screen\n case `fixed`:\n return `${width}px`\n\n // Image is always the width of the screen\n case `fullWidth`:\n return `100vw`\n\n default:\n return undefined\n }\n}\n\nexport const getSrcSet = (images: Array): string =>\n images.map(image => `${image.src} ${image.width}w`).join(`,\\n`)\n\nexport function formatFromFilename(filename: string): ImageFormat | undefined {\n const dot = filename.lastIndexOf(`.`)\n if (dot !== -1) {\n const ext = filename.slice(dot + 1)\n if (ext === `jpeg`) {\n return `jpg`\n }\n if (ext.length === 3 || ext.length === 4) {\n return ext as ImageFormat\n }\n }\n return undefined\n}\n\nexport function setDefaultDimensions(\n args: IGatsbyImageHelperArgs\n): IGatsbyImageHelperArgs {\n let {\n layout = `constrained`,\n width,\n height,\n sourceMetadata,\n breakpoints,\n aspectRatio,\n formats = [`auto`, `webp`],\n } = args\n formats = formats.map(format => format.toLowerCase() as ImageFormat)\n layout = camelCase(layout) as Layout\n\n if (width && height) {\n return { ...args, formats, layout, aspectRatio: width / height }\n }\n if (sourceMetadata.width && sourceMetadata.height && !aspectRatio) {\n aspectRatio = sourceMetadata.width / sourceMetadata.height\n }\n\n if (layout === `fullWidth`) {\n width = width || sourceMetadata.width || breakpoints[breakpoints.length - 1]\n height = height || Math.round(width / (aspectRatio || DEFAULT_ASPECT_RATIO))\n } else {\n if (!width) {\n if (height && aspectRatio) {\n width = height * aspectRatio\n } else if (sourceMetadata.width) {\n width = sourceMetadata.width\n } else if (height) {\n width = Math.round(height / DEFAULT_ASPECT_RATIO)\n } else {\n width = DEFAULT_FIXED_WIDTH\n }\n }\n\n if (aspectRatio && !height) {\n height = Math.round(width / aspectRatio)\n } else if (!aspectRatio) {\n aspectRatio = width / height\n }\n }\n return { ...args, width, height, aspectRatio, layout, formats }\n}\n\n/**\n * Use this for getting an image for the blurred placeholder. This ensures the\n * aspect ratio and crop match the main image\n */\nexport function getLowResolutionImageURL(\n args: IGatsbyImageHelperArgs,\n width = 20\n): string {\n args = setDefaultDimensions(args)\n const { generateImageSource, filename, aspectRatio } = args\n return generateImageSource(\n filename,\n width,\n Math.round(width / aspectRatio),\n args.sourceMetadata.format || `jpg`,\n args.fit,\n args.options\n )?.src\n}\n\nexport function generateImageData(\n args: IGatsbyImageHelperArgs\n): IGatsbyImageData {\n args = setDefaultDimensions(args)\n\n let {\n pluginName,\n sourceMetadata,\n generateImageSource,\n layout,\n fit,\n options,\n width,\n height,\n filename,\n reporter = { warn },\n backgroundColor,\n placeholderURL,\n } = args\n\n if (!pluginName) {\n reporter.warn(\n `[gatsby-plugin-image] \"generateImageData\" was not passed a plugin name`\n )\n }\n\n if (typeof generateImageSource !== `function`) {\n throw new Error(`generateImageSource must be a function`)\n }\n\n if (!sourceMetadata || (!sourceMetadata.width && !sourceMetadata.height)) {\n // No metadata means we let the CDN handle max size etc, aspect ratio etc\n sourceMetadata = {\n width,\n height,\n format: sourceMetadata?.format || formatFromFilename(filename) || `auto`,\n }\n } else if (!sourceMetadata.format) {\n sourceMetadata.format = formatFromFilename(filename)\n }\n\n const formats = new Set(args.formats)\n\n if (formats.size === 0 || formats.has(`auto`) || formats.has(``)) {\n formats.delete(`auto`)\n formats.delete(``)\n formats.add(sourceMetadata.format)\n }\n\n if (formats.has(`jpg`) && formats.has(`png`)) {\n reporter.warn(\n `[${pluginName}] Specifying both 'jpg' and 'png' formats is not supported. Using 'auto' instead`\n )\n if (sourceMetadata.format === `jpg`) {\n formats.delete(`png`)\n } else {\n formats.delete(`jpg`)\n }\n }\n\n const imageSizes = calculateImageSizes({ ...args, sourceMetadata })\n\n const result: IGatsbyImageData[\"images\"] = {\n sources: [],\n }\n\n let sizes = args.sizes\n if (!sizes) {\n sizes = getSizes(imageSizes.presentationWidth, layout)\n }\n\n formats.forEach(format => {\n const images = imageSizes.sizes\n .map(size => {\n const imageSrc = generateImageSource(\n filename,\n size,\n Math.round(size / imageSizes.aspectRatio),\n format,\n fit,\n options\n )\n if (\n !imageSrc?.width ||\n !imageSrc.height ||\n !imageSrc.src ||\n !imageSrc.format\n ) {\n reporter.warn(\n `[${pluginName}] The resolver for image ${filename} returned an invalid value.`\n )\n return undefined\n }\n return imageSrc\n })\n .filter(Boolean)\n\n if (format === `jpg` || format === `png` || format === `auto`) {\n const unscaled =\n images.find(img => img.width === imageSizes.unscaledWidth) || images[0]\n\n if (unscaled) {\n result.fallback = {\n src: unscaled.src,\n srcSet: getSrcSet(images),\n sizes,\n }\n }\n } else {\n result.sources?.push({\n srcSet: getSrcSet(images),\n sizes,\n type: `image/${format}`,\n })\n }\n })\n\n const imageProps: Partial = {\n images: result,\n layout,\n backgroundColor,\n }\n\n if (placeholderURL) {\n imageProps.placeholder = { fallback: placeholderURL }\n }\n\n switch (layout) {\n case `fixed`:\n imageProps.width = imageSizes.presentationWidth\n imageProps.height = imageSizes.presentationHeight\n break\n\n case `fullWidth`:\n imageProps.width = 1\n imageProps.height = 1 / imageSizes.aspectRatio\n break\n\n case `constrained`:\n imageProps.width = args.width || imageSizes.presentationWidth || 1\n imageProps.height = (imageProps.width || 1) / imageSizes.aspectRatio\n }\n\n return imageProps as IGatsbyImageData\n}\n\nconst dedupeAndSortDensities = (values: Array): Array =>\n Array.from(new Set([1, ...values])).sort(sortNumeric)\n\nexport function calculateImageSizes(args: IImageSizeArgs): IImageSizes {\n const {\n width,\n height,\n filename,\n layout = `constrained`,\n sourceMetadata: imgDimensions,\n reporter = { warn },\n breakpoints = DEFAULT_BREAKPOINTS,\n } = args\n\n // check that all dimensions provided are positive\n const userDimensions = { width, height }\n const erroneousUserDimensions = Object.entries(userDimensions).filter(\n ([_, size]) => typeof size === `number` && size < 1\n )\n if (erroneousUserDimensions.length) {\n throw new Error(\n `Specified dimensions for images must be positive numbers (> 0). Problem dimensions you have are ${erroneousUserDimensions\n .map(dim => dim.join(`: `))\n .join(`, `)}`\n )\n }\n\n if (layout === `fixed`) {\n return fixedImageSizes(args)\n } else if (layout === `constrained`) {\n return responsiveImageSizes(args)\n } else if (layout === `fullWidth`) {\n return responsiveImageSizes({ breakpoints, ...args })\n } else {\n reporter.warn(\n `No valid layout was provided for the image at ${filename}. Valid image layouts are fixed, fullWidth, and constrained. Found ${layout}`\n )\n return {\n sizes: [imgDimensions.width],\n presentationWidth: imgDimensions.width,\n presentationHeight: imgDimensions.height,\n aspectRatio: imgDimensions.width / imgDimensions.height,\n unscaledWidth: imgDimensions.width,\n }\n }\n}\nexport function fixedImageSizes({\n filename,\n sourceMetadata: imgDimensions,\n width,\n height,\n fit = `cover`,\n outputPixelDensities = DEFAULT_PIXEL_DENSITIES,\n reporter = { warn },\n}: IImageSizeArgs): IImageSizes {\n let aspectRatio = imgDimensions.width / imgDimensions.height\n // Sort, dedupe and ensure there's a 1\n const densities = dedupeAndSortDensities(outputPixelDensities)\n\n // If both are provided then we need to check the fit\n if (width && height) {\n const calculated = getDimensionsAndAspectRatio(imgDimensions, {\n width,\n height,\n fit,\n })\n width = calculated.width\n height = calculated.height\n aspectRatio = calculated.aspectRatio\n }\n\n if (!width) {\n if (!height) {\n width = DEFAULT_FIXED_WIDTH\n } else {\n width = Math.round(height * aspectRatio)\n }\n } else if (!height) {\n height = Math.round(width / aspectRatio)\n }\n\n const originalWidth = width // will use this for presentationWidth, don't want to lose it\n const isTopSizeOverriden =\n imgDimensions.width < width || imgDimensions.height < (height as number)\n\n // If the image is smaller than requested, warn the user that it's being processed as such\n // print out this message with the necessary information before we overwrite it for sizing\n if (isTopSizeOverriden) {\n const fixedDimension = imgDimensions.width < width ? `width` : `height`\n reporter.warn(`\nThe requested ${fixedDimension} \"${\n fixedDimension === `width` ? width : height\n }px\" for the image ${filename} was larger than the actual image ${fixedDimension} of ${\n imgDimensions[fixedDimension]\n }px. If possible, replace the current image with a larger one.`)\n\n if (fixedDimension === `width`) {\n width = imgDimensions.width\n height = Math.round(width / aspectRatio)\n } else {\n height = imgDimensions.height\n width = height * aspectRatio\n }\n }\n\n const sizes = densities\n .filter(size => size >= 1) // remove smaller densities because fixed images don't need them\n .map(density => Math.round(density * (width as number)))\n .filter(size => size <= imgDimensions.width)\n\n return {\n sizes,\n aspectRatio,\n presentationWidth: originalWidth,\n presentationHeight: Math.round(originalWidth / aspectRatio),\n unscaledWidth: width,\n }\n}\n\nexport function responsiveImageSizes({\n sourceMetadata: imgDimensions,\n width,\n height,\n fit = `cover`,\n outputPixelDensities = DEFAULT_PIXEL_DENSITIES,\n breakpoints,\n layout,\n}: IImageSizeArgs): IImageSizes {\n let sizes\n let aspectRatio = imgDimensions.width / imgDimensions.height\n // Sort, dedupe and ensure there's a 1\n const densities = dedupeAndSortDensities(outputPixelDensities)\n\n // If both are provided then we need to check the fit\n if (width && height) {\n const calculated = getDimensionsAndAspectRatio(imgDimensions, {\n width,\n height,\n fit,\n })\n width = calculated.width\n height = calculated.height\n aspectRatio = calculated.aspectRatio\n }\n\n // Case 1: width of height were passed in, make sure it isn't larger than the actual image\n width = width && Math.min(width, imgDimensions.width)\n height = height && Math.min(height, imgDimensions.height)\n\n // Case 2: neither width or height were passed in, use default size\n if (!width && !height) {\n width = Math.min(DEFAULT_FLUID_WIDTH, imgDimensions.width)\n height = width / aspectRatio\n }\n\n // if it still hasn't been found, calculate width from the derived height.\n // TS isn't smart enough to realise the type for height has been narrowed here\n if (!width) {\n width = (height as number) * aspectRatio\n }\n\n const originalWidth = width\n const isTopSizeOverriden =\n imgDimensions.width < width || imgDimensions.height < (height as number)\n if (isTopSizeOverriden) {\n width = imgDimensions.width\n height = imgDimensions.height\n }\n\n width = Math.round(width)\n\n if (breakpoints?.length > 0) {\n sizes = breakpoints.filter(size => size <= imgDimensions.width)\n\n // If a larger breakpoint has been filtered-out, add the actual image width instead\n if (\n sizes.length < breakpoints.length &&\n !sizes.includes(imgDimensions.width)\n ) {\n sizes.push(imgDimensions.width)\n }\n } else {\n sizes = densities.map(density => Math.round(density * (width as number)))\n sizes = sizes.filter(size => size <= imgDimensions.width)\n }\n\n // ensure that the size passed in is included in the final output\n if (layout === `constrained` && !sizes.includes(width)) {\n sizes.push(width)\n }\n sizes = sizes.sort(sortNumeric)\n return {\n sizes,\n aspectRatio,\n presentationWidth: originalWidth,\n presentationHeight: Math.round(originalWidth / aspectRatio),\n unscaledWidth: width,\n }\n}\n\nexport function getDimensionsAndAspectRatio(\n dimensions,\n options\n): { width: number; height: number; aspectRatio: number } {\n // Calculate the eventual width/height of the image.\n const imageAspectRatio = dimensions.width / dimensions.height\n\n let width = options.width\n let height = options.height\n\n switch (options.fit) {\n case `fill`: {\n width = options.width ? options.width : dimensions.width\n height = options.height ? options.height : dimensions.height\n break\n }\n case `inside`: {\n const widthOption = options.width\n ? options.width\n : Number.MAX_SAFE_INTEGER\n const heightOption = options.height\n ? options.height\n : Number.MAX_SAFE_INTEGER\n\n width = Math.min(widthOption, Math.round(heightOption * imageAspectRatio))\n height = Math.min(\n heightOption,\n Math.round(widthOption / imageAspectRatio)\n )\n break\n }\n case `outside`: {\n const widthOption = options.width ? options.width : 0\n const heightOption = options.height ? options.height : 0\n\n width = Math.max(widthOption, Math.round(heightOption * imageAspectRatio))\n height = Math.max(\n heightOption,\n Math.round(widthOption / imageAspectRatio)\n )\n break\n }\n\n default: {\n if (options.width && !options.height) {\n width = options.width\n height = Math.round(options.width / imageAspectRatio)\n }\n\n if (options.height && !options.width) {\n width = Math.round(options.height * imageAspectRatio)\n height = options.height\n }\n }\n }\n\n return {\n width,\n height,\n aspectRatio: width / height,\n }\n}\n","/* global GATSBY___IMAGE */\nimport { generateImageData, EVERY_BREAKPOINT } from \"../image-utils\"\nimport type { CSSProperties, HTMLAttributes, ImgHTMLAttributes } from \"react\"\nimport type { Node } from \"gatsby\"\nimport type { PlaceholderProps } from \"./placeholder\"\nimport type { MainImageProps } from \"./main-image\"\nimport type { IGatsbyImageData } from \"./gatsby-image.browser\"\nimport type {\n IGatsbyImageHelperArgs,\n Layout,\n IImage,\n ImageFormat,\n} from \"../image-utils\"\n\n// Native lazy-loading support: https://addyosmani.com/blog/lazy-loading/\nexport const hasNativeLazyLoadSupport = (): boolean =>\n typeof HTMLImageElement !== `undefined` &&\n `loading` in HTMLImageElement.prototype\n\nexport function gatsbyImageIsInstalled(): boolean {\n return typeof GATSBY___IMAGE !== `undefined` && GATSBY___IMAGE\n}\n\nexport type IGatsbyImageDataParent = T & {\n gatsbyImageData: IGatsbyImageData\n}\nexport type IGatsbyImageParent = T & {\n gatsbyImage: IGatsbyImageData\n}\nexport type FileNode = Partial & {\n childImageSharp?: IGatsbyImageDataParent>\n}\n\nconst isGatsbyImageData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node: IGatsbyImageData | any\n): node is IGatsbyImageData =>\n // 🦆 check for a deep prop to be sure this is a valid gatsbyImageData object\n Boolean(node?.images?.fallback?.src)\n\nconst isGatsbyImageDataParent = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node: IGatsbyImageDataParent | any\n): node is IGatsbyImageDataParent => Boolean(node?.gatsbyImageData)\n\nconst isGatsbyImageParent = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node: IGatsbyImageParent | any\n): node is IGatsbyImageParent => Boolean(node?.gatsbyImage)\n\nexport type ImageDataLike =\n | FileNode\n | IGatsbyImageDataParent\n | IGatsbyImageParent\n | IGatsbyImageData\n\nexport const getImage = (\n node: ImageDataLike | null\n): IGatsbyImageData | undefined => {\n // This checks both for gatsbyImageData and gatsbyImage\n if (isGatsbyImageData(node)) {\n return node\n }\n // gatsbyImageData GraphQL field\n if (isGatsbyImageDataParent(node)) {\n return node.gatsbyImageData\n }\n // gatsbyImage GraphQL field for Gatsby's Image CDN service\n if (isGatsbyImageParent(node)) {\n return node.gatsbyImage\n }\n return node?.childImageSharp?.gatsbyImageData\n}\n\nexport const getSrc = (node: ImageDataLike): string | undefined =>\n getImage(node)?.images?.fallback?.src\n\nexport const getSrcSet = (node: ImageDataLike): string | undefined =>\n getImage(node)?.images?.fallback?.srcSet\n\nexport function getWrapperProps(\n width: number,\n height: number,\n layout: Layout\n): Pick, \"className\" | \"style\"> & {\n \"data-gatsby-image-wrapper\": string\n} {\n const wrapperStyle: CSSProperties = {}\n\n let className = `gatsby-image-wrapper`\n\n // If the plugin isn't installed we need to apply the styles inline\n if (!gatsbyImageIsInstalled()) {\n wrapperStyle.position = `relative`\n wrapperStyle.overflow = `hidden`\n }\n\n if (layout === `fixed`) {\n wrapperStyle.width = width\n wrapperStyle.height = height\n } else if (layout === `constrained`) {\n if (!gatsbyImageIsInstalled()) {\n wrapperStyle.display = `inline-block`\n wrapperStyle.verticalAlign = `top`\n }\n className = `gatsby-image-wrapper gatsby-image-wrapper-constrained`\n }\n\n return {\n className,\n \"data-gatsby-image-wrapper\": ``,\n style: wrapperStyle,\n }\n}\n\nexport interface IUrlBuilderArgs {\n width: number\n height: number\n baseUrl: string\n format: ImageFormat\n options: OptionsType\n}\nexport interface IGetImageDataArgs> {\n baseUrl: string\n /**\n * For constrained and fixed images, the size of the image element\n */\n width?: number\n height?: number\n /**\n * If available, pass the source image width and height\n */\n sourceWidth?: number\n sourceHeight?: number\n /**\n * If only one dimension is passed, then this will be used to calculate the other.\n */\n aspectRatio?: number\n layout?: Layout\n /**\n * Returns a URL based on the passed arguments. Should be a pure function\n */\n urlBuilder: (args: IUrlBuilderArgs) => string\n\n /**\n * Should be a data URI\n */\n placeholderURL?: string\n backgroundColor?: string\n /**\n * Used in error messages etc\n */\n pluginName?: string\n\n /**\n * If you do not support auto-format, pass an array of image types here\n */\n formats?: Array\n\n breakpoints?: Array\n\n /**\n * Passed to the urlBuilder function\n */\n options?: OptionsType\n}\n\n/**\n * Use this hook to generate gatsby-plugin-image data in the browser.\n */\nexport function getImageData({\n baseUrl,\n urlBuilder,\n sourceWidth,\n sourceHeight,\n pluginName = `getImageData`,\n formats = [`auto`],\n breakpoints,\n options,\n ...props\n}: IGetImageDataArgs): IGatsbyImageData {\n if (\n !breakpoints?.length &&\n (props.layout === `fullWidth` || (props.layout as string) === `FULL_WIDTH`)\n ) {\n breakpoints = EVERY_BREAKPOINT\n }\n const generateImageSource = (\n baseUrl: string,\n width: number,\n height?: number,\n format?: ImageFormat\n ): IImage => {\n return {\n width,\n height,\n format,\n src: urlBuilder({ baseUrl, width, height, options, format }),\n }\n }\n\n const sourceMetadata: IGatsbyImageHelperArgs[\"sourceMetadata\"] = {\n width: sourceWidth,\n height: sourceHeight,\n format: `auto`,\n }\n\n const args: IGatsbyImageHelperArgs = {\n ...props,\n pluginName,\n generateImageSource,\n filename: baseUrl,\n formats,\n breakpoints,\n sourceMetadata,\n }\n return generateImageData(args)\n}\n\nexport function getMainProps(\n isLoading: boolean,\n isLoaded: boolean,\n images: IGatsbyImageData[\"images\"],\n loading?: \"eager\" | \"lazy\",\n style: CSSProperties = {}\n): Partial {\n // fallback when it's not configured in gatsby-config.\n if (!gatsbyImageIsInstalled()) {\n style = {\n height: `100%`,\n left: 0,\n position: `absolute`,\n top: 0,\n transform: `translateZ(0)`,\n transition: `opacity 250ms linear`,\n width: `100%`,\n willChange: `opacity`,\n ...style,\n }\n }\n\n const result = {\n ...images,\n loading,\n shouldLoad: isLoading,\n \"data-main-image\": ``,\n style: {\n ...style,\n opacity: isLoaded ? 1 : 0,\n },\n }\n\n return result\n}\n\nexport type PlaceholderImageAttrs = ImgHTMLAttributes &\n Pick & {\n \"data-placeholder-image\"?: string\n }\n\nexport function getPlaceholderProps(\n placeholder: PlaceholderImageAttrs | undefined,\n isLoaded: boolean,\n layout: Layout,\n width?: number,\n height?: number,\n backgroundColor?: string,\n objectFit?: CSSProperties[\"objectFit\"],\n objectPosition?: CSSProperties[\"objectPosition\"]\n): PlaceholderImageAttrs {\n const wrapperStyle: CSSProperties = {}\n\n if (backgroundColor) {\n wrapperStyle.backgroundColor = backgroundColor\n\n if (layout === `fixed`) {\n wrapperStyle.width = width\n wrapperStyle.height = height\n wrapperStyle.backgroundColor = backgroundColor\n wrapperStyle.position = `relative`\n } else if (layout === `constrained`) {\n wrapperStyle.position = `absolute`\n wrapperStyle.top = 0\n wrapperStyle.left = 0\n wrapperStyle.bottom = 0\n wrapperStyle.right = 0\n } else if (layout === `fullWidth`) {\n wrapperStyle.position = `absolute`\n wrapperStyle.top = 0\n wrapperStyle.left = 0\n wrapperStyle.bottom = 0\n wrapperStyle.right = 0\n }\n }\n\n if (objectFit) {\n wrapperStyle.objectFit = objectFit\n }\n\n if (objectPosition) {\n wrapperStyle.objectPosition = objectPosition\n }\n const result: PlaceholderImageAttrs = {\n ...placeholder,\n \"aria-hidden\": true,\n \"data-placeholder-image\": ``,\n style: {\n opacity: isLoaded ? 0 : 1,\n transition: `opacity 500ms linear`,\n ...wrapperStyle,\n },\n }\n\n // fallback when it's not configured in gatsby-config.\n if (!gatsbyImageIsInstalled()) {\n result.style = {\n height: `100%`,\n left: 0,\n position: `absolute`,\n top: 0,\n width: `100%`,\n }\n }\n\n return result\n}\n\nexport interface IArtDirectedImage {\n media: string\n image: IGatsbyImageData\n}\n\n/**\n * Generate a Gatsby image data object with multiple, art-directed images that display at different\n * resolutions.\n *\n * @param defaultImage The image displayed when no media query matches.\n * It is also used for all other settings applied to the image, such as width, height and layout.\n * You should pass a className to the component with media queries to adjust the size of the container,\n * as this cannot be adjusted automatically.\n * @param artDirected Array of objects which each contains a `media` string which is a media query\n * such as `(min-width: 320px)`, and the image object to use when that query matches.\n */\nexport function withArtDirection(\n defaultImage: IGatsbyImageData,\n artDirected: Array\n): IGatsbyImageData {\n const { images, placeholder, ...props } = defaultImage\n const output: IGatsbyImageData = {\n ...props,\n images: {\n ...images,\n sources: [],\n },\n placeholder: placeholder && {\n ...placeholder,\n sources: [],\n },\n }\n\n artDirected.forEach(({ media, image }) => {\n if (!media) {\n if (process.env.NODE_ENV === `development`) {\n console.warn(\n \"[gatsby-plugin-image] All art-directed images passed to must have a value set for `media`. Skipping.\"\n )\n }\n return\n }\n\n if (\n image.layout !== defaultImage.layout &&\n process.env.NODE_ENV === `development`\n ) {\n console.warn(\n `[gatsby-plugin-image] Mismatched image layout: expected \"${defaultImage.layout}\" but received \"${image.layout}\". All art-directed images use the same layout as the default image`\n )\n }\n\n output.images.sources.push(\n ...image.images.sources.map(source => {\n return { ...source, media }\n }),\n {\n media,\n srcSet: image.images.fallback.srcSet,\n }\n )\n\n if (!output.placeholder) {\n return\n }\n\n output.placeholder.sources.push({\n media,\n srcSet: image.placeholder.fallback,\n })\n })\n output.images.sources.push(...images.sources)\n if (placeholder?.sources) {\n output.placeholder?.sources.push(...placeholder.sources)\n }\n return output\n}\n","import React, { Fragment, FunctionComponent, PropsWithChildren } from \"react\"\nimport terserMacro from \"../../macros/terser.macro\"\nimport { Layout } from \"../image-utils\"\n\nexport interface ILayoutWrapperProps {\n layout: Layout\n width: number\n height: number\n}\n\nconst NativeScriptLoading: FunctionComponent = () => (\n \n)\n\nexport function getSizer(\n layout: Layout,\n width: number,\n height: number\n): string {\n let sizer = ``\n if (layout === `fullWidth`) {\n sizer = `
`\n }\n\n if (layout === `constrained`) {\n sizer = `
\"\"
`\n }\n\n return sizer\n}\n\nconst Sizer: FunctionComponent = function Sizer({\n layout,\n width,\n height,\n}) {\n if (layout === `fullWidth`) {\n return (\n
\n )\n }\n\n if (layout === `constrained`) {\n return (\n
\n \n
\n )\n }\n\n return null\n}\n\nexport const LayoutWrapper: FunctionComponent<\n PropsWithChildren\n> = function LayoutWrapper({ children, ...props }) {\n return (\n \n \n {children}\n\n {SERVER ? : null}\n \n )\n}\n","import React, { FunctionComponent, ImgHTMLAttributes } from \"react\"\nimport * as PropTypes from \"prop-types\"\n\nexport interface IResponsiveImageProps {\n sizes?: string\n srcSet: string\n}\n\nexport type SourceProps = IResponsiveImageProps &\n (\n | {\n media: string\n type?: string\n }\n | {\n media?: string\n type: string\n }\n )\n\ntype FallbackProps = { src: string } & Partial\n\ntype ImageProps = ImgHTMLAttributes & {\n src: string\n alt: string\n shouldLoad: boolean\n}\n\nexport type PictureProps = ImgHTMLAttributes & {\n fallback?: FallbackProps\n sources?: Array\n alt: string\n shouldLoad?: boolean\n}\n\nconst Image: FunctionComponent = function Image({\n src,\n srcSet,\n loading,\n alt = ``,\n shouldLoad,\n ...props\n}) {\n return (\n \n )\n}\n\nexport const Picture: React.FC = function Picture({\n fallback,\n sources = [],\n shouldLoad = true,\n ...props\n}) {\n const sizes = props.sizes || fallback?.sizes\n const fallbackImage = (\n \n )\n\n if (!sources.length) {\n return fallbackImage\n }\n\n return (\n \n {sources.map(({ media, srcSet, type }) => (\n \n ))}\n {fallbackImage}\n \n )\n}\n\nImage.propTypes = {\n src: PropTypes.string.isRequired,\n alt: PropTypes.string.isRequired,\n sizes: PropTypes.string,\n srcSet: PropTypes.string,\n shouldLoad: PropTypes.bool,\n}\n\nPicture.displayName = `Picture`\nPicture.propTypes = {\n alt: PropTypes.string.isRequired,\n shouldLoad: PropTypes.bool,\n fallback: PropTypes.exact({\n src: PropTypes.string.isRequired,\n srcSet: PropTypes.string,\n sizes: PropTypes.string,\n }),\n sources: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.exact({\n media: PropTypes.string.isRequired,\n type: PropTypes.string,\n sizes: PropTypes.string,\n srcSet: PropTypes.string.isRequired,\n }),\n PropTypes.exact({\n media: PropTypes.string,\n type: PropTypes.string.isRequired,\n sizes: PropTypes.string,\n srcSet: PropTypes.string.isRequired,\n }),\n ])\n ),\n}\n","import React, { FunctionComponent, ImgHTMLAttributes } from \"react\"\nimport * as PropTypes from \"prop-types\"\nimport { Picture, SourceProps } from \"./picture\"\n\nexport type PlaceholderProps = ImgHTMLAttributes & {\n fallback?: string\n sources?: Array\n}\n\nexport const Placeholder: FunctionComponent =\n function Placeholder({ fallback, ...props }) {\n if (fallback) {\n return (\n \n )\n } else {\n return
\n }\n }\n\nPlaceholder.displayName = `Placeholder`\nPlaceholder.propTypes = {\n fallback: PropTypes.string,\n sources: Picture.propTypes?.sources,\n alt: function (props, propName, componentName): Error | null {\n if (!props[propName]) {\n return null\n }\n\n return new Error(\n `Invalid prop \\`${propName}\\` supplied to \\`${componentName}\\`. Validation failed.`\n )\n },\n}\n","import React from \"react\"\nimport { Picture, PictureProps } from \"./picture\"\n\nexport type MainImageProps = PictureProps\n\nexport const MainImage: React.FC = function MainImage(props) {\n return (\n <>\n \n \n \n )\n}\n\nMainImage.displayName = `MainImage`\nMainImage.propTypes = Picture.propTypes\n","import React from \"react\"\nimport { getWrapperProps, getMainProps, getPlaceholderProps } from \"./hooks\"\nimport { Placeholder } from \"./placeholder\"\nimport { MainImage, MainImageProps } from \"./main-image\"\nimport { LayoutWrapper } from \"./layout-wrapper\"\nimport PropTypes from \"prop-types\"\nimport type { FunctionComponent, WeakValidationMap } from \"react\"\nimport type { GatsbyImageProps, IGatsbyImageData } from \"./gatsby-image.browser\"\n\nconst removeNewLines = (str: string): string => str.replace(/\\n/g, ``)\n\nexport const GatsbyImage: FunctionComponent =\n function GatsbyImage({\n as = `div`,\n className,\n class: preactClass,\n style,\n image,\n loading = `lazy`,\n imgClassName,\n imgStyle,\n backgroundColor,\n objectFit,\n objectPosition,\n ...props\n }) {\n if (!image) {\n console.warn(`[gatsby-plugin-image] Missing image prop`)\n return null\n }\n\n if (preactClass) {\n className = preactClass\n }\n\n imgStyle = {\n objectFit,\n objectPosition,\n backgroundColor,\n ...imgStyle,\n }\n\n const {\n width,\n height,\n layout,\n images,\n placeholder,\n backgroundColor: placeholderBackgroundColor,\n } = image\n\n const {\n style: wStyle,\n className: wClass,\n ...wrapperProps\n } = getWrapperProps(width, height, layout)\n\n const cleanedImages: IGatsbyImageData[\"images\"] = {\n fallback: undefined,\n sources: [],\n }\n if (images.fallback) {\n cleanedImages.fallback = {\n ...images.fallback,\n srcSet: images.fallback.srcSet\n ? removeNewLines(images.fallback.srcSet)\n : undefined,\n }\n }\n\n if (images.sources) {\n cleanedImages.sources = images.sources.map(source => {\n return {\n ...source,\n srcSet: removeNewLines(source.srcSet),\n }\n })\n }\n\n return React.createElement(\n as,\n {\n ...wrapperProps,\n style: {\n ...wStyle,\n ...style,\n backgroundColor,\n },\n className: `${wClass}${className ? ` ${className}` : ``}`,\n },\n \n \n\n )}\n // When eager is set we want to start the isLoading state on true (we want to load the img without react)\n {...getMainProps(\n loading === `eager`,\n false,\n cleanedImages,\n loading,\n imgStyle\n )}\n />\n \n )\n }\n\nexport const altValidator: PropTypes.Validator = (\n props: GatsbyImageProps,\n propName,\n componentName,\n ...rest\n): Error | undefined => {\n if (!props.alt && props.alt !== ``) {\n return new Error(\n `The \"alt\" prop is required in ${componentName}. If the image is purely presentational then pass an empty string: e.g. alt=\"\". Learn more: https://a11y-style-guide.com/style-guide/section-media.html`\n )\n }\n\n return PropTypes.string(props, propName, componentName, ...rest)\n}\n\nexport const propTypes = {\n image: PropTypes.object.isRequired,\n alt: altValidator,\n} as WeakValidationMap\n","import {\n createElement,\n memo,\n useMemo,\n useEffect,\n useLayoutEffect,\n useRef,\n} from \"react\"\nimport {\n getWrapperProps,\n gatsbyImageIsInstalled,\n hasNativeLazyLoadSupport,\n} from \"./hooks\"\nimport { getSizer } from \"./layout-wrapper\"\nimport { propTypes } from \"./gatsby-image.server\"\nimport type {\n FC,\n ElementType,\n FunctionComponent,\n ImgHTMLAttributes,\n CSSProperties,\n ReactEventHandler,\n} from \"react\"\nimport type { renderImageToString } from \"./lazy-hydrate\"\nimport type { PlaceholderProps } from \"./placeholder\"\nimport type { MainImageProps } from \"./main-image\"\nimport type { Layout } from \"../image-utils\"\n\nconst imageCache = new Set()\nlet renderImageToStringPromise\nlet renderImage: typeof renderImageToString | undefined\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface GatsbyImageProps\n extends Omit<\n ImgHTMLAttributes,\n \"placeholder\" | \"onLoad\" | \"src\" | \"srcSet\" | \"width\" | \"height\"\n > {\n alt: string\n as?: ElementType\n className?: string\n class?: string\n imgClassName?: string\n image: IGatsbyImageData\n imgStyle?: CSSProperties\n backgroundColor?: string\n objectFit?: CSSProperties[\"objectFit\"]\n objectPosition?: CSSProperties[\"objectPosition\"]\n onLoad?: (props: { wasCached: boolean }) => void\n onError?: ReactEventHandler\n onStartLoad?: (props: { wasCached: boolean }) => void\n}\n\nexport interface IGatsbyImageData {\n layout: Layout\n width: number\n height: number\n backgroundColor?: string\n images: Pick\n placeholder?: Pick\n}\n\nconst GatsbyImageHydrator: FC = function GatsbyImageHydrator({\n as = `div`,\n image,\n style,\n backgroundColor,\n className,\n class: preactClass,\n onStartLoad,\n onLoad,\n onError,\n ...props\n}) {\n const { width, height, layout } = image\n const {\n style: wStyle,\n className: wClass,\n ...wrapperProps\n } = getWrapperProps(width, height, layout)\n const root = useRef()\n const cacheKey = useMemo(() => JSON.stringify(image.images), [image.images])\n\n // Preact uses class instead of className so we need to check for both\n if (preactClass) {\n className = preactClass\n }\n\n const sizer = getSizer(layout, width, height)\n\n useEffect(() => {\n if (!renderImageToStringPromise) {\n renderImageToStringPromise = import(`./lazy-hydrate`).then(\n ({ renderImageToString, swapPlaceholderImage }) => {\n renderImage = renderImageToString\n\n return {\n renderImageToString,\n swapPlaceholderImage,\n }\n }\n )\n }\n\n // The plugin image component is a bit special where if it's server-side rendered, we add extra script tags to support lazy-loading without\n // In this case we stop hydration but fire the correct events.\n const ssrImage = root.current.querySelector(\n `[data-gatsby-image-ssr]`\n ) as HTMLImageElement\n if (ssrImage && hasNativeLazyLoadSupport()) {\n if (ssrImage.complete) {\n // Trigger onStartload and onLoad events\n onStartLoad?.({\n wasCached: true,\n })\n onLoad?.({\n wasCached: true,\n })\n\n // remove ssr key for state updates but add delay to not fight with native code snippt of gatsby-ssr\n setTimeout(() => {\n ssrImage.removeAttribute(`data-gatsby-image-ssr`)\n }, 0)\n } else {\n onStartLoad?.({\n wasCached: true,\n })\n\n ssrImage.addEventListener(`load`, function onLoadListener() {\n ssrImage.removeEventListener(`load`, onLoadListener)\n\n onLoad?.({\n wasCached: true,\n })\n // remove ssr key for state updates but add delay to not fight with native code snippt of gatsby-ssr\n setTimeout(() => {\n ssrImage.removeAttribute(`data-gatsby-image-ssr`)\n }, 0)\n })\n }\n\n imageCache.add(cacheKey)\n\n return\n }\n\n if (renderImage && imageCache.has(cacheKey)) {\n return\n }\n\n let animationFrame\n let cleanupCallback\n renderImageToStringPromise.then(\n ({ renderImageToString, swapPlaceholderImage }) => {\n if (!root.current) {\n return\n }\n\n root.current.innerHTML = renderImageToString({\n isLoading: true,\n isLoaded: imageCache.has(cacheKey),\n image,\n ...props,\n })\n\n if (!imageCache.has(cacheKey)) {\n animationFrame = requestAnimationFrame(() => {\n if (root.current) {\n cleanupCallback = swapPlaceholderImage(\n root.current,\n cacheKey,\n imageCache,\n style,\n onStartLoad,\n onLoad,\n onError\n )\n }\n })\n }\n }\n )\n\n // eslint-disable-next-line consistent-return\n return (): void => {\n if (animationFrame) {\n cancelAnimationFrame(animationFrame)\n }\n if (cleanupCallback) {\n cleanupCallback()\n }\n }\n }, [image])\n\n // useLayoutEffect is ran before React commits to the DOM. This allows us to make sure our HTML is using our cached image version\n useLayoutEffect(() => {\n if (imageCache.has(cacheKey) && renderImage) {\n root.current.innerHTML = renderImage({\n isLoading: imageCache.has(cacheKey),\n isLoaded: imageCache.has(cacheKey),\n image,\n ...props,\n })\n\n // Trigger onStartload and onLoad events\n onStartLoad?.({\n wasCached: true,\n })\n onLoad?.({\n wasCached: true,\n })\n }\n }, [image])\n\n // By keeping all props equal React will keep the component in the DOM\n return createElement(as, {\n ...wrapperProps,\n style: {\n ...wStyle,\n ...style,\n backgroundColor,\n },\n className: `${wClass}${className ? ` ${className}` : ``}`,\n ref: root,\n dangerouslySetInnerHTML: {\n __html: sizer,\n },\n suppressHydrationWarning: true,\n })\n}\n\nexport const GatsbyImage: FunctionComponent = memo(\n function GatsbyImage(props) {\n if (!props.image) {\n if (process.env.NODE_ENV === `development`) {\n console.warn(`[gatsby-plugin-image] Missing image prop`)\n }\n\n return null\n }\n\n if (!gatsbyImageIsInstalled() && process.env.NODE_ENV === `development`) {\n console.warn(\n `[gatsby-plugin-image] You're missing out on some cool performance features. Please add \"gatsby-plugin-image\" to your gatsby-config.js`\n )\n }\n\n return createElement(GatsbyImageHydrator, props)\n }\n)\n\nGatsbyImage.propTypes = propTypes\nGatsbyImage.displayName = `GatsbyImage`\n","import React, { FunctionComponent, ReactElement } from \"react\"\nimport {\n altValidator,\n GatsbyImage as GatsbyImageServer,\n} from \"./gatsby-image.server\"\nimport { GatsbyImageProps, IGatsbyImageData } from \"./gatsby-image.browser\"\nimport PropTypes from \"prop-types\"\nimport { ISharpGatsbyImageArgs } from \"../image-utils\"\n\nexport interface IStaticImageProps\n extends Omit,\n Omit {\n src: string\n filename?: string\n}\n\n// These values are added by Babel. Do not add them manually\ninterface IPrivateProps {\n __imageData?: IGatsbyImageData\n __error?: string\n}\n\nexport function _getStaticImage(\n GatsbyImage: FunctionComponent\n): React.FC {\n return function StaticImage({\n src,\n __imageData: imageData,\n __error,\n // We extract these because they're not meant to be passed-down to GatsbyImage\n /* eslint-disable @typescript-eslint/no-unused-vars */\n width,\n height,\n aspectRatio,\n tracedSVGOptions,\n placeholder,\n formats,\n quality,\n transformOptions,\n jpgOptions,\n pngOptions,\n webpOptions,\n avifOptions,\n blurredOptions,\n breakpoints,\n outputPixelDensities,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...props\n }): ReactElement {\n if (__error) {\n console.warn(__error)\n }\n\n if (imageData) {\n return \n }\n console.warn(`Image not loaded`, src)\n if (!__error && process.env.NODE_ENV === `development`) {\n console.warn(\n `Please ensure that \"gatsby-plugin-image\" is included in the plugins array in gatsby-config.js, and that your version of gatsby is at least 2.24.78`\n )\n }\n return null\n }\n}\n\nconst StaticImage: React.FC =\n _getStaticImage(GatsbyImageServer)\n\nconst checkDimensionProps: PropTypes.Validator = (\n props: IStaticImageProps & IPrivateProps,\n propName: keyof IStaticImageProps & IPrivateProps,\n ...rest\n) => {\n if (\n props.layout === `fullWidth` &&\n (propName === `width` || propName === `height`) &&\n props[propName]\n ) {\n return new Error(\n `\"${propName}\" ${props[propName]} may not be passed when layout is fullWidth.`\n )\n }\n return PropTypes.number(props, propName, ...rest)\n}\n\nconst validLayouts = new Set([`fixed`, `fullWidth`, `constrained`])\n\nexport const propTypes = {\n src: PropTypes.string.isRequired,\n alt: altValidator,\n width: checkDimensionProps,\n height: checkDimensionProps,\n sizes: PropTypes.string,\n layout: (props: IStaticImageProps & IPrivateProps): Error | undefined => {\n if (props.layout === undefined) {\n return undefined\n }\n if (validLayouts.has(props.layout)) {\n return undefined\n }\n\n return new Error(\n `Invalid value ${props.layout}\" provided for prop \"layout\". Defaulting to \"constrained\". Valid values are \"fixed\", \"fullWidth\" or \"constrained\".`\n )\n },\n}\n\nStaticImage.displayName = `StaticImage`\nStaticImage.propTypes = propTypes\n\nexport { StaticImage }\n","import {\n GatsbyImage as GatsbyImageBrowser,\n IGatsbyImageData,\n} from \"./gatsby-image.browser\"\nimport React from \"react\"\nimport {\n _getStaticImage,\n propTypes,\n IStaticImageProps,\n} from \"./static-image.server\"\n// These values are added by Babel. Do not add them manually\ninterface IPrivateProps {\n __imageData?: IGatsbyImageData\n __error?: string\n}\n\nconst StaticImage: React.FC =\n _getStaticImage(GatsbyImageBrowser)\n\nStaticImage.displayName = `StaticImage`\nStaticImage.propTypes = propTypes\n\nexport { StaticImage }\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t (\n \n \n
\n ({\n y: 0,\n transition: {\n delay: i * 0.1,\n },\n }),\n }}\n className={clsx(motionDiv, word === \" \" && spacing)}\n custom={i}\n >\n {word}\n \n
\n \n
\n ))\n}\n","// extracted by mini-css-extract-plugin\nexport var container = \"split-text-module--container--38c69\";\nexport var motionDiv = \"split-text-module--motion-div--9a9fd\";\nexport var spacing = \"split-text-module--spacing--7be47\";\nexport var wrapper = \"split-text-module--wrapper--636e1\";","import React, { useEffect, useState } from \"react\"\nimport { wrapper, inner, hide, icon, logo } from \"./navigation.module.css\"\nimport { Link } from \"gatsby\"\nimport { SplitText } from \"../split-text\"\nimport clsx from \"clsx\"\nimport { ReactComponent as Github } from \"/static/images/github.svg\"\nimport throttle from \"lodash/throttle\"\nimport { StaticImage } from \"gatsby-plugin-image\"\n\nconst Navigation = () => {\n const [showNavigation, setShowNavigation] = useState(true)\n const [prevScrollPos, setPrevScrollPos] = useState(0)\n\n useEffect(() => {\n const handleScroll = throttle(() => {\n const currentScrollPos = window.scrollY\n\n if (prevScrollPos > currentScrollPos) {\n setShowNavigation(true)\n } else {\n setShowNavigation(false)\n }\n\n setPrevScrollPos(currentScrollPos)\n }, 300)\n\n if (typeof window !== \"undefined\") {\n setPrevScrollPos(window.scrollY)\n window.addEventListener(\"scroll\", handleScroll)\n }\n\n return () => {\n if (typeof window !== \"undefined\") {\n window.removeEventListener(\"scroll\", handleScroll)\n }\n }\n }, [prevScrollPos])\n\n return (\n \n )\n}\n\nexport default Navigation\n","// extracted by mini-css-extract-plugin\nexport var hide = \"navigation-module--hide--a9821\";\nexport var icon = \"navigation-module--icon--bf065\";\nexport var inner = \"navigation-module--inner--e3a96\";\nexport var logo = \"navigation-module--logo--ffe4d\";\nexport var wrapper = \"navigation-module--wrapper--2382f\";","import * as React from \"react\"\nimport Navigation from \"../@layout/navigation\"\n\nconst Layout = ({ location, children }) => {\n const rootPath = `${__PATH_PREFIX__}`\n const isRootPath = location.pathname === rootPath\n\n return (\n
\n
\n \n
\n {children}\n
\n © {new Date().getFullYear()}, Built with\n {` `}\n Gatsby\n
\n
\n )\n}\n\nexport default Layout\n","/**\n * SEO component that queries for data with\n * Gatsby's useStaticQuery React hook\n *\n * See: https://www.gatsbyjs.com/docs/how-to/querying-data/use-static-query/\n */\n\nimport * as React from \"react\"\nimport { useStaticQuery, graphql } from \"gatsby\"\n\nconst Seo = ({ description, title, children }) => {\n const { site } = useStaticQuery(\n graphql`\n query {\n site {\n siteMetadata {\n title\n description\n social {\n twitter\n }\n }\n }\n }\n `\n )\n\n const metaDescription = description || site.siteMetadata.description\n const defaultTitle = site.siteMetadata?.title\n\n return (\n <>\n {defaultTitle ? `${title} | ${defaultTitle}` : title}\n \n \n \n \n \n \n \n \n {children}\n \n )\n}\n\nexport default Seo\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nconst MotionConfigContext = createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n","import { createContext } from 'react';\n\nconst MotionContext = createContext({});\n\nexport { MotionContext };\n","import { createContext } from 'react';\n\nconst LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\n","function isRefObject(ref) {\n return (typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n\nexport { isRefObject };\n","/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || Array.isArray(v);\n}\n\nexport { isVariantLabel };\n","function isAnimationControls(v) {\n return typeof v === \"object\" && typeof v.start === \"function\";\n}\n\nexport { isAnimationControls };\n","const variantPriorityOrder = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\",\n];\nconst variantProps = [\"initial\", ...variantPriorityOrder];\n\nexport { variantPriorityOrder, variantProps };\n","import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n return (isAnimationControls(props.animate) ||\n variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n","import { useContext, useMemo } from 'react';\nimport { MotionContext } from './index.mjs';\nimport { getCurrentTreeVariants } from './utils.mjs';\n\nfunction useCreateMotionContext(props) {\n const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext));\n return useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n","import { isVariantLabel } from '../../render/utils/is-variant-label.mjs';\nimport { isControllingVariants } from '../../render/utils/is-controlling-variants.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n if (isControllingVariants(props)) {\n const { initial, animate } = props;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n","const featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\",\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n};\nconst featureDefinitions = {};\nfor (const key in featureProps) {\n featureDefinitions[key] = {\n isEnabled: (props) => featureProps[key].some((name) => !!props[name]),\n };\n}\n\nexport { featureDefinitions };\n","import { createContext } from 'react';\n\n/**\n * Internal, exported only for usage in Framer\n */\nconst SwitchLayoutGroupContext = createContext({});\n\nexport { SwitchLayoutGroupContext };\n","const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\");\n\nexport { motionComponentSymbol };\n","import * as React from 'react';\nimport { forwardRef, useContext } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { loadFeatures } from './features/load-features.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { LazyContext } from '../context/LazyContext.mjs';\nimport { SwitchLayoutGroupContext } from '../context/SwitchLayoutGroupContext.mjs';\nimport { motionComponentSymbol } from './utils/symbol.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nfunction createMotionComponent({ preloadedFeatures, createVisualElement, useRender, useVisualState, Component, }) {\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout;\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n };\n const { isStatic } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState(props, isStatic);\n if (!isStatic && isBrowser) {\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement);\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext);\n const isStrict = useContext(LazyContext).strict;\n if (context.visualElement) {\n MeasureLayout = context.visualElement.loadFeatures(\n // Note: Pass the full new combined props to correctly re-render dynamic feature components.\n configAndProps, isStrict, preloadedFeatures, initialLayoutGroupConfig);\n }\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (React.createElement(MotionContext.Provider, { value: context },\n MeasureLayout && context.visualElement ? (React.createElement(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null,\n useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)));\n }\n const ForwardRefComponent = forwardRef(MotionComponent);\n ForwardRefComponent[motionComponentSymbol] = Component;\n return ForwardRefComponent;\n}\nfunction useLayoutId({ layoutId }) {\n const layoutGroupId = useContext(LayoutGroupContext).id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\n\nexport { createMotionComponent };\n","import { featureDefinitions } from './definitions.mjs';\n\nfunction loadFeatures(features) {\n for (const key in features) {\n featureDefinitions[key] = {\n ...featureDefinitions[key],\n ...features[key],\n };\n }\n}\n\nexport { loadFeatures };\n","import { useContext, useRef, useInsertionEffect, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\n\nfunction useVisualElement(Component, visualState, props, createVisualElement) {\n const { visualElement: parent } = useContext(MotionContext);\n const lazyContext = useContext(LazyContext);\n const presenceContext = useContext(PresenceContext);\n const reducedMotionConfig = useContext(MotionConfigContext).reducedMotion;\n const visualElementRef = useRef();\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n createVisualElement = createVisualElement || lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState,\n parent,\n props,\n presenceContext,\n blockInitialAnimation: presenceContext\n ? presenceContext.initial === false\n : false,\n reducedMotionConfig,\n });\n }\n const visualElement = visualElementRef.current;\n useInsertionEffect(() => {\n visualElement && visualElement.update(props, presenceContext);\n });\n /**\n * Cache this value as we want to know whether HandoffAppearAnimations\n * was present on initial render - it will be deleted after this.\n */\n const canHandoff = useRef(Boolean(window.HandoffAppearAnimations));\n useIsomorphicLayoutEffect(() => {\n if (!visualElement)\n return;\n visualElement.render();\n /**\n * Ideally this function would always run in a useEffect.\n *\n * However, if we have optimised appear animations to handoff from,\n * it needs to happen synchronously to ensure there's no flash of\n * incorrect styles in the event of a hydration error.\n *\n * So if we detect a situtation where optimised appear animations\n * are running, we use useLayoutEffect to trigger animations.\n */\n if (canHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n });\n useEffect(() => {\n if (!visualElement)\n return;\n visualElement.updateFeatures();\n if (!canHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n /**\n * Once we've handed off animations we can delete HandoffAppearAnimations\n * so components added after the initial render can animate changes\n * in useEffect vs useLayoutEffect.\n */\n window.HandoffAppearAnimations = undefined;\n canHandoff.current = false;\n });\n return visualElement;\n}\n\nexport { useVisualElement };\n","import { useCallback } from 'react';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nfunction useMotionRef(visualState, visualElement, externalRef) {\n return useCallback((instance) => {\n instance && visualState.mount && visualState.mount(instance);\n if (visualElement) {\n instance\n ? visualElement.mount(instance)\n : visualElement.unmount();\n }\n if (externalRef) {\n if (typeof externalRef === \"function\") {\n externalRef(instance);\n }\n else if (isRefObject(externalRef)) {\n externalRef.current = instance;\n }\n }\n }, \n /**\n * Only pass a new ref callback to React if we've received a visual element\n * factory. Otherwise we'll be mounting/remounting every time externalRef\n * or other dependencies change.\n */\n [visualElement]);\n}\n\nexport { useMotionRef };\n","import { createMotionComponent } from '../../motion/index.mjs';\n\n/**\n * Convert any React component into a `motion` component. The provided component\n * **must** use `React.forwardRef` to the underlying DOM component you want to animate.\n *\n * ```jsx\n * const Component = React.forwardRef((props, ref) => {\n * return
\n * })\n *\n * const MotionComponent = motion(Component)\n * ```\n *\n * @public\n */\nfunction createMotionProxy(createConfig) {\n function custom(Component, customMotionComponentConfig = {}) {\n return createMotionComponent(createConfig(Component, customMotionComponentConfig));\n }\n if (typeof Proxy === \"undefined\") {\n return custom;\n }\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n const componentCache = new Map();\n return new Proxy(custom, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: (_target, key) => {\n /**\n * If this element doesn't exist in the component cache, create it and cache.\n */\n if (!componentCache.has(key)) {\n componentCache.set(key, custom(key));\n }\n return componentCache.get(key);\n },\n });\n}\n\nexport { createMotionProxy };\n","/**\n * We keep these listed seperately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nconst lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"switch\",\n \"symbol\",\n \"svg\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n];\n\nexport { lowercaseSVGElements };\n","import { lowercaseSVGElements } from '../../svg/lowercase-elements.mjs';\n\nfunction isSVGComponent(Component) {\n if (\n /**\n * If it's not a string, it's a custom React component. Currently we only support\n * HTML custom React components.\n */\n typeof Component !== \"string\" ||\n /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component.includes(\"-\")) {\n return false;\n }\n else if (\n /**\n * If it's in our list of lowercase SVG tags, it's an SVG component\n */\n lowercaseSVGElements.indexOf(Component) > -1 ||\n /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/.test(Component)) {\n return true;\n }\n return false;\n}\n\nexport { isSVGComponent };\n","const scaleCorrectors = {};\nfunction addScaleCorrector(correctors) {\n Object.assign(scaleCorrectors, correctors);\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n","/**\n * Generate a list of every possible transform key.\n */\nconst transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n */\nconst transformProps = new Set(transformPropOrder);\n\nexport { transformPropOrder, transformProps };\n","import { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nimport { transformProps } from '../../render/html/utils/transform.mjs';\n\nfunction isForcedMotionValue(key, { layout, layoutId }) {\n return (transformProps.has(key) ||\n key.startsWith(\"origin\") ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue };\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\n","import { transformPropOrder } from './transform.mjs';\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(transform, { enableHardwareAcceleration = true, allowTransformNone = true, }, transformIsDefault, transformTemplate) {\n // The transform string we're going to build into.\n let transformString = \"\";\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n if (transform[key] !== undefined) {\n const transformName = translateAlias[key] || key;\n transformString += `${transformName}(${transform[key]}) `;\n }\n }\n if (enableHardwareAcceleration && !transform.z) {\n transformString += \"translateZ(0)\";\n }\n transformString = transformString.trim();\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n }\n else if (allowTransformNone && transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n\nexport { buildTransform };\n","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = checkStringStartsWith(\"--\");\nconst isCSSVariableToken = checkStringStartsWith(\"var(--\");\nconst cssVariableRegex = /var\\s*\\(\\s*--[\\w-]+(\\s*,\\s*(?:(?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)+)?\\s*\\)/g;\n\nexport { cssVariableRegex, isCSSVariableName, isCSSVariableToken };\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nconst getValueAsType = (value, type) => {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n\nexport { getValueAsType };\n","const clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nexport { clamp };\n","import { clamp } from '../../../utils/clamp.mjs';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n","/**\n * TODO: When we move from string as a source of truth to data models\n * everything in this folder should probably be referred to as models vs types\n */\n// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\nconst floatRegex = /(-)?([\\d]*\\.?[\\d])+/g;\nconst colorRegex = /(#[0-9a-f]{3,8}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2}(-?[\\d\\.]+%?)\\s*[\\,\\/]?\\s*[\\d\\.]*%?\\))/gi;\nconst singleColorRegex = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2}(-?[\\d\\.]+%?)\\s*[\\,\\/]?\\s*[\\d\\.]*%?\\))$/i;\nfunction isString(v) {\n return typeof v === \"string\";\n}\n\nexport { colorRegex, floatRegex, isString, sanitize, singleColorRegex };\n","import { isString } from '../utils.mjs';\n\nconst createUnitType = (unit) => ({\n test: (v) => isString(v) && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = createUnitType(\"deg\");\nconst percent = createUnitType(\"%\");\nconst px = createUnitType(\"px\");\nconst vh = createUnitType(\"vh\");\nconst vw = createUnitType(\"vw\");\nconst progressPercentage = {\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n};\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n","import { number } from '../../../value/types/numbers/index.mjs';\n\nconst int = {\n ...number,\n transform: Math.round,\n};\n\nexport { int };\n","import { scale, alpha } from '../../../value/types/numbers/index.mjs';\nimport { px, degrees, progressPercentage } from '../../../value/types/numbers/units.mjs';\nimport { int } from './type-int.mjs';\n\nconst numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n radius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n size: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n // Transform props\n rotate: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n // Misc\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n","import { buildTransform } from './build-transform.mjs';\nimport { isCSSVariableName } from '../../dom/utils/is-css-variable.mjs';\nimport { transformProps } from './transform.mjs';\nimport { getValueAsType } from '../../dom/value-types/get-as-type.mjs';\nimport { numberValueTypes } from '../../dom/value-types/number.mjs';\n\nfunction buildHTMLStyles(state, latestValues, options, transformTemplate) {\n const { style, vars, transform, transformOrigin } = state;\n // Track whether we encounter any transform or transformOrigin values.\n let hasTransform = false;\n let hasTransformOrigin = false;\n // Does the calculated transform essentially equal \"none\"?\n let transformIsNone = true;\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept seperately for further processing.\n */\n for (const key in latestValues) {\n const value = latestValues[key];\n /**\n * If this is a CSS variable we don't do any further processing.\n */\n if (isCSSVariableName(key)) {\n vars[key] = value;\n continue;\n }\n // Convert the value to its default value type, ie 0 -> \"0px\"\n const valueType = numberValueTypes[key];\n const valueAsType = getValueAsType(value, valueType);\n if (transformProps.has(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n transform[key] = valueAsType;\n // If we already know we have a non-default transform, early return\n if (!transformIsNone)\n continue;\n // Otherwise check to see if this is a default transform\n if (value !== (valueType.default || 0))\n transformIsNone = false;\n }\n else if (key.startsWith(\"origin\")) {\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n transformOrigin[key] = valueAsType;\n }\n else {\n style[key] = valueAsType;\n }\n }\n if (!latestValues.transform) {\n if (hasTransform || transformTemplate) {\n style.transform = buildTransform(state.transform, options, transformIsNone, transformTemplate);\n }\n else if (style.transform) {\n /**\n * If we have previously created a transform but currently don't have any,\n * reset transform style to none.\n */\n style.transform = \"none\";\n }\n }\n /**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n if (hasTransformOrigin) {\n const { originX = \"50%\", originY = \"50%\", originZ = 0, } = transformOrigin;\n style.transformOrigin = `${originX} ${originY} ${originZ}`;\n }\n}\n\nexport { buildHTMLStyles };\n","const createHtmlRenderState = () => ({\n style: {},\n transform: {},\n transformOrigin: {},\n vars: {},\n});\n\nexport { createHtmlRenderState };\n","import { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nfunction copyRawValuesOnly(target, source, props) {\n for (const key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues({ transformTemplate }, visualState, isStatic) {\n return useMemo(() => {\n const state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);\n return Object.assign({}, state.vars, state.style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState, isStatic) {\n const styleProp = props.style || {};\n const style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState, isStatic));\n return props.transformValues ? props.transformValues(style) : style;\n}\nfunction useHTMLProps(props, visualState, isStatic) {\n // The `any` isn't ideal but it is the type of createElement props argument\n const htmlProps = {};\n const style = useStyle(props, visualState, isStatic);\n if (props.drag && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false;\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\";\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : `pan-${props.drag === \"x\" ? \"y\" : \"x\"}`;\n }\n if (props.tabIndex === undefined &&\n (props.onTap || props.onTapStart || props.whileTap)) {\n htmlProps.tabIndex = 0;\n }\n htmlProps.style = style;\n return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps };\n","/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nconst validMotionProps = new Set([\n \"animate\",\n \"exit\",\n \"variants\",\n \"initial\",\n \"style\",\n \"values\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"transformValues\",\n \"custom\",\n \"inherit\",\n \"onLayoutAnimationStart\",\n \"onLayoutAnimationComplete\",\n \"onLayoutMeasure\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"_dragX\",\n \"_dragY\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"ignoreStrict\",\n \"viewport\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nfunction isValidMotionProp(key) {\n return (key.startsWith(\"while\") ||\n (key.startsWith(\"drag\") && key !== \"draggable\") ||\n key.startsWith(\"layout\") ||\n key.startsWith(\"onTap\") ||\n key.startsWith(\"onPan\") ||\n validMotionProps.has(key));\n}\n\nexport { isValidMotionProp };\n","import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nlet shouldForward = (key) => !isValidMotionProp(key);\nfunction loadExternalIsValidProp(isValidProp) {\n if (!isValidProp)\n return;\n // Explicitly filter our events\n shouldForward = (key) => key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n */\n loadExternalIsValidProp(require(\"@emotion/is-prop-valid\").default);\n}\ncatch (_a) {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n const filteredProps = {};\n for (const key in props) {\n /**\n * values is considered a valid prop by Emotion, so if it's present\n * this will be rendered out to the DOM unless explicitly filtered.\n *\n * We check the type as it could be used with the `feColorMatrix`\n * element, which we support.\n */\n if (key === \"values\" && typeof props.values === \"object\")\n continue;\n if (shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\"] && key.startsWith(\"onDrag\"))) {\n filteredProps[key] = props[key];\n }\n }\n return filteredProps;\n}\n\nexport { filterProps, loadExternalIsValidProp };\n","import { px } from '../../../value/types/numbers/units.mjs';\n\nfunction calcOrigin(origin, offset, size) {\n return typeof origin === \"string\"\n ? origin\n : px.transform(offset + size * origin);\n}\n/**\n * The SVG transform origin defaults are different to CSS and is less intuitive,\n * so we use the measured dimensions of the SVG to reconcile these.\n */\nfunction calcSVGTransformOrigin(dimensions, originX, originY) {\n const pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);\n const pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);\n return `${pxOriginX} ${pxOriginY}`;\n}\n\nexport { calcSVGTransformOrigin };\n","import { px } from '../../../value/types/numbers/units.mjs';\n\nconst dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nconst camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n */\nfunction buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n const keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = px.transform(-offset);\n // Build the dash array\n const pathLength = px.transform(length);\n const pathSpacing = px.transform(spacing);\n attrs[keys.array] = `${pathLength} ${pathSpacing}`;\n}\n\nexport { buildSVGPath };\n","import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { calcSVGTransformOrigin } from './transform-origin.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * Build SVG visual attrbutes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, originX, originY, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, options, isSVGTag, transformTemplate) {\n buildHTMLStyles(state, latest, options, transformTemplate);\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox;\n }\n return;\n }\n state.attrs = state.style;\n state.style = {};\n const { attrs, style, dimensions } = state;\n /**\n * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs\n * and copy it into style.\n */\n if (attrs.transform) {\n if (dimensions)\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n // Parse transformOrigin\n if (dimensions &&\n (originX !== undefined || originY !== undefined || style.transform)) {\n style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);\n }\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n if (attrScale !== undefined)\n attrs.scale = attrScale;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };\n","import { createHtmlRenderState } from '../../html/utils/create-render-state.mjs';\n\nconst createSvgRenderState = () => ({\n ...createHtmlRenderState(),\n attrs: {},\n});\n\nexport { createSvgRenderState };\n","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\n","import { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\n\nfunction useSVGProps(props, visualState, _isStatic, Component) {\n const visualProps = useMemo(() => {\n const state = createSvgRenderState();\n buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, isSVGTag(Component), props.transformTemplate);\n return {\n ...state.attrs,\n style: { ...state.style },\n };\n }, [visualState]);\n if (props.style) {\n const rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = { ...rawStyles, ...visualProps.style };\n }\n return visualProps;\n}\n\nexport { useSVGProps };\n","import { useMemo, createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.mjs';\nimport { filterProps } from './utils/filter-props.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\nimport { useSVGProps } from '../svg/use-props.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction createUseRender(forwardMotionProps = false) {\n const useRender = (Component, props, ref, { latestValues }, isStatic) => {\n const useVisualProps = isSVGComponent(Component)\n ? useSVGProps\n : useHTMLProps;\n const visualProps = useVisualProps(props, latestValues, isStatic, Component);\n const filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n const elementProps = {\n ...filteredProps,\n ...visualProps,\n ref,\n };\n /**\n * If component has been handed a motion value as its child,\n * memoise its initial value and render that. Subsequent updates\n * will be handled by the onChange handler\n */\n const { children } = props;\n const renderedChildren = useMemo(() => (isMotionValue(children) ? children.get() : children), [children]);\n return createElement(Component, {\n ...elementProps,\n children: renderedChildren,\n });\n };\n return useRender;\n}\n\nexport { createUseRender };\n","/**\n * Convert camelCase to dash-case properties.\n */\nconst camelToDash = (str) => str.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n\nexport { camelToDash };\n","function renderHTML(element, { style, vars }, styleProp, projection) {\n Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));\n // Loop over any CSS variables and assign those.\n for (const key in vars) {\n element.style.setProperty(key, vars[key]);\n }\n}\n\nexport { renderHTML };\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nconst camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n \"startOffset\",\n \"textLength\",\n \"lengthAdjust\",\n]);\n\nexport { camelCaseAttributes };\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState, _styleProp, projection) {\n renderHTML(element, renderState, undefined, projection);\n for (const key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\nexport { renderSVG };\n","import { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps) {\n const { style } = props;\n const newValues = {};\n for (const key in style) {\n if (isMotionValue(style[key]) ||\n (prevProps.style && isMotionValue(prevProps.style[key])) ||\n isForcedMotionValue(key, props)) {\n newValues[key] = style[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\nimport { transformPropOrder } from '../../html/utils/transform.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps) {\n const newValues = scrapeMotionValuesFromProps$1(props, prevProps);\n for (const key in props) {\n if (isMotionValue(props[key]) || isMotionValue(prevProps[key])) {\n const targetKey = transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","function resolveVariantFromProps(props, definition, custom, currentValues = {}, currentVelocity = {}) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n definition = definition(custom !== undefined ? custom : props.custom, currentValues, currentVelocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n definition = definition(custom !== undefined ? custom : props.custom, currentValues, currentVelocity);\n }\n return definition;\n}\n\nexport { resolveVariantFromProps };\n","const isKeyframesTarget = (v) => {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n","import { isKeyframesTarget } from '../animation/utils/is-keyframes-target.mjs';\n\nconst isCustomValue = (v) => {\n return Boolean(v && typeof v === \"object\" && v.mix && v.toValue);\n};\nconst resolveFinalValueInKeyframes = (v) => {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n};\n\nexport { isCustomValue, resolveFinalValueInKeyframes };\n","import { isCustomValue } from '../../utils/resolve-value.mjs';\nimport { isMotionValue } from './is-motion-value.mjs';\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n *\n * TODO: Remove and move to library\n */\nfunction resolveMotionValue(value) {\n const unwrappedValue = isMotionValue(value) ? value.get() : value;\n return isCustomValue(unwrappedValue)\n ? unwrappedValue.toValue()\n : unwrappedValue;\n}\n\nexport { resolveMotionValue };\n","import { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { resolveVariantFromProps } from '../../render/utils/resolve-variants.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { isControllingVariants, isVariantNode } from '../../render/utils/is-controlling-variants.mjs';\n\nfunction makeState({ scrapeMotionValuesFromProps, createRenderState, onMount, }, props, context, presenceContext) {\n const state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n if (onMount) {\n state.mount = (instance) => onMount(props, instance, state);\n }\n return state;\n}\nconst makeUseVisualState = (config) => (props, isStatic) => {\n const context = useContext(MotionContext);\n const presenceContext = useContext(PresenceContext);\n const make = () => makeState(config, props, context, presenceContext);\n return isStatic ? make() : useConstant(make);\n};\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n const values = {};\n const motionValues = scrapeMotionValues(props, {});\n for (const key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n let { initial, animate } = props;\n const isControllingVariants$1 = isControllingVariants(props);\n const isVariantNode$1 = isVariantNode(props);\n if (context &&\n isVariantNode$1 &&\n !isControllingVariants$1 &&\n props.inherit !== false) {\n if (initial === undefined)\n initial = context.initial;\n if (animate === undefined)\n animate = context.animate;\n }\n let isInitialAnimationBlocked = presenceContext\n ? presenceContext.initial === false\n : false;\n isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;\n const variantToSet = isInitialAnimationBlocked ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n list.forEach((definition) => {\n const resolved = resolveVariantFromProps(props, definition);\n if (!resolved)\n return;\n const { transitionEnd, transition, ...target } = resolved;\n for (const key in target) {\n let valueTarget = target[key];\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n const index = isInitialAnimationBlocked\n ? valueTarget.length - 1\n : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (const key in transitionEnd)\n values[key] = transitionEnd[key];\n });\n }\n return values;\n}\n\nexport { makeUseVisualState };\n","import { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst svgMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n onMount: (props, instance, { renderState, latestValues }) => {\n frame.read(() => {\n try {\n renderState.dimensions =\n typeof instance.getBBox ===\n \"function\"\n ? instance.getBBox()\n : instance.getBoundingClientRect();\n }\n catch (e) {\n // Most likely trying to measure an unrendered element under Firefox\n renderState.dimensions = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n });\n frame.render(() => {\n buildSVGAttrs(renderState, latestValues, { enableHardwareAcceleration: false }, isSVGTag(instance.tagName), props.transformTemplate);\n renderSVG(instance, renderState);\n });\n },\n }),\n};\n\nexport { svgMotionConfig };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nconst htmlMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n }),\n};\n\nexport { htmlMotionConfig };\n","function addDomEvent(target, eventName, handler, options = { passive: true }) {\n target.addEventListener(eventName, handler, options);\n return () => target.removeEventListener(eventName, handler);\n}\n\nexport { addDomEvent };\n","const isPrimaryPointer = (event) => {\n if (event.pointerType === \"mouse\") {\n return typeof event.button !== \"number\" || event.button <= 0;\n }\n else {\n /**\n * isPrimary is true for all mice buttons, whereas every touch point\n * is regarded as its own input. So subsequent concurrent touch points\n * will be false.\n *\n * Specifically match against false here as incomplete versions of\n * PointerEvents in very old browser might have it set as undefined.\n */\n return event.isPrimary !== false;\n }\n};\n\nexport { isPrimaryPointer };\n","import { isPrimaryPointer } from './utils/is-primary-pointer.mjs';\n\nfunction extractEventInfo(event, pointType = \"page\") {\n return {\n point: {\n x: event[pointType + \"X\"],\n y: event[pointType + \"Y\"],\n },\n };\n}\nconst addPointerInfo = (handler) => {\n return (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event));\n};\n\nexport { addPointerInfo, extractEventInfo };\n","import { addDomEvent } from './add-dom-event.mjs';\nimport { addPointerInfo } from './event-info.mjs';\n\nfunction addPointerEvent(target, eventName, handler, options) {\n return addDomEvent(target, eventName, addPointerInfo(handler), options);\n}\n\nexport { addPointerEvent };\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\n","function createLock(name) {\n let lock = null;\n return () => {\n const openLock = () => {\n lock = null;\n };\n if (lock === null) {\n lock = name;\n return openLock;\n }\n return false;\n };\n}\nconst globalHorizontalLock = createLock(\"dragHorizontal\");\nconst globalVerticalLock = createLock(\"dragVertical\");\nfunction getGlobalLock(drag) {\n let lock = false;\n if (drag === \"y\") {\n lock = globalVerticalLock();\n }\n else if (drag === \"x\") {\n lock = globalHorizontalLock();\n }\n else {\n const openHorizontal = globalHorizontalLock();\n const openVertical = globalVerticalLock();\n if (openHorizontal && openVertical) {\n lock = () => {\n openHorizontal();\n openVertical();\n };\n }\n else {\n // Release the locks because we don't use them\n if (openHorizontal)\n openHorizontal();\n if (openVertical)\n openVertical();\n }\n }\n return lock;\n}\nfunction isDragActive() {\n // Check the gesture lock - if we get it, it means no drag gesture is active\n // and we can safely fire the tap gesture.\n const openGestureLock = getGlobalLock(true);\n if (!openGestureLock)\n return true;\n openGestureLock();\n return false;\n}\n\nexport { createLock, getGlobalLock, isDragActive };\n","class Feature {\n constructor(node) {\n this.isMounted = false;\n this.node = node;\n }\n update() { }\n}\n\nexport { Feature };\n","import { addPointerEvent } from '../events/add-pointer-event.mjs';\nimport { pipe } from '../utils/pipe.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction addHoverEvent(node, isActive) {\n const eventName = \"pointer\" + (isActive ? \"enter\" : \"leave\");\n const callbackName = \"onHover\" + (isActive ? \"Start\" : \"End\");\n const handleEvent = (event, info) => {\n if (event.type === \"touch\" || isDragActive())\n return;\n const props = node.getProps();\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", isActive);\n }\n if (props[callbackName]) {\n frame.update(() => props[callbackName](event, info));\n }\n };\n return addPointerEvent(node.current, eventName, handleEvent, {\n passive: !node.getProps()[callbackName],\n });\n}\nclass HoverGesture extends Feature {\n mount() {\n this.unmount = pipe(addHoverEvent(this.node, true), addHoverEvent(this.node, false));\n }\n unmount() { }\n}\n\nexport { HoverGesture };\n","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nconst isNodeOrChild = (parent, child) => {\n if (!child) {\n return false;\n }\n else if (parent === child) {\n return true;\n }\n else {\n return isNodeOrChild(parent, child.parentElement);\n }\n};\n\nexport { isNodeOrChild };\n","import { extractEventInfo } from '../events/event-info.mjs';\nimport { addDomEvent } from '../events/add-dom-event.mjs';\nimport { addPointerEvent } from '../events/add-pointer-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { pipe } from '../utils/pipe.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\nimport { isNodeOrChild } from './utils/is-node-or-child.mjs';\nimport { noop } from '../utils/noop.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction fireSyntheticPointerEvent(name, handler) {\n if (!handler)\n return;\n const syntheticPointerEvent = new PointerEvent(\"pointer\" + name);\n handler(syntheticPointerEvent, extractEventInfo(syntheticPointerEvent));\n}\nclass PressGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removeStartListeners = noop;\n this.removeEndListeners = noop;\n this.removeAccessibleListeners = noop;\n this.startPointerPress = (startEvent, startInfo) => {\n this.removeEndListeners();\n if (this.isPressing)\n return;\n const props = this.node.getProps();\n const endPointerPress = (endEvent, endInfo) => {\n if (!this.checkPressEnd())\n return;\n const { onTap, onTapCancel } = this.node.getProps();\n frame.update(() => {\n /**\n * We only count this as a tap gesture if the event.target is the same\n * as, or a child of, this component's element\n */\n !isNodeOrChild(this.node.current, endEvent.target)\n ? onTapCancel && onTapCancel(endEvent, endInfo)\n : onTap && onTap(endEvent, endInfo);\n });\n };\n const removePointerUpListener = addPointerEvent(window, \"pointerup\", endPointerPress, { passive: !(props.onTap || props[\"onPointerUp\"]) });\n const removePointerCancelListener = addPointerEvent(window, \"pointercancel\", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo), { passive: !(props.onTapCancel || props[\"onPointerCancel\"]) });\n this.removeEndListeners = pipe(removePointerUpListener, removePointerCancelListener);\n this.startPress(startEvent, startInfo);\n };\n this.startAccessiblePress = () => {\n const handleKeydown = (keydownEvent) => {\n if (keydownEvent.key !== \"Enter\" || this.isPressing)\n return;\n const handleKeyup = (keyupEvent) => {\n if (keyupEvent.key !== \"Enter\" || !this.checkPressEnd())\n return;\n fireSyntheticPointerEvent(\"up\", (event, info) => {\n const { onTap } = this.node.getProps();\n if (onTap) {\n frame.update(() => onTap(event, info));\n }\n });\n };\n this.removeEndListeners();\n this.removeEndListeners = addDomEvent(this.node.current, \"keyup\", handleKeyup);\n fireSyntheticPointerEvent(\"down\", (event, info) => {\n this.startPress(event, info);\n });\n };\n const removeKeydownListener = addDomEvent(this.node.current, \"keydown\", handleKeydown);\n const handleBlur = () => {\n if (!this.isPressing)\n return;\n fireSyntheticPointerEvent(\"cancel\", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo));\n };\n const removeBlurListener = addDomEvent(this.node.current, \"blur\", handleBlur);\n this.removeAccessibleListeners = pipe(removeKeydownListener, removeBlurListener);\n };\n }\n startPress(event, info) {\n this.isPressing = true;\n const { onTapStart, whileTap } = this.node.getProps();\n /**\n * Ensure we trigger animations before firing event callback\n */\n if (whileTap && this.node.animationState) {\n this.node.animationState.setActive(\"whileTap\", true);\n }\n if (onTapStart) {\n frame.update(() => onTapStart(event, info));\n }\n }\n checkPressEnd() {\n this.removeEndListeners();\n this.isPressing = false;\n const props = this.node.getProps();\n if (props.whileTap && this.node.animationState) {\n this.node.animationState.setActive(\"whileTap\", false);\n }\n return !isDragActive();\n }\n cancelPress(event, info) {\n if (!this.checkPressEnd())\n return;\n const { onTapCancel } = this.node.getProps();\n if (onTapCancel) {\n frame.update(() => onTapCancel(event, info));\n }\n }\n mount() {\n const props = this.node.getProps();\n const removePointerListener = addPointerEvent(this.node.current, \"pointerdown\", this.startPointerPress, { passive: !(props.onTapStart || props[\"onPointerStart\"]) });\n const removeFocusListener = addDomEvent(this.node.current, \"focus\", this.startAccessiblePress);\n this.removeStartListeners = pipe(removePointerListener, removeFocusListener);\n }\n unmount() {\n this.removeStartListeners();\n this.removeEndListeners();\n this.removeAccessibleListeners();\n }\n}\n\nexport { PressGesture };\n","/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap();\nconst fireObserverCallback = (entry) => {\n const callback = observerCallbacks.get(entry.target);\n callback && callback(entry);\n};\nconst fireAllObserverCallbacks = (entries) => {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver({ root, ...options }) {\n const lookupRoot = root || document;\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n const rootObservers = observers.get(lookupRoot);\n const key = JSON.stringify(options);\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n const rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return () => {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\nexport { observeIntersection };\n","import { Feature } from '../Feature.mjs';\nimport { observeIntersection } from './observers.mjs';\n\nconst thresholdNames = {\n some: 0,\n all: 1,\n};\nclass InViewFeature extends Feature {\n constructor() {\n super(...arguments);\n this.hasEnteredView = false;\n this.isInView = false;\n }\n startObserver() {\n this.unmount();\n const { viewport = {} } = this.node.getProps();\n const { root, margin: rootMargin, amount = \"some\", once } = viewport;\n const options = {\n root: root ? root.current : undefined,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n const onIntersectionUpdate = (entry) => {\n const { isIntersecting } = entry;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (this.isInView === isIntersecting)\n return;\n this.isInView = isIntersecting;\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && this.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n this.hasEnteredView = true;\n }\n if (this.node.animationState) {\n this.node.animationState.setActive(\"whileInView\", isIntersecting);\n }\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n const { onViewportEnter, onViewportLeave } = this.node.getProps();\n const callback = isIntersecting ? onViewportEnter : onViewportLeave;\n callback && callback(entry);\n };\n return observeIntersection(this.node.current, options, onIntersectionUpdate);\n }\n mount() {\n this.startObserver();\n }\n update() {\n if (typeof IntersectionObserver === \"undefined\")\n return;\n const { props, prevProps } = this.node;\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(hasViewportOptionChanged(props, prevProps));\n if (hasOptionsChanged) {\n this.startObserver();\n }\n }\n unmount() { }\n}\nfunction hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {\n return (name) => viewport[name] !== prevViewport[name];\n}\n\nexport { InViewFeature };\n","import { HoverGesture } from '../../gestures/hover.mjs';\nimport { FocusGesture } from '../../gestures/focus.mjs';\nimport { PressGesture } from '../../gestures/press.mjs';\nimport { InViewFeature } from './viewport/index.mjs';\n\nconst gestureAnimations = {\n inView: {\n Feature: InViewFeature,\n },\n tap: {\n Feature: PressGesture,\n },\n focus: {\n Feature: FocusGesture,\n },\n hover: {\n Feature: HoverGesture,\n },\n};\n\nexport { gestureAnimations };\n","import { addDomEvent } from '../events/add-dom-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { pipe } from '../utils/pipe.mjs';\n\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n\nexport { FocusGesture };\n","function shallowCompare(next, prev) {\n if (!Array.isArray(prev))\n return false;\n const prevLength = prev.length;\n if (prevLength !== next.length)\n return false;\n for (let i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i])\n return false;\n }\n return true;\n}\n\nexport { shallowCompare };\n","import { resolveVariantFromProps } from './resolve-variants.mjs';\n\n/**\n * Creates an object containing the latest state of every MotionValue on a VisualElement\n */\nfunction getCurrent(visualElement) {\n const current = {};\n visualElement.values.forEach((value, key) => (current[key] = value.get()));\n return current;\n}\n/**\n * Creates an object containing the latest velocity of every MotionValue on a VisualElement\n */\nfunction getVelocity(visualElement) {\n const velocity = {};\n visualElement.values.forEach((value, key) => (velocity[key] = value.getVelocity()));\n return velocity;\n}\nfunction resolveVariant(visualElement, definition, custom) {\n const props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, getCurrent(visualElement), getVelocity(visualElement));\n}\n\nexport { resolveVariant };\n","import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\n\nconst optimizedAppearDataId = \"framerAppearId\";\nconst optimizedAppearDataAttribute = \"data-\" + camelToDash(optimizedAppearDataId);\n\nexport { optimizedAppearDataAttribute, optimizedAppearDataId };\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n","const instantAnimationState = {\n current: false,\n};\n\nexport { instantAnimationState };\n","const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n","import { isBezierDefinition } from '../../../easing/utils/is-bezier-definition.mjs';\n\nfunction isWaapiSupportedEasing(easing) {\n return Boolean(!easing ||\n (typeof easing === \"string\" && supportedWaapiEasing[easing]) ||\n isBezierDefinition(easing) ||\n (Array.isArray(easing) && easing.every(isWaapiSupportedEasing)));\n}\nconst cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\nconst supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\nfunction mapEasingToNativeEasing(easing) {\n if (!easing)\n return undefined;\n return isBezierDefinition(easing)\n ? cubicBezierAsString(easing)\n : Array.isArray(easing)\n ? easing.map(mapEasingToNativeEasing)\n : supportedWaapiEasing[easing];\n}\n\nexport { cubicBezierAsString, isWaapiSupportedEasing, mapEasingToNativeEasing, supportedWaapiEasing };\n","import { noop } from '../utils/noop.mjs';\n\n/*\n Bezier function generator\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticiably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0.0) {\n upperBound = currentT;\n }\n else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2)\n return noop;\n const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n // If animation is at start/end, return t without easing\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n","import { cubicBezier } from './cubic-bezier.mjs';\n\nconst easeIn = cubicBezier(0.42, 0, 1, 1);\nconst easeOut = cubicBezier(0, 0, 0.58, 1);\nconst easeInOut = cubicBezier(0.42, 0, 0.58, 1);\n\nexport { easeIn, easeInOut, easeOut };\n","const isEasingArray = (ease) => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\n","// Accepts an easing function and returns a new one that outputs mirrored values for\n// the second half of the animation. Turns easeIn into easeInOut.\nconst mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\nexport { mirrorEasing };\n","// Accepts an easing function and returns a new one that outputs reversed values.\n// Turns easeIn into easeOut.\nconst reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\nexport { reverseEasing };\n","import { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst circIn = (p) => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circOut);\n\nexport { circIn, circInOut, circOut };\n","import { cubicBezier } from './cubic-bezier.mjs';\nimport { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst backOut = cubicBezier(0.33, 1.53, 0.69, 0.99);\nconst backIn = reverseEasing(backOut);\nconst backInOut = mirrorEasing(backIn);\n\nexport { backIn, backInOut, backOut };\n","import { invariant } from '../../utils/errors.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { easeIn, easeInOut, easeOut } from '../ease.mjs';\nimport { circIn, circInOut, circOut } from '../circ.mjs';\nimport { backIn, backInOut, backOut } from '../back.mjs';\nimport { anticipate } from '../anticipate.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst easingDefinitionToFunction = (definition) => {\n if (Array.isArray(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`);\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (typeof definition === \"string\") {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`);\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n","import { backIn } from './back.mjs';\n\nconst anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n\nexport { anticipate };\n","import { isString, singleColorRegex, floatRegex } from '../utils.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((isString(v) && singleColorRegex.test(v) && v.startsWith(type)) ||\n (testProp && Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (!isString(v))\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n","import { clamp } from '../../../utils/clamp.mjs';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: isColorString(\"rgb\", \"red\"),\n parse: splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\",\n};\n\nexport { rgbUnit, rgba };\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst hsla = {\n test: isColorString(\"hsl\", \"hue\"),\n parse: splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return (\"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\");\n },\n};\n\nexport { hsla };\n","import { isString } from '../utils.mjs';\nimport { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return isString(v)\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n};\n\nexport { color };\n","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mix = (from, to, progress) => -progress * from + progress * to + from;\n\nexport { mix };\n","// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n","import { mix } from './mix.mjs';\nimport { invariant } from './errors.mjs';\nimport { hslaToRgba } from './hsla-to-rgba.mjs';\nimport { hex } from '../value/types/color/hex.mjs';\nimport { rgba } from '../value/types/color/rgba.mjs';\nimport { hsla } from '../value/types/color/hsla.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n return Math.sqrt(Math.max(0, v * (to * to - fromExpo) + fromExpo));\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n invariant(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`);\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Framer Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mix(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n","import { cssVariableRegex } from '../../../render/dom/utils/is-css-variable.mjs';\nimport { noop } from '../../../utils/noop.mjs';\nimport { color } from '../color/index.mjs';\nimport { number } from '../numbers/index.mjs';\nimport { colorRegex, floatRegex, isString, sanitize } from '../utils.mjs';\n\nfunction test(v) {\n var _a, _b;\n return (isNaN(v) &&\n isString(v) &&\n (((_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) || 0) +\n (((_b = v.match(colorRegex)) === null || _b === void 0 ? void 0 : _b.length) || 0) >\n 0);\n}\nconst cssVarTokeniser = {\n regex: cssVariableRegex,\n countKey: \"Vars\",\n token: \"${v}\",\n parse: noop,\n};\nconst colorTokeniser = {\n regex: colorRegex,\n countKey: \"Colors\",\n token: \"${c}\",\n parse: color.parse,\n};\nconst numberTokeniser = {\n regex: floatRegex,\n countKey: \"Numbers\",\n token: \"${n}\",\n parse: number.parse,\n};\nfunction tokenise(info, { regex, countKey, token, parse }) {\n const matches = info.tokenised.match(regex);\n if (!matches)\n return;\n info[\"num\" + countKey] = matches.length;\n info.tokenised = info.tokenised.replace(regex, token);\n info.values.push(...matches.map(parse));\n}\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const info = {\n value: originalValue,\n tokenised: originalValue,\n values: [],\n numVars: 0,\n numColors: 0,\n numNumbers: 0,\n };\n if (info.value.includes(\"var(--\"))\n tokenise(info, cssVarTokeniser);\n tokenise(info, colorTokeniser);\n tokenise(info, numberTokeniser);\n return info;\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction createTransformer(source) {\n const { values, numColors, numVars, tokenised } = analyseComplexValue(source);\n const numValues = values.length;\n return (v) => {\n let output = tokenised;\n for (let i = 0; i < numValues; i++) {\n if (i < numVars) {\n output = output.replace(cssVarTokeniser.token, v[i]);\n }\n else if (i < numVars + numColors) {\n output = output.replace(colorTokeniser.token, color.transform(v[i]));\n }\n else {\n output = output.replace(numberTokeniser.token, sanitize(v[i]));\n }\n }\n return output;\n };\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : v;\nfunction getAnimatableNone(v) {\n const parsed = parseComplexValue(v);\n const transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n","import { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { pipe } from './pipe.mjs';\nimport { warning } from './errors.mjs';\nimport { color } from '../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../value/types/complex/index.mjs';\n\nconst mixImmediate = (origin, target) => (p) => `${p > 0 ? target : origin}`;\nfunction getMixer(origin, target) {\n if (typeof origin === \"number\") {\n return (v) => mix(origin, target, v);\n }\n else if (color.test(origin)) {\n return mixColor(origin, target);\n }\n else {\n return origin.startsWith(\"var(\")\n ? mixImmediate(origin, target)\n : mixComplex(origin, target);\n }\n}\nconst mixArray = (from, to) => {\n const output = [...from];\n const numValues = output.length;\n const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i]));\n return (v) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](v);\n }\n return output;\n };\n};\nconst mixObject = (origin, target) => {\n const output = { ...origin, ...target };\n const blendValue = {};\n for (const key in output) {\n if (origin[key] !== undefined && target[key] !== undefined) {\n blendValue[key] = getMixer(origin[key], target[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n};\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.numVars === targetStats.numVars &&\n originStats.numColors === targetStats.numColors &&\n originStats.numNumbers >= targetStats.numNumbers;\n if (canInterpolate) {\n return pipe(mixArray(originStats.values, targetStats.values), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);\n return mixImmediate(origin, target);\n }\n};\n\nexport { mixArray, mixComplex, mixObject };\n","/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n\n @param [number]: Lower limit\n @param [number]: Upper limit\n @param [number]: Value to find progress within given range\n @return [number]: Progress of value within range as expressed 0-1\n*/\nconst progress = (from, to, value) => {\n const toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\n","import { invariant } from './errors.mjs';\nimport { color } from '../value/types/color/index.mjs';\nimport { clamp } from './clamp.mjs';\nimport { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { mixComplex, mixArray, mixObject } from './mix-complex.mjs';\nimport { pipe } from './pipe.mjs';\nimport { progress } from './progress.mjs';\nimport { noop } from './noop.mjs';\n\nconst mixNumber = (from, to) => (p) => mix(from, to, p);\nfunction detectMixerFactory(v) {\n if (typeof v === \"number\") {\n return mixNumber;\n }\n else if (typeof v === \"string\") {\n return color.test(v) ? mixColor : mixComplex;\n }\n else if (Array.isArray(v)) {\n return mixArray;\n }\n else if (typeof v === \"object\") {\n return mixObject;\n }\n return mixNumber;\n}\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || detectMixerFactory(output[0]);\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revist this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n","import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\nexport { defaultOffset };\n","import { mix } from '../mix.mjs';\nimport { progress } from '../progress.mjs';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mix(min, 1, offsetProgress));\n }\n}\n\nexport { fillOffset };\n","import { easeInOut } from '../../easing/ease.mjs';\nimport { isEasingArray } from '../../easing/utils/is-easing-array.mjs';\nimport { easingDefinitionToFunction } from '../../easing/utils/map.mjs';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../../utils/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../../utils/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n","function convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\n","/*\n Convert velocity into velocity per second\n\n @param [number]: Unit per frame\n @param [number]: Frame duration in ms\n*/\nfunction velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n","import { velocityPerSecond } from '../../../utils/velocity-per-second.mjs';\n\nconst velocitySampleDuration = 5; // ms\nfunction calcGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { calcGeneratorVelocity };\n","import { warning } from '../../../utils/errors.mjs';\nimport { clamp } from '../../../utils/clamp.mjs';\nimport { secondsToMilliseconds, millisecondsToSeconds } from '../../../utils/time-conversion.mjs';\n\nconst safeMin = 0.001;\nconst minDuration = 0.01;\nconst maxDuration = 10.0;\nconst minDamping = 0.05;\nconst maxDamping = 1;\nfunction findSpring({ duration = 800, bounce = 0.25, velocity = 0, mass = 1, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(maxDuration), \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(minDamping, maxDamping, dampingRatio);\n duration = clamp(minDuration, maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: 100,\n damping: 10,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring, maxDamping, maxDuration, minDamping, minDuration };\n","import { millisecondsToSeconds } from '../../../utils/time-conversion.mjs';\nimport { calcGeneratorVelocity } from '../utils/velocity.mjs';\nimport { findSpring, calcAngularFreq } from './find.mjs';\n\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = {\n velocity: 0.0,\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n isResolvedFromDuration: false,\n ...options,\n };\n // stiffness/damping/mass overrides duration/bounce\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n const derived = findSpring(options);\n springOptions = {\n ...springOptions,\n ...derived,\n velocity: 0.0,\n mass: 1.0,\n };\n springOptions.isResolvedFromDuration = true;\n }\n return springOptions;\n}\nfunction spring({ keyframes, restDelta, restSpeed, ...options }) {\n const origin = keyframes[0];\n const target = keyframes[keyframes.length - 1];\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = { done: false, value: origin };\n const { stiffness, damping, mass, velocity, duration, isResolvedFromDuration, } = getSpringOptions(options);\n const initialVelocity = velocity ? -millisecondsToSeconds(velocity) : 0.0;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const initialDelta = target - origin;\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5;\n restSpeed || (restSpeed = isGranularScale ? 0.01 : 2);\n restDelta || (restDelta = isGranularScale ? 0.005 : 0.5);\n let resolveSpring;\n if (dampingRatio < 1) {\n const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n // Underdamped spring\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (target -\n envelope *\n (((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq) *\n Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t);\n }\n else {\n // Overdamped spring\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (target -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n }\n return {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n next: (t) => {\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n let currentVelocity = initialVelocity;\n if (t !== 0) {\n /**\n * We only need to calculate velocity for under-damped springs\n * as over- and critically-damped springs can't overshoot, so\n * checking only for displacement is enough.\n */\n if (dampingRatio < 1) {\n currentVelocity = calcGeneratorVelocity(resolveSpring, t, current);\n }\n else {\n currentVelocity = 0;\n }\n }\n const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;\n const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;\n state.done =\n isBelowVelocityThreshold && isBelowDisplacementThreshold;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? target : current;\n return state;\n },\n };\n}\n\nexport { spring };\n","import { spring } from './spring/index.mjs';\nimport { calcGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: calcGeneratorVelocity(calcLatest, t, state.value),\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t > timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n","import { frame, cancelFrame, frameData } from '../../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: () => frame.update(passTimestamp, true),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => frameData.isProcessing ? frameData.timestamp : performance.now(),\n };\n};\n\nexport { frameloopDriver };\n","/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n","import { keyframes } from '../../generators/keyframes.mjs';\nimport { spring } from '../../generators/spring/index.mjs';\nimport { inertia } from '../../generators/inertia.mjs';\nimport { frameloopDriver } from './driver-frameloop.mjs';\nimport { interpolate } from '../../../utils/interpolate.mjs';\nimport { clamp } from '../../../utils/clamp.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../../utils/time-conversion.mjs';\nimport { calcGeneratorDuration } from '../../generators/utils/calc-duration.mjs';\n\nconst types = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes: keyframes,\n spring,\n};\n/**\n * Animate a single value on the main thread.\n *\n * This function is written, where functionality overlaps,\n * to be largely spec-compliant with WAAPI to allow fungibility\n * between the two.\n */\nfunction animateValue({ autoplay = true, delay = 0, driver = frameloopDriver, keyframes: keyframes$1, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", onPlay, onStop, onComplete, onUpdate, ...options }) {\n let speed = 1;\n let hasStopped = false;\n let resolveFinishedPromise;\n let currentFinishedPromise;\n /**\n * Resolve the current Promise every time we enter the\n * finished state. This is WAAPI-compatible behaviour.\n */\n const updateFinishedPromise = () => {\n currentFinishedPromise = new Promise((resolve) => {\n resolveFinishedPromise = resolve;\n });\n };\n // Create the first finished promise\n updateFinishedPromise();\n let animationDriver;\n const generatorFactory = types[type] || keyframes;\n /**\n * If this isn't the keyframes generator and we've been provided\n * strings as keyframes, we need to interpolate these.\n * TODO: Support velocity for units and complex value types/\n */\n let mapNumbersToKeyframes;\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n mapNumbersToKeyframes = interpolate([0, 100], keyframes$1, {\n clamp: false,\n });\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n let mirroredGenerator;\n if (repeatType === \"mirror\") {\n mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -(options.velocity || 0),\n });\n }\n let playState = \"idle\";\n let holdTime = null;\n let startTime = null;\n let cancelTime = null;\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null && repeat) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n let resolvedDuration = Infinity;\n let totalDuration = Infinity;\n if (calculatedDuration !== null) {\n resolvedDuration = calculatedDuration + repeatDelay;\n totalDuration = resolvedDuration * (repeat + 1) - repeatDelay;\n }\n let currentTime = 0;\n const tick = (timestamp) => {\n if (startTime === null)\n return;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (speed > 0)\n startTime = Math.min(startTime, timestamp);\n if (speed < 0)\n startTime = Math.min(timestamp - totalDuration / speed, startTime);\n if (holdTime !== null) {\n currentTime = holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n currentTime = Math.round(timestamp - startTime) * speed;\n }\n // Rebase on delay\n const timeWithoutDelay = currentTime - delay * (speed >= 0 ? 1 : -1);\n const isInDelayPhase = speed >= 0 ? timeWithoutDelay < 0 : timeWithoutDelay > totalDuration;\n currentTime = Math.max(timeWithoutDelay, 0);\n /**\n * If this animation has finished, set the current time\n * to the total duration.\n */\n if (playState === \"finished\" && holdTime === null) {\n currentTime = totalDuration;\n }\n let elapsed = currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = currentTime / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const iterationIsOdd = Boolean(currentIteration % 2);\n if (iterationIsOdd) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n let p = clamp(0, 1, iterationProgress);\n if (currentTime > totalDuration) {\n p = repeatType === \"reverse\" && iterationIsOdd ? 1 : 0;\n }\n elapsed = p * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n const state = isInDelayPhase\n ? { done: false, value: keyframes$1[0] }\n : frameGenerator.next(elapsed);\n if (mapNumbersToKeyframes) {\n state.value = mapNumbersToKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done = speed >= 0 ? currentTime >= totalDuration : currentTime <= 0;\n }\n const isAnimationFinished = holdTime === null &&\n (playState === \"finished\" || (playState === \"running\" && done));\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n finish();\n }\n return state;\n };\n const stopAnimationDriver = () => {\n animationDriver && animationDriver.stop();\n animationDriver = undefined;\n };\n const cancel = () => {\n playState = \"idle\";\n stopAnimationDriver();\n resolveFinishedPromise();\n updateFinishedPromise();\n startTime = cancelTime = null;\n };\n const finish = () => {\n playState = \"finished\";\n onComplete && onComplete();\n stopAnimationDriver();\n resolveFinishedPromise();\n };\n const play = () => {\n if (hasStopped)\n return;\n if (!animationDriver)\n animationDriver = driver(tick);\n const now = animationDriver.now();\n onPlay && onPlay();\n if (holdTime !== null) {\n startTime = now - holdTime;\n }\n else if (!startTime || playState === \"finished\") {\n startTime = now;\n }\n if (playState === \"finished\") {\n updateFinishedPromise();\n }\n cancelTime = startTime;\n holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n playState = \"running\";\n animationDriver.start();\n };\n if (autoplay) {\n play();\n }\n const controls = {\n then(resolve, reject) {\n return currentFinishedPromise.then(resolve, reject);\n },\n get time() {\n return millisecondsToSeconds(currentTime);\n },\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n currentTime = newTime;\n if (holdTime !== null || !animationDriver || speed === 0) {\n holdTime = newTime;\n }\n else {\n startTime = animationDriver.now() - newTime / speed;\n }\n },\n get duration() {\n const duration = generator.calculatedDuration === null\n ? calcGeneratorDuration(generator)\n : generator.calculatedDuration;\n return millisecondsToSeconds(duration);\n },\n get speed() {\n return speed;\n },\n set speed(newSpeed) {\n if (newSpeed === speed || !animationDriver)\n return;\n speed = newSpeed;\n controls.time = millisecondsToSeconds(currentTime);\n },\n get state() {\n return playState;\n },\n play,\n pause: () => {\n playState = \"paused\";\n holdTime = currentTime;\n },\n stop: () => {\n hasStopped = true;\n if (playState === \"idle\")\n return;\n playState = \"idle\";\n onStop && onStop();\n cancel();\n },\n cancel: () => {\n if (cancelTime !== null)\n tick(cancelTime);\n cancel();\n },\n complete: () => {\n playState = \"finished\";\n },\n sample: (elapsed) => {\n startTime = 0;\n return tick(elapsed);\n },\n };\n return controls;\n}\n\nexport { animateValue };\n","import { animateStyle } from './index.mjs';\nimport { isWaapiSupportedEasing } from './easing.mjs';\nimport { getFinalKeyframe } from './utils/get-final-keyframe.mjs';\nimport { animateValue } from '../js/index.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../../utils/time-conversion.mjs';\nimport { memo } from '../../../utils/memo.mjs';\nimport { noop } from '../../../utils/noop.mjs';\nimport { frameData, frame, cancelFrame } from '../../../frameloop/frame.mjs';\n\nconst supportsWaapi = memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\n/**\n * A list of values that can be hardware-accelerated.\n */\nconst acceleratedValues = new Set([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\",\n \"backgroundColor\",\n]);\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\n/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxDuration = 20000;\nconst requiresPregeneratedKeyframes = (valueName, options) => options.type === \"spring\" ||\n valueName === \"backgroundColor\" ||\n !isWaapiSupportedEasing(options.ease);\nfunction createAcceleratedAnimation(value, valueName, { onUpdate, onComplete, ...options }) {\n const canAccelerateAnimation = supportsWaapi() &&\n acceleratedValues.has(valueName) &&\n !options.repeatDelay &&\n options.repeatType !== \"mirror\" &&\n options.damping !== 0 &&\n options.type !== \"inertia\";\n if (!canAccelerateAnimation)\n return false;\n /**\n * TODO: Unify with js/index\n */\n let hasStopped = false;\n let resolveFinishedPromise;\n let currentFinishedPromise;\n /**\n * Resolve the current Promise every time we enter the\n * finished state. This is WAAPI-compatible behaviour.\n */\n const updateFinishedPromise = () => {\n currentFinishedPromise = new Promise((resolve) => {\n resolveFinishedPromise = resolve;\n });\n };\n // Create the first finished promise\n updateFinishedPromise();\n let { keyframes, duration = 300, ease, times } = options;\n /**\n * If this animation needs pre-generated keyframes then generate.\n */\n if (requiresPregeneratedKeyframes(valueName, options)) {\n const sampleAnimation = animateValue({\n ...options,\n repeat: 0,\n delay: 0,\n });\n let state = { done: false, value: keyframes[0] };\n const pregeneratedKeyframes = [];\n /**\n * Bail after 20 seconds of pre-generated keyframes as it's likely\n * we're heading for an infinite loop.\n */\n let t = 0;\n while (!state.done && t < maxDuration) {\n state = sampleAnimation.sample(t);\n pregeneratedKeyframes.push(state.value);\n t += sampleDelta;\n }\n times = undefined;\n keyframes = pregeneratedKeyframes;\n duration = t - sampleDelta;\n ease = \"linear\";\n }\n const animation = animateStyle(value.owner.current, valueName, keyframes, {\n ...options,\n duration,\n /**\n * This function is currently not called if ease is provided\n * as a function so the cast is safe.\n *\n * However it would be possible for a future refinement to port\n * in easing pregeneration from Motion One for browsers that\n * support the upcoming `linear()` easing function.\n */\n ease: ease,\n times,\n });\n /**\n * WAAPI animations don't resolve startTime synchronously. But a blocked\n * thread could delay the startTime resolution by a noticeable amount.\n * For synching handoff animations with the new Motion animation we want\n * to ensure startTime is synchronously set.\n */\n if (options.syncStart) {\n animation.startTime = frameData.isProcessing\n ? frameData.timestamp\n : document.timeline\n ? document.timeline.currentTime\n : performance.now();\n }\n const cancelAnimation = () => animation.cancel();\n const safeCancel = () => {\n frame.update(cancelAnimation);\n resolveFinishedPromise();\n updateFinishedPromise();\n };\n /**\n * Prefer the `onfinish` prop as it's more widely supported than\n * the `finished` promise.\n *\n * Here, we synchronously set the provided MotionValue to the end\n * keyframe. If we didn't, when the WAAPI animation is finished it would\n * be removed from the element which would then revert to its old styles.\n */\n animation.onfinish = () => {\n value.set(getFinalKeyframe(keyframes, options));\n onComplete && onComplete();\n safeCancel();\n };\n /**\n * Animation interrupt callback.\n */\n const controls = {\n then(resolve, reject) {\n return currentFinishedPromise.then(resolve, reject);\n },\n attachTimeline(timeline) {\n animation.timeline = timeline;\n animation.onfinish = null;\n return noop;\n },\n get time() {\n return millisecondsToSeconds(animation.currentTime || 0);\n },\n set time(newTime) {\n animation.currentTime = secondsToMilliseconds(newTime);\n },\n get speed() {\n return animation.playbackRate;\n },\n set speed(newSpeed) {\n animation.playbackRate = newSpeed;\n },\n get duration() {\n return millisecondsToSeconds(duration);\n },\n play: () => {\n if (hasStopped)\n return;\n animation.play();\n /**\n * Cancel any pending cancel tasks\n */\n cancelFrame(cancelAnimation);\n },\n pause: () => animation.pause(),\n stop: () => {\n hasStopped = true;\n if (animation.playState === \"idle\")\n return;\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read commited styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n const { currentTime } = animation;\n if (currentTime) {\n const sampleAnimation = animateValue({\n ...options,\n autoplay: false,\n });\n value.setWithVelocity(sampleAnimation.sample(currentTime - sampleDelta).value, sampleAnimation.sample(currentTime).value, sampleDelta);\n }\n safeCancel();\n },\n complete: () => animation.finish(),\n cancel: safeCancel,\n };\n return controls;\n}\n\nexport { createAcceleratedAnimation };\n","function memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n","import { mapEasingToNativeEasing } from './easing.mjs';\n\nfunction animateStyle(element, valueName, keyframes, { delay = 0, duration, repeat = 0, repeatType = \"loop\", ease, times, } = {}) {\n const keyframeOptions = { [valueName]: keyframes };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease);\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n return element.animate(keyframeOptions, {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n });\n}\n\nexport { animateStyle };\n","function getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }) {\n const index = repeat && repeatType !== \"loop\" && repeat % 2 === 1\n ? 0\n : keyframes.length - 1;\n return keyframes[index];\n}\n\nexport { getFinalKeyframe };\n","import { transformProps } from '../../render/html/utils/transform.mjs';\n\nconst underDampedSpring = {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n};\nconst criticallyDampedSpring = (target) => ({\n type: \"spring\",\n stiffness: 550,\n damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n});\nconst keyframesTransition = {\n type: \"keyframes\",\n duration: 0.8,\n};\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease = {\n type: \"keyframes\",\n ease: [0.25, 0.1, 0.35, 1],\n duration: 0.3,\n};\nconst getDefaultTransition = (valueKey, { keyframes }) => {\n if (keyframes.length > 2) {\n return keyframesTransition;\n }\n else if (transformProps.has(valueKey)) {\n return valueKey.startsWith(\"scale\")\n ? criticallyDampedSpring(keyframes[1])\n : underDampedSpring;\n }\n return ease;\n};\n\nexport { getDefaultTransition };\n","import { complex } from '../../value/types/complex/index.mjs';\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nconst isAnimatable = (key, value) => {\n // If the list of keys tat might be non-animatable grows, replace with Set\n if (key === \"zIndex\")\n return false;\n // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n if (typeof value === \"number\" || Array.isArray(value))\n return true;\n if (typeof value === \"string\" && // It's animatable if we have a string\n (complex.test(value) || value === \"0\") && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true;\n }\n return false;\n};\n\nexport { isAnimatable };\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils.mjs';\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"]);\nfunction applyDefaultFilter(v) {\n const [name, value] = v.slice(0, -1).split(\"(\");\n if (name === \"drop-shadow\")\n return v;\n const [number] = value.match(floatRegex) || [];\n if (!number)\n return v;\n const unit = value.replace(number, \"\");\n let defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number !== value)\n defaultValue *= 100;\n return name + \"(\" + defaultValue + unit + \")\";\n}\nconst functionRegex = /([a-z-]*)\\(.*?\\)/g;\nconst filter = {\n ...complex,\n getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v;\n },\n};\n\nexport { filter };\n","import { color } from '../../../value/types/color/index.mjs';\nimport { filter } from '../../../value/types/complex/filter.mjs';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nconst defaultValueTypes = {\n ...numberValueTypes,\n // Color props\n color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n filter,\n WebkitFilter: filter,\n};\n/**\n * Gets the default ValueType for the provided value key\n */\nconst getDefaultValueType = (key) => defaultValueTypes[key];\n\nexport { defaultValueTypes, getDefaultValueType };\n","import { complex } from '../../../value/types/complex/index.mjs';\nimport { filter } from '../../../value/types/complex/filter.mjs';\nimport { getDefaultValueType } from './defaults.mjs';\n\nfunction getAnimatableNone(key, value) {\n let defaultValueType = getDefaultValueType(key);\n if (defaultValueType !== filter)\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined;\n}\n\nexport { getAnimatableNone };\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nconst isZeroValueString = (v) => /^0[^.\\s]+$/.test(v);\n\nexport { isZeroValueString };\n","import { isZeroValueString } from '../../utils/is-zero-value-string.mjs';\n\nfunction isNone(value) {\n if (typeof value === \"number\") {\n return value === 0;\n }\n else if (value !== null) {\n return value === \"none\" || value === \"0\" || isZeroValueString(value);\n }\n}\n\nexport { isNone };\n","/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nfunction isTransitionDefined({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, elapsed, ...transition }) {\n return !!Object.keys(transition).length;\n}\nfunction getValueTransition(transition, key) {\n return transition[key] || transition[\"default\"] || transition;\n}\n\nexport { getValueTransition, isTransitionDefined };\n","import { warning } from '../../utils/errors.mjs';\nimport { secondsToMilliseconds } from '../../utils/time-conversion.mjs';\nimport { instantAnimationState } from '../../utils/use-instant-transition-state.mjs';\nimport { createAcceleratedAnimation } from '../animators/waapi/create-accelerated-animation.mjs';\nimport { createInstantAnimation } from '../animators/instant.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { isAnimatable } from '../utils/is-animatable.mjs';\nimport { getKeyframes } from '../utils/keyframes.mjs';\nimport { getValueTransition, isTransitionDefined } from '../utils/transitions.mjs';\nimport { animateValue } from '../animators/js/index.mjs';\n\nconst animateMotionValue = (valueName, value, target, transition = {}) => {\n return (onComplete) => {\n const valueTransition = getValueTransition(transition, valueName) || {};\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0;\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition;\n elapsed = elapsed - secondsToMilliseconds(delay);\n const keyframes = getKeyframes(value, valueName, target, valueTransition);\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0];\n const targetKeyframe = keyframes[keyframes.length - 1];\n const isOriginAnimatable = isAnimatable(valueName, originKeyframe);\n const isTargetAnimatable = isAnimatable(valueName, targetKeyframe);\n warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${valueName} from \"${originKeyframe}\" to \"${targetKeyframe}\". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \\`style\\` property.`);\n let options = {\n keyframes,\n velocity: value.getVelocity(),\n ease: \"easeOut\",\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v);\n valueTransition.onUpdate && valueTransition.onUpdate(v);\n },\n onComplete: () => {\n onComplete();\n valueTransition.onComplete && valueTransition.onComplete();\n },\n };\n /**\n * If there's no transition defined for this value, we can generate\n * unqiue transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n options = {\n ...options,\n ...getDefaultTransition(valueName, options),\n };\n }\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n if (options.duration) {\n options.duration = secondsToMilliseconds(options.duration);\n }\n if (options.repeatDelay) {\n options.repeatDelay = secondsToMilliseconds(options.repeatDelay);\n }\n if (!isOriginAnimatable ||\n !isTargetAnimatable ||\n instantAnimationState.current ||\n valueTransition.type === false) {\n /**\n * If we can't animate this value, or the global instant animation flag is set,\n * or this is simply defined as an instant transition, return an instant transition.\n */\n return createInstantAnimation(instantAnimationState.current\n ? { ...options, delay: 0 }\n : options);\n }\n /**\n * Animate via WAAPI if possible.\n */\n if (value.owner &&\n value.owner.current instanceof HTMLElement &&\n !value.owner.getProps().onUpdate) {\n const acceleratedAnimation = createAcceleratedAnimation(value, valueName, options);\n if (acceleratedAnimation)\n return acceleratedAnimation;\n }\n /**\n * If we didn't create an accelerated animation, create a JS animation\n */\n return animateValue(options);\n };\n};\n\nexport { animateMotionValue };\n","import { getAnimatableNone } from '../../render/dom/value-types/animatable-none.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\nimport { isNone } from './is-none.mjs';\n\nfunction getKeyframes(value, valueName, target, transition) {\n const isTargetAnimatable = isAnimatable(valueName, target);\n let keyframes;\n if (Array.isArray(target)) {\n keyframes = [...target];\n }\n else {\n keyframes = [null, target];\n }\n const defaultOrigin = transition.from !== undefined ? transition.from : value.get();\n let animatableTemplateValue = undefined;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < keyframes.length; i++) {\n /**\n * Fill null/wildcard keyframes\n */\n if (keyframes[i] === null) {\n keyframes[i] = i === 0 ? defaultOrigin : keyframes[i - 1];\n }\n if (isNone(keyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n // TODO: Clean this conditional, it works for now\n if (typeof keyframes[i] === \"string\" &&\n keyframes[i] !== \"none\" &&\n keyframes[i] !== \"0\") {\n animatableTemplateValue = keyframes[i];\n }\n }\n if (isTargetAnimatable &&\n noneKeyframeIndexes.length &&\n animatableTemplateValue) {\n for (let i = 0; i < noneKeyframeIndexes.length; i++) {\n const index = noneKeyframeIndexes[i];\n keyframes[index] = getAnimatableNone(valueName, animatableTemplateValue);\n }\n }\n return keyframes;\n}\n\nexport { getKeyframes };\n","import { animateValue } from './js/index.mjs';\nimport { noop } from '../../utils/noop.mjs';\n\nfunction createInstantAnimation({ keyframes, delay, onUpdate, onComplete, }) {\n const setValue = () => {\n onUpdate && onUpdate(keyframes[keyframes.length - 1]);\n onComplete && onComplete();\n /**\n * TODO: As this API grows it could make sense to always return\n * animateValue. This will be a bigger project as animateValue\n * is frame-locked whereas this function resolves instantly.\n * This is a behavioural change and also has ramifications regarding\n * assumptions within tests.\n */\n return {\n time: 0,\n speed: 1,\n duration: 0,\n play: (noop),\n pause: (noop),\n stop: (noop),\n then: (resolve) => {\n resolve();\n return Promise.resolve();\n },\n cancel: (noop),\n complete: (noop),\n };\n };\n return delay\n ? animateValue({\n keyframes: [0, 1],\n duration: 0,\n delay,\n onComplete: setValue,\n })\n : setValue();\n}\n\nexport { createInstantAnimation };\n","import { isMotionValue } from '../utils/is-motion-value.mjs';\n\nfunction isWillChangeMotionValue(value) {\n return Boolean(isMotionValue(value) && value.add);\n}\n\nexport { isWillChangeMotionValue };\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nconst isNumericalString = (v) => /^\\-?\\d*\\.?\\d+$/.test(v);\n\nexport { isNumericalString };\n","function addUniqueItem(arr, item) {\n if (arr.indexOf(item) === -1)\n arr.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n if (index > -1)\n arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem([...arr], fromIndex, toIndex) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n const [item] = arr.splice(fromIndex, 1);\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nclass SubscriptionManager {\n constructor() {\n this.subscriptions = [];\n }\n add(handler) {\n addUniqueItem(this.subscriptions, handler);\n return () => removeItem(this.subscriptions, handler);\n }\n notify(a, b, c) {\n const numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n }\n else {\n for (let i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n const handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n }\n getSize() {\n return this.subscriptions.length;\n }\n clear() {\n this.subscriptions.length = 0;\n }\n}\n\nexport { SubscriptionManager };\n","import { SubscriptionManager } from '../utils/subscription-manager.mjs';\nimport { velocityPerSecond } from '../utils/velocity-per-second.mjs';\nimport { warnOnce } from '../utils/warn-once.mjs';\nimport { frame, frameData } from '../frameloop/frame.mjs';\n\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n *\n * @internal\n */\n constructor(init, options = {}) {\n /**\n * This will be replaced by the build step with the latest version number.\n * When MotionValues are provided to motion components, warn if versions are mixed.\n */\n this.version = \"10.16.4\";\n /**\n * Duration, in milliseconds, since last updating frame.\n *\n * @internal\n */\n this.timeDelta = 0;\n /**\n * Timestamp of the last time this `MotionValue` was updated.\n *\n * @internal\n */\n this.lastUpdated = 0;\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = false;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v, render = true) => {\n this.prev = this.current;\n this.current = v;\n // Update timestamp\n const { delta, timestamp } = frameData;\n if (this.lastUpdated !== timestamp) {\n this.timeDelta = delta;\n this.lastUpdated = timestamp;\n frame.postRender(this.scheduleVelocityCheck);\n }\n // Update update subscribers\n if (this.prev !== this.current && this.events.change) {\n this.events.change.notify(this.current);\n }\n // Update velocity subscribers\n if (this.events.velocityChange) {\n this.events.velocityChange.notify(this.getVelocity());\n }\n // Update render subscribers\n if (render && this.events.renderRequest) {\n this.events.renderRequest.notify(this.current);\n }\n };\n /**\n * Schedule a velocity check for the next frame.\n *\n * This is an instanced and bound function to prevent generating a new\n * function once per frame.\n *\n * @internal\n */\n this.scheduleVelocityCheck = () => frame.postRender(this.velocityCheck);\n /**\n * Updates `prev` with `current` if the value hasn't been updated this frame.\n * This ensures velocity calculations return `0`.\n *\n * This is an instanced and bound function to prevent generating a new\n * function once per frame.\n *\n * @internal\n */\n this.velocityCheck = ({ timestamp }) => {\n if (timestamp !== this.lastUpdated) {\n this.prev = this.current;\n if (this.events.velocityChange) {\n this.events.velocityChange.notify(this.getVelocity());\n }\n }\n };\n this.hasAnimated = false;\n this.prev = this.current = init;\n this.canTrackVelocity = isFloat(this.current);\n this.owner = options.owner;\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return \n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n *\n * @internal\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v, render = true) {\n if (!render || !this.passiveEffect) {\n this.updateAndNotify(v, render);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = prev;\n this.timeDelta = delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v) {\n this.updateAndNotify(v);\n this.prev = v;\n this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n // This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful\n return this.canTrackVelocity\n ? // These casts could be avoided if parseFloat would be typed better\n velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prev), this.timeDelta)\n : 0;\n }\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n *\n * @internal\n */\n start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n delete this.animation;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n","/**\n * Tests a provided value against a ValueType\n */\nconst testValueType = (v) => (type) => type.test(v);\n\nexport { testValueType };\n","import { number } from '../../../value/types/numbers/index.mjs';\nimport { px, percent, degrees, vw, vh } from '../../../value/types/numbers/units.mjs';\nimport { testValueType } from './test.mjs';\nimport { auto } from './type-auto.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nconst dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nconst findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));\n\nexport { dimensionValueTypes, findDimensionValueType };\n","/**\n * ValueType for \"auto\"\n */\nconst auto = {\n test: (v) => v === \"auto\",\n parse: (v) => v,\n};\n\nexport { auto };\n","import { color } from '../../../value/types/color/index.mjs';\nimport { complex } from '../../../value/types/complex/index.mjs';\nimport { dimensionValueTypes } from './dimensions.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex];\n/**\n * Tests a value against the list of ValueTypes\n */\nconst findValueType = (v) => valueTypes.find(testValueType(v));\n\nexport { findValueType };\n","import { isNumericalString } from '../../utils/is-numerical-string.mjs';\nimport { isZeroValueString } from '../../utils/is-zero-value-string.mjs';\nimport { resolveFinalValueInKeyframes } from '../../utils/resolve-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { complex } from '../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../dom/value-types/animatable-none.mjs';\nimport { findValueType } from '../dom/value-types/find.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}\nfunction setTarget(visualElement, definition) {\n const resolved = resolveVariant(visualElement, definition);\n let { transitionEnd = {}, transition = {}, ...target } = resolved ? visualElement.makeTargetAnimatable(resolved, false) : {};\n target = { ...target, ...transitionEnd };\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\nfunction setVariants(visualElement, variantLabels) {\n const reversedLabels = [...variantLabels].reverse();\n reversedLabels.forEach((key) => {\n const variant = visualElement.getVariant(key);\n variant && setTarget(visualElement, variant);\n if (visualElement.variantChildren) {\n visualElement.variantChildren.forEach((child) => {\n setVariants(child, variantLabels);\n });\n }\n });\n}\nfunction setValues(visualElement, definition) {\n if (Array.isArray(definition)) {\n return setVariants(visualElement, definition);\n }\n else if (typeof definition === \"string\") {\n return setVariants(visualElement, [definition]);\n }\n else {\n setTarget(visualElement, definition);\n }\n}\nfunction checkTargetForNewValues(visualElement, target, origin) {\n var _a, _b;\n const newValueKeys = Object.keys(target).filter((key) => !visualElement.hasValue(key));\n const numNewValues = newValueKeys.length;\n if (!numNewValues)\n return;\n for (let i = 0; i < numNewValues; i++) {\n const key = newValueKeys[i];\n const targetValue = target[key];\n let value = null;\n /**\n * If the target is a series of keyframes, we can use the first value\n * in the array. If this first value is null, we'll still need to read from the DOM.\n */\n if (Array.isArray(targetValue)) {\n value = targetValue[0];\n }\n /**\n * If the target isn't keyframes, or the first keyframe was null, we need to\n * first check if an origin value was explicitly defined in the transition as \"from\",\n * if not read the value from the DOM. As an absolute fallback, take the defined target value.\n */\n if (value === null) {\n value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key];\n }\n /**\n * If value is still undefined or null, ignore it. Preferably this would throw,\n * but this was causing issues in Framer.\n */\n if (value === undefined || value === null)\n continue;\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(targetValue)) {\n value = getAnimatableNone(key, targetValue);\n }\n visualElement.addValue(key, motionValue(value, { owner: visualElement }));\n if (origin[key] === undefined) {\n origin[key] = value;\n }\n if (value !== null)\n visualElement.setBaseTarget(key, value);\n }\n}\nfunction getOriginFromTransition(key, transition) {\n if (!transition)\n return;\n const valueTransition = transition[key] || transition[\"default\"] || transition;\n return valueTransition.from;\n}\nfunction getOrigin(target, transition, visualElement) {\n const origin = {};\n for (const key in target) {\n const transitionOrigin = getOriginFromTransition(key, transition);\n if (transitionOrigin !== undefined) {\n origin[key] = transitionOrigin;\n }\n else {\n const value = visualElement.getValue(key);\n if (value) {\n origin[key] = value.get();\n }\n }\n }\n return origin;\n}\n\nexport { checkTargetForNewValues, getOrigin, getOriginFromTransition, setTarget, setValues };\n","import { transformProps } from '../../render/html/utils/transform.mjs';\nimport { optimizedAppearDataAttribute } from '../optimized-appear/data-id.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\nimport { isWillChangeMotionValue } from '../../value/use-will-change/is.mjs';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, definition, { delay = 0, transitionOverride, type } = {}) {\n let { transition = visualElement.getDefaultTransition(), transitionEnd, ...target } = visualElement.makeTargetAnimatable(definition);\n const willChange = visualElement.getValue(\"willChange\");\n if (transitionOverride)\n transition = transitionOverride;\n const animations = [];\n const animationTypeState = type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type];\n for (const key in target) {\n const value = visualElement.getValue(key);\n const valueTarget = target[key];\n if (!value ||\n valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n const valueTransition = {\n delay,\n elapsed: 0,\n ...transition,\n };\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n if (window.HandoffAppearAnimations && !value.hasAnimated) {\n const appearId = visualElement.getProps()[optimizedAppearDataAttribute];\n if (appearId) {\n valueTransition.elapsed = window.HandoffAppearAnimations(appearId, key, value, frame);\n valueTransition.syncStart = true;\n }\n }\n value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key)\n ? { type: false }\n : valueTransition));\n const animation = value.animation;\n if (isWillChangeMotionValue(willChange)) {\n willChange.add(key);\n animation.then(() => willChange.remove(key));\n }\n animations.push(animation);\n }\n if (transitionEnd) {\n Promise.all(animations).then(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n }\n return animations;\n}\n\nexport { animateTarget };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n const resolved = resolveVariant(visualElement, variant, options.custom);\n let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getAnimation = resolved\n ? () => Promise.all(animateTarget(visualElement, resolved, options))\n : () => Promise.resolve();\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size\n ? (forwardDelay = 0) => {\n const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;\n return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);\n }\n : () => Promise.resolve();\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n const { when } = transition;\n if (when) {\n const [first, last] = when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation];\n return first().then(() => last());\n }\n else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\nfunction animateChildren(visualElement, variant, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {\n const animations = [];\n const maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;\n const generateStaggerDuration = staggerDirection === 1\n ? (i = 0) => i * staggerChildren\n : (i = 0) => maxStaggerDuration - i * staggerChildren;\n Array.from(visualElement.variantChildren)\n .sort(sortByTreeOrder)\n .forEach((child, i) => {\n child.notify(\"AnimationStart\", variant);\n animations.push(animateVariant(child, variant, {\n ...options,\n delay: delayChildren + generateStaggerDuration(i),\n }).then(() => child.notify(\"AnimationComplete\", variant)));\n });\n return Promise.all(animations);\n}\nfunction sortByTreeOrder(a, b) {\n return a.sortNodePosition(b);\n}\n\nexport { animateVariant, sortByTreeOrder };\n","import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { shallowCompare } from '../../utils/shallow-compare.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { variantPriorityOrder } from './variant-props.mjs';\nimport { animateVisualElement } from '../../animation/interfaces/visual-element.mjs';\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse();\nconst numAnimationTypes = variantPriorityOrder.length;\nfunction animateList(visualElement) {\n return (animations) => Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n}\nfunction createAnimationState(visualElement) {\n let animate = animateList(visualElement);\n const state = createState();\n let isInitialRender = true;\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n const buildResolvedTypeValues = (acc, definition) => {\n const resolved = resolveVariant(visualElement, definition);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n acc = { ...acc, ...target, ...transitionEnd };\n }\n return acc;\n };\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(makeAnimator) {\n animate = makeAnimator(visualElement);\n }\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(options, changedActiveType) {\n const props = visualElement.getProps();\n const context = visualElement.getVariantContext(true) || {};\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n const animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n const removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n let encounteredKeys = {};\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n let removedVariantIndex = Infinity;\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (let i = 0; i < numAnimationTypes; i++) {\n const type = reversePriorityOrder[i];\n const typeState = state[type];\n const prop = props[type] !== undefined ? props[type] : context[type];\n const propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n const activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n let isInherited = prop === context[type] && prop !== props[type] && propIsVariant;\n /**\n *\n */\n if (isInherited &&\n isInitialRender &&\n visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = { ...encounteredKeys };\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n continue;\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n let shouldAnimateType = variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant);\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n const definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n let resolvedValues = definitionList.reduce(buildResolvedTypeValues, {});\n if (activeDelta === false)\n resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n const { prevResolvedValues = {} } = typeState;\n const allKeys = {\n ...prevResolvedValues,\n ...resolvedValues,\n };\n const markToAnimate = (key) => {\n shouldAnimateType = true;\n removedKeys.delete(key);\n typeState.needsAnimating[key] = true;\n };\n for (const key in allKeys) {\n const next = resolvedValues[key];\n const prev = prevResolvedValues[key];\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n /**\n * If the value has changed, we probably want to animate it.\n */\n if (next !== prev) {\n /**\n * If both values are keyframes, we need to shallow compare them to\n * detect whether any value has changed. If it has, we animate it.\n */\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n if (!shallowCompare(next, prev) || variantDidChange) {\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we want to ensure it doesn't animate by\n * adding it to the list of protected keys.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n else if (next !== undefined) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key);\n }\n else {\n // If it's undefined, it's been removed.\n removedKeys.add(key);\n }\n }\n else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n /**\n *\n */\n if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues };\n }\n if (isInitialRender && visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n /**\n * If this is an inherited prop we want to hard-block animations\n * TODO: Test as this should probably still handle animations triggered\n * by removed values?\n */\n if (shouldAnimateType && !isInherited) {\n animations.push(...definitionList.map((animation) => ({\n animation: animation,\n options: { type, ...options },\n })));\n }\n }\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n const fallbackAnimation = {};\n removedKeys.forEach((key) => {\n const fallbackTarget = visualElement.getBaseTarget(key);\n if (fallbackTarget !== undefined) {\n fallbackAnimation[key] = fallbackTarget;\n }\n });\n animations.push({ animation: fallbackAnimation });\n }\n let shouldAnimate = Boolean(animations.length);\n if (isInitialRender &&\n props.initial === false &&\n !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n return shouldAnimate ? animate(animations) : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type, isActive, options) {\n var _a;\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive)\n return Promise.resolve();\n // Propagate active change to children\n (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach((child) => { var _a; return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); });\n state[type].isActive = isActive;\n const animations = animateChanges(options, type);\n for (const key in state) {\n state[key].protectedKeys = {};\n }\n return animations;\n }\n return {\n animateChanges,\n setActive,\n setAnimateFunction,\n getState: () => state,\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n }\n else if (Array.isArray(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive = false) {\n return {\n isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n}\nfunction createState() {\n return {\n animate: createTypeState(true),\n whileInView: createTypeState(),\n whileHover: createTypeState(),\n whileTap: createTypeState(),\n whileDrag: createTypeState(),\n whileFocus: createTypeState(),\n exit: createTypeState(),\n };\n}\n\nexport { checkVariantsDidChange, createAnimationState };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n let animation;\n if (Array.isArray(definition)) {\n const animations = definition.map((variant) => animateVariant(visualElement, variant, options));\n animation = Promise.all(animations);\n }\n else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n }\n else {\n const resolvedDefinition = typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition;\n animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));\n }\n return animation.then(() => visualElement.notify(\"AnimationComplete\", definition));\n}\n\nexport { animateVisualElement };\n","import { Feature } from '../Feature.mjs';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent, onExitComplete, custom } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent, { custom: custom !== null && custom !== void 0 ? custom : this.node.getProps().custom });\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => onExitComplete(this.id));\n }\n }\n mount() {\n const { register } = this.node.presenceContext || {};\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() { }\n}\n\nexport { ExitAnimationFeature };\n","import { AnimationFeature } from './animation/index.mjs';\nimport { ExitAnimationFeature } from './animation/exit.mjs';\n\nconst animations = {\n animation: {\n Feature: AnimationFeature,\n },\n exit: {\n Feature: ExitAnimationFeature,\n },\n};\n\nexport { animations };\n","import { isAnimationControls } from '../../../animation/utils/is-animation-controls.mjs';\nimport { createAnimationState } from '../../../render/utils/animation-state.mjs';\nimport { Feature } from '../Feature.mjs';\n\nclass AnimationFeature extends Feature {\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n constructor(node) {\n super(node);\n node.animationState || (node.animationState = createAnimationState(node));\n }\n updateAnimationControlsSubscription() {\n const { animate } = this.node.getProps();\n this.unmount();\n if (isAnimationControls(animate)) {\n this.unmount = animate.subscribe(this.node);\n }\n }\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription();\n }\n update() {\n const { animate } = this.node.getProps();\n const { animate: prevAnimate } = this.node.prevProps || {};\n if (animate !== prevAnimate) {\n this.updateAnimationControlsSubscription();\n }\n }\n unmount() { }\n}\n\nexport { AnimationFeature };\n","const distance = (a, b) => Math.abs(a - b);\nfunction distance2D(a, b) {\n // Multi-dimensional\n const xDelta = distance(a.x, b.x);\n const yDelta = distance(a.y, b.y);\n return Math.sqrt(xDelta ** 2 + yDelta ** 2);\n}\n\nexport { distance, distance2D };\n","import { extractEventInfo } from '../../events/event-info.mjs';\nimport { secondsToMilliseconds, millisecondsToSeconds } from '../../utils/time-conversion.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { pipe } from '../../utils/pipe.mjs';\nimport { distance2D } from '../../utils/distance.mjs';\nimport { isPrimaryPointer } from '../../events/utils/is-primary-pointer.mjs';\nimport { frame, cancelFrame, frameData } from '../../frameloop/frame.mjs';\n\n/**\n * @internal\n */\nclass PanSession {\n constructor(event, handlers, { transformPagePoint } = {}) {\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursoe.\n const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info);\n };\n this.handlePointerMove = (event, info) => {\n this.lastMoveEvent = event;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const { onEnd, onSessionEnd } = this.handlers;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event))\n return;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(window, \"pointermove\", this.handlePointerMove), addPointerEvent(window, \"pointerup\", this.handlePointerUp), addPointerEvent(window, \"pointercancel\", this.handlePointerUp));\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n cancelFrame(this.updatePoint);\n }\n}\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point }, history) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n","import { mix } from '../../utils/mix.mjs';\n\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target = 0, maxDistance = 0.01) {\n return Math.abs(value - target) <= maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin = 0.5) {\n delta.origin = origin;\n delta.originPoint = mix(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n if (isNear(delta.scale, 1, 0.0001) || isNaN(delta.scale))\n delta.scale = 1;\n delta.translate =\n mix(target.min, target.max, delta.origin) - delta.originPoint;\n if (isNear(delta.translate) || isNaN(delta.translate))\n delta.translate = 0;\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined);\n calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined);\n}\nfunction calcRelativeAxis(target, relative, parent) {\n target.min = parent.min + relative.min;\n target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent) {\n calcRelativeAxis(target.x, relative.x, parent.x);\n calcRelativeAxis(target.y, relative.y, parent.y);\n}\nfunction calcRelativeAxisPosition(target, layout, parent) {\n target.min = layout.min - parent.min;\n target.max = target.min + calcLength(layout);\n}\nfunction calcRelativePosition(target, layout, parent) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x);\n calcRelativeAxisPosition(target.y, layout.y, parent.y);\n}\n\nexport { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };\n","import { progress } from '../../../utils/progress.mjs';\nimport { calcLength } from '../../../projection/geometry/delta-calc.mjs';\nimport { clamp } from '../../../utils/clamp.mjs';\nimport { mix } from '../../../utils/mix.mjs';\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nfunction applyConstraints(point, { min, max }, elastic) {\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic ? mix(min, point, elastic.min) : Math.max(point, min);\n }\n else if (max !== undefined && point > max) {\n // If we have a max point defined, and this is outside of that, constrain\n point = elastic ? mix(max, point, elastic.max) : Math.min(point, max);\n }\n return point;\n}\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nfunction calcRelativeAxisConstraints(axis, min, max) {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max: max !== undefined\n ? axis.max + max - (axis.max - axis.min)\n : undefined,\n };\n}\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nfunction calcRelativeConstraints(layoutBox, { top, left, bottom, right }) {\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nfunction calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n let min = constraintsAxis.min - layoutAxis.min;\n let max = constraintsAxis.max - layoutAxis.max;\n // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n if (constraintsAxis.max - constraintsAxis.min <\n layoutAxis.max - layoutAxis.min) {\n [min, max] = [max, min];\n }\n return { min, max };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nfunction calcViewportConstraints(layoutBox, constraintsBox) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n };\n}\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nfunction calcOrigin(source, target) {\n let origin = 0.5;\n const sourceLength = calcLength(source);\n const targetLength = calcLength(target);\n if (targetLength > sourceLength) {\n origin = progress(target.min, target.max - sourceLength, source.min);\n }\n else if (sourceLength > targetLength) {\n origin = progress(source.min, source.max - targetLength, target.min);\n }\n return clamp(0, 1, origin);\n}\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nfunction rebaseAxisConstraints(layout, constraints) {\n const relativeConstraints = {};\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min;\n }\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min;\n }\n return relativeConstraints;\n}\nconst defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nfunction resolveDragElastic(dragElastic = defaultElastic) {\n if (dragElastic === false) {\n dragElastic = 0;\n }\n else if (dragElastic === true) {\n dragElastic = defaultElastic;\n }\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n };\n}\nfunction resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel),\n };\n}\nfunction resolvePointElastic(dragElastic, label) {\n return typeof dragElastic === \"number\"\n ? dragElastic\n : dragElastic[label] || 0;\n}\n\nexport { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };\n","const createAxisDelta = () => ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n});\nconst createDelta = () => ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n});\nconst createAxis = () => ({ min: 0, max: 0 });\nconst createBox = () => ({\n x: createAxis(),\n y: createAxis(),\n});\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n","function eachAxis(callback) {\n return [callback(\"x\"), callback(\"y\")];\n}\n\nexport { eachAxis };\n","/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox({ top, left, right, bottom, }) {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox({ x, y }) {\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n if (!transformPoint)\n return point;\n const topLeft = transformPoint({ x: point.left, y: point.top });\n const bottomRight = transformPoint({ x: point.right, y: point.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n","function isIdentityScale(scale) {\n return scale === undefined || scale === 1;\n}\nfunction hasScale({ scale, scaleX, scaleY }) {\n return (!isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY));\n}\nfunction hasTransform(values) {\n return (hasScale(values) ||\n has2DTranslate(values) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY);\n}\nfunction has2DTranslate(values) {\n return is2DTranslate(values.x) || is2DTranslate(values.y);\n}\nfunction is2DTranslate(value) {\n return value && value !== \"0%\";\n}\n\nexport { has2DTranslate, hasScale, hasTransform };\n","import { mix } from '../../utils/mix.mjs';\nimport { hasTransform } from '../utils/has-transform.mjs';\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nfunction scalePoint(point, scale, originPoint) {\n const distanceFromOrigin = point - originPoint;\n const scaled = scale * distanceFromOrigin;\n return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint);\n }\n return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\nfunction applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {\n axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\nfunction applyBoxDelta(box, { x, y }) {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {\n const treeLength = treePath.length;\n if (!treeLength)\n return;\n // Reset the treeScale\n treeScale.x = treeScale.y = 1;\n let node;\n let delta;\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const instance = node.instance;\n if (instance &&\n instance.style &&\n instance.style.display === \"contents\") {\n continue;\n }\n if (isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(box, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y,\n });\n }\n if (delta) {\n // Incoporate each ancestor's scale into a culmulative treeScale for this component\n treeScale.x *= delta.x.scale;\n treeScale.y *= delta.y.scale;\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta);\n }\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues);\n }\n }\n /**\n * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n * This will help reduce useless scales getting rendered.\n */\n treeScale.x = snapToDefault(treeScale.x);\n treeScale.y = snapToDefault(treeScale.y);\n}\nfunction snapToDefault(scale) {\n if (Number.isInteger(scale))\n return scale;\n return scale > 1.0000000000001 || scale < 0.999999999999 ? scale : 1;\n}\nfunction translateAxis(axis, distance) {\n axis.min = axis.min + distance;\n axis.max = axis.max + distance;\n}\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nfunction transformAxis(axis, transforms, [key, scaleKey, originKey]) {\n const axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5;\n const originPoint = mix(axis.min, axis.max, axisOrigin);\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, transforms[key], transforms[scaleKey], originPoint, transforms.scale);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nfunction transformBox(box, transform) {\n transformAxis(box.x, transform, xKeys);\n transformAxis(box.y, transform, yKeys);\n}\n\nexport { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };\n","import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n const viewportBox = measureViewportBox(element, transformPagePoint);\n const { scroll } = rootProjectionNode;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x);\n translateAxis(viewportBox.y, scroll.offset.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n","import { invariant } from '../../utils/errors.mjs';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { getGlobalLock } from './utils/lock.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, calcOrigin } from './utils/constraints.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { eachAxis } from '../../projection/utils/each-axis.mjs';\nimport { measurePageBox } from '../../projection/utils/measure.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\nimport { calcLength } from '../../projection/geometry/delta-calc.mjs';\nimport { mix } from '../../utils/mix.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { animateMotionValue } from '../../animation/interfaces/motion-value.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst elementDragControls = new WeakMap();\n/**\n *\n */\n// let latestPointerEvent: PointerEvent\nclass VisualElementDragControls {\n constructor(visualElement) {\n // This is a reference to the global drag gesture lock, ensuring only one component\n // can \"capture\" the drag of one or both axes.\n // TODO: Look into moving this into pansession?\n this.openGlobalLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n // Stop any animations on both axis values immediately. This allows the user to throw and catch\n // the component.\n this.stopAnimation();\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event, \"page\").point);\n }\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openGlobalLock)\n this.openGlobalLock();\n this.openGlobalLock = getGlobalLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openGlobalLock)\n return;\n }\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.update(() => onDragStart(event, info), false, true);\n }\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n // latestPointerEvent = event\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openGlobalLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n onDrag && onDrag(event, info);\n };\n const onSessionEnd = (event, info) => this.stop(event, info);\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n }, { transformPagePoint: this.visualElement.getTransformPagePoint() });\n }\n stop(event, info) {\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging)\n return;\n const { velocity } = info;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.update(() => onDragEnd(event, info));\n }\n }\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openGlobalLock) {\n this.openGlobalLock();\n this.openGlobalLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps();\n const { layout } = this.visualElement.projection || {};\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative.\n */\n if (prevConstraints !== this.constraints &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = \"_drag\" + axis.toUpperCase();\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, (props.initial ? props.initial[axis] : undefined) || 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n axisValue.set(point[axis] - mix(min, max, 0.5));\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mix(min, max, boxProgress[axis]));\n });\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n drag && dragListener && this.start(event);\n });\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints)) {\n this.constraints = this.resolveRefConstraints();\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n measureDragConstraints();\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n","import { PanSession } from './PanSession.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.update(() => handler(event, info));\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), { transformPagePoint: this.node.getTransformPagePoint() });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: onPan,\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.update(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n\nexport { PanGesture };\n","/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nconst globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false,\n};\n\nexport { globalProjectionState };\n","import { px } from '../../value/types/numbers/units.mjs';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nconst correctBorderRadius = {\n correct: (latest, node) => {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n","import { mix } from '../../utils/mix.mjs';\nimport { complex } from '../../value/types/complex/index.mjs';\n\nconst correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n const xScale = projectionDelta.x.scale * treeScale.x;\n const yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mix(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n return template(shadow);\n },\n};\n\nexport { correctBoxShadow };\n","import React__default, { useContext } from 'react';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';\nimport { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';\nimport { globalProjectionState } from '../../../projection/node/state.mjs';\nimport { correctBorderRadius } from '../../../projection/styles/scale-border-radius.mjs';\nimport { correctBoxShadow } from '../../../projection/styles/scale-box-shadow.mjs';\nimport { addScaleCorrector } from '../../../projection/styles/scale-correction.mjs';\nimport { frame } from '../../../frameloop/frame.mjs';\n\nclass MeasureLayoutWithContext extends React__default.Component {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;\n const { projection } = visualElement;\n addScaleCorrector(defaultScaleCorrectors);\n if (projection) {\n if (layoutGroup.group)\n layoutGroup.group.add(projection);\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection);\n }\n projection.root.didUpdate();\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove();\n });\n projection.setOptions({\n ...projection.options,\n onExitComplete: () => this.safeToRemove(),\n });\n }\n globalProjectionState.hasEverUpdated = true;\n }\n getSnapshotBeforeUpdate(prevProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props;\n const projection = visualElement.projection;\n if (!projection)\n return null;\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined) {\n projection.willUpdate();\n }\n else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote();\n }\n else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n frame.postRender(() => {\n const stack = projection.getStack();\n if (!stack || !stack.members.length) {\n this.safeToRemove();\n }\n });\n }\n }\n return null;\n }\n componentDidUpdate() {\n const { projection } = this.props.visualElement;\n if (projection) {\n projection.root.didUpdate();\n queueMicrotask(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n });\n }\n }\n componentWillUnmount() {\n const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props;\n const { projection } = visualElement;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n }\n safeToRemove() {\n const { safeToRemove } = this.props;\n safeToRemove && safeToRemove();\n }\n render() {\n return null;\n }\n}\nfunction MeasureLayout(props) {\n const [isPresent, safeToRemove] = usePresence();\n const layoutGroup = useContext(LayoutGroupContext);\n return (React__default.createElement(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove }));\n}\nconst defaultScaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\n\nexport { MeasureLayout };\n","import { useContext, useId, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return
\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed the tree, but\n * `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence() {\n const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent, onExitComplete, register } = context;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n const id = useId();\n useEffect(() => register(id), []);\n const safeToRemove = () => onExitComplete && onExitComplete(id);\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return
\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n","import { circOut } from '../../easing/circ.mjs';\nimport { progress } from '../../utils/progress.mjs';\nimport { mix } from '../../utils/mix.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { percent, px } from '../../value/types/numbers/units.mjs';\n\nconst borders = [\"TopLeft\", \"TopRight\", \"BottomLeft\", \"BottomRight\"];\nconst numBorders = borders.length;\nconst asNumber = (value) => typeof value === \"string\" ? parseFloat(value) : value;\nconst isPx = (value) => typeof value === \"number\" || px.test(value);\nfunction mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {\n if (shouldCrossfadeOpacity) {\n target.opacity = mix(0, \n // TODO Reinstate this if only child\n lead.opacity !== undefined ? lead.opacity : 1, easeCrossfadeIn(progress));\n target.opacityExit = mix(follow.opacity !== undefined ? follow.opacity : 1, 0, easeCrossfadeOut(progress));\n }\n else if (isOnlyMember) {\n target.opacity = mix(follow.opacity !== undefined ? follow.opacity : 1, lead.opacity !== undefined ? lead.opacity : 1, progress);\n }\n /**\n * Mix border radius\n */\n for (let i = 0; i < numBorders; i++) {\n const borderLabel = `border${borders[i]}Radius`;\n let followRadius = getRadius(follow, borderLabel);\n let leadRadius = getRadius(lead, borderLabel);\n if (followRadius === undefined && leadRadius === undefined)\n continue;\n followRadius || (followRadius = 0);\n leadRadius || (leadRadius = 0);\n const canMix = followRadius === 0 ||\n leadRadius === 0 ||\n isPx(followRadius) === isPx(leadRadius);\n if (canMix) {\n target[borderLabel] = Math.max(mix(asNumber(followRadius), asNumber(leadRadius), progress), 0);\n if (percent.test(leadRadius) || percent.test(followRadius)) {\n target[borderLabel] += \"%\";\n }\n }\n else {\n target[borderLabel] = leadRadius;\n }\n }\n /**\n * Mix rotation\n */\n if (follow.rotate || lead.rotate) {\n target.rotate = mix(follow.rotate || 0, lead.rotate || 0, progress);\n }\n}\nfunction getRadius(values, radiusName) {\n return values[radiusName] !== undefined\n ? values[radiusName]\n : values.borderRadius;\n}\n// /**\n// * We only want to mix the background color if there's a follow element\n// * that we're not crossfading opacity between. For instance with switch\n// * AnimateSharedLayout animations, this helps the illusion of a continuous\n// * element being animated but also cuts down on the number of paints triggered\n// * for elements where opacity is doing that work for us.\n// */\n// if (\n// !hasFollowElement &&\n// latestLeadValues.backgroundColor &&\n// latestFollowValues.backgroundColor\n// ) {\n// /**\n// * This isn't ideal performance-wise as mixColor is creating a new function every frame.\n// * We could probably create a mixer that runs at the start of the animation but\n// * the idea behind the crossfader is that it runs dynamically between two potentially\n// * changing targets (ie opacity or borderRadius may be animating independently via variants)\n// */\n// leadState.backgroundColor = followState.backgroundColor = mixColor(\n// latestFollowValues.backgroundColor as string,\n// latestLeadValues.backgroundColor as string\n// )(p)\n// }\nconst easeCrossfadeIn = compress(0, 0.5, circOut);\nconst easeCrossfadeOut = compress(0.5, 0.95, noop);\nfunction compress(min, max, easing) {\n return (p) => {\n // Could replace ifs with clamp\n if (p < min)\n return 0;\n if (p > max)\n return 1;\n return easing(progress(min, max, p));\n };\n}\n\nexport { mixValues };\n","/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisInto(axis, originAxis) {\n axis.min = originAxis.min;\n axis.max = originAxis.max;\n}\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyBoxInto(box, originBox) {\n copyAxisInto(box.x, originBox.x);\n copyAxisInto(box.y, originBox.y);\n}\n\nexport { copyAxisInto, copyBoxInto };\n","import { mix } from '../../utils/mix.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n const relativeProgress = mix(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n let originPoint = mix(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);\n removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n","import { calcLength } from './delta-calc.mjs';\n\nfunction isAxisDeltaZero(delta) {\n return delta.translate === 0 && delta.scale === 1;\n}\nfunction isDeltaZero(delta) {\n return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);\n}\nfunction boxEquals(a, b) {\n return (a.x.min === b.x.min &&\n a.x.max === b.x.max &&\n a.y.min === b.y.min &&\n a.y.max === b.y.max);\n}\nfunction boxEqualsRounded(a, b) {\n return (Math.round(a.x.min) === Math.round(b.x.min) &&\n Math.round(a.x.max) === Math.round(b.x.max) &&\n Math.round(a.y.min) === Math.round(b.y.min) &&\n Math.round(a.y.max) === Math.round(b.y.max));\n}\nfunction aspectRatio(box) {\n return calcLength(box.x) / calcLength(box.y);\n}\n\nexport { aspectRatio, boxEquals, boxEqualsRounded, isDeltaZero };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\n\nclass NodeStack {\n constructor() {\n this.members = [];\n }\n add(node) {\n addUniqueItem(this.members, node);\n node.scheduleRender();\n }\n remove(node) {\n removeItem(this.members, node);\n if (node === this.prevLead) {\n this.prevLead = undefined;\n }\n if (node === this.lead) {\n const prevLead = this.members[this.members.length - 1];\n if (prevLead) {\n this.promote(prevLead);\n }\n }\n }\n relegate(node) {\n const indexOfNode = this.members.findIndex((member) => node === member);\n if (indexOfNode === 0)\n return false;\n /**\n * Find the next projection node that is present\n */\n let prevLead;\n for (let i = indexOfNode; i >= 0; i--) {\n const member = this.members[i];\n if (member.isPresent !== false) {\n prevLead = member;\n break;\n }\n }\n if (prevLead) {\n this.promote(prevLead);\n return true;\n }\n else {\n return false;\n }\n }\n promote(node, preserveFollowOpacity) {\n const prevLead = this.lead;\n if (node === prevLead)\n return;\n this.prevLead = prevLead;\n this.lead = node;\n node.show();\n if (prevLead) {\n prevLead.instance && prevLead.scheduleRender();\n node.scheduleRender();\n node.resumeFrom = prevLead;\n if (preserveFollowOpacity) {\n node.resumeFrom.preserveOpacity = true;\n }\n if (prevLead.snapshot) {\n node.snapshot = prevLead.snapshot;\n node.snapshot.latestValues =\n prevLead.animationValues || prevLead.latestValues;\n }\n if (node.root && node.root.isUpdating) {\n node.isLayoutDirty = true;\n }\n const { crossfade } = node.options;\n if (crossfade === false) {\n prevLead.hide();\n }\n /**\n * TODO:\n * - Test border radius when previous node was deleted\n * - boxShadow mixing\n * - Shared between element A in scrolled container and element B (scroll stays the same or changes)\n * - Shared between element A in transformed container and element B (transform stays the same or changes)\n * - Shared between element A in scrolled page and element B (scroll stays the same or changes)\n * ---\n * - Crossfade opacity of root nodes\n * - layoutId changes after animation\n * - layoutId changes mid animation\n */\n }\n }\n exitAnimationComplete() {\n this.members.forEach((node) => {\n const { options, resumingFrom } = node;\n options.onExitComplete && options.onExitComplete();\n if (resumingFrom) {\n resumingFrom.options.onExitComplete &&\n resumingFrom.options.onExitComplete();\n }\n });\n }\n scheduleRender() {\n this.members.forEach((node) => {\n node.instance && node.scheduleRender(false);\n });\n }\n /**\n * Clear any leads that have been removed this render to prevent them from being\n * used in future animations and to prevent memory leaks\n */\n removeLeadSnapshot() {\n if (this.lead && this.lead.snapshot) {\n this.lead.snapshot = undefined;\n }\n }\n}\n\nexport { NodeStack };\n","function buildProjectionTransform(delta, treeScale, latestTransform) {\n let transform = \"\";\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n const xTranslate = delta.x.translate / treeScale.x;\n const yTranslate = delta.y.translate / treeScale.y;\n if (xTranslate || yTranslate) {\n transform = `translate3d(${xTranslate}px, ${yTranslate}px, 0) `;\n }\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;\n }\n if (latestTransform) {\n const { rotate, rotateX, rotateY } = latestTransform;\n if (rotate)\n transform += `rotate(${rotate}deg) `;\n if (rotateX)\n transform += `rotateX(${rotateX}deg) `;\n if (rotateY)\n transform += `rotateY(${rotateY}deg) `;\n }\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n const elementScaleX = delta.x.scale * treeScale.x;\n const elementScaleY = delta.y.scale * treeScale.y;\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform += `scale(${elementScaleX}, ${elementScaleY})`;\n }\n return transform || \"none\";\n}\n\nexport { buildProjectionTransform };\n","const compareByDepth = (a, b) => a.depth - b.depth;\n\nexport { compareByDepth };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\nimport { compareByDepth } from './compare-by-depth.mjs';\n\nclass FlatTree {\n constructor() {\n this.children = [];\n this.isDirty = false;\n }\n add(child) {\n addUniqueItem(this.children, child);\n this.isDirty = true;\n }\n remove(child) {\n removeItem(this.children, child);\n this.isDirty = true;\n }\n forEach(callback) {\n this.isDirty && this.children.sort(compareByDepth);\n this.isDirty = false;\n this.children.forEach(callback);\n }\n}\n\nexport { FlatTree };\n","import { SubscriptionManager } from '../../utils/subscription-manager.mjs';\nimport { mixValues } from '../animation/mix-values.mjs';\nimport { copyBoxInto } from '../geometry/copy.mjs';\nimport { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from '../geometry/delta-apply.mjs';\nimport { calcRelativePosition, calcRelativeBox, calcBoxDelta, calcLength, isNear } from '../geometry/delta-calc.mjs';\nimport { removeBoxTransforms } from '../geometry/delta-remove.mjs';\nimport { createBox, createDelta } from '../geometry/models.mjs';\nimport { getValueTransition } from '../../animation/utils/transitions.mjs';\nimport { boxEqualsRounded, isDeltaZero, aspectRatio, boxEquals } from '../geometry/utils.mjs';\nimport { NodeStack } from '../shared/stack.mjs';\nimport { scaleCorrectors } from '../styles/scale-correction.mjs';\nimport { buildProjectionTransform } from '../styles/transform.mjs';\nimport { eachAxis } from '../utils/each-axis.mjs';\nimport { hasTransform, hasScale, has2DTranslate } from '../utils/has-transform.mjs';\nimport { FlatTree } from '../../render/utils/flat-tree.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { globalProjectionState } from './state.mjs';\nimport { delay } from '../../utils/delay.mjs';\nimport { mix } from '../../utils/mix.mjs';\nimport { record } from '../../debug/record.mjs';\nimport { isSVGElement } from '../../render/dom/utils/is-svg-element.mjs';\nimport { animateSingleValue } from '../../animation/interfaces/single-value.mjs';\nimport { clamp } from '../../utils/clamp.mjs';\nimport { cancelFrame, frameData, steps, frame } from '../../frameloop/frame.mjs';\nimport { noop } from '../../utils/noop.mjs';\n\nconst transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nconst animationTarget = 1000;\nlet id = 0;\n/**\n * Use a mutable data object for debug data so as to not create a new\n * object every frame.\n */\nconst projectionFrameData = {\n type: \"projectionFrame\",\n totalNodes: 0,\n resolvedTargetDeltas: 0,\n recalculatedProjection: 0,\n};\nfunction createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) {\n return class ProjectionNode {\n constructor(latestValues = {}, parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent()) {\n /**\n * A unique ID generated for every projection node.\n */\n this.id = id++;\n /**\n * An id that represents a unique session instigated by startUpdate.\n */\n this.animationId = 0;\n /**\n * A Set containing all this component's children. This is used to iterate\n * through the children.\n *\n * TODO: This could be faster to iterate as a flat array stored on the root node.\n */\n this.children = new Set();\n /**\n * Options for the node. We use this to configure what kind of layout animations\n * we should perform (if any).\n */\n this.options = {};\n /**\n * We use this to detect when its safe to shut down part of a projection tree.\n * We have to keep projecting children for scale correction and relative projection\n * until all their parents stop performing layout animations.\n */\n this.isTreeAnimating = false;\n this.isAnimationBlocked = false;\n /**\n * Flag to true if we think this layout has been changed. We can't always know this,\n * currently we set it to true every time a component renders, or if it has a layoutDependency\n * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n * and if one node is dirtied, they all are.\n */\n this.isLayoutDirty = false;\n /**\n * Flag to true if we think the projection calculations for this node needs\n * recalculating as a result of an updated transform or layout animation.\n */\n this.isProjectionDirty = false;\n /**\n * Flag to true if the layout *or* transform has changed. This then gets propagated\n * throughout the projection tree, forcing any element below to recalculate on the next frame.\n */\n this.isSharedProjectionDirty = false;\n /**\n * Flag transform dirty. This gets propagated throughout the whole tree but is only\n * respected by shared nodes.\n */\n this.isTransformDirty = false;\n /**\n * Block layout updates for instant layout transitions throughout the tree.\n */\n this.updateManuallyBlocked = false;\n this.updateBlockedByResize = false;\n /**\n * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n * call.\n */\n this.isUpdating = false;\n /**\n * If this is an SVG element we currently disable projection transforms\n */\n this.isSVG = false;\n /**\n * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n * its projection styles.\n */\n this.needsReset = false;\n /**\n * Flags whether this node should have its transform reset prior to measuring.\n */\n this.shouldResetTransform = false;\n /**\n * An object representing the calculated contextual/accumulated/tree scale.\n * This will be used to scale calculcated projection transforms, as these are\n * calculated in screen-space but need to be scaled for elements to layoutly\n * make it to their calculated destinations.\n *\n * TODO: Lazy-init\n */\n this.treeScale = { x: 1, y: 1 };\n /**\n *\n */\n this.eventHandlers = new Map();\n this.hasTreeAnimated = false;\n // Note: Currently only running on root node\n this.updateScheduled = false;\n this.checkUpdateFailed = () => {\n if (this.isUpdating) {\n this.isUpdating = false;\n this.clearAllSnapshots();\n }\n };\n /**\n * This is a multi-step process as shared nodes might be of different depths. Nodes\n * are sorted by depth order, so we need to resolve the entire tree before moving to\n * the next step.\n */\n this.updateProjection = () => {\n /**\n * Reset debug counts. Manually resetting rather than creating a new\n * object each frame.\n */\n projectionFrameData.totalNodes =\n projectionFrameData.resolvedTargetDeltas =\n projectionFrameData.recalculatedProjection =\n 0;\n this.nodes.forEach(propagateDirtyNodes);\n this.nodes.forEach(resolveTargetDelta);\n this.nodes.forEach(calcProjection);\n this.nodes.forEach(cleanDirtyNodes);\n record(projectionFrameData);\n };\n this.hasProjected = false;\n this.isVisible = true;\n this.animationProgress = 0;\n /**\n * Shared layout\n */\n // TODO Only running on root node\n this.sharedNodes = new Map();\n this.latestValues = latestValues;\n this.root = parent ? parent.root || parent : this;\n this.path = parent ? [...parent.path, parent] : [];\n this.parent = parent;\n this.depth = parent ? parent.depth + 1 : 0;\n for (let i = 0; i < this.path.length; i++) {\n this.path[i].shouldResetTransform = true;\n }\n if (this.root === this)\n this.nodes = new FlatTree();\n }\n addEventListener(name, handler) {\n if (!this.eventHandlers.has(name)) {\n this.eventHandlers.set(name, new SubscriptionManager());\n }\n return this.eventHandlers.get(name).add(handler);\n }\n notifyListeners(name, ...args) {\n const subscriptionManager = this.eventHandlers.get(name);\n subscriptionManager && subscriptionManager.notify(...args);\n }\n hasListeners(name) {\n return this.eventHandlers.has(name);\n }\n /**\n * Lifecycles\n */\n mount(instance, isLayoutDirty = this.root.hasTreeAnimated) {\n if (this.instance)\n return;\n this.isSVG = isSVGElement(instance);\n this.instance = instance;\n const { layoutId, layout, visualElement } = this.options;\n if (visualElement && !visualElement.current) {\n visualElement.mount(instance);\n }\n this.root.nodes.add(this);\n this.parent && this.parent.children.add(this);\n if (isLayoutDirty && (layout || layoutId)) {\n this.isLayoutDirty = true;\n }\n if (attachResizeListener) {\n let cancelDelay;\n const resizeUnblockUpdate = () => (this.root.updateBlockedByResize = false);\n attachResizeListener(instance, () => {\n this.root.updateBlockedByResize = true;\n cancelDelay && cancelDelay();\n cancelDelay = delay(resizeUnblockUpdate, 250);\n if (globalProjectionState.hasAnimatedSinceResize) {\n globalProjectionState.hasAnimatedSinceResize = false;\n this.nodes.forEach(finishAnimation);\n }\n });\n }\n if (layoutId) {\n this.root.registerSharedNode(layoutId, this);\n }\n // Only register the handler if it requires layout animation\n if (this.options.animate !== false &&\n visualElement &&\n (layoutId || layout)) {\n this.addEventListener(\"didUpdate\", ({ delta, hasLayoutChanged, hasRelativeTargetChanged, layout: newLayout, }) => {\n if (this.isTreeAnimationBlocked()) {\n this.target = undefined;\n this.relativeTarget = undefined;\n return;\n }\n // TODO: Check here if an animation exists\n const layoutTransition = this.options.transition ||\n visualElement.getDefaultTransition() ||\n defaultLayoutTransition;\n const { onLayoutAnimationStart, onLayoutAnimationComplete, } = visualElement.getProps();\n /**\n * The target layout of the element might stay the same,\n * but its position relative to its parent has changed.\n */\n const targetChanged = !this.targetLayout ||\n !boxEqualsRounded(this.targetLayout, newLayout) ||\n hasRelativeTargetChanged;\n /**\n * If the layout hasn't seemed to have changed, it might be that the\n * element is visually in the same place in the document but its position\n * relative to its parent has indeed changed. So here we check for that.\n */\n const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;\n if (this.options.layoutRoot ||\n (this.resumeFrom && this.resumeFrom.instance) ||\n hasOnlyRelativeTargetChanged ||\n (hasLayoutChanged &&\n (targetChanged || !this.currentAnimation))) {\n if (this.resumeFrom) {\n this.resumingFrom = this.resumeFrom;\n this.resumingFrom.resumingFrom = undefined;\n }\n this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);\n const animationOptions = {\n ...getValueTransition(layoutTransition, \"layout\"),\n onPlay: onLayoutAnimationStart,\n onComplete: onLayoutAnimationComplete,\n };\n if (visualElement.shouldReduceMotion ||\n this.options.layoutRoot) {\n animationOptions.delay = 0;\n animationOptions.type = false;\n }\n this.startAnimation(animationOptions);\n }\n else {\n /**\n * If the layout hasn't changed and we have an animation that hasn't started yet,\n * finish it immediately. Otherwise it will be animating from a location\n * that was probably never commited to screen and look like a jumpy box.\n */\n if (!hasLayoutChanged) {\n finishAnimation(this);\n }\n if (this.isLead() && this.options.onExitComplete) {\n this.options.onExitComplete();\n }\n }\n this.targetLayout = newLayout;\n });\n }\n }\n unmount() {\n this.options.layoutId && this.willUpdate();\n this.root.nodes.remove(this);\n const stack = this.getStack();\n stack && stack.remove(this);\n this.parent && this.parent.children.delete(this);\n this.instance = undefined;\n cancelFrame(this.updateProjection);\n }\n // only on the root\n blockUpdate() {\n this.updateManuallyBlocked = true;\n }\n unblockUpdate() {\n this.updateManuallyBlocked = false;\n }\n isUpdateBlocked() {\n return this.updateManuallyBlocked || this.updateBlockedByResize;\n }\n isTreeAnimationBlocked() {\n return (this.isAnimationBlocked ||\n (this.parent && this.parent.isTreeAnimationBlocked()) ||\n false);\n }\n // Note: currently only running on root node\n startUpdate() {\n if (this.isUpdateBlocked())\n return;\n this.isUpdating = true;\n this.nodes && this.nodes.forEach(resetRotation);\n this.animationId++;\n }\n getTransformTemplate() {\n const { visualElement } = this.options;\n return visualElement && visualElement.getProps().transformTemplate;\n }\n willUpdate(shouldNotifyListeners = true) {\n this.root.hasTreeAnimated = true;\n if (this.root.isUpdateBlocked()) {\n this.options.onExitComplete && this.options.onExitComplete();\n return;\n }\n !this.root.isUpdating && this.root.startUpdate();\n if (this.isLayoutDirty)\n return;\n this.isLayoutDirty = true;\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.shouldResetTransform = true;\n node.updateScroll(\"snapshot\");\n if (node.options.layoutRoot) {\n node.willUpdate(false);\n }\n }\n const { layoutId, layout } = this.options;\n if (layoutId === undefined && !layout)\n return;\n const transformTemplate = this.getTransformTemplate();\n this.prevTransformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n this.updateSnapshot();\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\");\n }\n update() {\n this.updateScheduled = false;\n const updateWasBlocked = this.isUpdateBlocked();\n // When doing an instant transition, we skip the layout update,\n // but should still clean up the measurements so that the next\n // snapshot could be taken correctly.\n if (updateWasBlocked) {\n this.unblockUpdate();\n this.clearAllSnapshots();\n this.nodes.forEach(clearMeasurements);\n return;\n }\n if (!this.isUpdating) {\n this.nodes.forEach(clearIsLayoutDirty);\n }\n this.isUpdating = false;\n /**\n * Write\n */\n this.nodes.forEach(resetTransformStyle);\n /**\n * Read ==================\n */\n // Update layout measurements of updated children\n this.nodes.forEach(updateLayout);\n /**\n * Write\n */\n // Notify listeners that the layout is updated\n this.nodes.forEach(notifyLayoutUpdate);\n this.clearAllSnapshots();\n /**\n * Manually flush any pending updates. Ideally\n * we could leave this to the following requestAnimationFrame but this seems\n * to leave a flash of incorrectly styled content.\n */\n const now = performance.now();\n frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp);\n frameData.timestamp = now;\n frameData.isProcessing = true;\n steps.update.process(frameData);\n steps.preRender.process(frameData);\n steps.render.process(frameData);\n frameData.isProcessing = false;\n }\n didUpdate() {\n if (!this.updateScheduled) {\n this.updateScheduled = true;\n queueMicrotask(() => this.update());\n }\n }\n clearAllSnapshots() {\n this.nodes.forEach(clearSnapshot);\n this.sharedNodes.forEach(removeLeadSnapshots);\n }\n scheduleUpdateProjection() {\n frame.preRender(this.updateProjection, false, true);\n }\n scheduleCheckAfterUnmount() {\n /**\n * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n * we manually call didUpdate to give a chance to the siblings to animate.\n * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n */\n frame.postRender(() => {\n if (this.isLayoutDirty) {\n this.root.didUpdate();\n }\n else {\n this.root.checkUpdateFailed();\n }\n });\n }\n /**\n * Update measurements\n */\n updateSnapshot() {\n if (this.snapshot || !this.instance)\n return;\n this.snapshot = this.measure();\n }\n updateLayout() {\n if (!this.instance)\n return;\n // TODO: Incorporate into a forwarded scroll offset\n this.updateScroll();\n if (!(this.options.alwaysMeasureLayout && this.isLead()) &&\n !this.isLayoutDirty) {\n return;\n }\n /**\n * When a node is mounted, it simply resumes from the prevLead's\n * snapshot instead of taking a new one, but the ancestors scroll\n * might have updated while the prevLead is unmounted. We need to\n * update the scroll again to make sure the layout we measure is\n * up to date.\n */\n if (this.resumeFrom && !this.resumeFrom.instance) {\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.updateScroll();\n }\n }\n const prevLayout = this.layout;\n this.layout = this.measure(false);\n this.layoutCorrected = createBox();\n this.isLayoutDirty = false;\n this.projectionDelta = undefined;\n this.notifyListeners(\"measure\", this.layout.layoutBox);\n const { visualElement } = this.options;\n visualElement &&\n visualElement.notify(\"LayoutMeasure\", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined);\n }\n updateScroll(phase = \"measure\") {\n let needsMeasurement = Boolean(this.options.layoutScroll && this.instance);\n if (this.scroll &&\n this.scroll.animationId === this.root.animationId &&\n this.scroll.phase === phase) {\n needsMeasurement = false;\n }\n if (needsMeasurement) {\n this.scroll = {\n animationId: this.root.animationId,\n phase,\n isRoot: checkIsScrollRoot(this.instance),\n offset: measureScroll(this.instance),\n };\n }\n }\n resetTransform() {\n if (!resetTransform)\n return;\n const isResetRequested = this.isLayoutDirty || this.shouldResetTransform;\n const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);\n const transformTemplate = this.getTransformTemplate();\n const transformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;\n if (isResetRequested &&\n (hasProjection ||\n hasTransform(this.latestValues) ||\n transformTemplateHasChanged)) {\n resetTransform(this.instance, transformTemplateValue);\n this.shouldResetTransform = false;\n this.scheduleRender();\n }\n }\n measure(removeTransform = true) {\n const pageBox = this.measurePageBox();\n let layoutBox = this.removeElementScroll(pageBox);\n /**\n * Measurements taken during the pre-render stage\n * still have transforms applied so we remove them\n * via calculation.\n */\n if (removeTransform) {\n layoutBox = this.removeTransform(layoutBox);\n }\n roundBox(layoutBox);\n return {\n animationId: this.root.animationId,\n measuredBox: pageBox,\n layoutBox,\n latestValues: {},\n source: this.id,\n };\n }\n measurePageBox() {\n const { visualElement } = this.options;\n if (!visualElement)\n return createBox();\n const box = visualElement.measureViewportBox();\n // Remove viewport scroll to give page-relative coordinates\n const { scroll } = this.root;\n if (scroll) {\n translateAxis(box.x, scroll.offset.x);\n translateAxis(box.y, scroll.offset.y);\n }\n return box;\n }\n removeElementScroll(box) {\n const boxWithoutScroll = createBox();\n copyBoxInto(boxWithoutScroll, box);\n /**\n * Performance TODO: Keep a cumulative scroll offset down the tree\n * rather than loop back up the path.\n */\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n const { scroll, options } = node;\n if (node !== this.root && scroll && options.layoutScroll) {\n /**\n * If this is a new scroll root, we want to remove all previous scrolls\n * from the viewport box.\n */\n if (scroll.isRoot) {\n copyBoxInto(boxWithoutScroll, box);\n const { scroll: rootScroll } = this.root;\n /**\n * Undo the application of page scroll that was originally added\n * to the measured bounding box.\n */\n if (rootScroll) {\n translateAxis(boxWithoutScroll.x, -rootScroll.offset.x);\n translateAxis(boxWithoutScroll.y, -rootScroll.offset.y);\n }\n }\n translateAxis(boxWithoutScroll.x, scroll.offset.x);\n translateAxis(boxWithoutScroll.y, scroll.offset.y);\n }\n }\n return boxWithoutScroll;\n }\n applyTransform(box, transformOnly = false) {\n const withTransforms = createBox();\n copyBoxInto(withTransforms, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!transformOnly &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(withTransforms, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y,\n });\n }\n if (!hasTransform(node.latestValues))\n continue;\n transformBox(withTransforms, node.latestValues);\n }\n if (hasTransform(this.latestValues)) {\n transformBox(withTransforms, this.latestValues);\n }\n return withTransforms;\n }\n removeTransform(box) {\n const boxWithoutTransform = createBox();\n copyBoxInto(boxWithoutTransform, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!node.instance)\n continue;\n if (!hasTransform(node.latestValues))\n continue;\n hasScale(node.latestValues) && node.updateSnapshot();\n const sourceBox = createBox();\n const nodeBox = node.measurePageBox();\n copyBoxInto(sourceBox, nodeBox);\n removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot ? node.snapshot.layoutBox : undefined, sourceBox);\n }\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues);\n }\n return boxWithoutTransform;\n }\n setTargetDelta(delta) {\n this.targetDelta = delta;\n this.root.scheduleUpdateProjection();\n this.isProjectionDirty = true;\n }\n setOptions(options) {\n this.options = {\n ...this.options,\n ...options,\n crossfade: options.crossfade !== undefined ? options.crossfade : true,\n };\n }\n clearMeasurements() {\n this.scroll = undefined;\n this.layout = undefined;\n this.snapshot = undefined;\n this.prevTransformTemplateValue = undefined;\n this.targetDelta = undefined;\n this.target = undefined;\n this.isLayoutDirty = false;\n }\n forceRelativeParentToResolveTarget() {\n if (!this.relativeParent)\n return;\n /**\n * If the parent target isn't up-to-date, force it to update.\n * This is an unfortunate de-optimisation as it means any updating relative\n * projection will cause all the relative parents to recalculate back\n * up the tree.\n */\n if (this.relativeParent.resolvedRelativeTargetAt !==\n frameData.timestamp) {\n this.relativeParent.resolveTargetDelta(true);\n }\n }\n resolveTargetDelta(forceRecalculation = false) {\n var _a;\n /**\n * Once the dirty status of nodes has been spread through the tree, we also\n * need to check if we have a shared node of a different depth that has itself\n * been dirtied.\n */\n const lead = this.getLead();\n this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty);\n this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty);\n this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty);\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n /**\n * We don't use transform for this step of processing so we don't\n * need to check whether any nodes have changed transform.\n */\n const canSkip = !(forceRecalculation ||\n (isShared && this.isSharedProjectionDirty) ||\n this.isProjectionDirty ||\n ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty) ||\n this.attemptToResolveRelativeTarget);\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If we have no layout, we can't perform projection, so early return\n */\n if (!this.layout || !(layout || layoutId))\n return;\n this.resolvedRelativeTargetAt = frameData.timestamp;\n /**\n * If we don't have a targetDelta but do have a layout, we can attempt to resolve\n * a relativeParent. This will allow a component to perform scale correction\n * even if no animation has started.\n */\n // TODO If this is unsuccessful this currently happens every frame\n if (!this.targetDelta && !this.relativeTarget) {\n // TODO: This is a semi-repetition of further down this function, make DRY\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n relativeParent.layout &&\n this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.layout.layoutBox, relativeParent.layout.layoutBox);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\n }\n }\n /**\n * If we have no relative target or no target delta our target isn't valid\n * for this frame.\n */\n if (!this.relativeTarget && !this.targetDelta)\n return;\n /**\n * Lazy-init target data structure\n */\n if (!this.target) {\n this.target = createBox();\n this.targetWithTransforms = createBox();\n }\n /**\n * If we've got a relative box for this component, resolve it into a target relative to the parent.\n */\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.relativeParent &&\n this.relativeParent.target) {\n this.forceRelativeParentToResolveTarget();\n calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target);\n /**\n * If we've only got a targetDelta, resolve it into a target\n */\n }\n else if (this.targetDelta) {\n if (Boolean(this.resumingFrom)) {\n // TODO: This is creating a new object every frame\n this.target = this.applyTransform(this.layout.layoutBox);\n }\n else {\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n applyBoxDelta(this.target, this.targetDelta);\n }\n else {\n /**\n * If no target, use own layout as target\n */\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n /**\n * If we've been told to attempt to resolve a relative target, do so.\n */\n if (this.attemptToResolveRelativeTarget) {\n this.attemptToResolveRelativeTarget = false;\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n Boolean(relativeParent.resumingFrom) ===\n Boolean(this.resumingFrom) &&\n !relativeParent.options.layoutScroll &&\n relativeParent.target &&\n this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.target, relativeParent.target);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\n }\n }\n /**\n * Increase debug counter for resolved target deltas\n */\n projectionFrameData.resolvedTargetDeltas++;\n }\n getClosestProjectingParent() {\n if (!this.parent ||\n hasScale(this.parent.latestValues) ||\n has2DTranslate(this.parent.latestValues)) {\n return undefined;\n }\n if (this.parent.isProjecting()) {\n return this.parent;\n }\n else {\n return this.parent.getClosestProjectingParent();\n }\n }\n isProjecting() {\n return Boolean((this.relativeTarget ||\n this.targetDelta ||\n this.options.layoutRoot) &&\n this.layout);\n }\n calcProjection() {\n var _a;\n const lead = this.getLead();\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n let canSkip = true;\n /**\n * If this is a normal layout animation and neither this node nor its nearest projecting\n * is dirty then we can't skip.\n */\n if (this.isProjectionDirty || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty)) {\n canSkip = false;\n }\n /**\n * If this is a shared layout animation and this node's shared projection is dirty then\n * we can't skip.\n */\n if (isShared &&\n (this.isSharedProjectionDirty || this.isTransformDirty)) {\n canSkip = false;\n }\n /**\n * If we have resolved the target this frame we must recalculate the\n * projection to ensure it visually represents the internal calculations.\n */\n if (this.resolvedRelativeTargetAt === frameData.timestamp) {\n canSkip = false;\n }\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If this section of the tree isn't animating we can\n * delete our target sources for the following frame.\n */\n this.isTreeAnimating = Boolean((this.parent && this.parent.isTreeAnimating) ||\n this.currentAnimation ||\n this.pendingAnimation);\n if (!this.isTreeAnimating) {\n this.targetDelta = this.relativeTarget = undefined;\n }\n if (!this.layout || !(layout || layoutId))\n return;\n /**\n * Reset the corrected box with the latest values from box, as we're then going\n * to perform mutative operations on it.\n */\n copyBoxInto(this.layoutCorrected, this.layout.layoutBox);\n /**\n * Record previous tree scales before updating.\n */\n const prevTreeScaleX = this.treeScale.x;\n const prevTreeScaleY = this.treeScale.y;\n /**\n * Apply all the parent deltas to this box to produce the corrected box. This\n * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n */\n applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared);\n /**\n * If this layer needs to perform scale correction but doesn't have a target,\n * use the layout as the target.\n */\n if (lead.layout &&\n !lead.target &&\n (this.treeScale.x !== 1 || this.treeScale.y !== 1)) {\n lead.target = lead.layout.layoutBox;\n }\n const { target } = lead;\n if (!target) {\n /**\n * If we don't have a target to project into, but we were previously\n * projecting, we want to remove the stored transform and schedule\n * a render to ensure the elements reflect the removed transform.\n */\n if (this.projectionTransform) {\n this.projectionDelta = createDelta();\n this.projectionTransform = \"none\";\n this.scheduleRender();\n }\n return;\n }\n if (!this.projectionDelta) {\n this.projectionDelta = createDelta();\n this.projectionDeltaWithTransform = createDelta();\n }\n const prevProjectionTransform = this.projectionTransform;\n /**\n * Update the delta between the corrected box and the target box before user-set transforms were applied.\n * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n * for our layout reprojection, but still allow them to be scaled correctly by the user.\n * It might be that to simplify this we may want to accept that user-set scale is also corrected\n * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n * to allow people to choose whether these styles are corrected based on just the\n * layout reprojection or the final bounding box.\n */\n calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);\n this.projectionTransform = buildProjectionTransform(this.projectionDelta, this.treeScale);\n if (this.projectionTransform !== prevProjectionTransform ||\n this.treeScale.x !== prevTreeScaleX ||\n this.treeScale.y !== prevTreeScaleY) {\n this.hasProjected = true;\n this.scheduleRender();\n this.notifyListeners(\"projectionUpdate\", target);\n }\n /**\n * Increase debug counter for recalculated projections\n */\n projectionFrameData.recalculatedProjection++;\n }\n hide() {\n this.isVisible = false;\n // TODO: Schedule render\n }\n show() {\n this.isVisible = true;\n // TODO: Schedule render\n }\n scheduleRender(notifyAll = true) {\n this.options.scheduleRender && this.options.scheduleRender();\n if (notifyAll) {\n const stack = this.getStack();\n stack && stack.scheduleRender();\n }\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = undefined;\n }\n }\n setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false) {\n const snapshot = this.snapshot;\n const snapshotLatestValues = snapshot\n ? snapshot.latestValues\n : {};\n const mixedValues = { ...this.latestValues };\n const targetDelta = createDelta();\n if (!this.relativeParent ||\n !this.relativeParent.options.layoutRoot) {\n this.relativeTarget = this.relativeTargetOrigin = undefined;\n }\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;\n const relativeLayout = createBox();\n const snapshotSource = snapshot ? snapshot.source : undefined;\n const layoutSource = this.layout ? this.layout.source : undefined;\n const isSharedLayoutAnimation = snapshotSource !== layoutSource;\n const stack = this.getStack();\n const isOnlyMember = !stack || stack.members.length <= 1;\n const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation &&\n !isOnlyMember &&\n this.options.crossfade === true &&\n !this.path.some(hasOpacityCrossfade));\n this.animationProgress = 0;\n let prevRelativeTarget;\n this.mixTargetDelta = (latest) => {\n const progress = latest / 1000;\n mixAxisDelta(targetDelta.x, delta.x, progress);\n mixAxisDelta(targetDelta.y, delta.y, progress);\n this.setTargetDelta(targetDelta);\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.layout &&\n this.relativeParent &&\n this.relativeParent.layout) {\n calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox);\n mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress);\n /**\n * If this is an unchanged relative target we can consider the\n * projection not dirty.\n */\n if (prevRelativeTarget &&\n boxEquals(this.relativeTarget, prevRelativeTarget)) {\n this.isProjectionDirty = false;\n }\n if (!prevRelativeTarget)\n prevRelativeTarget = createBox();\n copyBoxInto(prevRelativeTarget, this.relativeTarget);\n }\n if (isSharedLayoutAnimation) {\n this.animationValues = mixedValues;\n mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);\n }\n this.root.scheduleUpdateProjection();\n this.scheduleRender();\n this.animationProgress = progress;\n };\n this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0);\n }\n startAnimation(options) {\n this.notifyListeners(\"animationStart\");\n this.currentAnimation && this.currentAnimation.stop();\n if (this.resumingFrom && this.resumingFrom.currentAnimation) {\n this.resumingFrom.currentAnimation.stop();\n }\n if (this.pendingAnimation) {\n cancelFrame(this.pendingAnimation);\n this.pendingAnimation = undefined;\n }\n /**\n * Start the animation in the next frame to have a frame with progress 0,\n * where the target is the same as when the animation started, so we can\n * calculate the relative positions correctly for instant transitions.\n */\n this.pendingAnimation = frame.update(() => {\n globalProjectionState.hasAnimatedSinceResize = true;\n this.currentAnimation = animateSingleValue(0, animationTarget, {\n ...options,\n onUpdate: (latest) => {\n this.mixTargetDelta(latest);\n options.onUpdate && options.onUpdate(latest);\n },\n onComplete: () => {\n options.onComplete && options.onComplete();\n this.completeAnimation();\n },\n });\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = this.currentAnimation;\n }\n this.pendingAnimation = undefined;\n });\n }\n completeAnimation() {\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = undefined;\n this.resumingFrom.preserveOpacity = undefined;\n }\n const stack = this.getStack();\n stack && stack.exitAnimationComplete();\n this.resumingFrom =\n this.currentAnimation =\n this.animationValues =\n undefined;\n this.notifyListeners(\"animationComplete\");\n }\n finishAnimation() {\n if (this.currentAnimation) {\n this.mixTargetDelta && this.mixTargetDelta(animationTarget);\n this.currentAnimation.stop();\n }\n this.completeAnimation();\n }\n applyTransformsToTarget() {\n const lead = this.getLead();\n let { targetWithTransforms, target, layout, latestValues } = lead;\n if (!targetWithTransforms || !target || !layout)\n return;\n /**\n * If we're only animating position, and this element isn't the lead element,\n * then instead of projecting into the lead box we instead want to calculate\n * a new target that aligns the two boxes but maintains the layout shape.\n */\n if (this !== lead &&\n this.layout &&\n layout &&\n shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) {\n target = this.target || createBox();\n const xLength = calcLength(this.layout.layoutBox.x);\n target.x.min = lead.target.x.min;\n target.x.max = target.x.min + xLength;\n const yLength = calcLength(this.layout.layoutBox.y);\n target.y.min = lead.target.y.min;\n target.y.max = target.y.min + yLength;\n }\n copyBoxInto(targetWithTransforms, target);\n /**\n * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n * This is the final box that we will then project into by calculating a transform delta and\n * applying it to the corrected box.\n */\n transformBox(targetWithTransforms, latestValues);\n /**\n * Update the delta between the corrected box and the final target box, after\n * user-set transforms are applied to it. This will be used by the renderer to\n * create a transform style that will reproject the element from its layout layout\n * into the desired bounding box.\n */\n calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);\n }\n registerSharedNode(layoutId, node) {\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack());\n }\n const stack = this.sharedNodes.get(layoutId);\n stack.add(node);\n const config = node.options.initialPromotionConfig;\n node.promote({\n transition: config ? config.transition : undefined,\n preserveFollowOpacity: config && config.shouldPreserveFollowOpacity\n ? config.shouldPreserveFollowOpacity(node)\n : undefined,\n });\n }\n isLead() {\n const stack = this.getStack();\n return stack ? stack.lead === this : true;\n }\n getLead() {\n var _a;\n const { layoutId } = this.options;\n return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;\n }\n getPrevLead() {\n var _a;\n const { layoutId } = this.options;\n return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined;\n }\n getStack() {\n const { layoutId } = this.options;\n if (layoutId)\n return this.root.sharedNodes.get(layoutId);\n }\n promote({ needsReset, transition, preserveFollowOpacity, } = {}) {\n const stack = this.getStack();\n if (stack)\n stack.promote(this, preserveFollowOpacity);\n if (needsReset) {\n this.projectionDelta = undefined;\n this.needsReset = true;\n }\n if (transition)\n this.setOptions({ transition });\n }\n relegate() {\n const stack = this.getStack();\n if (stack) {\n return stack.relegate(this);\n }\n else {\n return false;\n }\n }\n resetRotation() {\n const { visualElement } = this.options;\n if (!visualElement)\n return;\n // If there's no detected rotation values, we can early return without a forced render.\n let hasRotate = false;\n /**\n * An unrolled check for rotation values. Most elements don't have any rotation and\n * skipping the nested loop and new object creation is 50% faster.\n */\n const { latestValues } = visualElement;\n if (latestValues.rotate ||\n latestValues.rotateX ||\n latestValues.rotateY ||\n latestValues.rotateZ) {\n hasRotate = true;\n }\n // If there's no rotation values, we don't need to do any more.\n if (!hasRotate)\n return;\n const resetValues = {};\n // Check the rotate value of all axes and reset to 0\n for (let i = 0; i < transformAxes.length; i++) {\n const key = \"rotate\" + transformAxes[i];\n // Record the rotation and then temporarily set it to 0\n if (latestValues[key]) {\n resetValues[key] = latestValues[key];\n visualElement.setStaticValue(key, 0);\n }\n }\n // Force a render of this element to apply the transform with all rotations\n // set to 0.\n visualElement.render();\n // Put back all the values we reset\n for (const key in resetValues) {\n visualElement.setStaticValue(key, resetValues[key]);\n }\n // Schedule a render for the next frame. This ensures we won't visually\n // see the element with the reset rotate value applied.\n visualElement.scheduleRender();\n }\n getProjectionStyles(styleProp = {}) {\n var _a, _b;\n // TODO: Return lifecycle-persistent object\n const styles = {};\n if (!this.instance || this.isSVG)\n return styles;\n if (!this.isVisible) {\n return { visibility: \"hidden\" };\n }\n else {\n styles.visibility = \"\";\n }\n const transformTemplate = this.getTransformTemplate();\n if (this.needsReset) {\n this.needsReset = false;\n styles.opacity = \"\";\n styles.pointerEvents =\n resolveMotionValue(styleProp.pointerEvents) || \"\";\n styles.transform = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : \"none\";\n return styles;\n }\n const lead = this.getLead();\n if (!this.projectionDelta || !this.layout || !lead.target) {\n const emptyStyles = {};\n if (this.options.layoutId) {\n emptyStyles.opacity =\n this.latestValues.opacity !== undefined\n ? this.latestValues.opacity\n : 1;\n emptyStyles.pointerEvents =\n resolveMotionValue(styleProp.pointerEvents) || \"\";\n }\n if (this.hasProjected && !hasTransform(this.latestValues)) {\n emptyStyles.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n this.hasProjected = false;\n }\n return emptyStyles;\n }\n const valuesToRender = lead.animationValues || lead.latestValues;\n this.applyTransformsToTarget();\n styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);\n if (transformTemplate) {\n styles.transform = transformTemplate(valuesToRender, styles.transform);\n }\n const { x, y } = this.projectionDelta;\n styles.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;\n if (lead.animationValues) {\n /**\n * If the lead component is animating, assign this either the entering/leaving\n * opacity\n */\n styles.opacity =\n lead === this\n ? (_b = (_a = valuesToRender.opacity) !== null && _a !== void 0 ? _a : this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1\n : this.preserveOpacity\n ? this.latestValues.opacity\n : valuesToRender.opacityExit;\n }\n else {\n /**\n * Or we're not animating at all, set the lead component to its layout\n * opacity and other components to hidden.\n */\n styles.opacity =\n lead === this\n ? valuesToRender.opacity !== undefined\n ? valuesToRender.opacity\n : \"\"\n : valuesToRender.opacityExit !== undefined\n ? valuesToRender.opacityExit\n : 0;\n }\n /**\n * Apply scale correction\n */\n for (const key in scaleCorrectors) {\n if (valuesToRender[key] === undefined)\n continue;\n const { correct, applyTo } = scaleCorrectors[key];\n /**\n * Only apply scale correction to the value if we have an\n * active projection transform. Otherwise these values become\n * vulnerable to distortion if the element changes size without\n * a corresponding layout animation.\n */\n const corrected = styles.transform === \"none\"\n ? valuesToRender[key]\n : correct(valuesToRender[key], lead);\n if (applyTo) {\n const num = applyTo.length;\n for (let i = 0; i < num; i++) {\n styles[applyTo[i]] = corrected;\n }\n }\n else {\n styles[key] = corrected;\n }\n }\n /**\n * Disable pointer events on follow components. This is to ensure\n * that if a follow component covers a lead component it doesn't block\n * pointer events on the lead.\n */\n if (this.options.layoutId) {\n styles.pointerEvents =\n lead === this\n ? resolveMotionValue(styleProp.pointerEvents) || \"\"\n : \"none\";\n }\n return styles;\n }\n clearSnapshot() {\n this.resumeFrom = this.snapshot = undefined;\n }\n // Only run on root\n resetTree() {\n this.root.nodes.forEach((node) => { var _a; return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); });\n this.root.nodes.forEach(clearMeasurements);\n this.root.sharedNodes.clear();\n }\n };\n}\nfunction updateLayout(node) {\n node.updateLayout();\n}\nfunction notifyLayoutUpdate(node) {\n var _a;\n const snapshot = ((_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) || node.snapshot;\n if (node.isLead() &&\n node.layout &&\n snapshot &&\n node.hasListeners(\"didUpdate\")) {\n const { layoutBox: layout, measuredBox: measuredLayout } = node.layout;\n const { animationType } = node.options;\n const isShared = snapshot.source !== node.layout.source;\n // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n // animations for instance if layout=\"size\" and an element has only changed position\n if (animationType === \"size\") {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(axisSnapshot);\n axisSnapshot.min = layout[axis].min;\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(layout[axis]);\n axisSnapshot.max = axisSnapshot.min + length;\n /**\n * Ensure relative target gets resized and rerendererd\n */\n if (node.relativeTarget && !node.currentAnimation) {\n node.isProjectionDirty = true;\n node.relativeTarget[axis].max =\n node.relativeTarget[axis].min + length;\n }\n });\n }\n const layoutDelta = createDelta();\n calcBoxDelta(layoutDelta, layout, snapshot.layoutBox);\n const visualDelta = createDelta();\n if (isShared) {\n calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox);\n }\n else {\n calcBoxDelta(visualDelta, layout, snapshot.layoutBox);\n }\n const hasLayoutChanged = !isDeltaZero(layoutDelta);\n let hasRelativeTargetChanged = false;\n if (!node.resumeFrom) {\n const relativeParent = node.getClosestProjectingParent();\n /**\n * If the relativeParent is itself resuming from a different element then\n * the relative snapshot is not relavent\n */\n if (relativeParent && !relativeParent.resumeFrom) {\n const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent;\n if (parentSnapshot && parentLayout) {\n const relativeSnapshot = createBox();\n calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox);\n const relativeLayout = createBox();\n calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox);\n if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {\n hasRelativeTargetChanged = true;\n }\n if (relativeParent.options.layoutRoot) {\n node.relativeTarget = relativeLayout;\n node.relativeTargetOrigin = relativeSnapshot;\n node.relativeParent = relativeParent;\n }\n }\n }\n }\n node.notifyListeners(\"didUpdate\", {\n layout,\n snapshot,\n delta: visualDelta,\n layoutDelta,\n hasLayoutChanged,\n hasRelativeTargetChanged,\n });\n }\n else if (node.isLead()) {\n const { onExitComplete } = node.options;\n onExitComplete && onExitComplete();\n }\n /**\n * Clearing transition\n * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n * and why we need it at all\n */\n node.options.transition = undefined;\n}\nfunction propagateDirtyNodes(node) {\n /**\n * Increase debug counter for nodes encountered this frame\n */\n projectionFrameData.totalNodes++;\n if (!node.parent)\n return;\n /**\n * If this node isn't projecting, propagate isProjectionDirty. It will have\n * no performance impact but it will allow the next child that *is* projecting\n * but *isn't* dirty to just check its parent to see if *any* ancestor needs\n * correcting.\n */\n if (!node.isProjecting()) {\n node.isProjectionDirty = node.parent.isProjectionDirty;\n }\n /**\n * Propagate isSharedProjectionDirty and isTransformDirty\n * throughout the whole tree. A future revision can take another look at\n * this but for safety we still recalcualte shared nodes.\n */\n node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty ||\n node.parent.isProjectionDirty ||\n node.parent.isSharedProjectionDirty));\n node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty);\n}\nfunction cleanDirtyNodes(node) {\n node.isProjectionDirty =\n node.isSharedProjectionDirty =\n node.isTransformDirty =\n false;\n}\nfunction clearSnapshot(node) {\n node.clearSnapshot();\n}\nfunction clearMeasurements(node) {\n node.clearMeasurements();\n}\nfunction clearIsLayoutDirty(node) {\n node.isLayoutDirty = false;\n}\nfunction resetTransformStyle(node) {\n const { visualElement } = node.options;\n if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notify(\"BeforeLayoutMeasure\");\n }\n node.resetTransform();\n}\nfunction finishAnimation(node) {\n node.finishAnimation();\n node.targetDelta = node.relativeTarget = node.target = undefined;\n node.isProjectionDirty = true;\n}\nfunction resolveTargetDelta(node) {\n node.resolveTargetDelta();\n}\nfunction calcProjection(node) {\n node.calcProjection();\n}\nfunction resetRotation(node) {\n node.resetRotation();\n}\nfunction removeLeadSnapshots(stack) {\n stack.removeLeadSnapshot();\n}\nfunction mixAxisDelta(output, delta, p) {\n output.translate = mix(delta.translate, 0, p);\n output.scale = mix(delta.scale, 1, p);\n output.origin = delta.origin;\n output.originPoint = delta.originPoint;\n}\nfunction mixAxis(output, from, to, p) {\n output.min = mix(from.min, to.min, p);\n output.max = mix(from.max, to.max, p);\n}\nfunction mixBox(output, from, to, p) {\n mixAxis(output.x, from.x, to.x, p);\n mixAxis(output.y, from.y, to.y, p);\n}\nfunction hasOpacityCrossfade(node) {\n return (node.animationValues && node.animationValues.opacityExit !== undefined);\n}\nconst defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1],\n};\nconst userAgentContains = (string) => typeof navigator !== \"undefined\" &&\n navigator.userAgent.toLowerCase().includes(string);\n/**\n * Measured bounding boxes must be rounded in Safari and\n * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements\n * can appear to jump.\n */\nconst roundPoint = userAgentContains(\"applewebkit/\") && !userAgentContains(\"chrome/\")\n ? Math.round\n : noop;\nfunction roundAxis(axis) {\n // Round to the nearest .5 pixels to support subpixel layouts\n axis.min = roundPoint(axis.min);\n axis.max = roundPoint(axis.max);\n}\nfunction roundBox(box) {\n roundAxis(box.x);\n roundAxis(box.y);\n}\nfunction shouldAnimatePositionOnly(animationType, snapshot, layout) {\n return (animationType === \"position\" ||\n (animationType === \"preserve-aspect\" &&\n !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2)));\n}\n\nexport { cleanDirtyNodes, createProjectionNode, mixAxis, mixAxisDelta, mixBox, propagateDirtyNodes };\n","function record(data) {\n if (window.MotionDebug) {\n window.MotionDebug.record(data);\n }\n}\n\nexport { record };\n","function isSVGElement(element) {\n return element instanceof SVGElement && element.tagName !== \"svg\";\n}\n\nexport { isSVGElement };\n","import { frame, cancelFrame } from '../frameloop/frame.mjs';\n\n/**\n * Timeout defined in ms\n */\nfunction delay(callback, timeout) {\n const start = performance.now();\n const checkElapsed = ({ timestamp }) => {\n const elapsed = timestamp - start;\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed);\n callback(elapsed - timeout);\n }\n };\n frame.read(checkElapsed, true);\n return () => cancelFrame(checkElapsed);\n}\n\nexport { delay };\n","import { animateMotionValue } from './motion-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction animateSingleValue(value, keyframes, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes, options));\n return motionValue$1.animation;\n}\n\nexport { animateSingleValue };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\n\nconst DocumentProjectionNode = createProjectionNode({\n attachResizeListener: (ref, notify) => addDomEvent(ref, \"resize\", notify),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body.scrollLeft,\n y: document.documentElement.scrollTop || document.body.scrollTop,\n }),\n checkIsScrollRoot: () => true,\n});\n\nexport { DocumentProjectionNode };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { DocumentProjectionNode } from './DocumentProjectionNode.mjs';\n\nconst rootProjectionNode = {\n current: undefined,\n};\nconst HTMLProjectionNode = createProjectionNode({\n measureScroll: (instance) => ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }),\n defaultParent: () => {\n if (!rootProjectionNode.current) {\n const documentNode = new DocumentProjectionNode({});\n documentNode.mount(window);\n documentNode.setOptions({ layoutScroll: true });\n rootProjectionNode.current = documentNode;\n }\n return rootProjectionNode.current;\n },\n resetTransform: (instance, value) => {\n instance.style.transform = value !== undefined ? value : \"none\";\n },\n checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === \"fixed\"),\n});\n\nexport { HTMLProjectionNode, rootProjectionNode };\n","import { DragGesture } from '../../gestures/drag/index.mjs';\nimport { PanGesture } from '../../gestures/pan/index.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\nimport { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\n\nconst drag = {\n pan: {\n Feature: PanGesture,\n },\n drag: {\n Feature: DragGesture,\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { drag };\n","import { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\n\nclass DragGesture extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n }\n}\n\nexport { DragGesture };\n","import { invariant } from '../../../utils/errors.mjs';\nimport { isNumericalString } from '../../../utils/is-numerical-string.mjs';\nimport { isCSSVariableToken } from './is-css-variable.mjs';\n\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\nconst splitCSSVariableRegex = /var\\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\\)/;\nfunction parseCSSVariable(current) {\n const match = splitCSSVariableRegex.exec(current);\n if (!match)\n return [,];\n const [, token, fallback] = match;\n return [token, fallback];\n}\nconst maxDepth = 4;\nfunction getVariableValue(current, element, depth = 1) {\n invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`);\n const [token, fallback] = parseCSSVariable(current);\n // No CSS variable detected\n if (!token)\n return;\n // Attempt to read this CSS variable off the element\n const resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n const trimmed = resolved.trim();\n return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;\n }\n else if (isCSSVariableToken(fallback)) {\n // The fallback might itself be a CSS variable, in which case we attempt to resolve it too.\n return getVariableValue(fallback, element, depth + 1);\n }\n else {\n return fallback;\n }\n}\n/**\n * Resolve CSS variables from\n *\n * @internal\n */\nfunction resolveCSSVariables(visualElement, { ...target }, transitionEnd) {\n const element = visualElement.current;\n if (!(element instanceof Element))\n return { target, transitionEnd };\n // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`\n // only if they change but I think this reads clearer and this isn't a performance-critical path.\n if (transitionEnd) {\n transitionEnd = { ...transitionEnd };\n }\n // Go through existing `MotionValue`s and ensure any existing CSS variables are resolved\n visualElement.values.forEach((value) => {\n const current = value.get();\n if (!isCSSVariableToken(current))\n return;\n const resolved = getVariableValue(current, element);\n if (resolved)\n value.set(resolved);\n });\n // Cycle through every target property and resolve CSS variables. Currently\n // we only read single-var properties like `var(--foo)`, not `calc(var(--foo) + 20px)`\n for (const key in target) {\n const current = target[key];\n if (!isCSSVariableToken(current))\n continue;\n const resolved = getVariableValue(current, element);\n if (!resolved)\n continue;\n // Clone target if it hasn't already been\n target[key] = resolved;\n if (!transitionEnd)\n transitionEnd = {};\n // If the user hasn't already set this key on `transitionEnd`, set it to the unresolved\n // CSS variable. This will ensure that after the animation the component will reflect\n // changes in the value of the CSS variable.\n if (transitionEnd[key] === undefined) {\n transitionEnd[key] = current;\n }\n }\n return { target, transitionEnd };\n}\n\nexport { parseCSSVariable, resolveCSSVariables };\n","import { isKeyframesTarget } from '../../../animation/utils/is-keyframes-target.mjs';\nimport { invariant } from '../../../utils/errors.mjs';\nimport { transformPropOrder } from '../../html/utils/transform.mjs';\nimport { findDimensionValueType } from '../value-types/dimensions.mjs';\nimport { isBrowser } from '../../../utils/is-browser.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n \"x\",\n \"y\",\n \"translateX\",\n \"translateY\",\n]);\nconst isPositionalKey = (key) => positionalKeys.has(key);\nconst hasPositionalKey = (target) => {\n return Object.keys(target).some(isPositionalKey);\n};\nconst isNumOrPxType = (v) => v === number || v === px;\nconst getPosFromMatrix = (matrix, pos) => parseFloat(matrix.split(\", \")[pos]);\nconst getTranslateFromMatrix = (pos2, pos3) => (_bbox, { transform }) => {\n if (transform === \"none\" || !transform)\n return 0;\n const matrix3d = transform.match(/^matrix3d\\((.+)\\)$/);\n if (matrix3d) {\n return getPosFromMatrix(matrix3d[1], pos3);\n }\n else {\n const matrix = transform.match(/^matrix\\((.+)\\)$/);\n if (matrix) {\n return getPosFromMatrix(matrix[1], pos2);\n }\n else {\n return 0;\n }\n }\n};\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n // Apply changes to element before measurement\n if (removedTransforms.length)\n visualElement.render();\n return removedTransforms;\n}\nconst positionalValues = {\n // Dimensions\n width: ({ x }, { paddingLeft = \"0\", paddingRight = \"0\" }) => x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight),\n height: ({ y }, { paddingTop = \"0\", paddingBottom = \"0\" }) => y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom),\n top: (_bbox, { top }) => parseFloat(top),\n left: (_bbox, { left }) => parseFloat(left),\n bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min),\n right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min),\n // Transform\n x: getTranslateFromMatrix(4, 13),\n y: getTranslateFromMatrix(5, 14),\n};\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x;\npositionalValues.translateY = positionalValues.y;\nconst convertChangedValueTypes = (target, visualElement, changedKeys) => {\n const originBbox = visualElement.measureViewportBox();\n const element = visualElement.current;\n const elementComputedStyle = getComputedStyle(element);\n const { display } = elementComputedStyle;\n const origin = {};\n // If the element is currently set to display: \"none\", make it visible before\n // measuring the target bounding box\n if (display === \"none\") {\n visualElement.setStaticValue(\"display\", target.display || \"block\");\n }\n /**\n * Record origins before we render and update styles\n */\n changedKeys.forEach((key) => {\n origin[key] = positionalValues[key](originBbox, elementComputedStyle);\n });\n // Apply the latest values (as set in checkAndConvertChangedValueTypes)\n visualElement.render();\n const targetBbox = visualElement.measureViewportBox();\n changedKeys.forEach((key) => {\n // Restore styles to their **calculated computed style**, not their actual\n // originally set style. This allows us to animate between equivalent pixel units.\n const value = visualElement.getValue(key);\n value && value.jump(origin[key]);\n target[key] = positionalValues[key](targetBbox, elementComputedStyle);\n });\n return target;\n};\nconst checkAndConvertChangedValueTypes = (visualElement, target, origin = {}, transitionEnd = {}) => {\n target = { ...target };\n transitionEnd = { ...transitionEnd };\n const targetPositionalKeys = Object.keys(target).filter(isPositionalKey);\n // We want to remove any transform values that could affect the element's bounding box before\n // it's measured. We'll reapply these later.\n let removedTransformValues = [];\n let hasAttemptedToRemoveTransformValues = false;\n const changedValueTypeKeys = [];\n targetPositionalKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (!visualElement.hasValue(key))\n return;\n let from = origin[key];\n let fromType = findDimensionValueType(from);\n const to = target[key];\n let toType;\n // TODO: The current implementation of this basically throws an error\n // if you try and do value conversion via keyframes. There's probably\n // a way of doing this but the performance implications would need greater scrutiny,\n // as it'd be doing multiple resize-remeasure operations.\n if (isKeyframesTarget(to)) {\n const numKeyframes = to.length;\n const fromIndex = to[0] === null ? 1 : 0;\n from = to[fromIndex];\n fromType = findDimensionValueType(from);\n for (let i = fromIndex; i < numKeyframes; i++) {\n /**\n * Don't allow wildcard keyframes to be used to detect\n * a difference in value types.\n */\n if (to[i] === null)\n break;\n if (!toType) {\n toType = findDimensionValueType(to[i]);\n invariant(toType === fromType ||\n (isNumOrPxType(fromType) && isNumOrPxType(toType)), \"Keyframes must be of the same dimension as the current value\");\n }\n else {\n invariant(findDimensionValueType(to[i]) === toType, \"All keyframes must be of the same type\");\n }\n }\n }\n else {\n toType = findDimensionValueType(to);\n }\n if (fromType !== toType) {\n // If they're both just number or px, convert them both to numbers rather than\n // relying on resize/remeasure to convert (which is wasteful in this situation)\n if (isNumOrPxType(fromType) && isNumOrPxType(toType)) {\n const current = value.get();\n if (typeof current === \"string\") {\n value.set(parseFloat(current));\n }\n if (typeof to === \"string\") {\n target[key] = parseFloat(to);\n }\n else if (Array.isArray(to) && toType === px) {\n target[key] = to.map(parseFloat);\n }\n }\n else if ((fromType === null || fromType === void 0 ? void 0 : fromType.transform) &&\n (toType === null || toType === void 0 ? void 0 : toType.transform) &&\n (from === 0 || to === 0)) {\n // If one or the other value is 0, it's safe to coerce it to the\n // type of the other without measurement\n if (from === 0) {\n value.set(toType.transform(from));\n }\n else {\n target[key] = fromType.transform(to);\n }\n }\n else {\n // If we're going to do value conversion via DOM measurements, we first\n // need to remove non-positional transform values that could affect the bbox measurements.\n if (!hasAttemptedToRemoveTransformValues) {\n removedTransformValues =\n removeNonTranslationalTransform(visualElement);\n hasAttemptedToRemoveTransformValues = true;\n }\n changedValueTypeKeys.push(key);\n transitionEnd[key] =\n transitionEnd[key] !== undefined\n ? transitionEnd[key]\n : target[key];\n value.jump(to);\n }\n }\n });\n if (changedValueTypeKeys.length) {\n const scrollY = changedValueTypeKeys.indexOf(\"height\") >= 0\n ? window.pageYOffset\n : null;\n const convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys);\n // If we removed transform values, reapply them before the next render\n if (removedTransformValues.length) {\n removedTransformValues.forEach(([key, value]) => {\n visualElement.getValue(key).set(value);\n });\n }\n // Reapply original values\n visualElement.render();\n // Restore scroll position\n if (isBrowser && scrollY !== null) {\n window.scrollTo({ top: scrollY });\n }\n return { target: convertedTarget, transitionEnd };\n }\n else {\n return { target, transitionEnd };\n }\n};\n/**\n * Convert value types for x/y/width/height/top/left/bottom/right\n *\n * Allows animation between `'auto'` -> `'100%'` or `0` -> `'calc(50% - 10vw)'`\n *\n * @internal\n */\nfunction unitConversion(visualElement, target, origin, transitionEnd) {\n return hasPositionalKey(target)\n ? checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd)\n : { target, transitionEnd };\n}\n\nexport { positionalValues, unitConversion };\n","import { resolveCSSVariables } from './css-variables-conversion.mjs';\nimport { unitConversion } from './unit-conversion.mjs';\n\n/**\n * Parse a DOM variant to make it animatable. This involves resolving CSS variables\n * and ensuring animations like \"20%\" => \"calc(50vw)\" are performed in pixels.\n */\nconst parseDomVariant = (visualElement, target, origin, transitionEnd) => {\n const resolved = resolveCSSVariables(visualElement, target, transitionEnd);\n target = resolved.target;\n transitionEnd = resolved.transitionEnd;\n return unitConversion(visualElement, target, origin, transitionEnd);\n};\n\nexport { parseDomVariant };\n","// Does this device prefer reduced motion? Returns `null` server-side.\nconst prefersReducedMotion = { current: null };\nconst hasReducedMotionListener = { current: false };\n\nexport { hasReducedMotionListener, prefersReducedMotion };\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n","import { warning, invariant } from '../utils/errors.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { isRefObject } from '../utils/is-ref-object.mjs';\nimport { initPrefersReducedMotion } from '../utils/reduced-motion/index.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from '../utils/reduced-motion/state.mjs';\nimport { SubscriptionManager } from '../utils/subscription-manager.mjs';\nimport { motionValue } from '../value/index.mjs';\nimport { isWillChangeMotionValue } from '../value/use-will-change/is.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { transformProps } from './html/utils/transform.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { isVariantLabel } from './utils/is-variant-label.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\nimport { warnOnce } from '../utils/warn-once.mjs';\nimport { featureDefinitions } from '../motion/features/definitions.mjs';\nimport { variantProps } from './utils/variant-props.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nconst featureNames = Object.keys(featureDefinitions);\nconst numFeatures = featureNames.length;\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\nconst numVariantProps = variantProps.length;\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n constructor({ parent, props, presenceContext, reducedMotionConfig, visualState, }, options = {}) {\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n this.values = new Map();\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n this.prevMotionValues = {};\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.scheduleRender = () => frame.render(this.render, false, true);\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.options = options;\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't neccessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {});\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key], false);\n if (isWillChangeMotionValue(willChange)) {\n willChange.add(key);\n }\n }\n }\n }\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps) {\n return {};\n }\n mount(instance) {\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion =\n this.reducedMotionConfig === \"never\"\n ? false\n : this.reducedMotionConfig === \"always\"\n ? true\n : prefersReducedMotion.current;\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\");\n }\n if (this.parent)\n this.parent.children.add(this);\n this.update(this.props, this.presenceContext);\n }\n unmount() {\n visualElementStore.delete(this.current);\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent && this.parent.children.delete(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n this.features[key].unmount();\n }\n this.current = null;\n }\n bindToMotionValue(key, value) {\n const valueIsTransform = transformProps.has(key);\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate &&\n frame.update(this.notifyUpdate, false, true);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n });\n const removeOnRenderRequest = value.on(\"renderRequest\", this.scheduleRender);\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n removeOnRenderRequest();\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n loadFeatures({ children, ...renderedProps }, isStrict, preloadedFeatures, initialLayoutGroupConfig) {\n let ProjectionNodeConstructor;\n let MeasureLayout;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict) {\n const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n renderedProps.ignoreStrict\n ? warning(false, strictMessage)\n : invariant(false, strictMessage);\n }\n for (let i = 0; i < numFeatures; i++) {\n const name = featureNames[i];\n const { isEnabled, Feature: FeatureConstructor, ProjectionNode, MeasureLayout: MeasureLayoutComponent, } = featureDefinitions[name];\n if (ProjectionNode)\n ProjectionNodeConstructor = ProjectionNode;\n if (isEnabled(renderedProps)) {\n if (!this.features[name] && FeatureConstructor) {\n this.features[name] = new FeatureConstructor(this);\n }\n if (MeasureLayoutComponent) {\n MeasureLayout = MeasureLayoutComponent;\n }\n }\n }\n if (!this.projection && ProjectionNodeConstructor) {\n this.projection = new ProjectionNodeConstructor(this.latestValues, this.parent && this.parent.projection);\n const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, } = renderedProps;\n this.projection.setOptions({\n layoutId,\n layout,\n alwaysMeasureLayout: Boolean(drag) ||\n (dragConstraints && isRefObject(dragConstraints)),\n visualElement: this,\n scheduleRender: () => this.scheduleRender(),\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout === \"string\" ? layout : \"both\",\n initialPromotionConfig: initialLayoutGroupConfig,\n layoutScroll,\n layoutRoot,\n });\n }\n return MeasureLayout;\n }\n updateFeatures() {\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.options, this.props);\n }\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\n }\n /**\n * Make a target animatable by Popmotion. For instance, if we're\n * trying to animate width from 100px to 100vw we need to measure 100vw\n * in pixels to determine what we really need to animate to. This is also\n * pluggable to support Framer's custom value types like Color,\n * and CSS variables.\n */\n makeTargetAnimatable(target, canMutate = true) {\n return this.makeTargetAnimatableFromInstance(target, this.props, canMutate);\n }\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listener = props[\"on\" + key];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n getVariantContext(startAtParent = false) {\n if (startAtParent) {\n return this.parent ? this.parent.getVariantContext() : undefined;\n }\n if (!this.isControllingVariants) {\n const context = this.parent\n ? this.parent.getVariantContext() || {}\n : {};\n if (this.props.initial !== undefined) {\n context.initial = this.props.initial;\n }\n return context;\n }\n const context = {};\n for (let i = 0; i < numVariantProps; i++) {\n const name = variantProps[i];\n const prop = this.props[name];\n if (isVariantLabel(prop) || prop === false) {\n context[name] = prop;\n }\n }\n return context;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n if (value !== this.values.get(key)) {\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n }\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key) {\n var _a;\n return this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : (_a = this.getBaseTargetFromProps(this.props, key)) !== null && _a !== void 0 ? _a : this.readValueFromInstance(this.current, key, this.options);\n }\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n var _a;\n const { initial } = this.props;\n const valueFromInitial = typeof initial === \"string\" || typeof initial === \"object\"\n ? (_a = resolveVariantFromProps(this.props, initial)) === null || _a === void 0 ? void 0 : _a[key]\n : undefined;\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n}\n\nexport { VisualElement };\n","import { isBrowser } from '../is-browser.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\nfunction initPrefersReducedMotion() {\n hasReducedMotionListener.current = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);\n motionMediaQuery.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n\nexport { initPrefersReducedMotion };\n","import { isWillChangeMotionValue } from '../../value/use-will-change/is.mjs';\nimport { warnOnce } from '../../utils/warn-once.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction updateMotionValuesFromProps(element, next, prev) {\n const { willChange } = next;\n for (const key in next) {\n const nextValue = next[key];\n const prevValue = prev[key];\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue);\n if (isWillChangeMotionValue(willChange)) {\n willChange.add(key);\n }\n /**\n * Check the version of the incoming motion value with this version\n * and warn against mismatches.\n */\n if (process.env.NODE_ENV === \"development\") {\n warnOnce(nextValue.version === \"10.16.4\", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.16.4 may not work as expected.`);\n }\n }\n else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping from a motion value to a static value,\n * create a new motion value from that\n */\n element.addValue(key, motionValue(nextValue, { owner: element }));\n if (isWillChangeMotionValue(willChange)) {\n willChange.remove(key);\n }\n }\n else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n const existingValue = element.getValue(key);\n // TODO: Only update values that aren't being animated or even looked at\n !existingValue.hasAnimated && existingValue.set(nextValue);\n }\n else {\n const latestValue = element.getStaticValue(key);\n element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element }));\n }\n }\n }\n // Handle removed values\n for (const key in prev) {\n if (next[key] === undefined)\n element.removeValue(key);\n }\n return next;\n}\n\nexport { updateMotionValuesFromProps };\n","import { getOrigin, checkTargetForNewValues } from '../utils/setters.mjs';\nimport { parseDomVariant } from './utils/parse-dom-variant.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nclass DOMVisualElement extends VisualElement {\n sortInstanceNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n return props.style ? props.style[key] : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n makeTargetAnimatableFromInstance({ transition, transitionEnd, ...target }, { transformValues }, isMounted) {\n let origin = getOrigin(target, transition || {}, this);\n /**\n * If Framer has provided a function to convert `Color` etc value types, convert them\n */\n if (transformValues) {\n if (transitionEnd)\n transitionEnd = transformValues(transitionEnd);\n if (target)\n target = transformValues(target);\n if (origin)\n origin = transformValues(origin);\n }\n if (isMounted) {\n checkTargetForNewValues(this, target, origin);\n const parsed = parseDomVariant(this, target, origin, transitionEnd);\n transitionEnd = parsed.transitionEnd;\n target = parsed.target;\n }\n return {\n transition,\n transitionEnd,\n ...target,\n };\n }\n}\n\nexport { DOMVisualElement };\n","import { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { isCSSVariableName } from '../dom/utils/is-css-variable.mjs';\nimport { transformProps } from './utils/transform.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nclass HTMLVisualElement extends DOMVisualElement {\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n else {\n const computedStyle = getComputedStyle(instance);\n const value = (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0;\n return typeof value === \"string\" ? value.trim() : value;\n }\n }\n measureInstanceViewportBox(instance, { transformPagePoint }) {\n return measureViewportBox(instance, transformPagePoint);\n }\n build(renderState, latestValues, options, props) {\n buildHTMLStyles(renderState, latestValues, options, props.transformTemplate);\n }\n scrapeMotionValuesFromProps(props, prevProps) {\n return scrapeMotionValuesFromProps(props, prevProps);\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current)\n this.current.textContent = `${latest}`;\n });\n }\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderHTML(instance, renderState, styleProp, projection);\n }\n}\n\nexport { HTMLVisualElement, getComputedStyle };\n","import { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { transformProps } from '../html/utils/transform.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\n\nclass SVGVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.isSVGTag = false;\n }\n getBaseTargetFromProps(props, key) {\n return props[key];\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return instance.getAttribute(key);\n }\n measureInstanceViewportBox() {\n return createBox();\n }\n scrapeMotionValuesFromProps(props, prevProps) {\n return scrapeMotionValuesFromProps(props, prevProps);\n }\n build(renderState, latestValues, options, props) {\n buildSVGAttrs(renderState, latestValues, options, this.isSVGTag, props.transformTemplate);\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderSVG(instance, renderState, styleProp, projection);\n }\n mount(instance) {\n this.isSVGTag = isSVGTag(instance.tagName);\n super.mount(instance);\n }\n}\n\nexport { SVGVisualElement };\n","import { HTMLVisualElement } from '../html/HTMLVisualElement.mjs';\nimport { SVGVisualElement } from '../svg/SVGVisualElement.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nconst createDomVisualElement = (Component, options) => {\n return isSVGComponent(Component)\n ? new SVGVisualElement(options, { enableHardwareAcceleration: false })\n : new HTMLVisualElement(options, { enableHardwareAcceleration: true });\n};\n\nexport { createDomVisualElement };\n","import { createMotionComponent } from '../../motion/index.mjs';\nimport { createMotionProxy } from './motion-proxy.mjs';\nimport { createDomMotionConfig } from './utils/create-config.mjs';\nimport { gestureAnimations } from '../../motion/features/gestures.mjs';\nimport { animations } from '../../motion/features/animations.mjs';\nimport { drag } from '../../motion/features/drag.mjs';\nimport { createDomVisualElement } from './create-visual-element.mjs';\nimport { layout } from '../../motion/features/layout.mjs';\n\nconst preloadedFeatures = {\n ...animations,\n ...gestureAnimations,\n ...drag,\n ...layout,\n};\n/**\n * HTML & SVG components, optimised for use with gestures and animation. These can be used as\n * drop-in replacements for any HTML & SVG component, all CSS & SVG properties are supported.\n *\n * @public\n */\nconst motion = /*@__PURE__*/ createMotionProxy((Component, config) => createDomMotionConfig(Component, config, preloadedFeatures, createDomVisualElement));\n/**\n * Create a DOM `motion` component with the provided string. This is primarily intended\n * as a full alternative to `motion` for consumers who have to support environments that don't\n * support `Proxy`.\n *\n * ```javascript\n * import { createDomMotionComponent } from \"framer-motion\"\n *\n * const motion = {\n * div: createDomMotionComponent('div')\n * }\n * ```\n *\n * @public\n */\nfunction createDomMotionComponent(key) {\n return createMotionComponent(createDomMotionConfig(key, { forwardMotionProps: false }, preloadedFeatures, createDomVisualElement));\n}\n\nexport { createDomMotionComponent, motion };\n","import { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\n\nconst layout = {\n layout: {\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { layout };\n","import { isSVGComponent } from './is-svg-component.mjs';\nimport { createUseRender } from '../use-render.mjs';\nimport { svgMotionConfig } from '../../svg/config-motion.mjs';\nimport { htmlMotionConfig } from '../../html/config-motion.mjs';\n\nfunction createDomMotionConfig(Component, { forwardMotionProps = false }, preloadedFeatures, createVisualElement) {\n const baseConfig = isSVGComponent(Component)\n ? svgMotionConfig\n : htmlMotionConfig;\n return {\n ...baseConfig,\n preloadedFeatures,\n useRender: createUseRender(forwardMotionProps),\n createVisualElement,\n Component,\n };\n}\n\nexport { createDomMotionConfig };\n"],"names":["UPPERCASE","LOWERCASE","LEADING_CAPITAL","IDENTIFIER","SEPARATORS","LEADING_SEPARATORS","RegExp","source","SEPARATORS_AND_IDENTIFIER","NUMBERS_AND_IDENTIFIER","camelCase","input","options","Array","isArray","TypeError","pascalCase","preserveConsecutiveUppercase","map","x","trim","filter","length","join","toLowerCase","locale","string","toLocaleLowerCase","toUpperCase","toLocaleUpperCase","isLastCharLower","isLastCharUpper","isLastLastCharUpper","i","character","test","slice","preserveCamelCase","replace","lastIndex","m1","charAt","_","identifier","m","postProcess","module","exports","W","hasNativeLazyLoadSupport","HTMLImageElement","prototype","z","e","t","a","s","width","height","className","style","P","h","loading","shouldLoad","opacity","A","r","n","o","l","backgroundColor","position","top","left","bottom","right","objectFit","objectPosition","d","transition","H","F","_ref5","layout","paddingTop","maxWidth","display","alt","role","src","G","children","u","V","B","U","srcSet","decoding","Y","fallback","sources","sizes","_ref6","media","type","key","X","propTypes","isRequired","displayName","J","Z","Error","K","Q","ee","te","ae","_len","arguments","_key","c","apply","concat","ie","image","se","re","ne","Set","oe","le","de","as","class","g","onStartLoad","p","onLoad","onError","f","w","y","b","v","E","k","S","M","N","$","JSON","stringify","images","I","then","_ref7","renderImageToString","swapPlaceholderImage","current","querySelector","complete","wasCached","setTimeout","removeAttribute","addEventListener","removeEventListener","add","has","_ref8","innerHTML","isLoading","isLoaded","requestAnimationFrame","cancelAnimationFrame","ref","dangerouslySetInnerHTML","__html","suppressHydrationWarning","ce","he","ue","__imageData","__error","console","warn","ge","imgClassName","imgStyle","placeholder","pe","_len2","_key2","me","fe","we","_g","_defs","SplitText","_ref","words","rest","split","word","React","AnimatePresence","motion","div","initial","animate","exit","variants","visible","delay","clsx","custom","_extends","Object","assign","bind","target","hasOwnProperty","call","this","SvgGithub","props","fill","xmlns","clipPath","fillRule","clipRule","id","Navigation","showNavigation","setShowNavigation","useState","prevScrollPos","setPrevScrollPos","useEffect","handleScroll","throttle","currentScrollPos","window","scrollY","Link","to","StaticImage","formats","quality","require","rel","href","Github","location","isRootPath","__PATH_PREFIX__","pathname","Date","getFullYear","_site$siteMetadata","_site$siteMetadata2","_site$siteMetadata2$s","description","title","site","useStaticQuery","metaDescription","siteMetadata","defaultTitle","name","content","property","social","twitter","Symbol","getRawTag","objectToString","symToStringTag","toStringTag","undefined","value","trimmedEndIndex","reTrimStart","freeGlobal","objectProto","nativeObjectToString","toString","isOwn","tag","unmasked","result","freeSelf","self","root","Function","reWhitespace","index","isObject","now","toNumber","nativeMax","Math","max","nativeMin","min","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","leadingEdge","clearTimeout","cancel","flush","baseGetTag","isObjectLike","debounce","baseTrim","isSymbol","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","other","valueOf","isBinary","MotionConfigContext","createContext","transformPagePoint","isStatic","reducedMotion","MotionContext","LazyContext","strict","isRefObject","isVariantLabel","isAnimationControls","start","variantPriorityOrder","variantProps","isControllingVariants","some","isVariantNode","Boolean","useCreateMotionContext","context","inherit","getCurrentTreeVariants","useContext","useMemo","variantLabelsAsDependency","prop","featureProps","animation","drag","focus","hover","tap","pan","inView","featureDefinitions","isEnabled","SwitchLayoutGroupContext","motionComponentSymbol","for","preloadedFeatures","createVisualElement","useRender","useVisualState","Component","features","loadFeatures","ForwardRefComponent","forwardRef","externalRef","MeasureLayout","configAndProps","layoutId","useLayoutId","visualState","visualElement","parent","lazyContext","presenceContext","reducedMotionConfig","visualElementRef","useRef","renderer","blockInitialAnimation","useInsertionEffect","update","canHandoff","HandoffAppearAnimations","render","animationState","animateChanges","updateFeatures","useVisualElement","initialLayoutGroupConfig","isStrict","Provider","useCallback","instance","mount","unmount","useMotionRef","layoutGroupId","LayoutGroupContext","createMotionProxy","createConfig","customMotionComponentConfig","Proxy","componentCache","Map","get","_target","set","lowercaseSVGElements","isSVGComponent","includes","indexOf","scaleCorrectors","transformPropOrder","transformProps","isForcedMotionValue","startsWith","isMotionValue","getVelocity","translateAlias","transformPerspective","numTransforms","checkStringStartsWith","token","isCSSVariableName","isCSSVariableToken","getValueAsType","transform","clamp","number","parse","parseFloat","alpha","scale","default","sanitize","round","floatRegex","colorRegex","singleColorRegex","isString","createUnitType","unit","endsWith","degrees","percent","px","vh","vw","progressPercentage","numberValueTypes","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","maxHeight","size","padding","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","rotate","rotateX","rotateY","rotateZ","scaleX","scaleY","scaleZ","skew","skewX","skewY","distance","translateX","translateY","translateZ","perspective","originX","originY","originZ","zIndex","fillOpacity","strokeOpacity","numOctaves","buildHTMLStyles","state","latestValues","transformTemplate","vars","transformOrigin","hasTransform","hasTransformOrigin","transformIsNone","valueType","valueAsType","enableHardwareAcceleration","allowTransformNone","transformIsDefault","transformString","buildTransform","createHtmlRenderState","copyRawValuesOnly","useStyle","useInitialMotionValues","transformValues","useHTMLProps","htmlProps","dragListener","draggable","userSelect","WebkitUserSelect","WebkitTouchCallout","touchAction","tabIndex","onTap","onTapStart","whileTap","validMotionProps","isValidMotionProp","shouldForward","isValidProp","_a","calcOrigin","origin","offset","dashKeys","array","camelKeys","buildSVGAttrs","attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset","latest","isSVGTag","viewBox","attrs","dimensions","calcSVGTransformOrigin","spacing","useDashCase","keys","buildSVGPath","createSvgRenderState","useSVGProps","_isStatic","visualProps","rawStyles","createUseRender","forwardMotionProps","filteredProps","isDom","values","filterProps","elementProps","renderedChildren","createElement","camelToDash","str","renderHTML","element","styleProp","projection","getProjectionStyles","setProperty","camelCaseAttributes","renderSVG","renderState","_styleProp","setAttribute","scrapeMotionValuesFromProps","prevProps","newValues","substring","resolveVariantFromProps","definition","currentValues","currentVelocity","isKeyframesTarget","isCustomValue","mix","toValue","resolveFinalValueInKeyframes","resolveMotionValue","unwrappedValue","makeUseVisualState","config","make","createRenderState","onMount","makeLatestValues","makeState","scrapeMotionValues","motionValues","isControllingVariants$1","isVariantNode$1","isInitialAnimationBlocked","variantToSet","forEach","resolved","transitionEnd","valueTarget","svgMotionConfig","read","getBBox","getBoundingClientRect","tagName","htmlMotionConfig","addDomEvent","eventName","handler","passive","isPrimaryPointer","event","pointerType","button","isPrimary","extractEventInfo","pointType","point","addPointerInfo","addPointerEvent","combineFunctions","pipe","transformers","reduce","createLock","lock","openLock","globalHorizontalLock","globalVerticalLock","getGlobalLock","openHorizontal","openVertical","isDragActive","openGestureLock","Feature","constructor","node","isMounted","addHoverEvent","isActive","callbackName","info","getProps","whileHover","setActive","isNodeOrChild","child","parentElement","fireSyntheticPointerEvent","syntheticPointerEvent","PointerEvent","observerCallbacks","WeakMap","observers","fireObserverCallback","entry","callback","fireAllObserverCallbacks","entries","observeIntersection","rootInteresectionObserver","lookupRoot","document","rootObservers","IntersectionObserver","initIntersectionObserver","observe","delete","unobserve","thresholdNames","all","gestureAnimations","super","hasEnteredView","isInView","startObserver","viewport","rootMargin","amount","once","threshold","isIntersecting","onViewportEnter","onViewportLeave","prevViewport","hasViewportOptionChanged","removeStartListeners","noop","removeEndListeners","removeAccessibleListeners","startPointerPress","startEvent","startInfo","isPressing","removePointerUpListener","endEvent","endInfo","checkPressEnd","onTapCancel","removePointerCancelListener","cancelEvent","cancelInfo","cancelPress","startPress","startAccessiblePress","removeKeydownListener","keydownEvent","keyupEvent","removeBlurListener","removePointerListener","removeFocusListener","onFocus","isFocusVisible","matches","onBlur","shallowCompare","next","prev","prevLength","resolveVariant","getCurrent","velocity","optimizedAppearDataAttribute","secondsToMilliseconds","seconds","millisecondsToSeconds","milliseconds","instantAnimationState","isBezierDefinition","easing","isWaapiSupportedEasing","supportedWaapiEasing","every","cubicBezierAsString","linear","ease","easeIn","easeOut","easeInOut","circIn","circOut","backIn","backOut","mapEasingToNativeEasing","calcBezier","a1","a2","subdivisionPrecision","subdivisionMaxIterations","cubicBezier","mX1","mY1","mX2","mY2","getTForX","aX","lowerBound","upperBound","currentX","currentT","abs","binarySubdivide","isEasingArray","mirrorEasing","reverseEasing","sin","acos","circInOut","backInOut","easingLookup","anticipate","pow","easingDefinitionToFunction","x1","y1","x2","y2","isColorString","testProp","splitColor","aName","bName","cName","match","rgbUnit","clampRgbUnit","rgba","red","green","blue","alpha$1","hex","hsla","hue","saturation","lightness","color","from","progress","hueToRgb","q","mixLinearColor","fromExpo","sqrt","colorTypes","asRGBA","find","model","hslaToRgba","mixColor","fromRGBA","toRGBA","blended","cssVarTokeniser","regex","countKey","colorTokeniser","numberTokeniser","tokenise","tokenised","push","analyseComplexValue","originalValue","numVars","numColors","numNumbers","parseComplexValue","createTransformer","numValues","output","convertNumbersToZero","complex","_b","isNaN","getAnimatableNone","parsed","transformer","mixImmediate","getMixer","mixComplex","mixArray","blendValue","fromThis","mixObject","template","originStats","targetStats","toFromDifference","mixNumber","createMixers","customMixer","mixers","mixerFactory","numMixers","mixer","easingFunction","interpolate","isClamp","inputLength","reverse","interpolator","progressInRange","defaultOffset","arr","remaining","offsetProgress","fillOffset","keyframes","duration","keyframeValues","times","easingFunctions","done","absoluteTimes","convertOffsetToTimes","mapTimeToKeyframe","splice","calculatedDuration","velocityPerSecond","frameDuration","velocitySampleDuration","calcGeneratorVelocity","resolveValue","prevT","safeMin","minDuration","maxDuration","minDamping","maxDamping","findSpring","bounce","mass","envelope","derivative","dampingRatio","undampedFreq","exponentialDecay","delta","calcAngularFreq","exp","initialGuess","rootIterations","approximateRoot","stiffness","damping","durationKeys","physicsKeys","isSpringType","spring","restDelta","restSpeed","isResolvedFromDuration","springOptions","derived","getSpringOptions","initialVelocity","initialDelta","undampedAngularFreq","isGranularScale","resolveSpring","angularFreq","cos","dampedAngularFreq","freqForT","sinh","cosh","isBelowVelocityThreshold","isBelowDisplacementThreshold","inertia","power","timeConstant","bounceDamping","bounceStiffness","modifyTarget","nearestBoundary","amplitude","ideal","calcDelta","calcLatest","applyFriction","timeReachedBoundary","spring$1","checkCatchBoundary","hasUpdatedFrame","frameloopDriver","passTimestamp","timestamp","stop","frameData","isProcessing","performance","maxGeneratorDuration","calcGeneratorDuration","generator","Infinity","types","decay","tween","animateValue","autoplay","driver","keyframes$1","repeat","repeatDelay","repeatType","onPlay","onStop","onComplete","onUpdate","resolveFinishedPromise","currentFinishedPromise","speed","hasStopped","updateFinishedPromise","Promise","resolve","animationDriver","generatorFactory","mapNumbersToKeyframes","mirroredGenerator","playState","holdTime","startTime","cancelTime","resolvedDuration","totalDuration","currentTime","tick","timeWithoutDelay","isInDelayPhase","elapsed","frameGenerator","currentIteration","floor","iterationProgress","iterationIsOdd","isAnimationFinished","finish","stopAnimationDriver","play","controls","reject","newTime","newSpeed","pause","sample","supportsWaapi","memo","Element","acceleratedValues","createAcceleratedAnimation","valueName","requiresPregeneratedKeyframes","sampleAnimation","pregeneratedKeyframes","keyframeOptions","iterations","direction","animateStyle","owner","syncStart","timeline","cancelAnimation","safeCancel","onfinish","getFinalKeyframe","attachTimeline","playbackRate","setWithVelocity","underDampedSpring","keyframesTransition","getDefaultTransition","valueKey","isAnimatable","maxDefaults","applyDefaultFilter","defaultValue","functionRegex","functions","defaultValueTypes","outlineColor","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","WebkitFilter","getDefaultValueType","defaultValueType","isZeroValueString","isNone","getValueTransition","animateMotionValue","valueTransition","isTargetAnimatable","defaultOrigin","animatableTemplateValue","noneKeyframeIndexes","getKeyframes","originKeyframe","targetKeyframe","isOriginAnimatable","when","_delay","delayChildren","staggerChildren","staggerDirection","isTransitionDefined","setValue","createInstantAnimation","HTMLElement","acceleratedAnimation","isWillChangeMotionValue","isNumericalString","addUniqueItem","item","removeItem","SubscriptionManager","subscriptions","notify","numSubscriptions","getSize","clear","collectMotionValues","MotionValue","init","version","timeDelta","lastUpdated","canTrackVelocity","events","updateAndNotify","postRender","scheduleVelocityCheck","change","velocityChange","renderRequest","velocityCheck","hasAnimated","onChange","subscription","on","unsubscribe","clearListeners","eventManagers","attach","passiveEffect","stopPassiveEffect","jump","getPrevious","startAnimation","animationStart","animationComplete","clearAnimation","animationCancel","isAnimating","destroy","motionValue","testValueType","dimensionValueTypes","findDimensionValueType","valueTypes","setMotionValue","hasValue","getValue","addValue","setTarget","makeTargetAnimatable","getOriginFromTransition","shouldBlockAnimation","protectedKeys","needsAnimating","shouldBlock","animateTarget","transitionOverride","willChange","animations","animationTypeState","getState","appearId","shouldReduceMotion","remove","animateVariant","variant","getAnimation","getChildAnimations","variantChildren","forwardDelay","maxStaggerDuration","generateStaggerDuration","sort","sortByTreeOrder","animateChildren","first","last","sortNodePosition","reversePriorityOrder","numAnimationTypes","animateList","resolvedDefinition","animateVisualElement","createAnimationState","createTypeState","whileInView","whileDrag","whileFocus","isInitialRender","buildResolvedTypeValues","acc","changedActiveType","getVariantContext","removedKeys","encounteredKeys","removedVariantIndex","typeState","propIsVariant","activeDelta","isInherited","manuallyAnimateOnMount","prevProp","variantDidChange","checkVariantsDidChange","shouldAnimateType","definitionList","resolvedValues","prevResolvedValues","allKeys","markToAnimate","fallbackAnimation","fallbackTarget","getBaseTarget","shouldAnimate","setAnimateFunction","makeAnimator","updateAnimationControlsSubscription","subscribe","prevAnimate","isPresent","onExitComplete","prevIsPresent","prevPresenceContext","exitAnimation","register","PanSession","handlers","lastMoveEvent","lastMoveEventInfo","updatePoint","getPanInfo","history","isPanStarted","isDistancePastThreshold","xDelta","yDelta","distance2D","onStart","onMove","handlePointerMove","transformPoint","handlePointerUp","end","onEnd","onSessionEnd","panInfo","initialInfo","onSessionStart","removeListeners","updateHandlers","subtractPoint","lastDevicePoint","startDevicePoint","timestampedPoint","lastPoint","calcLength","axis","isNear","maxDistance","calcAxisDelta","originPoint","translate","calcBoxDelta","calcRelativeAxis","relative","calcRelativeAxisPosition","calcRelativePosition","calcRelativeAxisConstraints","calcViewportAxisConstraints","layoutAxis","constraintsAxis","defaultElastic","resolveAxisElastic","dragElastic","minLabel","maxLabel","resolvePointElastic","label","createDelta","createBox","eachAxis","convertBoundingBoxToBox","isIdentityScale","hasScale","has2DTranslate","is2DTranslate","scalePoint","applyPointDelta","boxScale","applyAxisDelta","applyBoxDelta","box","snapToDefault","Number","isInteger","translateAxis","transformAxis","transforms","scaleKey","originKey","axisOrigin","xKeys","yKeys","transformBox","measureViewportBox","topLeft","bottomRight","transformBoxPoints","elementDragControls","VisualElementDragControls","openGlobalLock","isDragging","currentDirection","constraints","hasMutatedConstraints","elastic","originEvent","snapToCursor","panSession","stopAnimation","dragPropagation","onDragStart","resolveConstraints","isAnimationBlocked","getAxisMotionValue","measuredAxis","layoutBox","dragDirectionLock","onDirectionLock","onDrag","lockThreshold","getCurrentDirection","updateAxis","getTransformPagePoint","onDragEnd","_point","shouldDrag","axisValue","applyConstraints","dragConstraints","prevConstraints","resolveRefConstraints","calcRelativeConstraints","resolveDragElastic","relativeConstraints","rebaseAxisConstraints","onMeasureDragConstraints","constraintsElement","constraintsBox","rootProjectionNode","viewportBox","scroll","measurePageBox","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","dragMomentum","dragTransition","dragSnapToOrigin","onDragTransitionEnd","momentumAnimations","startAxisValueAnimation","dragKey","externalMotionValue","scalePositionWithinConstraints","boxProgress","sourceLength","targetLength","updateScroll","updateLayout","addListeners","stopPointerListener","measureDragConstraints","stopMeasureLayoutListener","stopResizeListener","stopLayoutUpdateListener","hasLayoutChanged","asyncHandler","globalProjectionState","hasAnimatedSinceResize","hasEverUpdated","pixelsToPercent","pixels","correctBorderRadius","correct","correctBoxShadow","treeScale","projectionDelta","original","shadow","xScale","yScale","averageScale","MeasureLayoutWithContext","componentDidMount","layoutGroup","switchLayoutGroup","correctors","defaultScaleCorrectors","group","didUpdate","safeToRemove","setOptions","getSnapshotBeforeUpdate","layoutDependency","willUpdate","promote","relegate","stack","getStack","members","componentDidUpdate","queueMicrotask","currentAnimation","isLead","componentWillUnmount","promoteContext","scheduleCheckAfterUnmount","deregister","useId","usePresence","applyTo","boxShadow","borders","numBorders","asNumber","isPx","getRadius","radiusName","easeCrossfadeIn","compress","easeCrossfadeOut","copyAxisInto","originAxis","copyBoxInto","originBox","removePointDelta","removeAxisTransforms","sourceAxis","removeAxisDelta","removeBoxTransforms","sourceBox","isAxisDeltaZero","isDeltaZero","boxEqualsRounded","aspectRatio","NodeStack","scheduleRender","prevLead","lead","indexOfNode","findIndex","member","preserveFollowOpacity","show","resumeFrom","preserveOpacity","snapshot","animationValues","isUpdating","isLayoutDirty","crossfade","hide","exitAnimationComplete","resumingFrom","removeLeadSnapshot","buildProjectionTransform","latestTransform","xTranslate","yTranslate","elementScaleX","elementScaleY","compareByDepth","depth","FlatTree","isDirty","transformAxes","projectionFrameData","totalNodes","resolvedTargetDeltas","recalculatedProjection","createProjectionNode","attachResizeListener","defaultParent","measureScroll","checkIsScrollRoot","resetTransform","animationId","isTreeAnimating","isProjectionDirty","isSharedProjectionDirty","isTransformDirty","updateManuallyBlocked","updateBlockedByResize","isSVG","needsReset","shouldResetTransform","eventHandlers","hasTreeAnimated","updateScheduled","checkUpdateFailed","clearAllSnapshots","updateProjection","data","nodes","propagateDirtyNodes","resolveTargetDelta","calcProjection","cleanDirtyNodes","MotionDebug","record","hasProjected","isVisible","animationProgress","sharedNodes","path","notifyListeners","subscriptionManager","hasListeners","SVGElement","cancelDelay","resizeUnblockUpdate","timeout","checkElapsed","finishAnimation","registerSharedNode","hasRelativeTargetChanged","newLayout","isTreeAnimationBlocked","relativeTarget","layoutTransition","defaultLayoutTransition","onLayoutAnimationStart","onLayoutAnimationComplete","targetChanged","targetLayout","hasOnlyRelativeTargetChanged","layoutRoot","setAnimationOrigin","animationOptions","blockUpdate","unblockUpdate","isUpdateBlocked","startUpdate","resetRotation","getTransformTemplate","shouldNotifyListeners","prevTransformTemplateValue","updateSnapshot","clearMeasurements","clearIsLayoutDirty","resetTransformStyle","notifyLayoutUpdate","process","preRender","clearSnapshot","removeLeadSnapshots","scheduleUpdateProjection","measure","alwaysMeasureLayout","prevLayout","layoutCorrected","phase","needsMeasurement","layoutScroll","isRoot","isResetRequested","hasProjection","transformTemplateValue","transformTemplateHasChanged","removeTransform","pageBox","removeElementScroll","roundAxis","measuredBox","boxWithoutScroll","rootScroll","applyTransform","transformOnly","withTransforms","boxWithoutTransform","setTargetDelta","targetDelta","forceRelativeParentToResolveTarget","relativeParent","resolvedRelativeTargetAt","forceRecalculation","getLead","isShared","attemptToResolveRelativeTarget","getClosestProjectingParent","relativeTargetOrigin","targetWithTransforms","isProjecting","canSkip","pendingAnimation","prevTreeScaleX","prevTreeScaleY","treePath","isSharedTransition","treeLength","applyTreeDeltas","projectionTransform","projectionDeltaWithTransform","prevProjectionTransform","notifyAll","snapshotLatestValues","mixedValues","relativeLayout","isSharedLayoutAnimation","isOnlyMember","shouldCrossfadeOpacity","hasOpacityCrossfade","prevRelativeTarget","mixTargetDelta","mixAxisDelta","mixAxis","follow","opacityExit","borderLabel","followRadius","leadRadius","mixValues","motionValue$1","animateSingleValue","completeAnimation","applyTransformsToTarget","shouldAnimatePositionOnly","animationType","xLength","yLength","initialPromotionConfig","shouldPreserveFollowOpacity","getPrevLead","hasRotate","resetValues","setStaticValue","styles","visibility","pointerEvents","emptyStyles","valuesToRender","corrected","num","resetTree","measuredLayout","axisSnapshot","layoutDelta","visualDelta","parentSnapshot","parentLayout","relativeSnapshot","onBeforeLayoutMeasure","userAgentContains","navigator","userAgent","roundPoint","DocumentProjectionNode","documentElement","scrollLeft","body","scrollTop","HTMLProjectionNode","documentNode","getComputedStyle","removePointerDownListener","onPointerDown","pointerDownEvent","session","createPanHandlers","onPanSessionStart","onPanStart","onPan","onPanEnd","removeGroupControls","dragControls","ProjectionNode","splitCSSVariableRegex","maxDepth","getVariableValue","exec","parseCSSVariable","getPropertyValue","trimmed","positionalKeys","isPositionalKey","isNumOrPxType","getPosFromMatrix","matrix","pos","getTranslateFromMatrix","pos2","pos3","_bbox","matrix3d","transformKeys","nonTranslationalTransformKeys","positionalValues","checkAndConvertChangedValueTypes","targetPositionalKeys","removedTransformValues","hasAttemptedToRemoveTransformValues","changedValueTypeKeys","fromType","toType","numKeyframes","fromIndex","removedTransforms","removeNonTranslationalTransform","pageYOffset","convertedTarget","changedKeys","originBbox","elementComputedStyle","targetBbox","convertChangedValueTypes","scrollTo","unitConversion","hasPositionalKey","parseDomVariant","resolveCSSVariables","prefersReducedMotion","hasReducedMotionListener","visualElementStore","featureNames","numFeatures","propEventHandlers","numVariantProps","VisualElement","valueSubscriptions","prevMotionValues","propEventSubscriptions","notifyUpdate","triggerBuild","renderInstance","baseTarget","initialValues","initialMotionValues","_props","_prevProps","removeFromVariantTree","addVariantChild","bindToMotionValue","matchMedia","motionMediaQuery","setReducedMotionPreferences","addListener","initPrefersReducedMotion","valueIsTransform","removeOnChange","latestValue","removeOnRenderRequest","sortInstanceNodePosition","renderedProps","ProjectionNodeConstructor","FeatureConstructor","MeasureLayoutComponent","feature","build","measureInstanceViewportBox","getStaticValue","canMutate","makeTargetAnimatableFromInstance","listener","nextValue","prevValue","existingValue","removeValue","updateMotionValuesFromProps","handleChildMotionValue","getVariant","getClosestVariantNode","startAtParent","closestVariantNode","removeValueFromRenderState","readValue","getBaseTargetFromProps","readValueFromInstance","setBaseTarget","valueFromInitial","DOMVisualElement","compareDocumentPosition","transitionOrigin","getOrigin","newValueKeys","numNewValues","targetValue","checkTargetForNewValues","HTMLVisualElement","defaultType","computedStyle","childSubscription","textContent","SVGVisualElement","getAttribute"],"sourceRoot":""} \ No newline at end of file diff --git a/css/page/1/index.html b/css/page/1/index.html index b51d73fa..7a749a23 100644 --- a/css/page/1/index.html +++ b/css/page/1/index.html @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git a/home/page/1/index.html b/home/page/1/index.html index 742141ac..a1dc5713 100644 --- a/home/page/1/index.html +++ b/home/page/1/index.html @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git a/home/page/2/index.html b/home/page/2/index.html index 614a6359..40eabc1e 100644 --- a/home/page/2/index.html +++ b/home/page/2/index.html @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git a/home/page/3/index.html b/home/page/3/index.html index dafa9599..542f616d 100644 --- a/home/page/3/index.html +++ b/home/page/3/index.html @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git a/home/page/4/index.html b/home/page/4/index.html index e7848993..aee8354a 100644 --- a/home/page/4/index.html +++ b/home/page/4/index.html @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git a/home/page/5/index.html b/home/page/5/index.html index a0652bbb..63f3639c 100644 --- a/home/page/5/index.html +++ b/home/page/5/index.html @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git a/home/page/6/index.html b/home/page/6/index.html index 5cdf8def..78b1818e 100644 --- a/home/page/6/index.html +++ b/home/page/6/index.html @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git a/javascript/page/1/index.html b/javascript/page/1/index.html index 39db035b..0a9bfc53 100644 --- a/javascript/page/1/index.html +++ b/javascript/page/1/index.html @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git a/javascript/page/2/index.html b/javascript/page/2/index.html index 10e9b301..035ed5a9 100644 --- a/javascript/page/2/index.html +++ b/javascript/page/2/index.html @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git "a/js-deepdive-\352\266\214\354\236\245-\353\252\250\354\235\214/index.html" "b/js-deepdive-\352\266\214\354\236\245-\353\252\250\354\235\214/index.html" index c0c53674..9c65e690 100644 --- "a/js-deepdive-\352\266\214\354\236\245-\353\252\250\354\235\214/index.html" +++ "b/js-deepdive-\352\266\214\354\236\245-\353\252\250\354\235\214/index.html" @@ -164,4 +164,4 @@

- \ No newline at end of file + \ No newline at end of file diff --git "a/page-data/Sass-\354\202\254\354\232\251\352\270\260/page-data.json" "b/page-data/Sass-\354\202\254\354\232\251\352\270\260/page-data.json" index 08738b1f..45a822a2 100644 --- "a/page-data/Sass-\354\202\254\354\232\251\352\270\260/page-data.json" +++ "b/page-data/Sass-\354\202\254\354\232\251\352\270\260/page-data.json" @@ -1 +1 @@ -{"componentChunkName":"component---src-templates-blog-post-js","path":"/Sass-사용기","result":{"data":{"site":{"siteMetadata":{"title":"Suu3 Blog"}},"markdownRemark":{"id":"154bba20-58c6-513f-b3a1-dec08e4f4abb","excerpt":"CSS 프레임워크들에 대해 차츰 알아가던 작년의 나는 Sass를 회사에 입사하면서 처음 써보게 됐다. 작년만 해도, 강의를 들으면 흔히 사용하는 styled-components나 최근에 뜨는 기술이라며 써보게 된 tailwindCSS, CSS문법에서 크게 차이 나지 않는 postCSS…","html":"

CSS 프레임워크들에 대해 차츰 알아가던 작년의 나는 Sass를 회사에 입사하면서 처음 써보게 됐다.

\n

작년만 해도, 강의를 들으면 흔히 사용하는 styled-components나 최근에 뜨는 기술이라며 써보게 된 tailwindCSS, CSS문법에서 크게 차이 나지 않는 postCSS 정도만 써본 상태였다.

\n

초반엔 PostCSS 쓰듯이 그냥 nesting 문법 정도만 썼었는데, 사용하면서 보니 유용한 문법들이 많았다. (중간엔 내가 제대로 Sass를 사용하지 못하고 있었구나 반성하기도 했다ㅎ)

\n

Sass를 사용하면서 느낀 점들을 공유하려고 한다.

\n

들어가기 앞서..

\n

CSS 전처리기

\n

Sass는 CSS 전처리기이다. CSS 전처리기는 pure CSS에서는 쓸 수 없는 편한 문법들을 가지고 CSS를 작성하면, CSS로 변환해주는 프로그램이다.

\n

CSS 전처리기에는 Sass 말고도 less나 stylus도 있는데, sass가 가장 점유율이 높은 것 같다.

\n

반대로 CSS를 더 현대적으로 바꿔주는 CSS후처리기인 PostCSS도 있다.

\n

Sass

\n

Sass는 2006년에 나온 CSS 전처리기로, 당시 pure CSS가 갖고 있던 문제점들을 보완하기 위해 나왔다. mixin, nesting, 상속 셀렉터 등의 문법으로 가독성과 유지보수를 좋게 만들었고, CSS의 재사용도 가능하게 했다.

\n

아무래도 최근에 많이 쓰이는 CSS in JS나 atomic CSS와 비교하면 오래된 기술이긴 하다.

\n

하지만 나는 디자인 시스템이 자주 바뀌어 재사용성이 떨어지는 프로젝트를 많이 하기도 했고, CSS in JS를 사용할 때 태그가 많아질수록 선택자나 컴포넌트도 늘어나는 점이 불편했기 때문에 꼭 최신 기술을 쓰지 않아도 개발자 편의나 컨벤션에 맞춰서 쓰면 된다고 생각한다.

\n

(몇 달 전까지만 해도, 사실 지금도 좀 최신 기술을 쓰면 안될 것 같은 조급함이 있는데 최근에는 그런 마음을 누르고 협업 하는 사람들이 편한 기술은 무엇인가? 에 생각을 해보게 됐다.)

\n

Sass와 Scss는 뭐가 다를까

","tableOfContents":"","frontmatter":{"title":"Sass 사용기","date":"August 13, 2023","description":"Sass를 사용하면서 알게된 것들","category":"css","tag":["sass"]}},"previous":{"fields":{"slug":"/줄임말로-웹-용어-이해하기/"},"frontmatter":{"title":"줄임말로 웹 용어 이해하기"}},"next":null},"pageContext":{"id":"154bba20-58c6-513f-b3a1-dec08e4f4abb","previousPostId":"01530742-7081-5326-9bfa-96c99e6d96ce","nextPostId":null}},"staticQueryHashes":["2841359383"],"slicesMap":{}} \ No newline at end of file +{"componentChunkName":"component---src-templates-blog-post-js","path":"/Sass-사용기","result":{"data":{"site":{"siteMetadata":{"title":"Suu3 Blog"}},"markdownRemark":{"id":"69d98081-41ad-58d2-9de3-1edd2d023da9","excerpt":"CSS 프레임워크들에 대해 차츰 알아가던 작년의 나는 Sass를 회사에 입사하면서 처음 써보게 됐다. 작년만 해도, 강의를 들으면 흔히 사용하는 styled-components나 최근에 뜨는 기술이라며 써보게 된 tailwindCSS, CSS문법에서 크게 차이 나지 않는 postCSS…","html":"

CSS 프레임워크들에 대해 차츰 알아가던 작년의 나는 Sass를 회사에 입사하면서 처음 써보게 됐다.

\n

작년만 해도, 강의를 들으면 흔히 사용하는 styled-components나 최근에 뜨는 기술이라며 써보게 된 tailwindCSS, CSS문법에서 크게 차이 나지 않는 postCSS 정도만 써본 상태였다.

\n

초반엔 PostCSS 쓰듯이 그냥 nesting 문법 정도만 썼었는데, 사용하면서 보니 유용한 문법들이 많았다. (중간엔 내가 제대로 Sass를 사용하지 못하고 있었구나 반성하기도 했다ㅎ)

\n

Sass를 사용하면서 느낀 점들을 공유하려고 한다.

\n

들어가기 앞서..

\n

CSS 전처리기

\n

Sass는 CSS 전처리기이다. CSS 전처리기는 pure CSS에서는 쓸 수 없는 편한 문법들을 가지고 CSS를 작성하면, CSS로 변환해주는 프로그램이다.

\n

CSS 전처리기에는 Sass 말고도 less나 stylus도 있는데, sass가 가장 점유율이 높은 것 같다.

\n

반대로 CSS를 더 현대적으로 바꿔주는 CSS후처리기인 PostCSS도 있다.

\n

Sass

\n

Sass는 2006년에 나온 CSS 전처리기로, 당시 pure CSS가 갖고 있던 문제점들을 보완하기 위해 나왔다. mixin, nesting, 상속 셀렉터 등의 문법으로 가독성과 유지보수를 좋게 만들었고, CSS의 재사용도 가능하게 했다.

\n

아무래도 최근에 많이 쓰이는 CSS in JS나 atomic CSS와 비교하면 오래된 기술이긴 하다.

\n

하지만 나는 디자인 시스템이 자주 바뀌어 재사용성이 떨어지는 프로젝트를 많이 하기도 했고, CSS in JS를 사용할 때 태그가 많아질수록 선택자나 컴포넌트도 늘어나는 점이 불편했기 때문에 꼭 최신 기술을 쓰지 않아도 개발자 편의나 컨벤션에 맞춰서 쓰면 된다고 생각한다.

\n

(몇 달 전까지만 해도, 사실 지금도 좀 최신 기술을 쓰면 안될 것 같은 조급함이 있는데 최근에는 그런 마음을 누르고 협업 하는 사람들이 편한 기술은 무엇인가? 에 생각을 해보게 됐다.)

\n

Sass와 Scss는 뭐가 다를까

","tableOfContents":"","frontmatter":{"title":"Sass 사용기","date":"August 13, 2023","description":"Sass를 사용하면서 알게된 것들","category":"css","tag":["sass"]}},"previous":{"fields":{"slug":"/줄임말로-웹-용어-이해하기/"},"frontmatter":{"title":"줄임말로 웹 용어 이해하기"}},"next":null},"pageContext":{"id":"69d98081-41ad-58d2-9de3-1edd2d023da9","previousPostId":"4bfe43b6-5e7f-5216-94f2-2bec6e7e0f75","nextPostId":null}},"staticQueryHashes":["2841359383"],"slicesMap":{}} \ No newline at end of file diff --git a/page-data/app-data.json b/page-data/app-data.json index 6130bf03..e6146312 100644 --- a/page-data/app-data.json +++ b/page-data/app-data.json @@ -1 +1 @@ -{"webpackCompilationHash":"87093e9ba30baf402929"} +{"webpackCompilationHash":"e31498f865302c7c7144"} diff --git "a/page-data/js-deepdive-\352\266\214\354\236\245-\353\252\250\354\235\214/page-data.json" "b/page-data/js-deepdive-\352\266\214\354\236\245-\353\252\250\354\235\214/page-data.json" index c8189c2e..6eebeaae 100644 --- "a/page-data/js-deepdive-\352\266\214\354\236\245-\353\252\250\354\235\214/page-data.json" +++ "b/page-data/js-deepdive-\352\266\214\354\236\245-\353\252\250\354\235\214/page-data.json" @@ -1 +1 @@ -{"componentChunkName":"component---src-templates-blog-post-js","path":"/js-deepdive-권장-모음","result":{"data":{"site":{"siteMetadata":{"title":"Suu3 Blog"}},"markdownRemark":{"id":"7c70c3e2-6680-5fb6-9a98-a795773017e0","excerpt":"(23.08.06 마지막 업데이트) 현재 프론트 엔드면 한 번씩은 스터디 해봤을 모던 자바스크립트 Deep Dive라는 책을 아는 프론트 엔드 개발자 분과 함께 스터디 중이다. 말은 스터디이지만, 직장인인 서로의 상황을 고려해 완독을 목표로 한 주에…","html":"

(23.08.06 마지막 업데이트)

\n

현재 프론트 엔드면 한 번씩은 스터디 해봤을 모던 자바스크립트 Deep Dive라는 책을 아는 프론트 엔드 개발자 분과 함께 스터디 중이다.

\n

말은 스터디이지만, 직장인인 서로의 상황을 고려해 완독을 목표로 한 주에 2장씩 내용을 정리해서 수행 여부를 체크하고 있다. (다음 책 스터디는 더 딥하게 공부해서 서로 설명해주기까지 해볼까 생각 중이다.)

\n

완전 완독까지 2달은 더 해야 할 것 같고, 전체 목차가 전부 정리가 되면 마지막으로 포맷 맞춰서 다시 정리한 다음 git book으로 만들어서 정리한 내용들만 다시 읽어볼 생각이다.

\n

(여러 번 봐도 아깝지 않을 만큼 좋은 내용이 많았다.)

\n

아무튼, 이런 계획을 갖고 있는데 특히 책에 ‘~하는 것을 권장한다’, ‘~하는 것은 바람직하지 않다’라는 표현들이 나오는데, 그 이유도 잘 설명이 되어있어서 전체 내용 말고도 따로 그 정보들만 모아보고 싶다는 생각이 들어서 이 글을 작성하게 되었다.

\n

놓친 내용을 찾으면 글이 수정될 수 있다.

\n

2장 자바스크립트란?

\n

Node.js

\n
    \n
  • 데이터를 실시간으로 처리하기 위해 I/O가 빈번하게 발생하는 SPA에 적합하다.
  • \n
  • CPU 사용률이 높은 애플리케이션에는 권장하지 않는다.
  • \n
\n

4장 변수

\n

식별자

\n
    \n
  • 변수는 하나의 문에서 쉼표로 구분해 여러 개를 한번에 선언할 수 있지만, 가독성이 나빠지므로 권장하지 않는다.
  • \n
  • ES5부터 유니코드 문자를 허용하므로 한글, 일본어 식별자도 가능하나 바람직하지 않으므로 권장하지 않는다.
  • \n
\n

5장 표현식과 문

\n

세미콜론과 세미콜론 자동 삽입 기능

\n
    \n
  • 세미콜론 자동 삽입 기능(ASI)이 암묵적으로 수행되므로 세미콜론은 생략 가능하지만 세미콜론 사용이 권장된다.\n
      \n
    • 개발자의 예측과 ASI의 예측이 일치하지 않는 경우가 간혹 있으며, ESLint에도 세미콜론 사용을 기본으로 설정하고 있고, TC39(ECMAScript 기술 위원회)도 세미콜론 사용을 권장하는 분위기이다.
    • \n
    \n
  • \n
\n

6장 데이터 타입

\n

undefined 타입

\n
    \n
  • undefined는 개발자가 의도적으로 할당하기 위한 값이 아니라 자바스크립트 엔진이 변수를 초기화 할 때 사용하는 값이다.
  • \n
  • 개발자가 변수에 의도적으로 undefined를 할당하면 본래 취지와 어긋날 뿐더러 혼란을 줄 수 있으므로 권장하지 않는다.
  • \n
  • 변수에 값이 없다는 걸 명시하고 싶을 때에는 null을 할당한다.
  • \n
\n

7장 연산자

\n
    \n
  • 연산자 우선순위는 기억하기 어려우므로 외우기보다 연산자 우선순위가 가장 높은 그룹 연산자 를 사용하여 우선순위를 명시적으로 조절하는 것을 권장한다.
  • \n
\n

8장 제어문

\n
    \n
  • 레이블 문: 식별자가 붙은 문. 프로그램의 실행 순서를 제어하기 위해 사용한다.\nex) switch문의 case, default\n
    outer: for(var i = 0 ; i < 3 ; i++){\n\tfor(var j = 0 ; j < 3 ; j++ ){\n\t\tif(i + j === 3) break outer;\n\t\tconsole.log(inner [${i}, ${j}]`);\n\t}\n}
    \n레이블 문은 중첩 for문의 외부로 탈출할 때 외엔 권장하지 않는다.\n레이블 문은 프로그램의 흐름을 복잡하게 만들어 가독성이 나빠지고 오류가 발생하게 한다.
  • \n
\n

10장 객체 리터럴

\n

프로퍼티 키

\n
    \n
  • 빈 문자열 & 예약어을 프로퍼티 키로 에러가 발생하지는 않는다. 하지만 키로서 의미를 갖지 못하므로 권장하지 않는다.
  • \n
\n

12장 함수

\n

변수 호이스팅

\n
    \n
  • 함수 호이스팅은 함수를 호출하기 전에 반드시 함수를 선언해야 한다는 당연한 규칙을 무시하므로, 더글라스 크락포드(JSON 창시자)는 함수 선언문 대신 함수 표현식을 사용할 것을 권장한다.
  • \n
\n

함수의 매개변수 개수

\n
    \n
  • 함수의 매개변수는 순서에 의미가 있다. 매개변수의 개수가 많아지면 전달해야 할 인수의 순서를 고려하기 힘들어지고, 실수를 발생시킬 가능성이 높아지므로 매개변수는 최대 3개 이상을 넘지 않는 것을 권장한다.
  • \n
","tableOfContents":"","frontmatter":{"title":"책 모던 자바스크립트 Deep Dive 권장 사항 모음","date":"August 06, 2023","description":"모던 자바스크립트 Deep Dive 책 스터디를 진행하면서 '권장한다'는 내용들을 모아보았다.","category":"javascript","tag":["javascript"]}},"previous":{"fields":{"slug":"/정규표현식/"},"frontmatter":{"title":"정규 표현식"}},"next":{"fields":{"slug":"/vsc-snippet/"},"frontmatter":{"title":"개발 속도를 높이는 코드 스니펫 설정"}}},"pageContext":{"id":"7c70c3e2-6680-5fb6-9a98-a795773017e0","previousPostId":"1f3a88e2-57cb-533b-8f42-c2c5a04c5fc8","nextPostId":"3218db99-da73-5d37-8820-519450896203"}},"staticQueryHashes":["2841359383"],"slicesMap":{}} \ No newline at end of file +{"componentChunkName":"component---src-templates-blog-post-js","path":"/js-deepdive-권장-모음","result":{"data":{"site":{"siteMetadata":{"title":"Suu3 Blog"}},"markdownRemark":{"id":"999fc8b4-af4b-5f3c-9936-ff67026ebecd","excerpt":"(23.08.06 마지막 업데이트) 현재 프론트 엔드면 한 번씩은 스터디 해봤을 모던 자바스크립트 Deep Dive라는 책을 아는 프론트 엔드 개발자 분과 함께 스터디 중이다. 말은 스터디이지만, 직장인인 서로의 상황을 고려해 완독을 목표로 한 주에…","html":"

(23.08.06 마지막 업데이트)

\n

현재 프론트 엔드면 한 번씩은 스터디 해봤을 모던 자바스크립트 Deep Dive라는 책을 아는 프론트 엔드 개발자 분과 함께 스터디 중이다.

\n

말은 스터디이지만, 직장인인 서로의 상황을 고려해 완독을 목표로 한 주에 2장씩 내용을 정리해서 수행 여부를 체크하고 있다. (다음 책 스터디는 더 딥하게 공부해서 서로 설명해주기까지 해볼까 생각 중이다.)

\n

완전 완독까지 2달은 더 해야 할 것 같고, 전체 목차가 전부 정리가 되면 마지막으로 포맷 맞춰서 다시 정리한 다음 git book으로 만들어서 정리한 내용들만 다시 읽어볼 생각이다.

\n

(여러 번 봐도 아깝지 않을 만큼 좋은 내용이 많았다.)

\n

아무튼, 이런 계획을 갖고 있는데 특히 책에 ‘~하는 것을 권장한다’, ‘~하는 것은 바람직하지 않다’라는 표현들이 나오는데, 그 이유도 잘 설명이 되어있어서 전체 내용 말고도 따로 그 정보들만 모아보고 싶다는 생각이 들어서 이 글을 작성하게 되었다.

\n

놓친 내용을 찾으면 글이 수정될 수 있다.

\n

2장 자바스크립트란?

\n

Node.js

\n
    \n
  • 데이터를 실시간으로 처리하기 위해 I/O가 빈번하게 발생하는 SPA에 적합하다.
  • \n
  • CPU 사용률이 높은 애플리케이션에는 권장하지 않는다.
  • \n
\n

4장 변수

\n

식별자

\n
    \n
  • 변수는 하나의 문에서 쉼표로 구분해 여러 개를 한번에 선언할 수 있지만, 가독성이 나빠지므로 권장하지 않는다.
  • \n
  • ES5부터 유니코드 문자를 허용하므로 한글, 일본어 식별자도 가능하나 바람직하지 않으므로 권장하지 않는다.
  • \n
\n

5장 표현식과 문

\n

세미콜론과 세미콜론 자동 삽입 기능

\n
    \n
  • 세미콜론 자동 삽입 기능(ASI)이 암묵적으로 수행되므로 세미콜론은 생략 가능하지만 세미콜론 사용이 권장된다.\n
      \n
    • 개발자의 예측과 ASI의 예측이 일치하지 않는 경우가 간혹 있으며, ESLint에도 세미콜론 사용을 기본으로 설정하고 있고, TC39(ECMAScript 기술 위원회)도 세미콜론 사용을 권장하는 분위기이다.
    • \n
    \n
  • \n
\n

6장 데이터 타입

\n

undefined 타입

\n
    \n
  • undefined는 개발자가 의도적으로 할당하기 위한 값이 아니라 자바스크립트 엔진이 변수를 초기화 할 때 사용하는 값이다.
  • \n
  • 개발자가 변수에 의도적으로 undefined를 할당하면 본래 취지와 어긋날 뿐더러 혼란을 줄 수 있으므로 권장하지 않는다.
  • \n
  • 변수에 값이 없다는 걸 명시하고 싶을 때에는 null을 할당한다.
  • \n
\n

7장 연산자

\n
    \n
  • 연산자 우선순위는 기억하기 어려우므로 외우기보다 연산자 우선순위가 가장 높은 그룹 연산자 를 사용하여 우선순위를 명시적으로 조절하는 것을 권장한다.
  • \n
\n

8장 제어문

\n
    \n
  • 레이블 문: 식별자가 붙은 문. 프로그램의 실행 순서를 제어하기 위해 사용한다.\nex) switch문의 case, default\n
    outer: for(var i = 0 ; i < 3 ; i++){\n\tfor(var j = 0 ; j < 3 ; j++ ){\n\t\tif(i + j === 3) break outer;\n\t\tconsole.log(inner [${i}, ${j}]`);\n\t}\n}
    \n레이블 문은 중첩 for문의 외부로 탈출할 때 외엔 권장하지 않는다.\n레이블 문은 프로그램의 흐름을 복잡하게 만들어 가독성이 나빠지고 오류가 발생하게 한다.
  • \n
\n

10장 객체 리터럴

\n

프로퍼티 키

\n
    \n
  • 빈 문자열 & 예약어을 프로퍼티 키로 에러가 발생하지는 않는다. 하지만 키로서 의미를 갖지 못하므로 권장하지 않는다.
  • \n
\n

12장 함수

\n

변수 호이스팅

\n
    \n
  • 함수 호이스팅은 함수를 호출하기 전에 반드시 함수를 선언해야 한다는 당연한 규칙을 무시하므로, 더글라스 크락포드(JSON 창시자)는 함수 선언문 대신 함수 표현식을 사용할 것을 권장한다.
  • \n
\n

함수의 매개변수 개수

\n
    \n
  • 함수의 매개변수는 순서에 의미가 있다. 매개변수의 개수가 많아지면 전달해야 할 인수의 순서를 고려하기 힘들어지고, 실수를 발생시킬 가능성이 높아지므로 매개변수는 최대 3개 이상을 넘지 않는 것을 권장한다.
  • \n
","tableOfContents":"","frontmatter":{"title":"책 모던 자바스크립트 Deep Dive 권장 사항 모음","date":"August 06, 2023","description":"모던 자바스크립트 Deep Dive 책 스터디를 진행하면서 '권장한다'는 내용들을 모아보았다.","category":"javascript","tag":["javascript"]}},"previous":{"fields":{"slug":"/정규표현식/"},"frontmatter":{"title":"정규 표현식"}},"next":{"fields":{"slug":"/vsc-snippet/"},"frontmatter":{"title":"개발 속도를 높이는 코드 스니펫 설정"}}},"pageContext":{"id":"999fc8b4-af4b-5f3c-9936-ff67026ebecd","previousPostId":"16d7e09b-38b2-5734-90d8-9def74099812","nextPostId":"d6ce46cd-73b6-5bec-ad90-a51b3356f42e"}},"staticQueryHashes":["2841359383"],"slicesMap":{}} \ No newline at end of file diff --git a/page-data/vsc-snippet/page-data.json b/page-data/vsc-snippet/page-data.json index 8d55fb18..d252b746 100644 --- a/page-data/vsc-snippet/page-data.json +++ b/page-data/vsc-snippet/page-data.json @@ -1 +1 @@ -{"componentChunkName":"component---src-templates-blog-post-js","path":"/vsc-snippet","result":{"data":{"site":{"siteMetadata":{"title":"Suu3 Blog"}},"markdownRemark":{"id":"3218db99-da73-5d37-8820-519450896203","excerpt":"기존에도 익스텐션을 통해서 리액트 스니펫 등을 사용하고 있었지만, 생산성없이 유독 반복해서 적게 되는 코드들을 스니펫으로 추가해서 개발 속도를 높여야겠다는 생각이 들었다. 내 경우엔 회사에서 Sass를 사용하고 있었고, scss…","html":"

기존에도 익스텐션을 통해서 리액트 스니펫 등을 사용하고 있었지만, 생산성없이 유독 반복해서 적게 되는 코드들을 스니펫으로 추가해서 개발 속도를 높여야겠다는 생각이 들었다.

\n

내 경우엔 회사에서 Sass를 사용하고 있었고, scss 모듈을 불러와서 클래스 이름을 붙여야 했는데 너무 의미 없는 반복 작업으로 느껴져, 클래스 이름을 붙이는 코드 스니펫을 설정해야겠다는 생각을 했다.

\n

코드 스니펫(code snippet)이란?

\n

코드 스니펫은 작은 코드 조각을 말한다. 개발자들이 자주 사용하는 패턴이나 기능을 간단하게 표현한 것이다.

\n

예를 들어 리액트를 쓰게 되면

\n
import React from \"react\"\n\nconst Component = () => {\n  return //...\n}\n\nexport default Component
\n

위와 같은 코드를 컴포넌트를 하나 만들 때마다 반복해서 쓰게 되는데, 웬만한 규모의 프로젝트들은 컴포넌트가 어마어마하게 많을 것이므로 이런 반복 작업을 할 수록 개발자 경험은 떨어질 것이다.

\n

이때, 코드 스니펫을 설정하면 예를들어 rsc만 입력하여도 위와 같은 코드가 자동으로 입력되게 할 수 있다. 이를 테면 앱의 텍스트 대치 같은 것이다.

","tableOfContents":"","frontmatter":{"title":"개발 속도를 높이는 코드 스니펫 설정","date":"August 11, 2023","description":"프로젝트 별 Visual Studio Code 코드 스니펫 설정을 알아보자","category":"기타","tag":["vsc","snippet"]}},"previous":{"fields":{"slug":"/js-deepdive-권장-모음/"},"frontmatter":{"title":"책 모던 자바스크립트 Deep Dive 권장 사항 모음"}},"next":{"fields":{"slug":"/줄임말로-웹-용어-이해하기/"},"frontmatter":{"title":"줄임말로 웹 용어 이해하기"}}},"pageContext":{"id":"3218db99-da73-5d37-8820-519450896203","previousPostId":"7c70c3e2-6680-5fb6-9a98-a795773017e0","nextPostId":"01530742-7081-5326-9bfa-96c99e6d96ce"}},"staticQueryHashes":["2841359383"],"slicesMap":{}} \ No newline at end of file +{"componentChunkName":"component---src-templates-blog-post-js","path":"/vsc-snippet","result":{"data":{"site":{"siteMetadata":{"title":"Suu3 Blog"}},"markdownRemark":{"id":"d6ce46cd-73b6-5bec-ad90-a51b3356f42e","excerpt":"기존에도 익스텐션을 통해서 리액트 스니펫 등을 사용하고 있었지만, 생산성없이 유독 반복해서 적게 되는 코드들을 스니펫으로 추가해서 개발 속도를 높여야겠다는 생각이 들었다. 내 경우엔 회사에서 Sass를 사용하고 있었고, scss…","html":"

기존에도 익스텐션을 통해서 리액트 스니펫 등을 사용하고 있었지만, 생산성없이 유독 반복해서 적게 되는 코드들을 스니펫으로 추가해서 개발 속도를 높여야겠다는 생각이 들었다.

\n

내 경우엔 회사에서 Sass를 사용하고 있었고, scss 모듈을 불러와서 클래스 이름을 붙여야 했는데 너무 의미 없는 반복 작업으로 느껴져, 클래스 이름을 붙이는 코드 스니펫을 설정해야겠다는 생각을 했다.

\n

코드 스니펫(code snippet)이란?

\n

코드 스니펫은 작은 코드 조각을 말한다. 개발자들이 자주 사용하는 패턴이나 기능을 간단하게 표현한 것이다.

\n

예를 들어 리액트를 쓰게 되면

\n
import React from \"react\"\n\nconst Component = () => {\n  return //...\n}\n\nexport default Component
\n

위와 같은 코드를 컴포넌트를 하나 만들 때마다 반복해서 쓰게 되는데, 웬만한 규모의 프로젝트들은 컴포넌트가 어마어마하게 많을 것이므로 이런 반복 작업을 할 수록 개발자 경험은 떨어질 것이다.

\n

이때, 코드 스니펫을 설정하면 예를들어 rsc만 입력하여도 위와 같은 코드가 자동으로 입력되게 할 수 있다. 이를 테면 앱의 텍스트 대치 같은 것이다.

","tableOfContents":"","frontmatter":{"title":"개발 속도를 높이는 코드 스니펫 설정","date":"August 11, 2023","description":"프로젝트 별 Visual Studio Code 코드 스니펫 설정을 알아보자","category":"기타","tag":["vsc","snippet"]}},"previous":{"fields":{"slug":"/js-deepdive-권장-모음/"},"frontmatter":{"title":"책 모던 자바스크립트 Deep Dive 권장 사항 모음"}},"next":{"fields":{"slug":"/줄임말로-웹-용어-이해하기/"},"frontmatter":{"title":"줄임말로 웹 용어 이해하기"}}},"pageContext":{"id":"d6ce46cd-73b6-5bec-ad90-a51b3356f42e","previousPostId":"999fc8b4-af4b-5f3c-9936-ff67026ebecd","nextPostId":"4bfe43b6-5e7f-5216-94f2-2bec6e7e0f75"}},"staticQueryHashes":["2841359383"],"slicesMap":{}} \ No newline at end of file diff --git "a/page-data/yarn-berry-pnp-\354\202\254\354\232\251\352\270\260/page-data.json" "b/page-data/yarn-berry-pnp-\354\202\254\354\232\251\352\270\260/page-data.json" index 2219e3a1..3a14fd01 100644 --- "a/page-data/yarn-berry-pnp-\354\202\254\354\232\251\352\270\260/page-data.json" +++ "b/page-data/yarn-berry-pnp-\354\202\254\354\232\251\352\270\260/page-data.json" @@ -1 +1 @@ -{"componentChunkName":"component---src-templates-blog-post-js","path":"/yarn-berry-pnp-사용기","result":{"data":{"site":{"siteMetadata":{"title":"Suu3 Blog"}},"markdownRemark":{"id":"af26b310-0499-50ad-8d2f-ecdd2d17057d","excerpt":"벌써 yarn berry + pnp 를 사용한 지 반년이 되어간다. 몇 년 전엔 npm 종속성 문제에 고통 받으며 node_modules를 지우고 다시 npm install을 반복했던 적도 있었는데 지금 진행하고 있는 프로젝트들은 전부 pnpm이나 yarn berry + pnp…","html":"

벌써 yarn berry + pnp 를 사용한 지 반년이 되어간다.

\n

몇 년 전엔 npm 종속성 문제에 고통 받으며 node_modules를 지우고 다시 npm install을 반복했던 적도 있었는데 지금 진행하고 있는 프로젝트들은 전부 pnpm이나 yarn berry + pnp 방식으로 바꾸었다.

\n

pnpm과 비교하자면 yarn berry + pnp는 한번 캐시 되면 설치 속도가 굉장히 빠르고, node_modules가 없다는 점이 더 마음에 든다.

\n

다만 pnpm보다 설정하는 게 더 까다롭고, node_modules가 없음으로서 종종 겪게 되는 상황들이 있었어서 앞으로 사용할 패키지 매니저들은 pnpm을 주로 쓸 것 같다.

\n

yarn berry를 쓰면서 몇몇 마주했던 문제 상황들을 서술하려고 한다.

\n

Yarn berry + pnp vs 기존 yarn과 npm

\n

(yarn berry = yarn2 같은 말이다.)

\n

yarn1 / npm

\n
    \n
  • 기존 node_modules는 패키지들을 중복으로 불러오지 않게 호이스팅하면서, 직접 의존하고 있지 않음에도 불러올 수 있는 유령 의존성이 생기는 문제점이 있었다.
  • \n
\n

yarn berry + pnp

\n
    \n
  • yarn berry + pnp는 호이스팅 없이 .yarn/cache에 의존성 zip 아카이브 파일을 관리하고, pnp.cjs 에 패키지들의 의존성 정보과 위치를 명시하여 패키지를 검색할 수 있게 한다.
  • \n
  • yarn berry를 사용하게 되면 .yarn/cache 에 있는 zip 파일들을 원격 저장소에 올리게 된다. 이렇게 할 경우 협업자가 clone 받고 yarn install할 필요가 없어진다. (zero install)
  • \n
\n

yarn berry 시작하기

\n

Installation

\n
    \n
  1. yarn 설치
  2. \n
\n
npm install -g yarn\nyarn set version berry
\n
    \n
  1. \n

    만약 VSC와 typescript를 쓴다면 추가 설정이 필요하다. 이 과정을 생략하면 타입이 불러와지지 않는다.

    \n

    yarn 문서에서는 다음과 같이 설명한다.

    \n

    Editor SDKs

    \n\n

    2-1. 다음 코드 실행

    \n
    yarn dlx @yarnpkg/sdks vscode
    \n

    2-2. VSC 익스텐션 중 ZipFS를 설치한다.

    \n

    2-3. VSC에서 ctrl+shift+p - Select TypeScript Version 선택 - Use Workspace Version 선택

    \n
  2. \n
  3. \n

    (선택) yarn 설정을 바꿀 수 있다. 루트에 .yarnrc.yml 파일을 만든다.

    \n

    Configuration options

    \n
    nodeLinker: pnp
    \n

    nodeLinker를 node_modules로 작성해주면 node_modules를 사용할 수 있다. 하지만 굳이?

    \n
  4. \n
","tableOfContents":"","frontmatter":{"title":"Yarn berry + pnp 사용기","date":"August 04, 2023","description":"Yarn berry + pnp 사용기","category":"기타","tag":["yarn"]}},"previous":null,"next":{"fields":{"slug":"/정규표현식/"},"frontmatter":{"title":"정규 표현식"}}},"pageContext":{"id":"af26b310-0499-50ad-8d2f-ecdd2d17057d","previousPostId":null,"nextPostId":"1f3a88e2-57cb-533b-8f42-c2c5a04c5fc8"}},"staticQueryHashes":["2841359383"],"slicesMap":{}} \ No newline at end of file +{"componentChunkName":"component---src-templates-blog-post-js","path":"/yarn-berry-pnp-사용기","result":{"data":{"site":{"siteMetadata":{"title":"Suu3 Blog"}},"markdownRemark":{"id":"19681d98-eae2-5dc4-940a-69cee7ee69e1","excerpt":"벌써 yarn berry + pnp 를 사용한 지 반년이 되어간다. 몇 년 전엔 npm 종속성 문제에 고통 받으며 node_modules를 지우고 다시 npm install을 반복했던 적도 있었는데 지금 진행하고 있는 프로젝트들은 전부 pnpm이나 yarn berry + pnp…","html":"

벌써 yarn berry + pnp 를 사용한 지 반년이 되어간다.

\n

몇 년 전엔 npm 종속성 문제에 고통 받으며 node_modules를 지우고 다시 npm install을 반복했던 적도 있었는데 지금 진행하고 있는 프로젝트들은 전부 pnpm이나 yarn berry + pnp 방식으로 바꾸었다.

\n

pnpm과 비교하자면 yarn berry + pnp는 한번 캐시 되면 설치 속도가 굉장히 빠르고, node_modules가 없다는 점이 더 마음에 든다.

\n

다만 pnpm보다 설정하는 게 더 까다롭고, node_modules가 없음으로서 종종 겪게 되는 상황들이 있었어서 앞으로 사용할 패키지 매니저들은 pnpm을 주로 쓸 것 같다.

\n

yarn berry를 쓰면서 몇몇 마주했던 문제 상황들을 서술하려고 한다.

\n

Yarn berry + pnp vs 기존 yarn과 npm

\n

(yarn berry = yarn2 같은 말이다.)

\n

yarn1 / npm

\n
    \n
  • 기존 node_modules는 패키지들을 중복으로 불러오지 않게 호이스팅하면서, 직접 의존하고 있지 않음에도 불러올 수 있는 유령 의존성이 생기는 문제점이 있었다.
  • \n
\n

yarn berry + pnp

\n
    \n
  • yarn berry + pnp는 호이스팅 없이 .yarn/cache에 의존성 zip 아카이브 파일을 관리하고, pnp.cjs 에 패키지들의 의존성 정보과 위치를 명시하여 패키지를 검색할 수 있게 한다.
  • \n
  • yarn berry를 사용하게 되면 .yarn/cache 에 있는 zip 파일들을 원격 저장소에 올리게 된다. 이렇게 할 경우 협업자가 clone 받고 yarn install할 필요가 없어진다. (zero install)
  • \n
\n

yarn berry 시작하기

\n

Installation

\n
    \n
  1. yarn 설치
  2. \n
\n
npm install -g yarn\nyarn set version berry
\n
    \n
  1. \n

    만약 VSC와 typescript를 쓴다면 추가 설정이 필요하다. 이 과정을 생략하면 타입이 불러와지지 않는다.

    \n

    yarn 문서에서는 다음과 같이 설명한다.

    \n

    Editor SDKs

    \n\n

    2-1. 다음 코드 실행

    \n
    yarn dlx @yarnpkg/sdks vscode
    \n

    2-2. VSC 익스텐션 중 ZipFS를 설치한다.

    \n

    2-3. VSC에서 ctrl+shift+p - Select TypeScript Version 선택 - Use Workspace Version 선택

    \n
  2. \n
  3. \n

    (선택) yarn 설정을 바꿀 수 있다. 루트에 .yarnrc.yml 파일을 만든다.

    \n

    Configuration options

    \n
    nodeLinker: pnp
    \n

    nodeLinker를 node_modules로 작성해주면 node_modules를 사용할 수 있다. 하지만 굳이?

    \n
  4. \n
","tableOfContents":"","frontmatter":{"title":"Yarn berry + pnp 사용기","date":"August 04, 2023","description":"Yarn berry + pnp 사용기","category":"기타","tag":["yarn"]}},"previous":null,"next":{"fields":{"slug":"/정규표현식/"},"frontmatter":{"title":"정규 표현식"}}},"pageContext":{"id":"19681d98-eae2-5dc4-940a-69cee7ee69e1","previousPostId":null,"nextPostId":"16d7e09b-38b2-5734-90d8-9def74099812"}},"staticQueryHashes":["2841359383"],"slicesMap":{}} \ No newline at end of file diff --git "a/page-data/\354\240\225\352\267\234\355\221\234\355\230\204\354\213\235/page-data.json" "b/page-data/\354\240\225\352\267\234\355\221\234\355\230\204\354\213\235/page-data.json" index 4dfcf569..99e3c375 100644 --- "a/page-data/\354\240\225\352\267\234\355\221\234\355\230\204\354\213\235/page-data.json" +++ "b/page-data/\354\240\225\352\267\234\355\221\234\355\230\204\354\213\235/page-data.json" @@ -1 +1 @@ -{"componentChunkName":"component---src-templates-blog-post-js","path":"/정규표현식","result":{"data":{"site":{"siteMetadata":{"title":"Suu3 Blog"}},"markdownRemark":{"id":"1f3a88e2-57cb-533b-8f42-c2c5a04c5fc8","excerpt":"…","html":"

정규 표현식

\n

정규 표현식은 특정한 규칙을 가진 문자열의 집합을 표현하는 데 사용하는 형식 언어이다. 자바스크립트 말고도 다른 언어들도 다 지원한다.

\n

코딩 테스트 문자열 문제나 어떤 폼에서 인풋 값이 유효한지 체크할 때 많이 사용하는 것 같다.

\n

예를 들어 회원 가입 폼의 정규식을 체크할 때, 백엔드와 협의해서 정규식 규칙을 정했던 경험이 있다.

\n

정규 표현식을 만드는 방법을 꼭 외워야 하는가 에 대해서는 개인적으로는 일부 상황에서만 쓰이고, 검색하면 바로 나오기 때문에 외울 필요는 없다고 생각하지만

\n

필요할 때 바로 사용하기 위해서 정리하고자 한다.

\n

(또한 기획자가 일반적으로 쓰이지 않는 규칙으로 문자열을 검증하길 요구한다면 거기에 맞게 표현식을 만들어내야 하니 말이다.)

\n

정규표현식 생성법

\n

정규 표현식을 만드는 방법에는 두 가지가 있다.

\n

1. 정규 표현식 리터럴

\n
    \n
  1. 스크립트를 불러올 때 컴파일 된다.
  2. \n
  3. 바뀔 일 없는 패턴에 사용하면 성능이 향상될 수 있다.\n(https://developer.mozilla.org/ko/docs/Web/JavaScript/Guide/Regular_expressions MDN 정규표현식 문서)
  4. \n
\n
const regexp = /is/i
\n

2. RegExp 생성자 함수

\n
    \n
  1. 런타임에 컴파일된다.
  2. \n
  3. 바뀔 수 있는 패턴에 사용한다.
  4. \n
\n
const regexp = new RegExp(/is/i)
\n

정규표현식 메서드

\n
    \n
  • RegExp.prototype.exec
  • \n
  • RegExp.prototype.test
  • \n
  • String.prototype.match
  • \n
\n
\n

Reference

\n
    \n
  • MDN 정규 표현식 문서
  • \n
\n

정규 표현식 - JavaScript | MDN

\n
    \n
  • 모던 자바스크립트 딥다이브 책
  • \n
","tableOfContents":"","frontmatter":{"title":"정규 표현식","date":"August 05, 2023","description":"정규 표현식","category":"javascript","tag":["regex","javascript"]}},"previous":{"fields":{"slug":"/yarn-berry-pnp-사용기/"},"frontmatter":{"title":"Yarn berry + pnp 사용기"}},"next":{"fields":{"slug":"/js-deepdive-권장-모음/"},"frontmatter":{"title":"책 모던 자바스크립트 Deep Dive 권장 사항 모음"}}},"pageContext":{"id":"1f3a88e2-57cb-533b-8f42-c2c5a04c5fc8","previousPostId":"af26b310-0499-50ad-8d2f-ecdd2d17057d","nextPostId":"7c70c3e2-6680-5fb6-9a98-a795773017e0"}},"staticQueryHashes":["2841359383"],"slicesMap":{}} \ No newline at end of file +{"componentChunkName":"component---src-templates-blog-post-js","path":"/정규표현식","result":{"data":{"site":{"siteMetadata":{"title":"Suu3 Blog"}},"markdownRemark":{"id":"16d7e09b-38b2-5734-90d8-9def74099812","excerpt":"…","html":"

정규 표현식

\n

정규 표현식은 특정한 규칙을 가진 문자열의 집합을 표현하는 데 사용하는 형식 언어이다. 자바스크립트 말고도 다른 언어들도 다 지원한다.

\n

코딩 테스트 문자열 문제나 어떤 폼에서 인풋 값이 유효한지 체크할 때 많이 사용하는 것 같다.

\n

예를 들어 회원 가입 폼의 정규식을 체크할 때, 백엔드와 협의해서 정규식 규칙을 정했던 경험이 있다.

\n

정규 표현식을 만드는 방법을 꼭 외워야 하는가 에 대해서는 개인적으로는 일부 상황에서만 쓰이고, 검색하면 바로 나오기 때문에 외울 필요는 없다고 생각하지만

\n

필요할 때 바로 사용하기 위해서 정리하고자 한다.

\n

(또한 기획자가 일반적으로 쓰이지 않는 규칙으로 문자열을 검증하길 요구한다면 거기에 맞게 표현식을 만들어내야 하니 말이다.)

\n

정규표현식 생성법

\n

정규 표현식을 만드는 방법에는 두 가지가 있다.

\n

1. 정규 표현식 리터럴

\n
    \n
  1. 스크립트를 불러올 때 컴파일 된다.
  2. \n
  3. 바뀔 일 없는 패턴에 사용하면 성능이 향상될 수 있다.\n(https://developer.mozilla.org/ko/docs/Web/JavaScript/Guide/Regular_expressions MDN 정규표현식 문서)
  4. \n
\n
const regexp = /is/i
\n

2. RegExp 생성자 함수

\n
    \n
  1. 런타임에 컴파일된다.
  2. \n
  3. 바뀔 수 있는 패턴에 사용한다.
  4. \n
\n
const regexp = new RegExp(/is/i)
\n

정규표현식 메서드

\n
    \n
  • RegExp.prototype.exec
  • \n
  • RegExp.prototype.test
  • \n
  • String.prototype.match
  • \n
\n
\n

Reference

\n
    \n
  • MDN 정규 표현식 문서
  • \n
\n

정규 표현식 - JavaScript | MDN

\n
    \n
  • 모던 자바스크립트 딥다이브 책
  • \n
","tableOfContents":"","frontmatter":{"title":"정규 표현식","date":"August 05, 2023","description":"정규 표현식","category":"javascript","tag":["regex","javascript"]}},"previous":{"fields":{"slug":"/yarn-berry-pnp-사용기/"},"frontmatter":{"title":"Yarn berry + pnp 사용기"}},"next":{"fields":{"slug":"/js-deepdive-권장-모음/"},"frontmatter":{"title":"책 모던 자바스크립트 Deep Dive 권장 사항 모음"}}},"pageContext":{"id":"16d7e09b-38b2-5734-90d8-9def74099812","previousPostId":"19681d98-eae2-5dc4-940a-69cee7ee69e1","nextPostId":"999fc8b4-af4b-5f3c-9936-ff67026ebecd"}},"staticQueryHashes":["2841359383"],"slicesMap":{}} \ No newline at end of file diff --git "a/page-data/\354\244\204\354\236\204\353\247\220\353\241\234-\354\233\271-\354\232\251\354\226\264-\354\235\264\355\225\264\355\225\230\352\270\260/page-data.json" "b/page-data/\354\244\204\354\236\204\353\247\220\353\241\234-\354\233\271-\354\232\251\354\226\264-\354\235\264\355\225\264\355\225\230\352\270\260/page-data.json" index 3bdefef2..0ccb30ed 100644 --- "a/page-data/\354\244\204\354\236\204\353\247\220\353\241\234-\354\233\271-\354\232\251\354\226\264-\354\235\264\355\225\264\355\225\230\352\270\260/page-data.json" +++ "b/page-data/\354\244\204\354\236\204\353\247\220\353\241\234-\354\233\271-\354\232\251\354\226\264-\354\235\264\355\225\264\355\225\230\352\270\260/page-data.json" @@ -1 +1 @@ -{"componentChunkName":"component---src-templates-blog-post-js","path":"/줄임말로-웹-용어-이해하기","result":{"data":{"site":{"siteMetadata":{"title":"Suu3 Blog"}},"markdownRemark":{"id":"01530742-7081-5326-9bfa-96c99e6d96ce","excerpt":"예~전에 면접에서으로 html(HyperText Markup Language)의 풀네임이 뭐냐는 질문을 들은 적이 있다. 전혀 생각해본 적 없는 질문이라 정말 당황했었는데 찍어서 맞추긴 또 맞췄다😅 맞추긴 맞췄지만 그땐 HyperText Markup Language…","html":"

예~전에 면접에서으로 html(HyperText Markup Language)의 풀네임이 뭐냐는 질문을 들은 적이 있다.

\n

전혀 생각해본 적 없는 질문이라 정말 당황했었는데 찍어서 맞추긴 또 맞췄다😅

\n

맞추긴 맞췄지만 그땐 HyperText Markup Language 라는 뜻이 뭔지 정확히 이해하지 못했었는데\n최근에 CSS의 역사에 대한 아티클을 읽어보면서 초기 웹의 형태에 대해 알게 되고, 드디어 제대로 그 뜻을 이해하게 되었다.

\n

평소에 아무 생각 없이 당연하게 쓰는 용어들이 왜 그 용어가 되었는지 알아보면 의미 있을 것 같아 정리해보게 됐다.

\n

HTML - HyperText Markup Language

\n

HTML은 최초로 웹 서버와 웹 브라우저를 만든 팀 버너스리가 만든 마크업 언어이다.

\n

HyperText

\n

‘hyper’라는 단어는 일반적으로 beyond(뛰어넘는다)를 의미한다. 하이퍼 텍스트는 하나의 텍스트에서 다른 텍스트로 뛰어 넘어갈 수 있는 텍스트를 말한다.\n일반적인 소설과 같은 텍스트들은 위→아래 등 순차적으로 읽어 내려가야 하는 반면, 하이퍼 텍스트는 마우스 클릭 등으로 단번에 다른 텍스트로 넘어갈 수 있다.

\n

MarkUp Language

\n

문서의 서식(구조나 형식, 요소 간의 관계)를 제어할 수 있는 텍스트 인코딩 시스템을 말한다.

\n

이처럼 HTML은 HyperText로 된 문서를 작성할 수 있는 언어라고 보면 될 것 같다.

\n

지금은 웹이 애플리케이션의 의미로, 여러가지 서비스를 제공하고 웹 안에서 다양한 일들을 할 수 있지만, 초반에는 단순 문서의 형태였다고 한다.

\n

\n \n \n \n(팀 버너스리가 만든 최초의 웹인 월드 와이드 웹. https://www.w3.org/People/Berners-Lee/WorldWideWeb.html)

\n

MarkDown과 MarkUp은 뭐가 다를까?

\n

지금 쓰고 있는 이 문서의 형식인 마크 다운과도 헷갈렸는데,

\n

마크 업은 문서의 서식을 설명하는 언어이고, 마크 다운은 텍스트를 HTML로 변환해주는 마크 업 라이브러리이다. (https://daringfireball.net/projects/markdown/)\n원래는 라이브러리인데, 이 라이브러리의 스타일을 모방한 마크 업 언어도 마크 다운이라고 부른다.

\n
<li>Item one</li>
\n

위가 마크업이고

\n
* Item one
\n

아래가 마크다운이다.

\n

좀 더 쓰기 편한 형태의 마크업 언어를 마크다운이라고 생각하면 될 것 같다.

","tableOfContents":"","frontmatter":{"title":"줄임말로 웹 용어 이해하기","date":"August 12, 2023","description":"줄임말로 웹 용어 이해하기","category":"web","tag":["web"]}},"previous":{"fields":{"slug":"/vsc-snippet/"},"frontmatter":{"title":"개발 속도를 높이는 코드 스니펫 설정"}},"next":{"fields":{"slug":"/Sass-사용기/"},"frontmatter":{"title":"Sass 사용기"}}},"pageContext":{"id":"01530742-7081-5326-9bfa-96c99e6d96ce","previousPostId":"3218db99-da73-5d37-8820-519450896203","nextPostId":"154bba20-58c6-513f-b3a1-dec08e4f4abb"}},"staticQueryHashes":["2841359383"],"slicesMap":{}} \ No newline at end of file +{"componentChunkName":"component---src-templates-blog-post-js","path":"/줄임말로-웹-용어-이해하기","result":{"data":{"site":{"siteMetadata":{"title":"Suu3 Blog"}},"markdownRemark":{"id":"4bfe43b6-5e7f-5216-94f2-2bec6e7e0f75","excerpt":"예~전에 면접에서으로 html(HyperText Markup Language)의 풀네임이 뭐냐는 질문을 들은 적이 있다. 전혀 생각해본 적 없는 질문이라 정말 당황했었는데 찍어서 맞추긴 또 맞췄다😅 맞추긴 맞췄지만 그땐 HyperText Markup Language…","html":"

예~전에 면접에서으로 html(HyperText Markup Language)의 풀네임이 뭐냐는 질문을 들은 적이 있다.

\n

전혀 생각해본 적 없는 질문이라 정말 당황했었는데 찍어서 맞추긴 또 맞췄다😅

\n

맞추긴 맞췄지만 그땐 HyperText Markup Language 라는 뜻이 뭔지 정확히 이해하지 못했었는데\n최근에 CSS의 역사에 대한 아티클을 읽어보면서 초기 웹의 형태에 대해 알게 되고, 드디어 제대로 그 뜻을 이해하게 되었다.

\n

평소에 아무 생각 없이 당연하게 쓰는 용어들이 왜 그 용어가 되었는지 알아보면 의미 있을 것 같아 정리해보게 됐다.

\n

HTML - HyperText Markup Language

\n

HTML은 최초로 웹 서버와 웹 브라우저를 만든 팀 버너스리가 만든 마크업 언어이다.

\n

HyperText

\n

‘hyper’라는 단어는 일반적으로 beyond(뛰어넘는다)를 의미한다. 하이퍼 텍스트는 하나의 텍스트에서 다른 텍스트로 뛰어 넘어갈 수 있는 텍스트를 말한다.\n일반적인 소설과 같은 텍스트들은 위→아래 등 순차적으로 읽어 내려가야 하는 반면, 하이퍼 텍스트는 마우스 클릭 등으로 단번에 다른 텍스트로 넘어갈 수 있다.

\n

MarkUp Language

\n

문서의 서식(구조나 형식, 요소 간의 관계)를 제어할 수 있는 텍스트 인코딩 시스템을 말한다.

\n

이처럼 HTML은 HyperText로 된 문서를 작성할 수 있는 언어라고 보면 될 것 같다.

\n

지금은 웹이 애플리케이션의 의미로, 여러가지 서비스를 제공하고 웹 안에서 다양한 일들을 할 수 있지만, 초반에는 단순 문서의 형태였다고 한다.

\n

\n \n \n \n(팀 버너스리가 만든 최초의 웹인 월드 와이드 웹. https://www.w3.org/People/Berners-Lee/WorldWideWeb.html)

\n

MarkDown과 MarkUp은 뭐가 다를까?

\n

지금 쓰고 있는 이 문서의 형식인 마크 다운과도 헷갈렸는데,

\n

마크 업은 문서의 서식을 설명하는 언어이고, 마크 다운은 텍스트를 HTML로 변환해주는 마크 업 라이브러리이다. (https://daringfireball.net/projects/markdown/)\n원래는 라이브러리인데, 이 라이브러리의 스타일을 모방한 마크 업 언어도 마크 다운이라고 부른다.

\n
<li>Item one</li>
\n

위가 마크업이고

\n
* Item one
\n

아래가 마크다운이다.

\n

좀 더 쓰기 편한 형태의 마크업 언어를 마크다운이라고 생각하면 될 것 같다.

","tableOfContents":"","frontmatter":{"title":"줄임말로 웹 용어 이해하기","date":"August 12, 2023","description":"줄임말로 웹 용어 이해하기","category":"web","tag":["web"]}},"previous":{"fields":{"slug":"/vsc-snippet/"},"frontmatter":{"title":"개발 속도를 높이는 코드 스니펫 설정"}},"next":{"fields":{"slug":"/Sass-사용기/"},"frontmatter":{"title":"Sass 사용기"}}},"pageContext":{"id":"4bfe43b6-5e7f-5216-94f2-2bec6e7e0f75","previousPostId":"d6ce46cd-73b6-5bec-ad90-a51b3356f42e","nextPostId":"69d98081-41ad-58d2-9de3-1edd2d023da9"}},"staticQueryHashes":["2841359383"],"slicesMap":{}} \ No newline at end of file diff --git a/rss.xml b/rss.xml index 1bdbf406..5858f2fc 100644 --- a/rss.xml +++ b/rss.xml @@ -1,4 +1,4 @@ -<![CDATA[Gatsby Starter Blog RSS Feed]]>https://suu3.github.io/blog/home/page/1GatsbyJSMon, 18 Dec 2023 04:25:10 GMT<![CDATA[Sass 사용기]]>https://suu3.github.io/blog/home/page/1/Sass-사용기/https://suu3.github.io/blog/home/page/1/Sass-사용기/Sun, 13 Aug 2023 00:00:00 GMT<p>CSS 프레임워크들에 대해 차츰 알아가던 작년의 나는 Sass를 회사에 입사하면서 처음 써보게 됐다.</p> +<![CDATA[Gatsby Starter Blog RSS Feed]]>https://suu3.github.io/blog/home/page/1GatsbyJSMon, 18 Dec 2023 04:27:12 GMT<![CDATA[Sass 사용기]]>https://suu3.github.io/blog/home/page/1/Sass-사용기/https://suu3.github.io/blog/home/page/1/Sass-사용기/Sun, 13 Aug 2023 00:00:00 GMT<p>CSS 프레임워크들에 대해 차츰 알아가던 작년의 나는 Sass를 회사에 입사하면서 처음 써보게 됐다.</p> <p>작년만 해도, 강의를 들으면 흔히 사용하는 styled-components나 최근에 뜨는 기술이라며 써보게 된 tailwindCSS, CSS문법에서 크게 차이 나지 않는 postCSS 정도만 써본 상태였다.</p> <p>초반엔 PostCSS 쓰듯이 그냥 nesting 문법 정도만 썼었는데, 사용하면서 보니 유용한 문법들이 많았다. (중간엔 내가 제대로 Sass를 사용하지 못하고 있었구나 반성하기도 했다ㅎ)</p> <p>Sass를 사용하면서 느낀 점들을 공유하려고 한다.</p> diff --git a/static/94eb39c58147f048d2b7747e975eab86/145fc/icon.png b/static/94eb39c58147f048d2b7747e975eab86/145fc/icon.png index 6d596df2..3932d0bd 100644 Binary files a/static/94eb39c58147f048d2b7747e975eab86/145fc/icon.png and b/static/94eb39c58147f048d2b7747e975eab86/145fc/icon.png differ diff --git a/static/94eb39c58147f048d2b7747e975eab86/cf150/icon.png b/static/94eb39c58147f048d2b7747e975eab86/cf150/icon.png index 5efd2821..7907e3fa 100644 Binary files a/static/94eb39c58147f048d2b7747e975eab86/cf150/icon.png and b/static/94eb39c58147f048d2b7747e975eab86/cf150/icon.png differ diff --git a/vsc-snippet/index.html b/vsc-snippet/index.html index fb94ce9c..27ab626f 100644 --- a/vsc-snippet/index.html +++ b/vsc-snippet/index.html @@ -70,4 +70,4 @@

- \ No newline at end of file + \ No newline at end of file diff --git a/web/page/1/index.html b/web/page/1/index.html index af97a70b..3c186e52 100644 --- a/web/page/1/index.html +++ b/web/page/1/index.html @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git a/webpack-runtime-9d937c23088e007e6b59.js b/webpack-runtime-9d937c23088e007e6b59.js new file mode 100644 index 00000000..22b4cd9b --- /dev/null +++ b/webpack-runtime-9d937c23088e007e6b59.js @@ -0,0 +1,2 @@ +!function(){"use strict";var e,t,n,r,o,a={},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return a[e](n,n.exports,c),n.exports}c.m=a,e=[],c.O=function(t,n,r,o){if(!n){var a=1/0;for(s=0;s=o)&&Object.keys(c.O).every((function(e){return c.O[e](n[i])}))?n.splice(i--,1):(u=!1,o0&&e[s-1][2]>o;s--)e[s]=e[s-1];e[s]=[n,r,o]},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},c.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var a={};t=t||[null,n({}),n([]),n(n)];for(var u=2&r&&e;"object"==typeof u&&!~t.indexOf(u);u=n(u))Object.getOwnPropertyNames(u).forEach((function(t){a[t]=function(){return e[t]}}));return a.default=function(){return e},c.d(o,a),o},c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.f={},c.e=function(e){return Promise.all(Object.keys(c.f).reduce((function(t,n){return c.f[n](e,t),t}),[]))},c.u=function(e){return({195:"95c9862768abc0ac06177fd129f00e514cf460e3",218:"component---src-pages-404-tsx",351:"commons",435:"component---src-templates-category-posts-js",591:"component---src-templates-home-tsx",989:"component---src-templates-blog-post-js"}[e]||e)+"-"+{195:"9de51bab124c90e66f59",218:"deb86b43928e59b99a04",270:"08939b34060d631a0e3d",351:"dc874e109473e818028c",435:"26a1813ad7285813717f",591:"03eefa65fbc1efcc1917",856:"4ff93c28e2962fa346e5",989:"0a10be500ee9bb5c641c"}[e]+".js"},c.miniCssF=function(e){return"styles.f039a46e079797535e9f.css"},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="gatsby-blog:",c.l=function(e,t,n,a){if(r[e])r[e].push(t);else{var u,i;if(void 0!==n)for(var f=document.getElementsByTagName("script"),s=0;s 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"gatsby-blog:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + ({\"195\":\"95c9862768abc0ac06177fd129f00e514cf460e3\",\"218\":\"component---src-pages-404-tsx\",\"351\":\"commons\",\"435\":\"component---src-templates-category-posts-js\",\"591\":\"component---src-templates-home-tsx\",\"989\":\"component---src-templates-blog-post-js\"}[chunkId] || chunkId) + \"-\" + {\"195\":\"9de51bab124c90e66f59\",\"218\":\"deb86b43928e59b99a04\",\"270\":\"08939b34060d631a0e3d\",\"351\":\"288422f67b1a4d800aad\",\"435\":\"26a1813ad7285813717f\",\"591\":\"03eefa65fbc1efcc1917\",\"856\":\"4ff93c28e2962fa346e5\",\"989\":\"0a10be500ee9bb5c641c\"}[chunkId] + \".js\";\n};","// This function allow to reference all chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + \"styles\" + \".\" + \"f039a46e079797535e9f\" + \".css\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"/blog/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t658: 0,\n\t532: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(!/^(532|658)$/.test(chunkId)) {\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkgatsby_blog\"] = self[\"webpackChunkgatsby_blog\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));"],"names":["deferred","leafPrototypes","getProto","inProgress","dataWebpackPrefix","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","getPrototypeOf","obj","__proto__","t","value","mode","this","then","ns","create","def","current","indexOf","getOwnPropertyNames","forEach","definition","o","defineProperty","enumerable","get","f","e","chunkId","Promise","all","reduce","promises","u","miniCssF","g","globalThis","Function","window","prop","prototype","hasOwnProperty","call","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","setTimeout","bind","type","target","head","appendChild","Symbol","toStringTag","p","installedChunks","installedChunkData","test","promise","resolve","reject","error","Error","errorType","realSrc","message","name","request","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","id","chunkLoadingGlobal","self"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"webpack-runtime-9d937c23088e007e6b59.js","mappings":"6BAAIA,ECCAC,EADAC,ECAAC,EACAC,E,KCAAC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,EAAOD,QAASJ,GAG/CK,EAAOD,OACf,CAGAJ,EAAoBO,EAAID,EHzBpBZ,EAAW,GACfM,EAAoBQ,EAAI,SAASC,EAAQC,EAAUC,EAAIC,GACtD,IAAGF,EAAH,CAMA,IAAIG,EAAeC,IACnB,IAASC,EAAI,EAAGA,EAAIrB,EAASsB,O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AAMU,QAAUV,EAAMU,OAAOb,IACpDyB,EAAMI,QAAU,iBAAmB5D,EAAU,cAAgB0D,EAAY,KAAOC,EAAU,IAC1FH,EAAMK,KAAO,iBACbL,EAAMb,KAAOe,EACbF,EAAMM,QAAUH,EAChBR,EAAmB,GAAGK,EACvB,CAEF,GACyC,SAAWxD,EAASA,EAC9D,CAGJ,EAUApD,EAAoBQ,EAAEU,EAAI,SAASkC,GAAW,OAAoC,IAA7BkD,EAAgBlD,EAAgB,EAGrF,IAAI+D,EAAuB,SAASC,EAA4BC,GAC/D,IAKIpH,EAAUmD,EALV1C,EAAW2G,EAAK,GAChBC,EAAcD,EAAK,GACnBE,EAAUF,EAAK,GAGItG,EAAI,EAC3B,GAAGL,EAAS8G,MAAK,SAASC,GAAM,OAA+B,IAAxBnB,EAAgBmB,EAAW,IAAI,CACrE,IAAIxH,KAAYqH,EACZtH,EAAoB8C,EAAEwE,EAAarH,KACrCD,EAAoBO,EAAEN,GAAYqH,EAAYrH,IAGhD,GAAGsH,EAAS,IAAI9G,EAAS8G,EAAQvH,EAClC,CAEA,IADGoH,GAA4BA,EAA2BC,GACrDtG,EAAIL,EAASM,OAAQD,IACzBqC,EAAU1C,EAASK,GAChBf,EAAoB8C,EAAEwD,EAAiBlD,IAAYkD,EAAgBlD,IACrEkD,EAAgBlD,GAAS,KAE1BkD,EAAgBlD,GAAW,EAE5B,OAAOpD,EAAoBQ,EAAEC,EAC9B,EAEIiH,EAAqBC,KAA8B,wBAAIA,KAA8B,yBAAK,GAC9FD,EAAmB9E,QAAQuE,EAAqBrB,KAAK,KAAM,IAC3D4B,EAAmBpD,KAAO6C,EAAqBrB,KAAK,KAAM4B,EAAmBpD,KAAKwB,KAAK4B,G","sources":["webpack://gatsby-blog/webpack/runtime/chunk loaded","webpack://gatsby-blog/webpack/runtime/create fake namespace object","webpack://gatsby-blog/webpack/runtime/load script","webpack://gatsby-blog/webpack/bootstrap","webpack://gatsby-blog/webpack/runtime/compat get default export","webpack://gatsby-blog/webpack/runtime/define property getters","webpack://gatsby-blog/webpack/runtime/ensure chunk","webpack://gatsby-blog/webpack/runtime/get javascript chunk filename","webpack://gatsby-blog/webpack/runtime/get mini-css chunk filename","webpack://gatsby-blog/webpack/runtime/global","webpack://gatsby-blog/webpack/runtime/hasOwnProperty shorthand","webpack://gatsby-blog/webpack/runtime/make namespace object","webpack://gatsby-blog/webpack/runtime/publicPath","webpack://gatsby-blog/webpack/runtime/jsonp chunk loading"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"gatsby-blog:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + ({\"195\":\"95c9862768abc0ac06177fd129f00e514cf460e3\",\"218\":\"component---src-pages-404-tsx\",\"351\":\"commons\",\"435\":\"component---src-templates-category-posts-js\",\"591\":\"component---src-templates-home-tsx\",\"989\":\"component---src-templates-blog-post-js\"}[chunkId] || chunkId) + \"-\" + {\"195\":\"9de51bab124c90e66f59\",\"218\":\"deb86b43928e59b99a04\",\"270\":\"08939b34060d631a0e3d\",\"351\":\"dc874e109473e818028c\",\"435\":\"26a1813ad7285813717f\",\"591\":\"03eefa65fbc1efcc1917\",\"856\":\"4ff93c28e2962fa346e5\",\"989\":\"0a10be500ee9bb5c641c\"}[chunkId] + \".js\";\n};","// This function allow to reference all chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + \"styles\" + \".\" + \"f039a46e079797535e9f\" + \".css\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"/blog/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t658: 0,\n\t532: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(!/^(532|658)$/.test(chunkId)) {\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkgatsby_blog\"] = self[\"webpackChunkgatsby_blog\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));"],"names":["deferred","leafPrototypes","getProto","inProgress","dataWebpackPrefix","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","getPrototypeOf","obj","__proto__","t","value","mode","this","then","ns","create","def","current","indexOf","getOwnPropertyNames","forEach","definition","o","defineProperty","enumerable","get","f","e","chunkId","Promise","all","reduce","promises","u","miniCssF","g","globalThis","Function","window","prop","prototype","hasOwnProperty","call","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","setTimeout","bind","type","target","head","appendChild","Symbol","toStringTag","p","installedChunks","installedChunkData","test","promise","resolve","reject","error","Error","errorType","realSrc","message","name","request","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","id","chunkLoadingGlobal","self"],"sourceRoot":""} \ No newline at end of file diff --git a/webpack-runtime-f21123b8f63d928b661a.js b/webpack-runtime-f21123b8f63d928b661a.js deleted file mode 100644 index 481708a4..00000000 --- a/webpack-runtime-f21123b8f63d928b661a.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(){"use strict";var e,t,n,r,o,c={},u={};function i(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return c[e](n,n.exports,i),n.exports}i.m=c,e=[],i.O=function(t,n,r,o){if(!n){var c=1/0;for(s=0;s=o)&&Object.keys(i.O).every((function(e){return i.O[e](n[a])}))?n.splice(a--,1):(u=!1,o0&&e[s-1][2]>o;s--)e[s]=e[s-1];e[s]=[n,r,o]},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},i.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);i.r(o);var c={};t=t||[null,n({}),n([]),n(n)];for(var u=2&r&&e;"object"==typeof u&&!~t.indexOf(u);u=n(u))Object.getOwnPropertyNames(u).forEach((function(t){c[t]=function(){return e[t]}}));return c.default=function(){return e},i.d(o,c),o},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=function(e){return Promise.all(Object.keys(i.f).reduce((function(t,n){return i.f[n](e,t),t}),[]))},i.u=function(e){return({195:"95c9862768abc0ac06177fd129f00e514cf460e3",218:"component---src-pages-404-tsx",351:"commons",435:"component---src-templates-category-posts-js",591:"component---src-templates-home-tsx",989:"component---src-templates-blog-post-js"}[e]||e)+"-"+{195:"9de51bab124c90e66f59",218:"deb86b43928e59b99a04",270:"08939b34060d631a0e3d",351:"288422f67b1a4d800aad",435:"26a1813ad7285813717f",591:"03eefa65fbc1efcc1917",856:"4ff93c28e2962fa346e5",989:"0a10be500ee9bb5c641c"}[e]+".js"},i.miniCssF=function(e){return"styles.f039a46e079797535e9f.css"},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="gatsby-blog:",i.l=function(e,t,n,c){if(r[e])r[e].push(t);else{var u,a;if(void 0!==n)for(var f=document.getElementsByTagName("script"),s=0;s - \ No newline at end of file + \ No newline at end of file diff --git "a/\352\270\260\355\203\200/page/1/index.html" "b/\352\270\260\355\203\200/page/1/index.html" index 88cf9849..cd699adf 100644 --- "a/\352\270\260\355\203\200/page/1/index.html" +++ "b/\352\270\260\355\203\200/page/1/index.html" @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git "a/\352\270\260\355\203\200/page/2/index.html" "b/\352\270\260\355\203\200/page/2/index.html" index dde454ce..df6659d2 100644 --- "a/\352\270\260\355\203\200/page/2/index.html" +++ "b/\352\270\260\355\203\200/page/2/index.html" @@ -55,4 +55,4 @@ > window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file diff --git "a/\354\240\225\352\267\234\355\221\234\355\230\204\354\213\235/index.html" "b/\354\240\225\352\267\234\355\221\234\355\230\204\354\213\235/index.html" index 2ea229d5..3cc87999 100644 --- "a/\354\240\225\352\267\234\355\221\234\355\230\204\354\213\235/index.html" +++ "b/\354\240\225\352\267\234\355\221\234\355\230\204\354\213\235/index.html" @@ -112,4 +112,4 @@

- \ No newline at end of file + \ No newline at end of file diff --git "a/\354\244\204\354\236\204\353\247\220\353\241\234-\354\233\271-\354\232\251\354\226\264-\354\235\264\355\225\264\355\225\230\352\270\260/index.html" "b/\354\244\204\354\236\204\353\247\220\353\241\234-\354\233\271-\354\232\251\354\226\264-\354\235\264\355\225\264\355\225\230\352\270\260/index.html" index 7efb1096..6d6867c1 100644 --- "a/\354\244\204\354\236\204\353\247\220\353\241\234-\354\233\271-\354\232\251\354\226\264-\354\235\264\355\225\264\355\225\230\352\270\260/index.html" +++ "b/\354\244\204\354\236\204\353\247\220\353\241\234-\354\233\271-\354\232\251\354\226\264-\354\235\264\355\225\264\355\225\230\352\270\260/index.html" @@ -111,4 +111,4 @@

window.___chunkMapping="{\"app\":[\"/app-7474751982414f54997e.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-deb86b43928e59b99a04.js\"],\"component---src-templates-blog-post-js\":[\"/component---src-templates-blog-post-js-0a10be500ee9bb5c641c.js\"],\"component---src-templates-category-posts-js\":[\"/component---src-templates-category-posts-js-26a1813ad7285813717f.js\"],\"component---src-templates-home-tsx\":[\"/component---src-templates-home-tsx-03eefa65fbc1efcc1917.js\"]}"; - \ No newline at end of file + \ No newline at end of file