UNPKG

linkees

Version:

A beautiful Single Page component made with React to display all your important social links for your followers (Alternative to linktr.ee).

2 lines 482 kB
/*! For license information please see index.js.LICENSE.txt */ !function(A,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["React"],e):"object"==typeof exports?exports.Linkees=e(require("react")):A.Linkees=e(A.React)}(this,A=>(()=>{"use strict";var e={156:e=>{e.exports=A},698:(A,e)=>{var t=Symbol.for("react.transitional.element");function n(A,e,n){var i=null;if(void 0!==n&&(i=""+n),void 0!==e.key&&(i=""+e.key),"key"in e)for(var s in n={},e)"key"!==s&&(n[s]=e[s]);else n=e;return e=n.ref,{$$typeof:t,type:A,key:i,ref:void 0!==e?e:null,props:n}}Symbol.for("react.fragment"),e.jsx=n,e.jsxs=n},848:(A,e,t)=>{A.exports=t(698)}},t={};function n(A){var i=t[A];if(void 0!==i)return i.exports;var s=t[A]={exports:{}};return e[A](s,s.exports,n),s.exports}n.n=A=>{var e=A&&A.__esModule?()=>A.default:()=>A;return n.d(e,{a:e}),e},n.d=(A,e)=>{for(var t in e)n.o(e,t)&&!n.o(A,t)&&Object.defineProperty(A,t,{enumerable:!0,get:e[t]})},n.o=(A,e)=>Object.prototype.hasOwnProperty.call(A,e),n.r=A=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})};var i={};n.r(i),n.d(i,{CHANNEL_TYPES:()=>Yr,CHANNEL_TYPE_VS_COVER_IMAGE:()=>Zr,Card:()=>Ur,Footer:()=>Gr,Header:()=>v,Linkees:()=>kr,MoonIcon:()=>a,SunIcon:()=>o,default:()=>Kr,getCoverImage:()=>Wr,isValidUrl:()=>qr,openLink:()=>Jr});var s=n(848),r=n(156),f=n.n(r),o=function(A){var e=A.color,t=void 0===e?"#000":e,n=A.size,i=void 0===n?24:n,r=A.className,f=void 0===r?"":r;return(0,s.jsxs)("svg",{className:"sun-icon ".concat(f),width:i,height:i,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Sun icon",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"5",stroke:t,strokeWidth:"2"}),(0,s.jsx)("path",{d:"M12 1V3M12 21V23M4.22 4.22L5.64 5.64M18.36 18.36L19.78 19.78M1 12H3M21 12H23M4.22 19.78L5.64 18.36M18.36 5.64L19.78 4.22",stroke:t,strokeWidth:"2",strokeLinecap:"round"})]})},a=function(A){var e=A.color,t=void 0===e?"#000":e,n=A.size,i=void 0===n?24:n,r=A.className,f=void 0===r?"":r;return(0,s.jsx)("svg",{className:"moon-icon ".concat(f),width:i,height:i,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Moon icon",children:(0,s.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:t})})},v=function(A){var e=A.avatar,t=A.name,n=f().useState("dark"),i=n[0],r=n[1];f().useEffect(function(){var A=localStorage.getItem("linkees-theme")||"dark";r(A),document.body.setAttribute("data-theme",A)},[]),f().useEffect(function(){document.body.setAttribute("data-theme",i),localStorage.setItem("linkees-theme",i)},[i]);var v="dark"===i;return(0,s.jsxs)("div",{className:"Header container",children:[(0,s.jsxs)("div",{className:"ten columns Header__inner",children:[e&&(0,s.jsx)("img",{src:e,alt:"".concat(t,"'s avatar"),loading:"lazy"}),(0,s.jsx)("h2",{children:t})]}),(0,s.jsx)("button",{className:"switch-theme-button",onClick:function(){r(function(A){return"dark"===A?"light":"dark"})},"aria-label":"Switch to ".concat(v?"light":"dark"," theme"),type:"button",children:v?(0,s.jsx)(o,{color:"white",size:20}):(0,s.jsx)(a,{size:20})})]})};const u=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],c=(()=>new Set(u))(),P=A=>180*A/Math.PI,d=A=>{const e=P(Math.atan2(A[1],A[0]));return h(e)},g={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:A=>(Math.abs(A[0])+Math.abs(A[3]))/2,rotate:d,rotateZ:d,skewX:A=>P(Math.atan(A[1])),skewY:A=>P(Math.atan(A[2])),skew:A=>(Math.abs(A[1])+Math.abs(A[2]))/2},h=A=>((A%=360)<0&&(A+=360),A),l=A=>Math.sqrt(A[0]*A[0]+A[1]*A[1]),z=A=>Math.sqrt(A[4]*A[4]+A[5]*A[5]),C={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:l,scaleY:z,scale:A=>(l(A)+z(A))/2,rotateX:A=>h(P(Math.atan2(A[6],A[5]))),rotateY:A=>h(P(Math.atan2(-A[2],A[0]))),rotateZ:d,rotate:d,skewX:A=>P(Math.atan(A[4])),skewY:A=>P(Math.atan(A[1])),skew:A=>(Math.abs(A[1])+Math.abs(A[4]))/2};function E(A){return A.includes("scale")?1:0}function B(A,e){if(!A||"none"===A)return E(e);const t=A.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(t)n=C,i=t;else{const e=A.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=g,i=e}if(!i)return E(e);const s=n[e],r=i[1].split(",").map(H);return"function"==typeof s?s(r):r[s]}function H(A){return parseFloat(A.trim())}const m=A=>e=>"string"==typeof e&&e.startsWith(A),x=m("--"),p=m("var(--"),I=A=>!!p(A)&&w.test(A.split("/*")[0].trim()),w=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function X({top:A,left:e,right:t,bottom:n}){return{x:{min:e,max:t},y:{min:A,max:n}}}const Q=(A,e,t)=>A+(e-A)*t;function j(A){return void 0===A||1===A}function y({scale:A,scaleX:e,scaleY:t}){return!j(A)||!j(e)||!j(t)}function O(A){return y(A)||T(A)||A.z||A.rotate||A.rotateX||A.rotateY||A.skewX||A.skewY}function T(A){return b(A.x)||b(A.y)}function b(A){return A&&"0%"!==A}function D(A,e,t){return t+e*(A-t)}function M(A,e,t,n,i){return void 0!==i&&(A=D(A,i,n)),D(A,t,n)+e}function L(A,e=0,t=1,n,i){A.min=M(A.min,e,t,n,i),A.max=M(A.max,e,t,n,i)}function F(A,{x:e,y:t}){L(A.x,e.translate,e.scale,e.originPoint),L(A.y,t.translate,t.scale,t.originPoint)}const R=.999999999999,N=1.0000000000001;function V(A,e){A.min=A.min+e,A.max=A.max+e}function Y(A,e,t,n,i=.5){L(A,e,t,Q(A.min,A.max,i),n)}function Z(A,e){Y(A.x,e.x,e.scaleX,e.scale,e.originX),Y(A.y,e.y,e.scaleY,e.scale,e.originY)}function W(A,e){return X(function(A,e){if(!e)return A;const t=e({x:A.left,y:A.top}),n=e({x:A.right,y:A.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}(A.getBoundingClientRect(),e))}const q=new Set(["width","height","top","left","right","bottom",...u]),J=(A,e,t)=>t>e?e:t<A?A:t,U={test:A=>"number"==typeof A,parse:parseFloat,transform:A=>A},G={...U,transform:A=>J(0,1,A)},k={...U,default:1},K=A=>({test:e=>"string"==typeof e&&e.endsWith(A)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${A}`}),S=K("deg"),$=K("%"),_=K("px"),AA=K("vh"),eA=K("vw"),tA=(()=>({...$,parse:A=>$.parse(A)/100,transform:A=>$.transform(100*A)}))(),nA=A=>e=>e.test(A),iA=[U,_,$,S,eA,AA,{test:A=>"auto"===A,parse:A=>A}],sA=A=>iA.find(nA(A)),rA=A=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(A),fA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function oA(A,e,t=1){const[n,i]=function(A){const e=fA.exec(A);if(!e)return[,];const[,t,n,i]=e;return[`--${t??n}`,i]}(A);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);if(s){const A=s.trim();return rA(A)?parseFloat(A):A}return I(i)?oA(i,e,t+1):i}const aA=A=>A===U||A===_,vA=new Set(["x","y","z"]),uA=u.filter(A=>!vA.has(A)),cA={width:({x:A},{paddingLeft:e="0",paddingRight:t="0"})=>A.max-A.min-parseFloat(e)-parseFloat(t),height:({y:A},{paddingTop:e="0",paddingBottom:t="0"})=>A.max-A.min-parseFloat(e)-parseFloat(t),top:(A,{top:e})=>parseFloat(e),left:(A,{left:e})=>parseFloat(e),bottom:({y:A},{top:e})=>parseFloat(e)+(A.max-A.min),right:({x:A},{left:e})=>parseFloat(e)+(A.max-A.min),x:(A,{transform:e})=>B(e,"x"),y:(A,{transform:e})=>B(e,"y")};cA.translateX=cA.x,cA.translateY=cA.y;const PA=A=>A,dA={},gA=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],hA={value:null,addProjectionMetrics:null};function lA(A,e){let t=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>t=!0,r=gA.reduce((A,t)=>(A[t]=function(A,e){let t=new Set,n=new Set,i=!1,s=!1;const r=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1},o=0;function a(e){r.has(e)&&(v.schedule(e),A()),o++,e(f)}const v={schedule:(A,e=!1,s=!1)=>{const f=s&&i?t:n;return e&&r.add(A),f.has(A)||f.add(A),A},cancel:A=>{n.delete(A),r.delete(A)},process:A=>{f=A,i?s=!0:(i=!0,[t,n]=[n,t],t.forEach(a),e&&hA.value&&hA.value.frameloop[e].push(o),o=0,t.clear(),i=!1,s&&(s=!1,v.process(A)))}};return v}(s,e?t:void 0),A),{}),{setup:f,read:o,resolveKeyframes:a,preUpdate:v,update:u,preRender:c,render:P,postRender:d}=r,g=()=>{const s=dA.useManualTiming?i.timestamp:performance.now();t=!1,dA.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(s-i.timestamp,40),1)),i.timestamp=s,i.isProcessing=!0,f.process(i),o.process(i),a.process(i),v.process(i),u.process(i),c.process(i),P.process(i),d.process(i),i.isProcessing=!1,t&&e&&(n=!1,A(g))};return{schedule:gA.reduce((e,s)=>{const f=r[s];return e[s]=(e,s=!1,r=!1)=>(t||(t=!0,n=!0,i.isProcessing||A(g)),f.schedule(e,s,r)),e},{}),cancel:A=>{for(let e=0;e<gA.length;e++)r[gA[e]].cancel(A)},state:i,steps:r}}const{schedule:zA,cancel:CA,state:EA,steps:BA}=lA("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:PA,!0),HA=new Set;let mA=!1,xA=!1,pA=!1;function IA(){if(xA){const A=Array.from(HA).filter(A=>A.needsMeasurement),e=new Set(A.map(A=>A.element)),t=new Map;e.forEach(A=>{const e=function(A){const e=[];return uA.forEach(t=>{const n=A.getValue(t);void 0!==n&&(e.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),e}(A);e.length&&(t.set(A,e),A.render())}),A.forEach(A=>A.measureInitialState()),e.forEach(A=>{A.render();const e=t.get(A);e&&e.forEach(([e,t])=>{A.getValue(e)?.set(t)})}),A.forEach(A=>A.measureEndState()),A.forEach(A=>{void 0!==A.suspendedScrollY&&window.scrollTo(0,A.suspendedScrollY)})}xA=!1,mA=!1,HA.forEach(A=>A.complete(pA)),HA.clear()}function wA(){HA.forEach(A=>{A.readKeyframes(),A.needsMeasurement&&(xA=!0)})}class XA{constructor(A,e,t,n,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...A],this.onComplete=e,this.name=t,this.motionValue=n,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(HA.add(this),mA||(mA=!0,zA.read(wA),zA.resolveKeyframes(IA))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:A,name:e,element:t,motionValue:n}=this;if(null===A[0]){const i=n?.get(),s=A[A.length-1];if(void 0!==i)A[0]=i;else if(t&&e){const n=t.readValue(e,s);null!=n&&(A[0]=n)}void 0===A[0]&&(A[0]=s),n&&void 0===i&&n.set(A[0])}!function(A){for(let e=1;e<A.length;e++)A[e]??(A[e]=A[e-1])}(A)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(A=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,A),HA.delete(this)}cancel(){"scheduled"===this.state&&(HA.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const QA=A=>/^0[^.\s]+$/u.test(A);function jA(A){return"number"==typeof A?0===A:null===A||"none"===A||"0"===A||QA(A)}const yA=A=>Math.round(1e5*A)/1e5,OA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,TA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bA=(A,e)=>t=>Boolean("string"==typeof t&&TA.test(t)&&t.startsWith(A)||e&&!function(A){return null==A}(t)&&Object.prototype.hasOwnProperty.call(t,e)),DA=(A,e,t)=>n=>{if("string"!=typeof n)return n;const[i,s,r,f]=n.match(OA);return{[A]:parseFloat(i),[e]:parseFloat(s),[t]:parseFloat(r),alpha:void 0!==f?parseFloat(f):1}},MA={...U,transform:A=>Math.round((A=>J(0,255,A))(A))},LA={test:bA("rgb","red"),parse:DA("red","green","blue"),transform:({red:A,green:e,blue:t,alpha:n=1})=>"rgba("+MA.transform(A)+", "+MA.transform(e)+", "+MA.transform(t)+", "+yA(G.transform(n))+")"},FA={test:bA("#"),parse:function(A){let e="",t="",n="",i="";return A.length>5?(e=A.substring(1,3),t=A.substring(3,5),n=A.substring(5,7),i=A.substring(7,9)):(e=A.substring(1,2),t=A.substring(2,3),n=A.substring(3,4),i=A.substring(4,5),e+=e,t+=t,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:LA.transform},RA={test:bA("hsl","hue"),parse:DA("hue","saturation","lightness"),transform:({hue:A,saturation:e,lightness:t,alpha:n=1})=>"hsla("+Math.round(A)+", "+$.transform(yA(e))+", "+$.transform(yA(t))+", "+yA(G.transform(n))+")"},NA={test:A=>LA.test(A)||FA.test(A)||RA.test(A),parse:A=>LA.test(A)?LA.parse(A):RA.test(A)?RA.parse(A):FA.parse(A),transform:A=>"string"==typeof A?A:A.hasOwnProperty("red")?LA.transform(A):RA.transform(A),getAnimatableNone:A=>{const e=NA.parse(A);return e.alpha=0,NA.transform(e)}},VA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,YA="number",ZA="color",WA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function qA(A){const e=A.toString(),t=[],n={color:[],number:[],var:[]},i=[];let s=0;const r=e.replace(WA,A=>(NA.test(A)?(n.color.push(s),i.push(ZA),t.push(NA.parse(A))):A.startsWith("var(")?(n.var.push(s),i.push("var"),t.push(A)):(n.number.push(s),i.push(YA),t.push(parseFloat(A))),++s,"${}")).split("${}");return{values:t,split:r,indexes:n,types:i}}function JA(A){return qA(A).values}function UA(A){const{split:e,types:t}=qA(A),n=e.length;return A=>{let i="";for(let s=0;s<n;s++)if(i+=e[s],void 0!==A[s]){const e=t[s];i+=e===YA?yA(A[s]):e===ZA?NA.transform(A[s]):A[s]}return i}}const GA=A=>"number"==typeof A?0:NA.test(A)?NA.getAnimatableNone(A):A,kA={test:function(A){return isNaN(A)&&"string"==typeof A&&(A.match(OA)?.length||0)+(A.match(VA)?.length||0)>0},parse:JA,createTransformer:UA,getAnimatableNone:function(A){const e=JA(A);return UA(A)(e.map(GA))}},KA=new Set(["brightness","contrast","saturate","opacity"]);function SA(A){const[e,t]=A.slice(0,-1).split("(");if("drop-shadow"===e)return A;const[n]=t.match(OA)||[];if(!n)return A;const i=t.replace(n,"");let s=KA.has(e)?1:0;return n!==t&&(s*=100),e+"("+s+i+")"}const $A=/\b([a-z-]*)\(.*?\)/gu,_A={...kA,getAnimatableNone:A=>{const e=A.match($A);return e?e.map(SA).join(" "):A}},Ae={...U,transform:Math.round},ee={borderWidth:_,borderTopWidth:_,borderRightWidth:_,borderBottomWidth:_,borderLeftWidth:_,borderRadius:_,radius:_,borderTopLeftRadius:_,borderTopRightRadius:_,borderBottomRightRadius:_,borderBottomLeftRadius:_,width:_,maxWidth:_,height:_,maxHeight:_,top:_,right:_,bottom:_,left:_,padding:_,paddingTop:_,paddingRight:_,paddingBottom:_,paddingLeft:_,margin:_,marginTop:_,marginRight:_,marginBottom:_,marginLeft:_,backgroundPositionX:_,backgroundPositionY:_,rotate:S,rotateX:S,rotateY:S,rotateZ:S,scale:k,scaleX:k,scaleY:k,scaleZ:k,skew:S,skewX:S,skewY:S,distance:_,translateX:_,translateY:_,translateZ:_,x:_,y:_,z:_,perspective:_,transformPerspective:_,opacity:G,originX:tA,originY:tA,originZ:_,zIndex:Ae,fillOpacity:G,strokeOpacity:G,numOctaves:Ae},te={...ee,color:NA,backgroundColor:NA,outlineColor:NA,fill:NA,stroke:NA,borderColor:NA,borderTopColor:NA,borderRightColor:NA,borderBottomColor:NA,borderLeftColor:NA,filter:_A,WebkitFilter:_A},ne=A=>te[A];function ie(A,e){let t=ne(A);return t!==_A&&(t=kA),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const se=new Set(["auto","none","0"]);class re extends XA{constructor(A,e,t,n,i){super(A,e,t,n,i,!0)}readKeyframes(){const{unresolvedKeyframes:A,element:e,name:t}=this;if(!e||!e.current)return;super.readKeyframes();for(let t=0;t<A.length;t++){let n=A[t];if("string"==typeof n&&(n=n.trim(),I(n))){const i=oA(n,e.current);void 0!==i&&(A[t]=i),t===A.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!q.has(t)||2!==A.length)return;const[n,i]=A,s=sA(n),r=sA(i);if(s!==r)if(aA(s)&&aA(r))for(let e=0;e<A.length;e++){const t=A[e];"string"==typeof t&&(A[e]=parseFloat(t))}else cA[t]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:A,name:e}=this,t=[];for(let e=0;e<A.length;e++)(null===A[e]||jA(A[e]))&&t.push(e);t.length&&function(A,e,t){let n,i=0;for(;i<A.length&&!n;){const e=A[i];"string"==typeof e&&!se.has(e)&&qA(e).values.length&&(n=A[i]),i++}if(n&&t)for(const i of e)A[i]=ie(t,n)}(A,t,e)}measureInitialState(){const{element:A,unresolvedKeyframes:e,name:t}=this;if(!A||!A.current)return;"height"===t&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=cA[t](A.measureViewportBox(),window.getComputedStyle(A.current)),e[0]=this.measuredOrigin;const n=e[e.length-1];void 0!==n&&A.getValue(t,n).jump(n,!1)}measureEndState(){const{element:A,name:e,unresolvedKeyframes:t}=this;if(!A||!A.current)return;const n=A.getValue(e);n&&n.jump(this.measuredOrigin,!1);const i=t.length-1,s=t[i];t[i]=cA[e](A.measureViewportBox(),window.getComputedStyle(A.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,t])=>{A.getValue(e).set(t)}),this.resolveNoneKeyframes()}}const fe=A=>Boolean(A&&A.getVelocity);let oe;function ae(){oe=void 0}const ve={now:()=>(void 0===oe&&ve.set(EA.isProcessing||dA.useManualTiming?EA.timestamp:performance.now()),oe),set:A=>{oe=A,queueMicrotask(ae)}};function ue(A,e){-1===A.indexOf(e)&&A.push(e)}function ce(A,e){const t=A.indexOf(e);t>-1&&A.splice(t,1)}class Pe{constructor(){this.subscriptions=[]}add(A){return ue(this.subscriptions,A),()=>ce(this.subscriptions,A)}notify(A,e,t){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](A,e,t);else for(let i=0;i<n;i++){const n=this.subscriptions[i];n&&n(A,e,t)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function de(A,e){return e?A*(1e3/e):0}const ge={current:void 0};class he{constructor(A,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=A=>{const e=ve.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(A),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const A of this.dependents)A.dirty()},this.hasAnimated=!1,this.setCurrent(A),this.owner=e.owner}setCurrent(A){var e;this.current=A,this.updatedAt=ve.now(),null===this.canTrackVelocity&&void 0!==A&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(A=this.current){this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt}onChange(A){return this.on("change",A)}on(A,e){this.events[A]||(this.events[A]=new Pe);const t=this.events[A].add(e);return"change"===A?()=>{t(),zA.read(()=>{this.events.change.getSize()||this.stop()})}:t}clearListeners(){for(const A in this.events)this.events[A].clear()}attach(A,e){this.passiveEffect=A,this.stopPassiveEffect=e}set(A){this.passiveEffect?this.passiveEffect(A,this.updateAndNotify):this.updateAndNotify(A)}setWithVelocity(A,e,t){this.set(e),this.prev=void 0,this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt-t}jump(A,e=!0){this.updateAndNotify(A),this.prev=A,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(A){this.dependents||(this.dependents=new Set),this.dependents.add(A)}removeDependent(A){this.dependents&&this.dependents.delete(A)}get(){return ge.current&&ge.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const A=ve.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||A-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return de(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(A){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=A(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function le(A,e){return new he(A,e)}const ze=[...iA,NA,kA],{schedule:Ce,cancel:Ee}=lA(queueMicrotask,!1),Be={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"]},He={};for(const A in Be)He[A]={isEnabled:e=>Be[A].some(A=>!!e[A])};const me=()=>({x:{min:0,max:0},y:{min:0,max:0}}),xe="undefined"!=typeof window,pe={current:null},Ie={current:!1},we=new WeakMap;function Xe(A){return null!==A&&"object"==typeof A&&"function"==typeof A.start}function Qe(A){return"string"==typeof A||Array.isArray(A)}const je=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ye=["initial",...je];function Oe(A){return Xe(A.animate)||ye.some(e=>Qe(A[e]))}function Te(A){return Boolean(Oe(A)||A.variants)}function be(A){const e=[{},{}];return A?.values.forEach((A,t)=>{e[0][t]=A.get(),e[1][t]=A.getVelocity()}),e}function De(A,e,t,n){if("function"==typeof e){const[i,s]=be(n);e=e(void 0!==t?t:A.custom,i,s)}if("string"==typeof e&&(e=A.variants&&A.variants[e]),"function"==typeof e){const[i,s]=be(n);e=e(void 0!==t?t:A.custom,i,s)}return e}const Me=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Le{scrapeMotionValuesFromProps(A,e,t){return{}}constructor({parent:A,props:e,presenceContext:t,reducedMotionConfig:n,blockInitialAnimation:i,visualState:s},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=XA,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const A=ve.now();this.renderScheduledAt<A&&(this.renderScheduledAt=A,zA.render(this.render,!1,!0))};const{latestValues:f,renderState:o}=s;this.latestValues=f,this.baseTarget={...f},this.initialValues=e.initial?{...f}:{},this.renderState=o,this.parent=A,this.props=e,this.presenceContext=t,this.depth=A?A.depth+1:0,this.reducedMotionConfig=n,this.options=r,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Oe(e),this.isVariantNode=Te(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(A&&A.current);const{willChange:a,...v}=this.scrapeMotionValuesFromProps(e,{},this);for(const A in v){const e=v[A];void 0!==f[A]&&fe(e)&&e.set(f[A])}}mount(A){this.current=A,we.set(A,this),this.projection&&!this.projection.instance&&this.projection.mount(A),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((A,e)=>this.bindToMotionValue(e,A)),Ie.current||function(){if(Ie.current=!0,xe)if(window.matchMedia){const A=window.matchMedia("(prefers-reduced-motion)"),e=()=>pe.current=A.matches;A.addEventListener("change",e),e()}else pe.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||pe.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),CA(this.notifyUpdate),CA(this.render),this.valueSubscriptions.forEach(A=>A()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const A in this.events)this.events[A].clear();for(const A in this.features){const e=this.features[A];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(A){this.children.add(A),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(A)}removeChild(A){this.children.delete(A),this.enteringChildren&&this.enteringChildren.delete(A)}bindToMotionValue(A,e){this.valueSubscriptions.has(A)&&this.valueSubscriptions.get(A)();const t=c.has(A);t&&this.onBindTransform&&this.onBindTransform();const n=e.on("change",e=>{this.latestValues[A]=e,this.props.onUpdate&&zA.preRender(this.notifyUpdate),t&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,A,e)),this.valueSubscriptions.set(A,()=>{n(),i&&i(),e.owner&&e.stop()})}sortNodePosition(A){return this.current&&this.sortInstanceNodePosition&&this.type===A.type?this.sortInstanceNodePosition(this.current,A.current):0}updateFeatures(){let A="animation";for(A in He){const e=He[A];if(!e)continue;const{isEnabled:t,Feature:n}=e;if(!this.features[A]&&n&&t(this.props)&&(this.features[A]=new n(this)),this.features[A]){const e=this.features[A];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(A){return this.latestValues[A]}setStaticValue(A,e){this.latestValues[A]=e}update(A,e){(A.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=A,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Me.length;e++){const t=Me[e];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const n=A["on"+t];n&&(this.propEventSubscriptions[t]=this.on(t,n))}this.prevMotionValues=function(A,e,t){for(const n in e){const i=e[n],s=t[n];if(fe(i))A.addValue(n,i);else if(fe(s))A.addValue(n,le(i,{owner:A}));else if(s!==i)if(A.hasValue(n)){const e=A.getValue(n);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=A.getStaticValue(n);A.addValue(n,le(void 0!==e?e:i,{owner:A}))}}for(const n in t)void 0===e[n]&&A.removeValue(n);return e}(this,this.scrapeMotionValuesFromProps(A,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(A){return this.props.variants?this.props.variants[A]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(A){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(A),()=>e.variantChildren.delete(A)}addValue(A,e){const t=this.values.get(A);e!==t&&(t&&this.removeValue(A),this.bindToMotionValue(A,e),this.values.set(A,e),this.latestValues[A]=e.get())}removeValue(A){this.values.delete(A);const e=this.valueSubscriptions.get(A);e&&(e(),this.valueSubscriptions.delete(A)),delete this.latestValues[A],this.removeValueFromRenderState(A,this.renderState)}hasValue(A){return this.values.has(A)}getValue(A,e){if(this.props.values&&this.props.values[A])return this.props.values[A];let t=this.values.get(A);return void 0===t&&void 0!==e&&(t=le(null===e?void 0:e,{owner:this}),this.addValue(A,t)),t}readValue(A,e){let t=void 0===this.latestValues[A]&&this.current?this.getBaseTargetFromProps(this.props,A)??this.readValueFromInstance(this.current,A,this.options):this.latestValues[A];var n;return null!=t&&("string"==typeof t&&(rA(t)||QA(t))?t=parseFloat(t):(n=t,!ze.find(nA(n))&&kA.test(e)&&(t=ie(A,e))),this.setBaseTarget(A,fe(t)?t.get():t)),fe(t)?t.get():t}setBaseTarget(A,e){this.baseTarget[A]=e}getBaseTarget(A){const{initial:e}=this.props;let t;if("string"==typeof e||"object"==typeof e){const n=De(this.props,e,this.presenceContext?.custom);n&&(t=n[A])}if(e&&void 0!==t)return t;const n=this.getBaseTargetFromProps(this.props,A);return void 0===n||fe(n)?void 0!==this.initialValues[A]&&void 0===t?void 0:this.baseTarget[A]:n}on(A,e){return this.events[A]||(this.events[A]=new Pe),this.events[A].add(e)}notify(A,...e){this.events[A]&&this.events[A].notify(...e)}scheduleRenderMicrotask(){Ce.render(this.render)}}class Fe extends Le{constructor(){super(...arguments),this.KeyframeResolver=re}sortInstanceNodePosition(A,e){return 2&A.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(A,e){return A.style?A.style[e]:void 0}removeValueFromRenderState(A,{vars:e,style:t}){delete e[A],delete t[A]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:A}=this.props;fe(A)&&(this.childSubscription=A.on("change",A=>{this.current&&(this.current.textContent=`${A}`)}))}}const Re=(A,e)=>e&&"number"==typeof A?e.transform(A):A,Ne={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ve=u.length;function Ye(A,e,t){const{style:n,vars:i,transformOrigin:s}=A;let r=!1,f=!1;for(const A in e){const t=e[A];if(c.has(A))r=!0;else if(x(A))i[A]=t;else{const e=Re(t,ee[A]);A.startsWith("origin")?(f=!0,s[A]=e):n[A]=e}}if(e.transform||(r||t?n.transform=function(A,e,t){let n="",i=!0;for(let s=0;s<Ve;s++){const r=u[s],f=A[r];if(void 0===f)continue;let o=!0;if(o="number"==typeof f?f===(r.startsWith("scale")?1:0):0===parseFloat(f),!o||t){const A=Re(f,ee[r]);o||(i=!1,n+=`${Ne[r]||r}(${A}) `),t&&(e[r]=A)}}return n=n.trim(),t?n=t(e,i?"":n):i&&(n="none"),n}(e,A.transform,t):n.transform&&(n.transform="none")),f){const{originX:A="50%",originY:e="50%",originZ:t=0}=s;n.transformOrigin=`${A} ${e} ${t}`}}function Ze(A,{style:e,vars:t},n,i){const s=A.style;let r;for(r in e)s[r]=e[r];for(r in i?.applyProjectionStyles(s,n),t)s.setProperty(r,t[r])}const We={};function qe(A,{layout:e,layoutId:t}){return c.has(A)||A.startsWith("origin")||(e||void 0!==t)&&(!!We[A]||"opacity"===A)}function Je(A,e,t){const{style:n}=A,i={};for(const s in n)(fe(n[s])||e.style&&fe(e.style[s])||qe(s,A)||void 0!==t?.getValue(s)?.liveStyle)&&(i[s]=n[s]);return i}class Ue extends Fe{constructor(){super(...arguments),this.type="html",this.renderInstance=Ze}readValueFromInstance(A,e){if(c.has(e))return this.projection?.isProjecting?E(e):((A,e)=>{const{transform:t="none"}=getComputedStyle(A);return B(t,e)})(A,e);{const n=(t=A,window.getComputedStyle(t)),i=(x(e)?n.getPropertyValue(e):n[e])||0;return"string"==typeof i?i.trim():i}var t}measureInstanceViewportBox(A,{transformPagePoint:e}){return W(A,e)}build(A,e,t){Ye(A,e,t.transformTemplate)}scrapeMotionValuesFromProps(A,e,t){return Je(A,e,t)}}const Ge=A=>A.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ke={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ke={offset:"strokeDashoffset",array:"strokeDasharray"};function Se(A,{attrX:e,attrY:t,attrScale:n,pathLength:i,pathSpacing:s=1,pathOffset:r=0,...f},o,a,v){if(Ye(A,f,a),o)return void(A.style.viewBox&&(A.attrs.viewBox=A.style.viewBox));A.attrs=A.style,A.style={};const{attrs:u,style:c}=A;u.transform&&(c.transform=u.transform,delete u.transform),(c.transform||u.transformOrigin)&&(c.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),c.transform&&(c.transformBox=v?.transformBox??"fill-box",delete u.transformBox),void 0!==e&&(u.x=e),void 0!==t&&(u.y=t),void 0!==n&&(u.scale=n),void 0!==i&&function(A,e,t=1,n=0,i=!0){A.pathLength=1;const s=i?ke:Ke;A[s.offset]=_.transform(-n);const r=_.transform(e),f=_.transform(t);A[s.array]=`${r} ${f}`}(u,i,s,r,!1)}const $e=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"]),_e=A=>"string"==typeof A&&"svg"===A.toLowerCase();function At(A,e,t){const n=Je(A,e,t);for(const t in A)(fe(A[t])||fe(e[t]))&&(n[-1!==u.indexOf(t)?"attr"+t.charAt(0).toUpperCase()+t.substring(1):t]=A[t]);return n}class et extends Fe{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=me}getBaseTargetFromProps(A,e){return A[e]}readValueFromInstance(A,e){if(c.has(e)){const A=ne(e);return A&&A.default||0}return e=$e.has(e)?e:Ge(e),A.getAttribute(e)}scrapeMotionValuesFromProps(A,e,t){return At(A,e,t)}build(A,e,t){Se(A,e,this.isSVGTag,t.transformTemplate,t.style)}renderInstance(A,e,t,n){!function(A,e,t,n){Ze(A,e,void 0,n);for(const t in e.attrs)A.setAttribute($e.has(t)?t:Ge(t),e.attrs[t])}(A,e,0,n)}mount(A){this.isSVGTag=_e(A.tagName),super.mount(A)}}const tt=["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 nt(A){return"string"==typeof A&&!A.includes("-")&&!!(tt.indexOf(A)>-1||/[A-Z]/u.test(A))}const it=(A,e)=>nt(A)?new et(e):new Ue(e,{allowProjection:A!==r.Fragment}),st=(0,r.createContext)({}),rt=(0,r.createContext)({strict:!1}),ft=(0,r.createContext)({transformPagePoint:A=>A,isStatic:!1,reducedMotion:"never"}),ot=(0,r.createContext)({});function at(A){return Array.isArray(A)?A.join(" "):A}function vt(A,e,t){for(const n in e)fe(e[n])||qe(n,t)||(A[n]=e[n])}function ut(A,e){const t={},n=function(A,e){const t={};return vt(t,A.style||{},A),Object.assign(t,function({transformTemplate:A},e){return(0,r.useMemo)(()=>{const t={style:{},transform:{},transformOrigin:{},vars:{}};return Ye(t,e,A),Object.assign({},t.vars,t.style)},[e])}(A,e)),t}(A,e);return A.drag&&!1!==A.dragListener&&(t.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===A.drag?"none":"pan-"+("x"===A.drag?"y":"x")),void 0===A.tabIndex&&(A.onTap||A.onTapStart||A.whileTap)&&(t.tabIndex=0),t.style=n,t}function ct(A,e,t,n){const i=(0,r.useMemo)(()=>{const t={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Se(t,e,_e(n),A.transformTemplate,A.style),{...t.attrs,style:{...t.style}}},[e]);if(A.style){const e={};vt(e,A.style,A),i.style={...e,...i.style}}return i}const Pt=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function dt(A){return A.startsWith("while")||A.startsWith("drag")&&"draggable"!==A||A.startsWith("layout")||A.startsWith("onTap")||A.startsWith("onPan")||A.startsWith("onLayout")||Pt.has(A)}let gt=A=>!dt(A);try{"function"==typeof(ht=require("@emotion/is-prop-valid").default)&&(gt=A=>A.startsWith("on")?!dt(A):ht(A))}catch{}var ht;function lt(A,e,t,{latestValues:n},i,s=!1){const f=(nt(A)?ct:ut)(e,n,i,A),o=function(A,e,t){const n={};for(const i in A)"values"===i&&"object"==typeof A.values||(gt(i)||!0===t&&dt(i)||!e&&!dt(i)||A.draggable&&i.startsWith("onDrag"))&&(n[i]=A[i]);return n}(e,"string"==typeof A,s),a=A!==r.Fragment?{...o,...f,ref:t}:{},{children:v}=e,u=(0,r.useMemo)(()=>fe(v)?v.get():v,[v]);return(0,r.createElement)(A,{...a,children:u})}const zt=(0,r.createContext)(null);function Ct(A){return fe(A)?A.get():A}function Et(A,e,t,n){const i={},s=n(A,{});for(const A in s)i[A]=Ct(s[A]);let{initial:r,animate:f}=A;const o=Oe(A),a=Te(A);e&&a&&!o&&!1!==A.inherit&&(void 0===r&&(r=e.initial),void 0===f&&(f=e.animate));let v=!!t&&!1===t.initial;v=v||!1===r;const u=v?f:r;if(u&&"boolean"!=typeof u&&!Xe(u)){const e=Array.isArray(u)?u:[u];for(let t=0;t<e.length;t++){const n=De(A,e[t]);if(n){const{transitionEnd:A,transition:e,...t}=n;for(const A in t){let e=t[A];Array.isArray(e)&&(e=e[v?e.length-1:0]),null!==e&&(i[A]=e)}for(const e in A)i[e]=A[e]}}}return i}const Bt=A=>(e,t)=>{const n=(0,r.useContext)(ot),i=(0,r.useContext)(zt),s=()=>function({scrapeMotionValuesFromProps:A,createRenderState:e},t,n,i){return{latestValues:Et(t,n,i,A),renderState:e()}}(A,e,n,i);return t?s():function(A){const e=(0,r.useRef)(null);return null===e.current&&(e.current=A()),e.current}(s)},Ht=Bt({scrapeMotionValuesFromProps:Je,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})}),mt=Bt({scrapeMotionValuesFromProps:At,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}})}),xt=Symbol.for("motionComponentSymbol");function pt(A){return A&&"object"==typeof A&&Object.prototype.hasOwnProperty.call(A,"current")}function It(A,e,t){return(0,r.useCallback)(n=>{n&&A.onMount&&A.onMount(n),e&&(n?e.mount(n):e.unmount()),t&&("function"==typeof t?t(n):pt(t)&&(t.current=n))},[e])}const wt="data-"+Ge("framerAppearId"),Xt=(0,r.createContext)({}),Qt=xe?r.useLayoutEffect:r.useEffect;function jt(A,e,t,n,i){const{visualElement:s}=(0,r.useContext)(ot),f=(0,r.useContext)(rt),o=(0,r.useContext)(zt),a=(0,r.useContext)(ft).reducedMotion,v=(0,r.useRef)(null);n=n||f.renderer,!v.current&&n&&(v.current=n(A,{visualState:e,parent:s,props:t,presenceContext:o,blockInitialAnimation:!!o&&!1===o.initial,reducedMotionConfig:a}));const u=v.current,c=(0,r.useContext)(Xt);!u||u.projection||!i||"html"!==u.type&&"svg"!==u.type||function(A,e,t,n){const{layoutId:i,layout:s,drag:r,dragConstraints:f,layoutScroll:o,layoutRoot:a,layoutCrossfade:v}=e;A.projection=new t(A.latestValues,e["data-framer-portal-id"]?void 0:yt(A.parent)),A.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:Boolean(r)||f&&pt(f),visualElement:A,animationType:"string"==typeof s?s:"both",initialPromotionConfig:n,crossfade:v,layoutScroll:o,layoutRoot:a})}(v.current,t,i,c);const P=(0,r.useRef)(!1);(0,r.useInsertionEffect)(()=>{u&&P.current&&u.update(t,o)});const d=t[wt],g=(0,r.useRef)(Boolean(d)&&!window.MotionHandoffIsComplete?.(d)&&window.MotionHasOptimisedAnimation?.(d));return Qt(()=>{u&&(P.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),g.current&&u.animationState&&u.animationState.animateChanges())}),(0,r.useEffect)(()=>{u&&(!g.current&&u.animationState&&u.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(d)}),g.current=!1),u.enteringChildren=void 0)}),u}function yt(A){if(A)return!1!==A.options.allowProjection?A.projection:yt(A.parent)}function Ot(A,{forwardMotionProps:e=!1}={},t,n){t&&function(A){for(const e in A)He[e]={...He[e],...A[e]}}(t);const i=nt(A)?mt:Ht;function f(t,f){let o;const a={...(0,r.useContext)(ft),...t,layoutId:Tt(t)},{isStatic:v}=a,u=function(A){const{initial:e,animate:t}=function(A,e){if(Oe(A)){const{initial:e,animate:t}=A;return{initial:!1===e||Qe(e)?e:void 0,animate:Qe(t)?t:void 0}}return!1!==A.inherit?e:{}}(A,(0,r.useContext)(ot));return(0,r.useMemo)(()=>({initial:e,animate:t}),[at(e),at(t)])}(t),c=i(t,v);if(!v&&xe){(0,r.useContext)(rt).strict;const e=function(A){const{drag:e,layout:t}=He;if(!e&&!t)return{};const n={...e,...t};return{MeasureLayout:e?.isEnabled(A)||t?.isEnabled(A)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(a);o=e.MeasureLayout,u.visualElement=jt(A,c,a,n,e.ProjectionNode)}return(0,s.jsxs)(ot.Provider,{value:u,children:[o&&u.visualElement?(0,s.jsx)(o,{visualElement:u.visualElement,...a}):null,lt(A,t,It(c,u.visualElement,f),c,v,e)]})}f.displayName=`motion.${"string"==typeof A?A:`create(${A.displayName??A.name??""})`}`;const o=(0,r.forwardRef)(f);return o[xt]=A,o}function Tt({layoutId:A}){const e=(0,r.useContext)(st).id;return e&&void 0!==A?e+"-"+A:A}function bt(A,e){if("undefined"==typeof Proxy)return Ot;const t=new Map,n=(t,n)=>Ot(t,n,A,e);return new Proxy((A,e)=>n(A,e),{get:(i,s)=>"create"===s?n:(t.has(s)||t.set(s,Ot(s,void 0,A,e)),t.get(s))})}function Dt(A,e,t){const n=A.getProps();return De(n,e,void 0!==t?t:n.custom,A)}function Mt(A,e){return A?.[e]??A?.default??A}const Lt=A=>Array.isArray(A);function Ft(A,e,t){A.hasValue(e)?A.getValue(e).set(t):A.addValue(e,le(t))}function Rt(A){return Lt(A)?A[A.length-1]||0:A}function Nt(A,e){const t=A.getValue("willChange");if(n=t,Boolean(fe(n)&&n.add))return t.add(e);if(!t&&dA.WillChange){const t=new dA.WillChange("auto");A.addValue("willChange",t),t.add(e)}var n}function Vt(A){return A.props[wt]}function Yt(A){A.duration=0,A.type}const Zt=(A,e)=>t=>e(A(t)),Wt=(...A)=>A.reduce(Zt),qt=A=>1e3*A,Jt=A=>A/1e3,Ut={layout:0,mainThread:0,waapi:0};function Gt(A,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?A+6*(e-A)*t:t<.5?e:t<2/3?A+(e-A)*(2/3-t)*6:A}function kt(A,e){return t=>t>0?e:A}const Kt=(A,e,t)=>{const n=A*A,i=t*(e*e-n)+n;return i<0?0:Math.sqrt(i)},St=[FA,LA,RA];function $t(A){const e=(t=A,St.find(A=>A.test(t)));var t;if(Boolean(e),!Boolean(e))return!1;let n=e.parse(A);return e===RA&&(n=function({hue:A,saturation:e,lightness:t,alpha:n}){A/=360,t/=100;let i=0,s=0,r=0;if(e/=100){const n=t<.5?t*(1+e):t+e-t*e,f=2*t-n;i=Gt(f,n,A+1/3),s=Gt(f,n,A),r=Gt(f,n,A-1/3)}else i=s=r=t;return{red:Math.round(255*i),green:Math.round(255*s),blue:Math.round(255*r),alpha:n}}(n)),n}const _t=(A,e)=>{const t=$t(A),n=$t(e);if(!t||!n)return kt(A,e);const i={...t};return A=>(i.red=Kt(t.red,n.red,A),i.green=Kt(t.green,n.green,A),i.blue=Kt(t.blue,n.blue,A),i.alpha=Q(t.alpha,n.alpha,A),LA.transform(i))},An=new Set(["none","hidden"]);function en(A,e){return t=>Q(A,e,t)}function tn(A){return"number"==typeof A?en:"string"==typeof A?I(A)?kt:NA.test(A)?_t:rn:Array.isArray(A)?nn:"object"==typeof A?NA.test(A)?_t:sn:kt}function nn(A,e){const t=[...A],n=t.length,i=A.map((A,t)=>tn(A)(A,e[t]));return A=>{for(let e=0;e<n;e++)t[e]=i[e](A);return t}}function sn(A,e){const t={...A,...e},n={};for(const i in t)void 0!==A[i]&&void 0!==e[i]&&(n[i]=tn(A[i])(A[i],e[i]));return A=>{for(const e in n)t[e]=n[e](A);return t}}const rn=(A,e)=>{const t=kA.createTransformer(e),n=qA(A),i=qA(e);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?An.has(A)&&!i.values.length||An.has(e)&&!n.values.length?function(A,e){return An.has(A)?t=>t<=0?A:e:t=>t>=1?e:A}(A,e):Wt(nn(function(A,e){const t=[],n={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],r=A.indexes[s][n[s]],f=A.values[r]??0;t[i]=f,n[s]++}return t}(n,i),i.values),t):kt(A,e)};function fn(A,e,t){return"number"==typeof A&&"number"==typeof e&&"number"==typeof t?Q(A,e,t):tn(A)(A,e)}const on=A=>{const e=({timestamp:e})=>A(e);return{start:(A=!0)=>zA.update(e,A),stop:()=>CA(e),now:()=>EA.isProcessing?EA.timestamp:ve.now()}},an=(A,e,t=10)=>{let n="";const i=Math.max(Math.round(e/t),2);for(let e=0;e<i;e++)n+=Math.round(1e4*A(e/(i-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},vn=2e4;function un(A){let e=0,t=A.next(e);for(;!t.done&&e<vn;)e+=50,t=A.next(e);return e>=vn?1/0:e}function cn(A,e,t){const n=Math.max(e-5,0);return de(t-A(n),e-n)}const Pn=.01,dn=2,gn=.005,hn=.5;const ln=12;function zn(A,e){return A*Math.sqrt(1-e*e)}const Cn=["duration","bounce"],En=["stiffness","damping","mass"];function Bn(A,e){return e.some(e=>void 0!==A[e])}function Hn(A=.3,e=.3){const t="object"!=typeof A?{visualDuration:A,keyframes:[0,1],bounce:e}:A;let{restSpeed:n,restDelta:i}=t;const s=t.keyframes[0],r=t.keyframes[t.keyframes.length-1],f={done:!1,value:s},{stiffness:o,damping:a,mass:v,duration:u,velocity:c,isResolvedFromDuration:P}=function(A){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...A};if(!Bn(A,En)&&Bn(A,Cn))if(A.visualDuration){const t=A.visualDuration,n=2*Math.PI/(1.2*t),i=n*n,s=2*J(.05,1,1-(A.bounce||0))*Math.sqrt(i);e={...e,mass:1,stiffness:i,damping:s}}else{const t=function({duration:A=800,bounce:e=.3,velocity:t=0,mass:n=1}){let i,s;qt(10);let r=1-e;r=J(.05,1,r),A=J(.01,10,Jt(A)),r<1?(i=e=>{const n=e*r,i=n*A;return.001-(n-t)/zn(e,r)*Math.exp(-i)},s=e=>{const n=e*r*A,s=n*t+t,f=Math.pow(r,2)*Math.pow(e,2)*A,o=Math.exp(-n),a=zn(Math.pow(e,2),r);return(.001-i(e)>0?-1:1)*((s-f)*o)/a}):(i=e=>Math.exp(-e*A)*((e-t)*A+1)-.001,s=e=>Math.exp(-e*A)*(A*A*(t-e)));const f=function(A,e,t){let n=t;for(let t=1;t<ln;t++)n-=A(n)/e(n);return n}(i,s,5/A);if(A=qt(A),isNaN(f))return{stiffness:100,damping:10,duration:A};{const e=Math.pow(f,2)*n;return{stiffness:e,damping:2*r*Math.sqrt(n*e),duration:A}}}(A);e={...e,...t,mass:1},e.isResolvedFromDuration=!0}return e}({...t,velocity:-Jt(t.velocity||0)}),d=c||0,g=a/(2*Math.sqrt(o*v)),h=r-s,l=Jt(Math.sqrt(o/v)),z=Math.abs(h)<5;let C;if(n||(n=z?Pn:dn),i||(i=z?gn:hn),g<1){const A=zn(l,g);C=e=>{const t=Math.exp(-g*l*e);return r-t*((d+g*l*h)/A*Math.sin(A*e)+h*Math.cos(A*e))}}else if(1===g)C=A=>r-Math.exp(-l*A)*(h+(d+l*h)*A);else{const A=l*Math.sqrt(g*g-1);C=e=>{const t=Math.exp(-g*l*e),n=Math.min(A*e,300);return r-t*((d+g*l*h)*Math.sinh(n)+A*h*Math.cosh(n))/A}}const E={calculatedDuration:P&&u||null,next:A=>{const e=C(A);if(P)f.done=A>=u;else{let t=0===A?d:0;g<1&&(t=0===A?qt(d):cn(C,A,e));const s=Math.abs(t)<=n,o=Math.abs(r-e)<=i;f.done=s&&o}return f.value=f.done?r:e,f},toString:()=>{const A=Math.min(un(E),vn),e=an(e=>E.next(A*e).value,A,30);return A+"ms "+e},toTransition:()=>{}};return E}function mn({keyframes:A,velocity:e=0,power:t=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:r,min:f,max:o,restDelta:a=.5,restSpeed:v}){const u=A[0],c={done:!1,value:u},P=A=>void 0===f?o:void 0===o||Math.abs(f-A)<Math.abs(o-A)?f:o;let d=t*e;const g=u+d,h=void 0===r?g:r(g);h!==g&&(d=h-u);const l=A=>-d*Math.exp(-A/n),z=A=>h+l(A),C=A=>{const e=l(A),t=z(A);c.done=Math.abs(e)<=a,c.value=c.done?h:t};let E,B;const H=A=>{var e;e=c.value,(void 0!==f&&e<f||void 0!==o&&e>o)&&(E=A,B=Hn({keyframes:[c.value,P(c.value)],velocity:cn(z,A,c.value),damping:i,stiffness:s,restDelta:a,restSpeed:v}))};return H(0),{calculatedDuration:null,next:A=>{let e=!1;return B||void 0!==E||(e=!0,C(A),H(A)),void 0!==E&&A>=E?B.next(A-E):(!e&&C(A),c)}}}Hn.applyToOptions=A=>{const e=function(A,e=100,t){const n=t({...A,keyframes:[0,e]}),i=Math.min(un(n),vn);return{type:"keyframes",ease:A=>n.next(i*A).value/e,duration:Jt(i)}}(A,100,Hn);return A.ease=e.ease,A.duration=qt(e.duration),A.type="keyframes",A};const xn=(A,e,t)=>(((1-3*t+3*e)*A+(3*t-6*e))*A+3*e)*A;function pn(A,e,t,n){if(A===e&&t===n)return PA;return i=>0===i||1===i?i:xn(function(A,e,t,n,i){let s,r,f=0;do{r=e+(t-e)/2,s=xn(r,n,i)-A,s>0?t=r:e=r}while(Math.abs(s)>1e-7&&++f<12);return r}(i,0,1,A,t),e,n)}const In=pn(.42,0,1,1),wn=pn(0,0,.58,1),Xn=pn(.42,0,.58,1),Qn=A=>e=>e<=.5?A(2*e)/2:(2-A(2*(1-e)))/2,jn=A=>e=>1-A(1-e),yn=pn(.33,1.53,.69,.99),On=jn(yn),Tn=Qn(On),bn=A=>(A*=2)<1?.5*On(A):.5*(2-Math.pow(2,-10*(A-1))),Dn=A=>1-Math.sin(Math.acos(A)),Mn=jn(Dn),Ln=Qn(Dn),Fn=A=>Array.isArray(A)&&"number"==typeof A[0],Rn={linear:PA,easeIn:In,easeInOut:Xn,easeOut:wn,circIn:Dn,circInOut:Ln,circOut:Mn,backIn:On,backInOut:Tn,backOut:yn,anticipate:bn},Nn=A=>{if(Fn(A)){A.length;const[e,t,n,i]=A;return pn(e,t,n,i)}return"string"==typeof A?Rn[A]:A},Vn=(A,e,t)=>{const n=e-A;return 0===n?1:(t-A)/n};function Yn({duration:A=300,keyframes:e,times:t,ease:n="easeInOut"}){const i=(A=>Array.isArray(A)&&"number"!=typeof A[0])(n)?n.map(Nn):Nn(n),s={done:!1,value:e[0]},r=function(A,e){return A.map(A=>A*e)}(t&&t.length===e.length?t:function(A){const e=[0];return function(A,e){const t=A[A.length-1];for(let n=1;n<=e;n++){const i=Vn(0,e,n);A.push(Q(t,1,i))}}(e,A.length-1),e}(e),A),f=function(A,e,{clamp:t=!0,ease:n,mixer:i}={}){const s=A.length;if(e.length,1===s)return()=>e[0];if(2===s&&e[0]===e[1])return()=>e[1];const r=A[0]===A[1];A[0]>A[s-1]&&(A=[...A].reverse(),e=[...e].reverse());const f=function(A,e,t){const n=[],i=t||dA.mix||fn,s=A.length-1;for(let t=0;t<s;t++){let s=i(A[t],A[t+1]);if(e){const A=Array.isArray(e)?e[t]||PA:e;s=Wt(A,s)}n.push(s)}return n}(e,n,i),o=f.length,a=t=>{if(r&&t<A[0])return e[0];let n=0;if(o>1)for(;n<A.length-2&&!(t<A[n+1]);n++);const i=Vn(A[n],A[n+1],t);return f[n](i)};return t?e=>a(J(A[0],A[s-1],e)):a}(r,e,{ease:Array.isArray(i)?i:(o=e,a=i,o.map(()=>a||Xn).splice(0,o.length-1))});var o,a;return{calculatedDuration:A,next:e=>(s.value=f(e),s.done=e>=A,s)}}const Zn=A=>null!==A;function Wn(A,{repeat:e,repeatType:t="loop"},n,i=1){const s=A.filter(Zn),r=i<0||e&&"loop"!==t&&e%2==1?0:s.length-1;return r&&void 0!==n?n:s[r]}const qn={decay:mn,inertia:mn,tween:Yn,keyframes:Yn,spring:Hn};function Jn(A){"string"==typeof A.type&&(A.type=qn[A.type])}class Un{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(A=>{this.resolve=A})}notifyFinished(){this.resolve()}then(A,e){return this.finished.then(A,e)}}const Gn=A=>A/100;class kn extends Un{constructor(A){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:A}=this.options;A&&A.updatedAt!==ve.now()&&this.tick(ve.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},Ut.mainThread++,this.options=A,this.initAnimation(),this.play(),!1===A.autoplay&&this.pause()}initAnimation(){const{options:A}=this;Jn(A);const{type:e=Yn,repeat:t=0,repeatDelay:n=0,repeatType:i,velocity:s=0}=A;let{keyframes:r}=A;const f=e||Yn;f!==Yn&&"number"!=typeof r[0]&&(this.mixKeyframes=Wt(Gn,fn(r[0],r[1])),r=[0,100]);const o=f({...A,keyframes:r});"mirror"===i&&(this.mirroredGenerator=f({...A,keyframes:[...r].reverse(),velocity:-s})),null===o.calculatedDuration&&(o.calculatedDuration=un(o));const{calculatedDuration:a}=o;this.calculatedDuration=a,this.resolvedDuration=a+n,this.totalDuration=this.resolvedDuration*(t+1)-n,this.generator=o}updateTime(A){const e=Math.round(A-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(A,e=!1){const{generator:t,totalDuration:n,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:r,calculatedDuration:f}=this;if(null===this.startTime)return t.next(0);const{delay:o=0,keyframes:a,repeat:v,repeatType:u,repeatDelay:c,type:P,onUpdate:d,finalKeyframe:g}=this.options;this.speed>0