@opencx/widget 3.0.5 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/basic.cjs +1 -1
- package/dist/basic.cjs.map +1 -1
- package/dist/basic.js +1 -1
- package/dist/basic.js.map +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/src/designs/react/components/Text.component.d.ts +3 -2
- package/dist/src/designs/react/components/lib/button.d.ts +1 -1
- package/dist/src/headless/core/index.d.ts +1 -1
- package/dist/src/headless/core/types/messages.d.ts +9 -6
- package/dist/src/headless/react/index.d.ts +2 -1
- package/dist/src/headless/react/types/components.d.ts +2 -9
- package/dist/{useUploadFiles-B-KeKKAJ.cjs → useUploadFiles-CmlWu0sy.cjs} +2 -2
- package/dist/useUploadFiles-CmlWu0sy.cjs.map +1 -0
- package/dist/{useUploadFiles-DoAL3kRg.js → useUploadFiles-PZoekJC4.js} +2 -2
- package/dist/useUploadFiles-PZoekJC4.js.map +1 -0
- package/dist-embed/script.js +1 -1
- package/dist-embed/script.js.map +1 -1
- package/package.json +1 -1
- package/dist/useUploadFiles-B-KeKKAJ.cjs.map +0 -1
- package/dist/useUploadFiles-DoAL3kRg.js.map +0 -1
package/dist-embed/script.js
CHANGED
|
@@ -14,7 +14,7 @@ var fie=Object.defineProperty;var JI=at=>{throw TypeError(at)};var pie=(at,gt,wt
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var yO=y,vO=Symbol.for("react.element"),bO=Symbol.for("react.fragment"),xO=Object.prototype.hasOwnProperty,EO=yO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,TO={key:!0,ref:!0,__self:!0,__source:!0};function av(e,t,n){var r,i={},a=null,o=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)xO.call(t,r)&&!TO.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:vO,type:e,key:a,ref:o,props:i,_owner:EO.current}}gc.Fragment=bO,gc.jsx=av,gc.jsxs=av,Yy.exports=gc;var T=Yy.exports;const ov="3.0.5";function bc(e){"@babel/helpers - typeof";return bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bc(e)}var _O=/^\s+/,SO=/\s+$/;function fe(e,t){if(e=e||"",t=t||{},e instanceof fe)return e;if(!(this instanceof fe))return new fe(e,t);var n=CO(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}fe.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,a,o,s;return n=t.r/255,r=t.g/255,i=t.b/255,n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*a+.7152*o+.0722*s},setAlpha:function(t){return this._a=fv(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=lv(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=lv(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=sv(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=sv(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return uv(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return NO(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ot(this._r,255)*100)+"%",g:Math.round(ot(this._g,255)*100)+"%",b:Math.round(ot(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ot(this._r,255)*100)+"%, "+Math.round(ot(this._g,255)*100)+"%, "+Math.round(ot(this._b,255)*100)+"%)":"rgba("+Math.round(ot(this._r,255)*100)+"%, "+Math.round(ot(this._g,255)*100)+"%, "+Math.round(ot(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:HO[uv(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+cv(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=fe(t);r="#"+cv(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,a=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return a?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return fe(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(DO,arguments)},brighten:function(){return this._applyModification(LO,arguments)},darken:function(){return this._applyModification(MO,arguments)},desaturate:function(){return this._applyModification(PO,arguments)},saturate:function(){return this._applyModification(IO,arguments)},greyscale:function(){return this._applyModification(OO,arguments)},spin:function(){return this._applyModification(FO,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(UO,arguments)},complement:function(){return this._applyCombination(BO,arguments)},monochromatic:function(){return this._applyCombination(zO,arguments)},splitcomplement:function(){return this._applyCombination(jO,arguments)},triad:function(){return this._applyCombination(dv,[3])},tetrad:function(){return this._applyCombination(dv,[4])}},fe.fromRatio=function(e,t){if(bc(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Qs(e[r]));e=n}return fe(e,t)};function CO(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,s=!1;return typeof e=="string"&&(e=YO(e)),bc(e)=="object"&&(Zr(e.r)&&Zr(e.g)&&Zr(e.b)?(t=kO(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Zr(e.h)&&Zr(e.s)&&Zr(e.v)?(r=Qs(e.s),i=Qs(e.v),t=RO(e.h,r,i),o=!0,s="hsv"):Zr(e.h)&&Zr(e.s)&&Zr(e.l)&&(r=Qs(e.s),a=Qs(e.l),t=AO(e.h,r,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=fv(n),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function kO(e,t,n){return{r:ot(e,255)*255,g:ot(t,255)*255,b:ot(n,255)*255}}function sv(e,t,n){e=ot(e,255),t=ot(t,255),n=ot(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=(r+i)/2;if(r==i)a=o=0;else{var l=r-i;switch(o=s>.5?l/(2-r-i):l/(r+i),r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:o,l:s}}function AO(e,t,n){var r,i,a;e=ot(e,360),t=ot(t,100),n=ot(n,100);function o(u,c,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?u+(c-u)*6*d:d<1/2?c:d<2/3?u+(c-u)*(2/3-d)*6:u}if(t===0)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=o(l,s,e+1/3),i=o(l,s,e),a=o(l,s,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function lv(e,t,n){e=ot(e,255),t=ot(t,255),n=ot(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=r,l=r-i;if(o=r===0?0:l/r,r==i)a=0;else{switch(r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:o,v:s}}function RO(e,t,n){e=ot(e,360)*6,t=ot(t,100),n=ot(n,100);var r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6,u=[n,o,a,a,s,n][l],c=[s,n,n,o,a,a][l],d=[a,a,s,n,n,o][l];return{r:u*255,g:c*255,b:d*255}}function uv(e,t,n,r){var i=[fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function NO(e,t,n,r,i){var a=[fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(n).toString(16)),fr(pv(r))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function cv(e,t,n,r){var i=[fr(pv(r)),fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(n).toString(16))];return i.join("")}fe.equals=function(e,t){return!e||!t?!1:fe(e).toRgbString()==fe(t).toRgbString()},fe.random=function(){return fe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function PO(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s-=t/100,n.s=xc(n.s),fe(n)}function IO(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s+=t/100,n.s=xc(n.s),fe(n)}function OO(e){return fe(e).desaturate(100)}function DO(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l+=t/100,n.l=xc(n.l),fe(n)}function LO(e,t){t=t===0?0:t||10;var n=fe(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),fe(n)}function MO(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l-=t/100,n.l=xc(n.l),fe(n)}function FO(e,t){var n=fe(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,fe(n)}function BO(e){var t=fe(e).toHsl();return t.h=(t.h+180)%360,fe(t)}function dv(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=fe(e).toHsl(),r=[fe(e)],i=360/t,a=1;a<t;a++)r.push(fe({h:(n.h+a*i)%360,s:n.s,l:n.l}));return r}function jO(e){var t=fe(e).toHsl(),n=t.h;return[fe(e),fe({h:(n+72)%360,s:t.s,l:t.l}),fe({h:(n+216)%360,s:t.s,l:t.l})]}function UO(e,t,n){t=t||6,n=n||30;var r=fe(e).toHsl(),i=360/n,a=[fe(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(fe(r));return a}function zO(e,t){t=t||6;for(var n=fe(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(fe({h:r,s:i,v:a})),a=(a+s)%1;return o}fe.mix=function(e,t,n){n=n===0?0:n||50;var r=fe(e).toRgb(),i=fe(t).toRgb(),a=n/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return fe(o)},fe.readability=function(e,t){var n=fe(e),r=fe(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},fe.isReadable=function(e,t,n){var r=fe.readability(e,t),i,a;switch(a=!1,i=qO(n),i.level+i.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a},fe.mostReadable=function(e,t,n){var r=null,i=0,a,o,s,l;n=n||{},o=n.includeFallbackColors,s=n.level,l=n.size;for(var u=0;u<t.length;u++)a=fe.readability(e,t[u]),a>i&&(i=a,r=fe(t[u]));return fe.isReadable(e,r,{level:s,size:l})||!o?r:(n.includeFallbackColors=!1,fe.mostReadable(e,["#fff","#000"],n))};var ph=fe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},HO=fe.hexNames=VO(ph);function VO(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function fv(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ot(e,t){$O(e)&&(e="100%");var n=WO(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function xc(e){return Math.min(1,Math.max(0,e))}function In(e){return parseInt(e,16)}function $O(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function WO(e){return typeof e=="string"&&e.indexOf("%")!=-1}function fr(e){return e.length==1?"0"+e:""+e}function Qs(e){return e<=1&&(e=e*100+"%"),e}function pv(e){return Math.round(parseFloat(e)*255).toString(16)}function hv(e){return In(e)/255}var pr=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Zr(e){return!!pr.CSS_UNIT.exec(e)}function YO(e){e=e.replace(_O,"").replace(SO,"").toLowerCase();var t=!1;if(ph[e])e=ph[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=pr.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=pr.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=pr.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=pr.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=pr.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=pr.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=pr.hex8.exec(e))?{r:In(n[1]),g:In(n[2]),b:In(n[3]),a:hv(n[4]),format:t?"name":"hex8"}:(n=pr.hex6.exec(e))?{r:In(n[1]),g:In(n[2]),b:In(n[3]),format:t?"name":"hex"}:(n=pr.hex4.exec(e))?{r:In(n[1]+""+n[1]),g:In(n[2]+""+n[2]),b:In(n[3]+""+n[3]),a:hv(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=pr.hex3.exec(e))?{r:In(n[1]+""+n[1]),g:In(n[2]+""+n[2]),b:In(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function qO(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const GO=400,KO=600,hh={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},mv=({primary:e="hsl(0, 0%, 0%)"})=>{const t=fe(e).toHsl(),n=fe(e).isLight()?"240 10% 3.9%":"0 0% 100%";return{"--opencx-primary":`${t.h} ${t.s}% ${t.l}%`,"--opencx-primary-foreground":n,"--opencx-background":"0 0% 100%","--opencx-foreground":"240 10% 3.9%","--opencx-accent":"240 4.8% 95.9%","--opencx-accent-foreground":"240 5.9% 10%","--opencx-destructive":"0 84.2% 60.2%","--opencx-destructive-foreground":"0 0% 98%","--opencx-secondary":"240 4.8% 95.9%","--opencx-secondary-foreground":"240 5.9% 10%","--opencx-muted":"240 4.8% 95.9%","--opencx-muted-foreground":"240 3.8% 46.1%","--opencx-input":"240 5.9% 90%","--opencx-border":"240 5.9% 90%","--opencx-ring":"240 5.9% 10%"}};function XO(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function Zs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const mh=e=>Array.isArray(e);function gv(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Js(e){return typeof e=="string"||Array.isArray(e)}function wv(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function gh(e,t,n,r){if(typeof t=="function"){const[i,a]=wv(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=wv(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function Ec(e,t,n){const r=e.getProps();return gh(r,t,n!==void 0?n:r.custom,e)}const wh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yh=["initial",...wh],el=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ri=new Set(el),Jr=e=>e*1e3,ei=e=>e/1e3,QO={type:"spring",stiffness:500,damping:25,restSpeed:10},ZO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),JO={type:"keyframes",duration:.8},e6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},t6=(e,{keyframes:t})=>t.length>2?JO:Ri.has(e)?e.startsWith("scale")?ZO(t[1]):QO:e6;function vh(e,t){return e?e[t]||e.default||e:void 0}const n6={skipAnimations:!1,useManualTiming:!1},r6=e=>e!==null;function Tc(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(r6),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const qt=e=>e;function i6(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(u){a.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&a.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),a.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,l.process(u))}};return l}const _c=["read","resolveKeyframes","update","preRender","render","postRender"],a6=40;function yv(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=_c.reduce((w,v)=>(w[v]=i6(a),w),{}),{read:s,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:f}=o,p=()=>{const w=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(w-i.timestamp,a6),1),i.timestamp=w,i.isProcessing=!0,s.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:_c.reduce((w,v)=>{const b=o[v];return w[v]=(E,_=!1,S=!1)=>(n||m(),b.schedule(E,_,S)),w},{}),cancel:w=>{for(let v=0;v<_c.length;v++)o[_c[v]].cancel(w)},state:i,steps:o}}const{schedule:Xe,cancel:Ni,state:Ut,steps:bh}=yv(typeof requestAnimationFrame<"u"?requestAnimationFrame:qt,!0),vv=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,o6=1e-7,s6=12;function l6(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=vv(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>o6&&++s<s6);return o}function tl(e,t,n,r){if(e===t&&n===r)return qt;const i=a=>l6(a,0,1,e,n);return a=>a===0||a===1?a:vv(i(a),t,r)}const bv=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xv=e=>t=>1-e(1-t),Ev=tl(.33,1.53,.69,.99),xh=xv(Ev),Tv=bv(xh),_v=e=>(e*=2)<1?.5*xh(e):.5*(2-Math.pow(2,-10*(e-1))),Eh=e=>1-Math.sin(Math.acos(e)),Sv=xv(Eh),Cv=bv(Eh),kv=e=>/^0[^.\s]+$/u.test(e);function u6(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||kv(e):!0}let Th=qt;const Av=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Rv=e=>t=>typeof t=="string"&&t.startsWith(e),Nv=Rv("--"),c6=Rv("var(--"),_h=e=>c6(e)?d6.test(e.split("/*")[0].trim()):!1,d6=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,f6=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function p6(e){const t=f6.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Pv(e,t,n=1){const[r,i]=p6(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return Av(o)?parseFloat(o):o}return _h(i)?Pv(i,t,n+1):i}const Pi=(e,t,n)=>n>t?t:n<e?e:n,So={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},nl={...So,transform:e=>Pi(0,1,e)},Sc={...So,default:1},rl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ii=rl("deg"),Pr=rl("%"),we=rl("px"),h6=rl("vh"),m6=rl("vw"),Iv={...Pr,parse:e=>Pr.parse(e)/100,transform:e=>Pr.transform(e*100)},g6=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Ov=e=>e===So||e===we,Dv=(e,t)=>parseFloat(e.split(", ")[t]),Lv=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Dv(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?Dv(a[1],e):0}},w6=new Set(["x","y","z"]),y6=el.filter(e=>!w6.has(e));function v6(e){const t=[];return y6.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Co={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Lv(4,13),y:Lv(5,14)};Co.translateX=Co.x,Co.translateY=Co.y;const Mv=e=>t=>t.test(e),Fv=[So,we,Pr,Ii,m6,h6,{test:e=>e==="auto",parse:e=>e}],Bv=e=>Fv.find(Mv(e)),La=new Set;let Sh=!1,Ch=!1;function jv(){if(Ch){const e=Array.from(La).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=v6(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,o])=>{var s;(s=r.getValue(a))===null||s===void 0||s.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ch=!1,Sh=!1,La.forEach(e=>e.complete()),La.clear()}function Uv(){La.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ch=!0)})}function b6(){Uv(),jv()}class kh{constructor(t,n,r,i,a,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(La.add(this),Sh||(Sh=!0,Xe.read(Uv),Xe.resolveKeyframes(jv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){const o=i==null?void 0:i.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),i&&o===void 0&&i.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),La.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,La.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const il=e=>Math.round(e*1e5)/1e5,Ah=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function x6(e){return e==null}const E6=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Rh=(e,t)=>n=>!!(typeof n=="string"&&E6.test(n)&&n.startsWith(e)||t&&!x6(n)&&Object.prototype.hasOwnProperty.call(n,t)),zv=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,s]=r.match(Ah);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},T6=e=>Pi(0,255,e),Nh={...So,transform:e=>Math.round(T6(e))},Ma={test:Rh("rgb","red"),parse:zv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Nh.transform(e)+", "+Nh.transform(t)+", "+Nh.transform(n)+", "+il(nl.transform(r))+")"};function _6(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Ph={test:Rh("#"),parse:_6,transform:Ma.transform},ko={test:Rh("hsl","hue"),parse:zv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pr.transform(il(t))+", "+Pr.transform(il(n))+", "+il(nl.transform(r))+")"},Gt={test:e=>Ma.test(e)||Ph.test(e)||ko.test(e),parse:e=>Ma.test(e)?Ma.parse(e):ko.test(e)?ko.parse(e):Ph.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ma.transform(e):ko.transform(e)},S6=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function C6(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Ah))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(S6))===null||n===void 0?void 0:n.length)||0)>0}const Hv="number",Vv="color",k6="var",A6="var(",$v="${}",R6=/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 al(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(R6,l=>(Gt.test(l)?(r.color.push(a),i.push(Vv),n.push(Gt.parse(l))):l.startsWith(A6)?(r.var.push(a),i.push(k6),n.push(l)):(r.number.push(a),i.push(Hv),n.push(parseFloat(l))),++a,$v)).split($v);return{values:n,split:s,indexes:r,types:i}}function Wv(e){return al(e).values}function Yv(e){const{split:t,types:n}=al(e),r=t.length;return i=>{let a="";for(let o=0;o<r;o++)if(a+=t[o],i[o]!==void 0){const s=n[o];s===Hv?a+=il(i[o]):s===Vv?a+=Gt.transform(i[o]):a+=i[o]}return a}}const N6=e=>typeof e=="number"?0:e;function P6(e){const t=Wv(e);return Yv(e)(t.map(N6))}const Oi={test:C6,parse:Wv,createTransformer:Yv,getAnimatableNone:P6},I6=new Set(["brightness","contrast","saturate","opacity"]);function O6(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ah)||[];if(!r)return e;const i=n.replace(r,"");let a=I6.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const D6=/\b([a-z-]*)\(.*?\)/gu,Ih={...Oi,getAnimatableNone:e=>{const t=e.match(D6);return t?t.map(O6).join(" "):e}},L6={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,backgroundPositionX:we,backgroundPositionY:we},M6={rotate:Ii,rotateX:Ii,rotateY:Ii,rotateZ:Ii,scale:Sc,scaleX:Sc,scaleY:Sc,scaleZ:Sc,skew:Ii,skewX:Ii,skewY:Ii,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:nl,originX:Iv,originY:Iv,originZ:we},qv={...So,transform:Math.round},Oh={...L6,...M6,zIndex:qv,size:we,fillOpacity:nl,strokeOpacity:nl,numOctaves:qv},F6={...Oh,color:Gt,backgroundColor:Gt,outlineColor:Gt,fill:Gt,stroke:Gt,borderColor:Gt,borderTopColor:Gt,borderRightColor:Gt,borderBottomColor:Gt,borderLeftColor:Gt,filter:Ih,WebkitFilter:Ih},Dh=e=>F6[e];function Gv(e,t){let n=Dh(e);return n!==Ih&&(n=Oi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const B6=new Set(["auto","none","0"]);function j6(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!B6.has(a)&&al(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=Gv(n,i)}class Kv extends kh{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),_h(u))){const c=Pv(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!g6.has(r)||t.length!==2)return;const[i,a]=t,o=Bv(i),s=Bv(a);if(o!==s)if(Ov(o)&&Ov(s))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)u6(t[i])&&r.push(i);r.length&&j6(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Co[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const a=n.getValue(r);a&&a.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Co[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Lh(e){return typeof e=="function"}let Cc;function U6(){Cc=void 0}const Ir={now:()=>(Cc===void 0&&Ir.set(Ut.isProcessing||n6.useManualTiming?Ut.timestamp:performance.now()),Cc),set:e=>{Cc=e,queueMicrotask(U6)}},Xv=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Oi.test(e)||e==="0")&&!e.startsWith("url("));function z6(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function H6(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=Xv(i,t),s=Xv(a,t);return!o||!s?!1:z6(e)||(n==="spring"||Lh(n))&&r}const V6=40;class Qv{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ir.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>V6?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&b6(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ir.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:o,onComplete:s,onUpdate:l,isGenerator:u}=this.options;if(!u&&!H6(t,r,i,a))if(o)this.options.duration=0;else{l==null||l(Tc(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Zv(e,t){return t?e*(1e3/t):0}const $6=5;function Jv(e,t,n){const r=Math.max(t-$6,0);return Zv(n-e(r),t-r)}const Mh=.001,W6=.01,Y6=10,q6=.05,G6=1;function K6({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a,o=1-t;o=Pi(q6,G6,o),e=Pi(W6,Y6,ei(e)),o<1?(i=u=>{const c=u*o,d=c*e,f=c-n,p=Fh(u,o),m=Math.exp(-d);return Mh-f/p*m},a=u=>{const d=u*o*e,f=d*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-d),g=Fh(Math.pow(u,2),o);return(-i(u)+Mh>0?-1:1)*((f-p)*m)/g}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Mh+c*d},a=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const s=5/e,l=Q6(i,a,s);if(e=Jr(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const X6=12;function Q6(e,t,n){let r=n;for(let i=1;i<X6;i++)r=r-e(r)/t(r);return r}function Fh(e,t){return e*Math.sqrt(1-t*t)}const Z6=["duration","bounce"],J6=["stiffness","damping","mass"];function eb(e,t){return t.some(n=>e[n]!==void 0)}function e4(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!eb(e,J6)&&eb(e,Z6)){const n=K6(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function tb({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],o={done:!1,value:i},{stiffness:s,damping:l,mass:u,duration:c,velocity:d,isResolvedFromDuration:f}=e4({...r,velocity:-ei(r.velocity||0)}),p=d||0,m=l/(2*Math.sqrt(s*u)),g=a-i,x=ei(Math.sqrt(s/u)),w=Math.abs(g)<5;n||(n=w?.01:2),t||(t=w?.005:.5);let v;if(m<1){const b=Fh(x,m);v=E=>{const _=Math.exp(-m*x*E);return a-_*((p+m*x*g)/b*Math.sin(b*E)+g*Math.cos(b*E))}}else if(m===1)v=b=>a-Math.exp(-x*b)*(g+(p+x*g)*b);else{const b=x*Math.sqrt(m*m-1);v=E=>{const _=Math.exp(-m*x*E),S=Math.min(b*E,300);return a-_*((p+m*x*g)*Math.sinh(S)+b*g*Math.cosh(S))/b}}return{calculatedDuration:f&&c||null,next:b=>{const E=v(b);if(f)o.done=b>=c;else{let _=0;m<1&&(_=b===0?Jr(p):Jv(v,b,E));const S=Math.abs(_)<=n,I=Math.abs(a-E)<=t;o.done=S&&I}return o.value=o.done?a:E,o}}}function nb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=D=>s!==void 0&&D<s||l!==void 0&&D>l,m=D=>s===void 0?l:l===void 0||Math.abs(s-D)<Math.abs(l-D)?s:l;let g=n*t;const x=d+g,w=o===void 0?x:o(x);w!==x&&(g=w-d);const v=D=>-g*Math.exp(-D/r),b=D=>w+v(D),E=D=>{const V=v(D),N=b(D);f.done=Math.abs(V)<=u,f.value=f.done?w:N};let _,S;const I=D=>{p(f.value)&&(_=D,S=tb({keyframes:[f.value,m(f.value)],velocity:Jv(b,D,f.value),damping:i,stiffness:a,restDelta:u,restSpeed:c}))};return I(0),{calculatedDuration:null,next:D=>{let V=!1;return!S&&_===void 0&&(V=!0,E(D),I(D)),_!==void 0&&D>=_?S.next(D-_):(!V&&E(D),f)}}}const t4=tl(.42,0,1,1),n4=tl(0,0,.58,1),rb=tl(.42,0,.58,1),r4=e=>Array.isArray(e)&&typeof e[0]!="number",Bh=e=>Array.isArray(e)&&typeof e[0]=="number",ib={linear:qt,easeIn:t4,easeInOut:rb,easeOut:n4,circIn:Eh,circInOut:Cv,circOut:Sv,backIn:xh,backInOut:Tv,backOut:Ev,anticipate:_v},ab=e=>{if(Bh(e)){Th(e.length===4);const[t,n,r,i]=e;return tl(t,n,r,i)}else if(typeof e=="string")return Th(ib[e]!==void 0),ib[e];return e},i4=(e,t)=>n=>t(e(n)),ti=(...e)=>e.reduce(i4),Ao=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ut=(e,t,n)=>e+(t-e)*n;function jh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function a4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=jh(l,s,e+1/3),a=jh(l,s,e),o=jh(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function kc(e,t){return n=>n>0?t:e}const Uh=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},o4=[Ph,Ma,ko],s4=e=>o4.find(t=>t.test(e));function ob(e){const t=s4(e);if(!t)return!1;let n=t.parse(e);return t===ko&&(n=a4(n)),n}const sb=(e,t)=>{const n=ob(e),r=ob(t);if(!n||!r)return kc(e,t);const i={...n};return a=>(i.red=Uh(n.red,r.red,a),i.green=Uh(n.green,r.green,a),i.blue=Uh(n.blue,r.blue,a),i.alpha=ut(n.alpha,r.alpha,a),Ma.transform(i))},zh=new Set(["none","hidden"]);function l4(e,t){return zh.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function u4(e,t){return n=>ut(e,t,n)}function Hh(e){return typeof e=="number"?u4:typeof e=="string"?_h(e)?kc:Gt.test(e)?sb:f4:Array.isArray(e)?lb:typeof e=="object"?Gt.test(e)?sb:c4:kc}function lb(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>Hh(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function c4(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Hh(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function d4(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],s=e.indexes[o][i[o]],l=(n=e.values[s])!==null&&n!==void 0?n:0;r[a]=l,i[o]++}return r}const f4=(e,t)=>{const n=Oi.createTransformer(t),r=al(e),i=al(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?zh.has(e)&&!i.values.length||zh.has(t)&&!r.values.length?l4(e,t):ti(lb(d4(r,i),i.values),n):kc(e,t)};function ub(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ut(e,t,n):Hh(e)(e,t)}function p4(e,t,n){const r=[],i=n||ub,a=e.length-1;for(let o=0;o<a;o++){let s=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||qt:t;s=ti(l,s)}r.push(s)}return r}function h4(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Th(a===t.length),a===1)return()=>t[0];if(a===2&&e[0]===e[1])return()=>t[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=p4(t,r,i),s=o.length,l=u=>{let c=0;if(s>1)for(;c<e.length-2&&!(u<e[c+1]);c++);const d=Ao(e[c],e[c+1],u);return o[c](d)};return n?u=>l(Pi(e[0],e[a-1],u)):l}function m4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ao(0,t,r);e.push(ut(n,1,i))}}function g4(e){const t=[0];return m4(t,e.length-1),t}function w4(e,t){return e.map(n=>n*t)}function y4(e,t){return e.map(()=>t||rb).splice(0,e.length-1)}function Ac({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=r4(r)?r.map(ab):ab(r),a={done:!1,value:t[0]},o=w4(n&&n.length===t.length?n:g4(t),e),s=h4(o,t,{ease:Array.isArray(i)?i:y4(t,i)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}const cb=2e4;function v4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<cb;)t+=n,r=e.next(t);return t>=cb?1/0:t}const b4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Xe.update(t,!0),stop:()=>Ni(t),now:()=>Ut.isProcessing?Ut.timestamp:Ir.now()}},x4={decay:nb,inertia:nb,tween:Ac,keyframes:Ac,spring:tb},E4=e=>e/100;class Vh extends Qv{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:a}=this.options,o=(i==null?void 0:i.KeyframeResolver)||kh,s=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(a,s,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=this.options,s=Lh(n)?n:x4[n]||Ac;let l,u;s!==Ac&&typeof t[0]!="number"&&(l=ti(E4,ub(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});a==="mirror"&&(u=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=v4(c));const{calculatedDuration:d}=c,f=d+i,p=f*(r+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:D}=this.options;return{done:!0,value:D[D.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return a.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:g,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const w=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?w<0:w>c;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let b=this.currentTime,E=a;if(p){const D=Math.min(this.currentTime,c)/d;let V=Math.floor(D),N=D%1;!N&&D>=1&&(N=1),N===1&&V--,V=Math.min(V,p+1),!!(V%2)&&(m==="reverse"?(N=1-N,g&&(N-=g/d)):m==="mirror"&&(E=o)),b=Pi(0,1,N)*d}const _=v?{done:!1,value:l[0]}:E.next(b);s&&(_.value=s(_.value));let{done:S}=_;!v&&u!==null&&(S=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return I&&i!==void 0&&(_.value=Tc(l,this.options,i)),x&&x(_.value),I&&this.finish(),_}get duration(){const{resolved:t}=this;return t?ei(t.calculatedDuration):0}get time(){return ei(this.currentTime)}set time(t){t=Jr(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ei(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=b4,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const db=new Set(["opacity","clipPath","filter","transform"]),T4=10,_4=(e,t)=>{let n="";const r=Math.max(Math.round(t/T4),2);for(let i=0;i<r;i++)n+=e(Ao(0,r-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function $h(e){let t;return()=>(t===void 0&&(t=e()),t)}const S4={linearEasing:void 0};function C4(e,t){const n=$h(e);return()=>{var r;return(r=S4[t])!==null&&r!==void 0?r:n()}}const Rc=C4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function fb(e){return!!(typeof e=="function"&&Rc()||!e||typeof e=="string"&&(e in Wh||Rc())||Bh(e)||Array.isArray(e)&&e.every(fb))}const ol=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Wh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ol([0,.65,.55,1]),circOut:ol([.55,0,1,.45]),backIn:ol([.31,.01,.66,-.59]),backOut:ol([.33,1.53,.69,.99])};function pb(e,t){if(e)return typeof e=="function"&&Rc()?_4(e,t):Bh(e)?ol(e):Array.isArray(e)?e.map(n=>pb(n,t)||Wh.easeOut):Wh[e]}function k4(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=pb(s,i);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}function hb(e,t){e.timeline=t,e.onfinish=null}const A4=$h(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Nc=10,R4=2e4;function N4(e){return Lh(e.type)||e.type==="spring"||!fb(e.ease)}function P4(e,t){const n=new Vh({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let a=0;for(;!r.done&&a<R4;)r=n.sample(a),i.push(r.value),a+=Nc;return{times:void 0,keyframes:i,duration:a-Nc,ease:"linear"}}const mb={anticipate:_v,backInOut:Tv,circInOut:Cv};function I4(e){return e in mb}class gb extends Qv{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:a}=this.options;this.resolver=new Kv(a,(o,s)=>this.onKeyframesResolved(o,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:a,ease:o,type:s,motionValue:l,name:u,startTime:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(typeof o=="string"&&Rc()&&I4(o)&&(o=mb[o]),N4(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,element:g,...x}=this.options,w=P4(t,x);t=w.keyframes,t.length===1&&(t[1]=t[0]),i=w.duration,a=w.times,o=w.ease,s="keyframes"}const d=k4(l.owner.current,u,t,{...this.options,duration:i,times:a,ease:o});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(hb(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(Tc(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:a,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ei(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ei(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Jr(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return qt;const{animation:r}=n;hb(r,t)}return qt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:a,ease:o,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:d,element:f,...p}=this.options,m=new Vh({...p,keyframes:r,duration:i,type:a,ease:o,times:s,isGenerator:!0}),g=Jr(this.time);u.setWithVelocity(m.sample(g-Nc).value,m.sample(g).value,Nc)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:a,damping:o,type:s}=t;return A4()&&r&&db.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&a!=="mirror"&&o!==0&&s!=="inertia"}}const O4=$h(()=>window.ScrollTimeline!==void 0);class D4{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>O4()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,a)=>{i&&i(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function L4({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Yh=(e,t,n,r={},i,a)=>o=>{const s=vh(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Jr(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};L4(s)||(c={...c,...t6(e,c)}),c.duration&&(c.duration=Jr(c.duration)),c.repeatDelay&&(c.repeatDelay=Jr(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!a&&t.get()!==void 0){const f=Tc(c.keyframes,s);if(f!==void 0)return Xe.update(()=>{c.onUpdate(f),c.onComplete()}),new D4([])}return!a&&gb.supports(c)?new gb(c):new Vh(c)},M4=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),F4=e=>mh(e)?e[e.length-1]||0:e;function qh(e,t){e.indexOf(t)===-1&&e.push(t)}function Gh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Kh{constructor(){this.subscriptions=[]}add(t){return qh(this.subscriptions,t),()=>Gh(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const wb=30,B4=e=>!isNaN(parseFloat(e));class j4{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=Ir.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ir.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=B4(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Kh);const r=this.events[t].add(n);return t==="change"?()=>{r(),Xe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ir.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>wb)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,wb);return Zv(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function sl(e,t){return new j4(e,t)}function U4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,sl(n))}function z4(e,t){const n=Ec(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=F4(a[o]);U4(e,o,s)}}const Pc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yb="data-"+Pc("framerAppearId");function vb(e){return e.props[yb]}const Kt=e=>!!(e&&e.getVelocity);function H4(e){return!!(Kt(e)&&e.add)}function Xh(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(H4(n))return n.add(t)}function V4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function bb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(o=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in l){const f=e.getValue(d,(a=e.latestValues[d])!==null&&a!==void 0?a:null),p=l[d];if(p===void 0||c&&V4(c,d))continue;const m={delay:n,...vh(o||{},d)};let g=!1;if(window.MotionHandoffAnimation){const w=vb(e);if(w){const v=window.MotionHandoffAnimation(w,d,Xe);v!==null&&(m.startTime=v,g=!0)}}Xh(e,d),f.start(Yh(d,f,p,e.shouldReduceMotion&&Ri.has(d)?{type:!1}:m,e,g));const x=f.animation;x&&u.push(x)}return s&&Promise.all(u).then(()=>{Xe.update(()=>{s&&z4(e,s)})}),u}function Qh(e,t,n={}){var r;const i=Ec(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(bb(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=a;return $4(e,t,c+u,d,f,n)}:()=>Promise.resolve(),{when:l}=a;if(l){const[u,c]=l==="beforeChildren"?[o,s]:[s,o];return u().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function $4(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(W4).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(Qh(u,t,{...a,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function W4(e,t){return e.sortNodePosition(t)}function Y4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>Qh(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=Qh(e,t,n);else{const i=typeof t=="function"?Ec(e,t,n.custom):t;r=Promise.all(bb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const q4=yh.length;function xb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<q4;n++){const r=yh[n],i=e.props[r];(Js(i)||i===!1)&&(t[r]=i)}return t}const G4=[...wh].reverse(),K4=wh.length;function X4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Y4(e,n,r)))}function Q4(e){let t=X4(e),n=Eb(),r=!0;const i=l=>(u,c)=>{var d;const f=Ec(e,c,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...g}=f;u={...u,...g,...m}}return u};function a(l){t=l(e)}function o(l){const{props:u}=e,c=xb(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let x=0;x<K4;x++){const w=G4[x],v=n[w],b=u[w]!==void 0?u[w]:c[w],E=Js(b),_=w===l?v.isActive:null;_===!1&&(m=x);let S=b===c[w]&&b!==u[w]&&E;if(S&&r&&e.manuallyAnimateOnMount&&(S=!1),v.protectedKeys={...p},!v.isActive&&_===null||!b&&!v.prevProp||Zs(b)||typeof b=="boolean")continue;const I=Z4(v.prevProp,b);let D=I||w===l&&v.isActive&&!S&&E||x>m&&E,V=!1;const N=Array.isArray(b)?b:[b];let $=N.reduce(i(w),{});_===!1&&($={});const{prevResolvedValues:z={}}=v,X={...z,...$},Y=ee=>{D=!0,f.has(ee)&&(V=!0,f.delete(ee)),v.needsAnimating[ee]=!0;const F=e.getValue(ee);F&&(F.liveStyle=!1)};for(const ee in X){const F=$[ee],B=z[ee];if(p.hasOwnProperty(ee))continue;let k=!1;mh(F)&&mh(B)?k=!gv(F,B):k=F!==B,k?F!=null?Y(ee):f.add(ee):F!==void 0&&f.has(ee)?Y(ee):v.protectedKeys[ee]=!0}v.prevProp=b,v.prevResolvedValues=$,v.isActive&&(p={...p,...$}),r&&e.blockInitialAnimation&&(D=!1),D&&(!(S&&I)||V)&&d.push(...N.map(ee=>({animation:ee,options:{type:w}})))}if(f.size){const x={};f.forEach(w=>{const v=e.getBaseTarget(w),b=e.getValue(w);b&&(b.liveStyle=!0),x[w]=v??null}),d.push({animation:x})}let g=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const d=o(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Eb(),r=!0}}}function Z4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!gv(t,e):!1}function Fa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Eb(){return{animate:Fa(!0),whileInView:Fa(),whileHover:Fa(),whileTap:Fa(),whileDrag:Fa(),whileFocus:Fa(),exit:Fa()}}class Di{constructor(t){this.isMounted=!1,this.node=t}update(){}}class J4 extends Di{constructor(t){super(t),t.animationState||(t.animationState=Q4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Zs(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let e5=0;class t5 extends Di{constructor(){super(...arguments),this.id=e5++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const n5={animation:{Feature:J4},exit:{Feature:t5}},Tb=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ic(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const r5=e=>t=>Tb(t)&&e(t,Ic(t));function ni(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ri(e,t,n,r){return ni(e,t,r5(n),r)}const _b=(e,t)=>Math.abs(e-t);function i5(e,t){const n=_b(e.x,t.x),r=_b(e.y,t.y);return Math.sqrt(n**2+r**2)}class Sb{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Jh(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=i5(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:g}=Ut;this.history.push({...m,timestamp:g});const{onStart:x,onMove:w}=this.handlers;f||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Zh(f,this.transformPagePoint),Xe.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Jh(d.type==="pointercancel"?this.lastMoveEventInfo:Zh(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,x),m&&m(d,x)},!Tb(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Ic(t),s=Zh(o,this.transformPagePoint),{point:l}=s,{timestamp:u}=Ut;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Jh(s,this.history)),this.removeListeners=ti(ri(this.contextWindow,"pointermove",this.handlePointerMove),ri(this.contextWindow,"pointerup",this.handlePointerUp),ri(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ni(this.updatePoint)}}function Zh(e,t){return t?{point:t(e.point)}:e}function Cb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jh({point:e},t){return{point:e,delta:Cb(e,kb(t)),offset:Cb(e,a5(t)),velocity:o5(t,.1)}}function a5(e){return e[0]}function kb(e){return e[e.length-1]}function o5(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=kb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Jr(t)));)n--;if(!r)return{x:0,y:0};const a=ei(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ab(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Rb=Ab("dragHorizontal"),Nb=Ab("dragVertical");function Pb(e){let t=!1;if(e==="y")t=Nb();else if(e==="x")t=Rb();else{const n=Rb(),r=Nb();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Ib(){const e=Pb(!0);return e?(e(),!1):!0}function Ro(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const Ob=1e-4,s5=1-Ob,l5=1+Ob,Db=.01,u5=0-Db,c5=0+Db;function On(e){return e.max-e.min}function d5(e,t,n){return Math.abs(e-t)<=n}function Lb(e,t,n,r=.5){e.origin=r,e.originPoint=ut(t.min,t.max,e.origin),e.scale=On(n)/On(t),e.translate=ut(n.min,n.max,e.origin)-e.originPoint,(e.scale>=s5&&e.scale<=l5||isNaN(e.scale))&&(e.scale=1),(e.translate>=u5&&e.translate<=c5||isNaN(e.translate))&&(e.translate=0)}function ll(e,t,n,r){Lb(e.x,t.x,n.x,r?r.originX:void 0),Lb(e.y,t.y,n.y,r?r.originY:void 0)}function Mb(e,t,n){e.min=n.min+t.min,e.max=e.min+On(t)}function f5(e,t,n){Mb(e.x,t.x,n.x),Mb(e.y,t.y,n.y)}function Fb(e,t,n){e.min=t.min-n.min,e.max=e.min+On(t)}function ul(e,t,n){Fb(e.x,t.x,n.x),Fb(e.y,t.y,n.y)}function p5(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ut(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ut(n,e,r.max):Math.min(e,n)),e}function Bb(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function h5(e,{top:t,left:n,bottom:r,right:i}){return{x:Bb(e.x,n,i),y:Bb(e.y,t,r)}}function jb(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function m5(e,t){return{x:jb(e.x,t.x),y:jb(e.y,t.y)}}function g5(e,t){let n=.5;const r=On(e),i=On(t);return i>r?n=Ao(t.min,t.max-r,e.min):r>i&&(n=Ao(e.min,e.max-i,t.min)),Pi(0,1,n)}function w5(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const em=.35;function y5(e=em){return e===!1?e=0:e===!0&&(e=em),{x:Ub(e,"left","right"),y:Ub(e,"top","bottom")}}function Ub(e,t,n){return{min:zb(e,t),max:zb(e,n)}}function zb(e,t){return typeof e=="number"?e:e[t]||0}const Hb=()=>({translate:0,scale:1,origin:0,originPoint:0}),No=()=>({x:Hb(),y:Hb()}),Vb=()=>({min:0,max:0}),Et=()=>({x:Vb(),y:Vb()});function Kn(e){return[e("x"),e("y")]}function $b({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function v5({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function b5(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function tm(e){return e===void 0||e===1}function nm({scale:e,scaleX:t,scaleY:n}){return!tm(e)||!tm(t)||!tm(n)}function Ba(e){return nm(e)||Wb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Wb(e){return Yb(e.x)||Yb(e.y)}function Yb(e){return e&&e!=="0%"}function Oc(e,t,n){const r=e-n,i=t*r;return n+i}function qb(e,t,n,r,i){return i!==void 0&&(e=Oc(e,i,r)),Oc(e,n,r)+t}function rm(e,t=0,n=1,r,i){e.min=qb(e.min,t,n,r,i),e.max=qb(e.max,t,n,r,i)}function Gb(e,{x:t,y:n}){rm(e.x,t.translate,t.scale,t.originPoint),rm(e.y,n.translate,n.scale,n.originPoint)}const Kb=.999999999999,Xb=1.0000000000001;function x5(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Io(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Gb(e,o)),r&&Ba(a.latestValues)&&Io(e,a.latestValues))}t.x<Xb&&t.x>Kb&&(t.x=1),t.y<Xb&&t.y>Kb&&(t.y=1)}function Po(e,t){e.min=e.min+t,e.max=e.max+t}function Qb(e,t,n,r,i=.5){const a=ut(e.min,e.max,i);rm(e,t,n,a,r)}function Io(e,t){Qb(e.x,t.x,t.scaleX,t.scale,t.originX),Qb(e.y,t.y,t.scaleY,t.scale,t.originY)}function Zb(e,t){return $b(b5(e.getBoundingClientRect(),t))}function E5(e,t,n){const r=Zb(e,n),{scroll:i}=t;return i&&(Po(r.x,i.offset.x),Po(r.y,i.offset.y)),r}const Jb=({current:e})=>e?e.ownerDocument.defaultView:null,T5=new WeakMap;class _5{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=Et(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ic(c,"page").point)},a=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Pb(f),!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),Kn(x=>{let w=this.getAxisMotionValue(x).get()||0;if(Pr.test(w)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[x];b&&(w=On(b)*(parseFloat(w)/100))}}this.originPoint[x]=w}),m&&Xe.postRender(()=>m(c,d)),Xh(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:x}=d;if(p&&this.currentDirection===null){this.currentDirection=S5(x),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),g&&g(c,d)},s=(c,d)=>this.stop(c,d),l=()=>Kn(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Sb(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Jb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Xe.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Dc(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=p5(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&Ro(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=h5(i.layoutBox,n):this.constraints=!1,this.elastic=y5(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Kn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=w5(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ro(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=E5(r,i.root,this.visualElement.getTransformPagePoint());let o=m5(i.layout.layoutBox,a);if(n){const s=n(v5(o));this.hasMutatedConstraints=!!s,s&&(o=$b(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Kn(c=>{if(!Dc(c,n,this.currentDirection))return;let d=l&&l[c]||{};o&&(d={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Xh(this.visualElement,t),r.start(Yh(t,r,0,n,this.visualElement,!1))}stopAnimation(){Kn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Kn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Kn(n=>{const{drag:r}=this.getProps();if(!Dc(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-ut(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ro(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Kn(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const l=s.get();i[o]=g5({min:l,max:l},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Kn(o=>{if(!Dc(o,t,null))return;const s=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];s.set(ut(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;T5.set(this.visualElement,this);const t=this.visualElement.current,n=ri(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ro(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Xe.read(r);const o=ni(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Kn(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=em,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function Dc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function S5(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class C5 extends Di{constructor(t){super(t),this.removeGroupControls=qt,this.removeListeners=qt,this.controls=new _5(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||qt}unmount(){this.removeGroupControls(),this.removeListeners()}}const ex=e=>(t,n)=>{e&&Xe.postRender(()=>e(t,n))};class k5 extends Di{constructor(){super(...arguments),this.removePointerDownListener=qt}onPointerDown(t){this.session=new Sb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ex(t),onStart:ex(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&Xe.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=ri(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Lc=y.createContext(null);function A5(){const e=y.useContext(Lc);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=y.useId();y.useEffect(()=>r(i),[]);const a=y.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,a]:[!0]}const im=y.createContext({}),tx=y.createContext({}),Mc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function nx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const cl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(we.test(e))e=parseFloat(e);else return e;const n=nx(e,t.target.x),r=nx(e,t.target.y);return`${n}% ${r}%`}},R5={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Oi.parse(e);if(i.length>5)return r;const a=Oi.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=l;const u=ut(s,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),a(i)}},Fc={};function N5(e){Object.assign(Fc,e)}const{schedule:am,cancel:gie}=yv(queueMicrotask,!1);class P5 extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;N5(I5),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Mc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Xe.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),am.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function rx(e){const[t,n]=A5(),r=y.useContext(im);return T.jsx(P5,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(tx),isPresent:t,safeToRemove:n})}const I5={borderRadius:{...cl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cl,borderTopRightRadius:cl,borderBottomLeftRadius:cl,borderBottomRightRadius:cl,boxShadow:R5},ix=["TopLeft","TopRight","BottomLeft","BottomRight"],O5=ix.length,ax=e=>typeof e=="string"?parseFloat(e):e,ox=e=>typeof e=="number"||we.test(e);function D5(e,t,n,r,i,a){i?(e.opacity=ut(0,n.opacity!==void 0?n.opacity:1,L5(r)),e.opacityExit=ut(t.opacity!==void 0?t.opacity:1,0,M5(r))):a&&(e.opacity=ut(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<O5;o++){const s=`border${ix[o]}Radius`;let l=sx(t,s),u=sx(n,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ox(l)===ox(u)?(e[s]=Math.max(ut(ax(l),ax(u),r),0),(Pr.test(u)||Pr.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||n.rotate)&&(e.rotate=ut(t.rotate||0,n.rotate||0,r))}function sx(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const L5=lx(0,.5,Sv),M5=lx(.5,.95,qt);function lx(e,t,n){return r=>r<e?0:r>t?1:n(Ao(e,t,r))}function ux(e,t){e.min=t.min,e.max=t.max}function Xn(e,t){ux(e.x,t.x),ux(e.y,t.y)}function cx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function dx(e,t,n,r,i){return e-=t,e=Oc(e,1/n,r),i!==void 0&&(e=Oc(e,1/i,r)),e}function F5(e,t=0,n=1,r=.5,i,a=e,o=e){if(Pr.test(t)&&(t=parseFloat(t),t=ut(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=ut(a.min,a.max,r);e===a&&(s-=t),e.min=dx(e.min,t,n,s,i),e.max=dx(e.max,t,n,s,i)}function fx(e,t,[n,r,i],a,o){F5(e,t[n],t[r],t[i],t.scale,a,o)}const B5=["x","scaleX","originX"],j5=["y","scaleY","originY"];function px(e,t,n,r){fx(e.x,t,B5,n?n.x:void 0,r?r.x:void 0),fx(e.y,t,j5,n?n.y:void 0,r?r.y:void 0)}function hx(e){return e.translate===0&&e.scale===1}function mx(e){return hx(e.x)&&hx(e.y)}function gx(e,t){return e.min===t.min&&e.max===t.max}function U5(e,t){return gx(e.x,t.x)&&gx(e.y,t.y)}function wx(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yx(e,t){return wx(e.x,t.x)&&wx(e.y,t.y)}function vx(e){return On(e.x)/On(e.y)}function bx(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class z5{constructor(){this.members=[]}add(t){qh(this.members,t),t.scheduleRender()}remove(t){if(Gh(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function H5(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const V5=(e,t)=>e.depth-t.depth;class $5{constructor(){this.children=[],this.isDirty=!1}add(t){qh(this.children,t),this.isDirty=!0}remove(t){Gh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(V5),this.isDirty=!1,this.children.forEach(t)}}function Bc(e){const t=Kt(e)?e.get():e;return M4(t)?t.toValue():t}function W5(e,t){const n=Ir.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Ni(r),e(a-t))};return Xe.read(r,!0),()=>Ni(r)}function Y5(e){return e instanceof SVGElement&&e.tagName!=="svg"}function q5(e,t,n){const r=Kt(e)?e:sl(e);return r.start(Yh("",r,t,n)),r.animation}const ja={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},dl=typeof window<"u"&&window.MotionDebug!==void 0,om=["","X","Y","Z"],G5={visibility:"hidden"},xx=1e3;let K5=0;function sm(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ex(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=vb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xe,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ex(r)}function Tx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=K5++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,dl&&(ja.totalNodes=ja.resolvedTargetDeltas=ja.recalculatedProjection=0),this.nodes.forEach(Z5),this.nodes.forEach(rD),this.nodes.forEach(iD),this.nodes.forEach(J5),dl&&window.MotionDebug.record(ja)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new $5)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Kh),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const l=this.eventHandlers.get(o);l&&l.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Y5(o),this.instance=o;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(u||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=W5(f,250),Mc.hasAnimatedSinceResize&&(Mc.hasAnimatedSinceResize=!1,this.nodes.forEach(Sx))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||uD,{onLayoutAnimationStart:x,onLayoutAnimationComplete:w}=c.getProps(),v=!this.targetLayout||!yx(this.targetLayout,m)||p,b=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const E={...vh(g,"layout"),onPlay:x,onComplete:w};(c.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else f||Sx(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ni(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(aD),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ex(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(_x);return}this.isUpdating||this.nodes.forEach(tD),this.isUpdating=!1,this.nodes.forEach(nD),this.nodes.forEach(X5),this.nodes.forEach(Q5),this.clearAllSnapshots();const s=Ir.now();Ut.delta=Pi(0,1e3/60,s-Ut.timestamp),Ut.timestamp=s,Ut.isProcessing=!0,bh.update.process(Ut),bh.preRender.process(Ut),bh.render.process(Ut),Ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,am.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eD),this.sharedNodes.forEach(oD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Et(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!mx(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&(s||Ba(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return o&&(l=this.removeTransform(l)),cD(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:s}=this.options;if(!s)return Et();const l=s.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(dD))){const{scroll:c}=this.root;c&&(Po(l.x,c.offset.x),Po(l.y,c.offset.y))}return l}removeElementScroll(o){var s;const l=Et();if(Xn(l,o),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&Xn(l,o),Po(l.x,d.offset.x),Po(l.y,d.offset.y))}return l}applyTransform(o,s=!1){const l=Et();Xn(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Io(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ba(c.latestValues)&&Io(l,c.latestValues)}return Ba(this.latestValues)&&Io(l,this.latestValues),l}removeTransform(o){const s=Et();Xn(s,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Ba(u.latestValues))continue;nm(u.latestValues)&&u.updateSnapshot();const c=Et(),d=u.measurePageBox();Xn(c,d),px(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Ba(this.latestValues)&&px(s,this.latestValues),s}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ut.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Ut.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Et(),this.relativeTargetOrigin=Et(),ul(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Xn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Et(),this.targetWithTransforms=Et()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),f5(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xn(this.target,this.layout.layoutBox),Gb(this.target,this.targetDelta)):Xn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Et(),this.relativeTargetOrigin=Et(),ul(this.relativeTargetOrigin,this.target,p.target),Xn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}dl&&ja.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||nm(this.parent.latestValues)||Wb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Ut.timestamp&&(u=!1),u)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;Xn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;x5(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Et());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(cx(this.prevProjectionDelta.x,this.projectionDelta.x),cx(this.prevProjectionDelta.y,this.projectionDelta.y)),ll(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!bx(this.projectionDelta.x,this.prevProjectionDelta.x)||!bx(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),dl&&ja.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=No(),this.projectionDelta=No(),this.projectionDeltaWithTransform=No()}setAnimationOrigin(o,s=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=No();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=Et(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,x=this.getStack(),w=!x||x.members.length<=1,v=!!(g&&!w&&this.options.crossfade===!0&&!this.path.some(lD));this.animationProgress=0;let b;this.mixTargetDelta=E=>{const _=E/1e3;Cx(d.x,o.x,_),Cx(d.y,o.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ul(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sD(this.relativeTarget,this.relativeTargetOrigin,f,_),b&&U5(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Et()),Xn(b,this.relativeTarget)),g&&(this.animationValues=c,D5(c,u,this.latestValues,_,v,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ni(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{Mc.hasAnimatedSinceResize=!0,this.currentAnimation=q5(0,xx,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(xx),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:c}=o;if(!(!s||!l||!u)){if(this!==o&&this.layout&&u&&Px(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Et();const d=On(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=On(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Xn(s,l),Io(s,c),ll(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new z5),this.sharedNodes.get(o).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const u={};l.z&&sm("z",o,u,this.animationValues);for(let c=0;c<om.length;c++)sm(`rotate${om[c]}`,o,u,this.animationValues),sm(`skew${om[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return G5;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Bc(o==null?void 0:o.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Bc(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Ba(this.latestValues)&&(g.transform=c?c({},""):"none",this.hasProjected=!1),g}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),u.transform=H5(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:p,y:m}=this.projectionDelta;u.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?u.opacity=d===this?(l=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in Fc){if(f[g]===void 0)continue;const{correct:x,applyTo:w}=Fc[g],v=u.transform==="none"?f[g]:x(f[g],d);if(w){const b=w.length;for(let E=0;E<b;E++)u[w[E]]=v}else u[g]=v}return this.options.layoutId&&(u.pointerEvents=d===this?Bc(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(_x),this.root.sharedNodes.clear()}}}function X5(e){e.updateLayout()}function Q5(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?Kn(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=On(f);f.min=r[d].min,f.max=f.min+p}):Px(a,n.layoutBox,r)&&Kn(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=On(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const s=No();ll(s,r,n.layoutBox);const l=No();o?ll(l,e.applyTransform(i,!0),n.measuredBox):ll(l,r,n.layoutBox);const u=!mx(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=Et();ul(m,n.layoutBox,f.layoutBox);const g=Et();ul(g,r,p.layoutBox),yx(m,g)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Z5(e){dl&&ja.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function J5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eD(e){e.clearSnapshot()}function _x(e){e.clearMeasurements()}function tD(e){e.isLayoutDirty=!1}function nD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Sx(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rD(e){e.resolveTargetDelta()}function iD(e){e.calcProjection()}function aD(e){e.resetSkewAndRotation()}function oD(e){e.removeLeadSnapshot()}function Cx(e,t,n){e.translate=ut(t.translate,0,n),e.scale=ut(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function kx(e,t,n,r){e.min=ut(t.min,n.min,r),e.max=ut(t.max,n.max,r)}function sD(e,t,n,r){kx(e.x,t.x,n.x,r),kx(e.y,t.y,n.y,r)}function lD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const uD={duration:.45,ease:[.4,0,.1,1]},Ax=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Rx=Ax("applewebkit/")&&!Ax("chrome/")?Math.round:qt;function Nx(e){e.min=Rx(e.min),e.max=Rx(e.max)}function cD(e){Nx(e.x),Nx(e.y)}function Px(e,t,n){return e==="position"||e==="preserve-aspect"&&!d5(vx(t),vx(n),.2)}function dD(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const fD=Tx({attachResizeListener:(e,t)=>ni(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),lm={current:void 0},Ix=Tx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!lm.current){const e=new fD({});e.mount(window),e.setOptions({layoutScroll:!0}),lm.current=e}return lm.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),pD={pan:{Feature:k5},drag:{Feature:C5,ProjectionNode:Ix,MeasureLayout:rx}};function Ox(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(a,o)=>{if(a.pointerType==="touch"||Ib())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const l=s[r];l&&Xe.postRender(()=>l(a,o))};return ri(e.current,n,i,{passive:!e.getProps()[r]})}class hD extends Di{mount(){this.unmount=ti(Ox(this.node,!0),Ox(this.node,!1))}unmount(){}}class mD extends Di{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{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=ti(ni(this.node.current,"focus",()=>this.onFocus()),ni(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Dx=(e,t)=>t?e===t?!0:Dx(e,t.parentElement):!1;function um(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ic(n))}class gD extends Di{constructor(){super(...arguments),this.removeStartListeners=qt,this.removeEndListeners=qt,this.removeAccessibleListeners=qt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),a=ri(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!Dx(this.node.current,s.target)?c:u;f&&Xe.update(()=>f(s,l))},{passive:!(r.onTap||r.onPointerUp)}),o=ri(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=ti(a,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const o=s=>{s.key!=="Enter"||!this.checkPressEnd()||um("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&Xe.postRender(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=ni(this.node.current,"keyup",o),um("down",(s,l)=>{this.startPress(s,l)})},n=ni(this.node.current,"keydown",t),r=()=>{this.isPressing&&um("cancel",(a,o)=>this.cancelPress(a,o))},i=ni(this.node.current,"blur",r);this.removeAccessibleListeners=ti(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Xe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Ib()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Xe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=ri(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=ni(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ti(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const cm=new WeakMap,dm=new WeakMap,wD=e=>{const t=cm.get(e.target);t&&t(e)},yD=e=>{e.forEach(wD)};function vD({root:e,...t}){const n=e||document;dm.has(n)||dm.set(n,{});const r=dm.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(yD,{root:e,...t})),r[i]}function bD(e,t,n){const r=vD(t);return cm.set(e,n),r.observe(e),()=>{cm.delete(e),r.unobserve(e)}}const xD={some:0,all:1};class ED extends Di{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:xD[i]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return bD(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(TD(t,n))&&this.startObserver()}unmount(){}}function TD({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const _D={inView:{Feature:ED},tap:{Feature:gD},focus:{Feature:mD},hover:{Feature:hD}},SD={layout:{ProjectionNode:Ix,MeasureLayout:rx}},fm=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),jc=y.createContext({}),pm=typeof window<"u",Lx=pm?y.useLayoutEffect:y.useEffect,Mx=y.createContext({strict:!1});function CD(e,t,n,r,i){var a,o;const{visualElement:s}=y.useContext(jc),l=y.useContext(Mx),u=y.useContext(Lc),c=y.useContext(fm).reducedMotion,d=y.useRef();r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=y.useContext(tx);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&kD(d.current,n,i,p),y.useInsertionEffect(()=>{f&&f.update(n,u)});const m=n[yb],g=y.useRef(!!m&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return Lx(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),am.render(f.render),g.current&&f.animationState&&f.animationState.animateChanges())}),y.useEffect(()=>{f&&(!g.current&&f.animationState&&f.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,m)}),g.current=!1))}),f}function kD(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Fx(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Ro(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function Fx(e){if(e)return e.options.allowProjection!==!1?e.projection:Fx(e.parent)}function AD(e,t,n){return y.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Ro(n)&&(n.current=r))},[t])}function Uc(e){return Zs(e.animate)||yh.some(t=>Js(e[t]))}function Bx(e){return!!(Uc(e)||e.variants)}function RD(e,t){if(Uc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Js(n)?n:void 0,animate:Js(r)?r:void 0}}return e.inherit!==!1?t:{}}function ND(e){const{initial:t,animate:n}=RD(e,y.useContext(jc));return y.useMemo(()=>({initial:t,animate:n}),[jx(t),jx(n)])}function jx(e){return Array.isArray(e)?e.join(" "):e}const Ux={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"]},Oo={};for(const e in Ux)Oo[e]={isEnabled:t=>Ux[e].some(n=>!!t[n])};function PD(e){for(const t in e)Oo[t]={...Oo[t],...e[t]}}const ID=Symbol.for("motionComponentSymbol");function OD({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&PD(e);function a(s,l){let u;const c={...y.useContext(fm),...s,layoutId:DD(s)},{isStatic:d}=c,f=ND(s),p=r(s,d);if(!d&&pm){LD();const m=MD(c);u=m.MeasureLayout,f.visualElement=CD(i,p,c,t,m.ProjectionNode)}return T.jsxs(jc.Provider,{value:f,children:[u&&f.visualElement?T.jsx(u,{visualElement:f.visualElement,...c}):null,n(i,s,AD(p,f.visualElement,l),p,d,f.visualElement)]})}const o=y.forwardRef(a);return o[ID]=i,o}function DD({layoutId:e}){const t=y.useContext(im).id;return t&&e!==void 0?t+"-"+e:e}function LD(e,t){y.useContext(Mx).strict}function MD(e){const{drag:t,layout:n}=Oo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const FD=["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 hm(e){return typeof e!="string"||e.includes("-")?!1:!!(FD.indexOf(e)>-1||/[A-Z]/u.test(e))}function zx(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const Hx=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 Vx(e,t,n,r){zx(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Hx.has(i)?i:Pc(i),t.attrs[i])}function $x(e,{layout:t,layoutId:n}){return Ri.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Fc[e]||e==="opacity")}function mm(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(Kt(i[o])||t.style&&Kt(t.style[o])||$x(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(a[o]=i[o]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),a}function Wx(e,t,n){const r=mm(e,t,n);for(const i in e)if(Kt(e[i])||Kt(t[i])){const a=el.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}function gm(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}function BD(e){if(Ri.has(e))return"transform";if(db.has(e))return Pc(e)}function jD({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,a,o,s){const l={latestValues:UD(i,a,o,s?!1:e,t),renderState:n()};return r&&(l.mount=u=>r(i,u,l)),l}const Yx=e=>(t,n)=>{const r=y.useContext(jc),i=y.useContext(Lc),a=()=>jD(e,t,r,i,n);return n?a():gm(a)};function qx(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const a=gh(e,r[i]);if(a){const{transitionEnd:o,transition:s,...l}=a;n(l,o)}}}function UD(e,t,n,r,i){var a;const o={},s=new Set,l=r&&((a=e.style)===null||a===void 0?void 0:a.willChange)===void 0,u=i(e,{});for(const x in u)o[x]=Bc(u[x]);let{initial:c,animate:d}=e;const f=Uc(e),p=Bx(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const g=m?d:c;return g&&typeof g!="boolean"&&!Zs(g)&&qx(e,g,(x,w)=>{for(const v in x){let b=x[v];if(Array.isArray(b)){const E=m?b.length-1:0;b=b[E]}b!==null&&(o[v]=b)}for(const v in w)o[v]=w[v]}),l&&(d&&c!==!1&&!Zs(d)&&qx(e,d,x=>{for(const w in x){const v=BD(w);v&&s.add(v)}}),s.size&&(o.willChange=Array.from(s).join(","))),o}const wm=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Gx=()=>({...wm(),attrs:{}}),Kx=(e,t)=>t&&typeof e=="number"?t.transform(e):e,zD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},HD=el.length;function VD(e,t,n){let r="",i=!0;for(let a=0;a<HD;a++){const o=el[a],s=e[o];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(o.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const u=Kx(s,Oh[o]);if(!l){i=!1;const c=zD[o]||o;r+=`${c}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function ym(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const l in t){const u=t[l];if(Ri.has(l)){o=!0;continue}else if(Nv(l)){i[l]=u;continue}else{const c=Kx(u,Oh[l]);l.startsWith("origin")?(s=!0,a[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=VD(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:u="50%",originZ:c=0}=a;r.transformOrigin=`${l} ${u} ${c}`}}function Xx(e,t,n){return typeof e=="string"?e:we.transform(t+n*e)}function $D(e,t,n){const r=Xx(t,e.x,e.width),i=Xx(n,e.y,e.height);return`${r} ${i}`}const WD={offset:"stroke-dashoffset",array:"stroke-dasharray"},YD={offset:"strokeDashoffset",array:"strokeDasharray"};function qD(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?WD:YD;e[a.offset]=we.transform(-r);const o=we.transform(t),s=we.transform(n);e[a.array]=`${o} ${s}`}function vm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:l=0,...u},c,d){if(ym(e,u,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=$D(m,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&qD(f,o,s,l,!1)}const bm=e=>typeof e=="string"&&e.toLowerCase()==="svg",GD={useVisualState:Yx({scrapeMotionValuesFromProps:Wx,createRenderState:Gx,onMount:(e,t,{renderState:n,latestValues:r})=>{Xe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Xe.render(()=>{vm(n,r,bm(t.tagName),e.transformTemplate),Vx(t,n)})}})},KD={useVisualState:Yx({applyWillChange:!0,scrapeMotionValuesFromProps:mm,createRenderState:wm})};function Qx(e,t,n){for(const r in t)!Kt(t[r])&&!$x(r,n)&&(e[r]=t[r])}function XD({transformTemplate:e},t){return y.useMemo(()=>{const n=wm();return ym(n,t,e),Object.assign({},n.vars,n.style)},[t])}function QD(e,t){const n=e.style||{},r={};return Qx(r,n,e),Object.assign(r,XD(e,t)),r}function ZD(e,t){const n={},r=QD(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const JD=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 zc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||JD.has(e)}let Zx=e=>!zc(e);function eL(e){e&&(Zx=t=>t.startsWith("on")?!zc(t):e(t))}try{eL(require("@emotion/is-prop-valid").default)}catch{}function tL(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Zx(i)||n===!0&&zc(i)||!t&&!zc(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function nL(e,t,n,r){const i=y.useMemo(()=>{const a=Gx();return vm(a,t,bm(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Qx(a,e.style,e),i.style={...a,...i.style}}return i}function rL(e=!1){return(n,r,i,{latestValues:a},o)=>{const l=(hm(n)?nL:ZD)(r,a,o,n),u=tL(r,typeof n=="string",e),c=n!==y.Fragment?{...u,...l,ref:i}:{},{children:d}=r,f=y.useMemo(()=>Kt(d)?d.get():d,[d]);return y.createElement(n,{...c,children:f})}}function iL(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...hm(r)?GD:KD,preloadedFeatures:e,useRender:rL(i),createVisualElement:t,Component:r};return OD(o)}}const xm={current:null},Jx={current:!1};function aL(){if(Jx.current=!0,!!pm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xm.current=e.matches;e.addListener(t),t()}else xm.current=!1}function oL(e,t,n){for(const r in t){const i=t[r],a=n[r];if(Kt(i))e.addValue(r,i);else if(Kt(a))e.addValue(r,sl(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,sl(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const eE=new WeakMap,sL=[...Fv,Gt,Oi],lL=e=>sL.find(Mv(e)),tE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class uL{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=kh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Ir.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Xe.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Uc(n),this.isVariantNode=Bx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&Kt(p)&&p.set(l[f],!1)}}mount(t){this.current=t,eE.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((n,r)=>this.bindToMotionValue(r,n)),Jx.current||aL(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:xm.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){eE.delete(this.current),this.projection&&this.projection.unmount(),Ni(this.notifyUpdate),Ni(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),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){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ri.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Xe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Oo){const n=Oo[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Et()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<tE.length;r++){const i=tE[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=oL(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=sl(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Av(i)||kv(i))?i=parseFloat(i):!lL(i)&&Oi.test(n)&&(i=Gv(t,n)),this.setBaseTarget(t,Kt(i)?i.get():i)),Kt(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=gh(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Kt(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kh),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class nE extends uL{constructor(){super(...arguments),this.KeyframeResolver=Kv}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function cL(e){return window.getComputedStyle(e)}class dL extends nE{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=zx}readValueFromInstance(t,n){if(Ri.has(n)){const r=Dh(n);return r&&r.default||0}else{const r=cL(t),i=(Nv(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Zb(t,n)}build(t,n,r){ym(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return mm(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Kt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class fL extends nE{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Et}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ri.has(n)){const r=Dh(n);return r&&r.default||0}return n=Hx.has(n)?n:Pc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Wx(t,n,r)}build(t,n,r){vm(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){Vx(t,n,r,i)}mount(t){this.isSVGTag=bm(t.tagName),super.mount(t)}}const pL=(e,t)=>hm(e)?new fL(t):new dL(t,{allowProjection:e!==y.Fragment}),hL=iL({...n5,..._D,...pD,...SD},pL),Ua=XO(hL);class mL extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function gL({children:e,isPresent:t}){const n=y.useId(),r=y.useRef(null),i=y.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=y.useContext(fm);return y.useInsertionEffect(()=>{const{width:o,height:s,top:l,left:u}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return a&&(c.nonce=a),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
|
|
17
|
+
*/var yO=y,vO=Symbol.for("react.element"),bO=Symbol.for("react.fragment"),xO=Object.prototype.hasOwnProperty,EO=yO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,TO={key:!0,ref:!0,__self:!0,__source:!0};function av(e,t,n){var r,i={},a=null,o=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)xO.call(t,r)&&!TO.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:vO,type:e,key:a,ref:o,props:i,_owner:EO.current}}gc.Fragment=bO,gc.jsx=av,gc.jsxs=av,Yy.exports=gc;var T=Yy.exports;const ov="3.0.6";function bc(e){"@babel/helpers - typeof";return bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bc(e)}var _O=/^\s+/,SO=/\s+$/;function fe(e,t){if(e=e||"",t=t||{},e instanceof fe)return e;if(!(this instanceof fe))return new fe(e,t);var n=CO(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}fe.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,a,o,s;return n=t.r/255,r=t.g/255,i=t.b/255,n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*a+.7152*o+.0722*s},setAlpha:function(t){return this._a=fv(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=lv(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=lv(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=sv(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=sv(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return uv(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return NO(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ot(this._r,255)*100)+"%",g:Math.round(ot(this._g,255)*100)+"%",b:Math.round(ot(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ot(this._r,255)*100)+"%, "+Math.round(ot(this._g,255)*100)+"%, "+Math.round(ot(this._b,255)*100)+"%)":"rgba("+Math.round(ot(this._r,255)*100)+"%, "+Math.round(ot(this._g,255)*100)+"%, "+Math.round(ot(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:HO[uv(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+cv(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=fe(t);r="#"+cv(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,a=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return a?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return fe(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(DO,arguments)},brighten:function(){return this._applyModification(LO,arguments)},darken:function(){return this._applyModification(MO,arguments)},desaturate:function(){return this._applyModification(PO,arguments)},saturate:function(){return this._applyModification(IO,arguments)},greyscale:function(){return this._applyModification(OO,arguments)},spin:function(){return this._applyModification(FO,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(UO,arguments)},complement:function(){return this._applyCombination(BO,arguments)},monochromatic:function(){return this._applyCombination(zO,arguments)},splitcomplement:function(){return this._applyCombination(jO,arguments)},triad:function(){return this._applyCombination(dv,[3])},tetrad:function(){return this._applyCombination(dv,[4])}},fe.fromRatio=function(e,t){if(bc(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Qs(e[r]));e=n}return fe(e,t)};function CO(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,s=!1;return typeof e=="string"&&(e=YO(e)),bc(e)=="object"&&(Zr(e.r)&&Zr(e.g)&&Zr(e.b)?(t=kO(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Zr(e.h)&&Zr(e.s)&&Zr(e.v)?(r=Qs(e.s),i=Qs(e.v),t=RO(e.h,r,i),o=!0,s="hsv"):Zr(e.h)&&Zr(e.s)&&Zr(e.l)&&(r=Qs(e.s),a=Qs(e.l),t=AO(e.h,r,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=fv(n),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function kO(e,t,n){return{r:ot(e,255)*255,g:ot(t,255)*255,b:ot(n,255)*255}}function sv(e,t,n){e=ot(e,255),t=ot(t,255),n=ot(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=(r+i)/2;if(r==i)a=o=0;else{var l=r-i;switch(o=s>.5?l/(2-r-i):l/(r+i),r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:o,l:s}}function AO(e,t,n){var r,i,a;e=ot(e,360),t=ot(t,100),n=ot(n,100);function o(u,c,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?u+(c-u)*6*d:d<1/2?c:d<2/3?u+(c-u)*(2/3-d)*6:u}if(t===0)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=o(l,s,e+1/3),i=o(l,s,e),a=o(l,s,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function lv(e,t,n){e=ot(e,255),t=ot(t,255),n=ot(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=r,l=r-i;if(o=r===0?0:l/r,r==i)a=0;else{switch(r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:o,v:s}}function RO(e,t,n){e=ot(e,360)*6,t=ot(t,100),n=ot(n,100);var r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6,u=[n,o,a,a,s,n][l],c=[s,n,n,o,a,a][l],d=[a,a,s,n,n,o][l];return{r:u*255,g:c*255,b:d*255}}function uv(e,t,n,r){var i=[fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function NO(e,t,n,r,i){var a=[fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(n).toString(16)),fr(pv(r))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function cv(e,t,n,r){var i=[fr(pv(r)),fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(n).toString(16))];return i.join("")}fe.equals=function(e,t){return!e||!t?!1:fe(e).toRgbString()==fe(t).toRgbString()},fe.random=function(){return fe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function PO(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s-=t/100,n.s=xc(n.s),fe(n)}function IO(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s+=t/100,n.s=xc(n.s),fe(n)}function OO(e){return fe(e).desaturate(100)}function DO(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l+=t/100,n.l=xc(n.l),fe(n)}function LO(e,t){t=t===0?0:t||10;var n=fe(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),fe(n)}function MO(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l-=t/100,n.l=xc(n.l),fe(n)}function FO(e,t){var n=fe(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,fe(n)}function BO(e){var t=fe(e).toHsl();return t.h=(t.h+180)%360,fe(t)}function dv(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=fe(e).toHsl(),r=[fe(e)],i=360/t,a=1;a<t;a++)r.push(fe({h:(n.h+a*i)%360,s:n.s,l:n.l}));return r}function jO(e){var t=fe(e).toHsl(),n=t.h;return[fe(e),fe({h:(n+72)%360,s:t.s,l:t.l}),fe({h:(n+216)%360,s:t.s,l:t.l})]}function UO(e,t,n){t=t||6,n=n||30;var r=fe(e).toHsl(),i=360/n,a=[fe(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(fe(r));return a}function zO(e,t){t=t||6;for(var n=fe(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(fe({h:r,s:i,v:a})),a=(a+s)%1;return o}fe.mix=function(e,t,n){n=n===0?0:n||50;var r=fe(e).toRgb(),i=fe(t).toRgb(),a=n/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return fe(o)},fe.readability=function(e,t){var n=fe(e),r=fe(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},fe.isReadable=function(e,t,n){var r=fe.readability(e,t),i,a;switch(a=!1,i=qO(n),i.level+i.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a},fe.mostReadable=function(e,t,n){var r=null,i=0,a,o,s,l;n=n||{},o=n.includeFallbackColors,s=n.level,l=n.size;for(var u=0;u<t.length;u++)a=fe.readability(e,t[u]),a>i&&(i=a,r=fe(t[u]));return fe.isReadable(e,r,{level:s,size:l})||!o?r:(n.includeFallbackColors=!1,fe.mostReadable(e,["#fff","#000"],n))};var ph=fe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},HO=fe.hexNames=VO(ph);function VO(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function fv(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ot(e,t){$O(e)&&(e="100%");var n=WO(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function xc(e){return Math.min(1,Math.max(0,e))}function In(e){return parseInt(e,16)}function $O(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function WO(e){return typeof e=="string"&&e.indexOf("%")!=-1}function fr(e){return e.length==1?"0"+e:""+e}function Qs(e){return e<=1&&(e=e*100+"%"),e}function pv(e){return Math.round(parseFloat(e)*255).toString(16)}function hv(e){return In(e)/255}var pr=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Zr(e){return!!pr.CSS_UNIT.exec(e)}function YO(e){e=e.replace(_O,"").replace(SO,"").toLowerCase();var t=!1;if(ph[e])e=ph[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=pr.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=pr.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=pr.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=pr.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=pr.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=pr.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=pr.hex8.exec(e))?{r:In(n[1]),g:In(n[2]),b:In(n[3]),a:hv(n[4]),format:t?"name":"hex8"}:(n=pr.hex6.exec(e))?{r:In(n[1]),g:In(n[2]),b:In(n[3]),format:t?"name":"hex"}:(n=pr.hex4.exec(e))?{r:In(n[1]+""+n[1]),g:In(n[2]+""+n[2]),b:In(n[3]+""+n[3]),a:hv(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=pr.hex3.exec(e))?{r:In(n[1]+""+n[1]),g:In(n[2]+""+n[2]),b:In(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function qO(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const GO=400,KO=600,hh={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},mv=({primary:e="hsl(0, 0%, 0%)"})=>{const t=fe(e).toHsl(),n=fe(e).isLight()?"240 10% 3.9%":"0 0% 100%";return{"--opencx-primary":`${t.h} ${t.s}% ${t.l}%`,"--opencx-primary-foreground":n,"--opencx-background":"0 0% 100%","--opencx-foreground":"240 10% 3.9%","--opencx-accent":"240 4.8% 95.9%","--opencx-accent-foreground":"240 5.9% 10%","--opencx-destructive":"0 84.2% 60.2%","--opencx-destructive-foreground":"0 0% 98%","--opencx-secondary":"240 4.8% 95.9%","--opencx-secondary-foreground":"240 5.9% 10%","--opencx-muted":"240 4.8% 95.9%","--opencx-muted-foreground":"240 3.8% 46.1%","--opencx-input":"240 5.9% 90%","--opencx-border":"240 5.9% 90%","--opencx-ring":"240 5.9% 10%"}};function XO(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function Zs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const mh=e=>Array.isArray(e);function gv(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Js(e){return typeof e=="string"||Array.isArray(e)}function wv(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function gh(e,t,n,r){if(typeof t=="function"){const[i,a]=wv(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=wv(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function Ec(e,t,n){const r=e.getProps();return gh(r,t,n!==void 0?n:r.custom,e)}const wh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yh=["initial",...wh],el=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ri=new Set(el),Jr=e=>e*1e3,ei=e=>e/1e3,QO={type:"spring",stiffness:500,damping:25,restSpeed:10},ZO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),JO={type:"keyframes",duration:.8},e6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},t6=(e,{keyframes:t})=>t.length>2?JO:Ri.has(e)?e.startsWith("scale")?ZO(t[1]):QO:e6;function vh(e,t){return e?e[t]||e.default||e:void 0}const n6={skipAnimations:!1,useManualTiming:!1},r6=e=>e!==null;function Tc(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(r6),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const qt=e=>e;function i6(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(u){a.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&a.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),a.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,l.process(u))}};return l}const _c=["read","resolveKeyframes","update","preRender","render","postRender"],a6=40;function yv(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=_c.reduce((w,v)=>(w[v]=i6(a),w),{}),{read:s,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:f}=o,p=()=>{const w=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(w-i.timestamp,a6),1),i.timestamp=w,i.isProcessing=!0,s.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:_c.reduce((w,v)=>{const b=o[v];return w[v]=(E,_=!1,S=!1)=>(n||m(),b.schedule(E,_,S)),w},{}),cancel:w=>{for(let v=0;v<_c.length;v++)o[_c[v]].cancel(w)},state:i,steps:o}}const{schedule:Xe,cancel:Ni,state:Ut,steps:bh}=yv(typeof requestAnimationFrame<"u"?requestAnimationFrame:qt,!0),vv=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,o6=1e-7,s6=12;function l6(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=vv(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>o6&&++s<s6);return o}function tl(e,t,n,r){if(e===t&&n===r)return qt;const i=a=>l6(a,0,1,e,n);return a=>a===0||a===1?a:vv(i(a),t,r)}const bv=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xv=e=>t=>1-e(1-t),Ev=tl(.33,1.53,.69,.99),xh=xv(Ev),Tv=bv(xh),_v=e=>(e*=2)<1?.5*xh(e):.5*(2-Math.pow(2,-10*(e-1))),Eh=e=>1-Math.sin(Math.acos(e)),Sv=xv(Eh),Cv=bv(Eh),kv=e=>/^0[^.\s]+$/u.test(e);function u6(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||kv(e):!0}let Th=qt;const Av=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Rv=e=>t=>typeof t=="string"&&t.startsWith(e),Nv=Rv("--"),c6=Rv("var(--"),_h=e=>c6(e)?d6.test(e.split("/*")[0].trim()):!1,d6=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,f6=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function p6(e){const t=f6.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Pv(e,t,n=1){const[r,i]=p6(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return Av(o)?parseFloat(o):o}return _h(i)?Pv(i,t,n+1):i}const Pi=(e,t,n)=>n>t?t:n<e?e:n,So={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},nl={...So,transform:e=>Pi(0,1,e)},Sc={...So,default:1},rl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ii=rl("deg"),Pr=rl("%"),we=rl("px"),h6=rl("vh"),m6=rl("vw"),Iv={...Pr,parse:e=>Pr.parse(e)/100,transform:e=>Pr.transform(e*100)},g6=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Ov=e=>e===So||e===we,Dv=(e,t)=>parseFloat(e.split(", ")[t]),Lv=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Dv(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?Dv(a[1],e):0}},w6=new Set(["x","y","z"]),y6=el.filter(e=>!w6.has(e));function v6(e){const t=[];return y6.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Co={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Lv(4,13),y:Lv(5,14)};Co.translateX=Co.x,Co.translateY=Co.y;const Mv=e=>t=>t.test(e),Fv=[So,we,Pr,Ii,m6,h6,{test:e=>e==="auto",parse:e=>e}],Bv=e=>Fv.find(Mv(e)),La=new Set;let Sh=!1,Ch=!1;function jv(){if(Ch){const e=Array.from(La).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=v6(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,o])=>{var s;(s=r.getValue(a))===null||s===void 0||s.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ch=!1,Sh=!1,La.forEach(e=>e.complete()),La.clear()}function Uv(){La.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ch=!0)})}function b6(){Uv(),jv()}class kh{constructor(t,n,r,i,a,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(La.add(this),Sh||(Sh=!0,Xe.read(Uv),Xe.resolveKeyframes(jv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){const o=i==null?void 0:i.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),i&&o===void 0&&i.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),La.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,La.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const il=e=>Math.round(e*1e5)/1e5,Ah=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function x6(e){return e==null}const E6=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Rh=(e,t)=>n=>!!(typeof n=="string"&&E6.test(n)&&n.startsWith(e)||t&&!x6(n)&&Object.prototype.hasOwnProperty.call(n,t)),zv=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,s]=r.match(Ah);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},T6=e=>Pi(0,255,e),Nh={...So,transform:e=>Math.round(T6(e))},Ma={test:Rh("rgb","red"),parse:zv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Nh.transform(e)+", "+Nh.transform(t)+", "+Nh.transform(n)+", "+il(nl.transform(r))+")"};function _6(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Ph={test:Rh("#"),parse:_6,transform:Ma.transform},ko={test:Rh("hsl","hue"),parse:zv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pr.transform(il(t))+", "+Pr.transform(il(n))+", "+il(nl.transform(r))+")"},Gt={test:e=>Ma.test(e)||Ph.test(e)||ko.test(e),parse:e=>Ma.test(e)?Ma.parse(e):ko.test(e)?ko.parse(e):Ph.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ma.transform(e):ko.transform(e)},S6=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function C6(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Ah))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(S6))===null||n===void 0?void 0:n.length)||0)>0}const Hv="number",Vv="color",k6="var",A6="var(",$v="${}",R6=/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 al(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(R6,l=>(Gt.test(l)?(r.color.push(a),i.push(Vv),n.push(Gt.parse(l))):l.startsWith(A6)?(r.var.push(a),i.push(k6),n.push(l)):(r.number.push(a),i.push(Hv),n.push(parseFloat(l))),++a,$v)).split($v);return{values:n,split:s,indexes:r,types:i}}function Wv(e){return al(e).values}function Yv(e){const{split:t,types:n}=al(e),r=t.length;return i=>{let a="";for(let o=0;o<r;o++)if(a+=t[o],i[o]!==void 0){const s=n[o];s===Hv?a+=il(i[o]):s===Vv?a+=Gt.transform(i[o]):a+=i[o]}return a}}const N6=e=>typeof e=="number"?0:e;function P6(e){const t=Wv(e);return Yv(e)(t.map(N6))}const Oi={test:C6,parse:Wv,createTransformer:Yv,getAnimatableNone:P6},I6=new Set(["brightness","contrast","saturate","opacity"]);function O6(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ah)||[];if(!r)return e;const i=n.replace(r,"");let a=I6.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const D6=/\b([a-z-]*)\(.*?\)/gu,Ih={...Oi,getAnimatableNone:e=>{const t=e.match(D6);return t?t.map(O6).join(" "):e}},L6={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,backgroundPositionX:we,backgroundPositionY:we},M6={rotate:Ii,rotateX:Ii,rotateY:Ii,rotateZ:Ii,scale:Sc,scaleX:Sc,scaleY:Sc,scaleZ:Sc,skew:Ii,skewX:Ii,skewY:Ii,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:nl,originX:Iv,originY:Iv,originZ:we},qv={...So,transform:Math.round},Oh={...L6,...M6,zIndex:qv,size:we,fillOpacity:nl,strokeOpacity:nl,numOctaves:qv},F6={...Oh,color:Gt,backgroundColor:Gt,outlineColor:Gt,fill:Gt,stroke:Gt,borderColor:Gt,borderTopColor:Gt,borderRightColor:Gt,borderBottomColor:Gt,borderLeftColor:Gt,filter:Ih,WebkitFilter:Ih},Dh=e=>F6[e];function Gv(e,t){let n=Dh(e);return n!==Ih&&(n=Oi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const B6=new Set(["auto","none","0"]);function j6(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!B6.has(a)&&al(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=Gv(n,i)}class Kv extends kh{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),_h(u))){const c=Pv(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!g6.has(r)||t.length!==2)return;const[i,a]=t,o=Bv(i),s=Bv(a);if(o!==s)if(Ov(o)&&Ov(s))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)u6(t[i])&&r.push(i);r.length&&j6(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Co[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const a=n.getValue(r);a&&a.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Co[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Lh(e){return typeof e=="function"}let Cc;function U6(){Cc=void 0}const Ir={now:()=>(Cc===void 0&&Ir.set(Ut.isProcessing||n6.useManualTiming?Ut.timestamp:performance.now()),Cc),set:e=>{Cc=e,queueMicrotask(U6)}},Xv=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Oi.test(e)||e==="0")&&!e.startsWith("url("));function z6(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function H6(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=Xv(i,t),s=Xv(a,t);return!o||!s?!1:z6(e)||(n==="spring"||Lh(n))&&r}const V6=40;class Qv{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ir.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>V6?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&b6(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ir.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:o,onComplete:s,onUpdate:l,isGenerator:u}=this.options;if(!u&&!H6(t,r,i,a))if(o)this.options.duration=0;else{l==null||l(Tc(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Zv(e,t){return t?e*(1e3/t):0}const $6=5;function Jv(e,t,n){const r=Math.max(t-$6,0);return Zv(n-e(r),t-r)}const Mh=.001,W6=.01,Y6=10,q6=.05,G6=1;function K6({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a,o=1-t;o=Pi(q6,G6,o),e=Pi(W6,Y6,ei(e)),o<1?(i=u=>{const c=u*o,d=c*e,f=c-n,p=Fh(u,o),m=Math.exp(-d);return Mh-f/p*m},a=u=>{const d=u*o*e,f=d*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-d),g=Fh(Math.pow(u,2),o);return(-i(u)+Mh>0?-1:1)*((f-p)*m)/g}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Mh+c*d},a=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const s=5/e,l=Q6(i,a,s);if(e=Jr(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const X6=12;function Q6(e,t,n){let r=n;for(let i=1;i<X6;i++)r=r-e(r)/t(r);return r}function Fh(e,t){return e*Math.sqrt(1-t*t)}const Z6=["duration","bounce"],J6=["stiffness","damping","mass"];function eb(e,t){return t.some(n=>e[n]!==void 0)}function e4(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!eb(e,J6)&&eb(e,Z6)){const n=K6(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function tb({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],o={done:!1,value:i},{stiffness:s,damping:l,mass:u,duration:c,velocity:d,isResolvedFromDuration:f}=e4({...r,velocity:-ei(r.velocity||0)}),p=d||0,m=l/(2*Math.sqrt(s*u)),g=a-i,x=ei(Math.sqrt(s/u)),w=Math.abs(g)<5;n||(n=w?.01:2),t||(t=w?.005:.5);let v;if(m<1){const b=Fh(x,m);v=E=>{const _=Math.exp(-m*x*E);return a-_*((p+m*x*g)/b*Math.sin(b*E)+g*Math.cos(b*E))}}else if(m===1)v=b=>a-Math.exp(-x*b)*(g+(p+x*g)*b);else{const b=x*Math.sqrt(m*m-1);v=E=>{const _=Math.exp(-m*x*E),S=Math.min(b*E,300);return a-_*((p+m*x*g)*Math.sinh(S)+b*g*Math.cosh(S))/b}}return{calculatedDuration:f&&c||null,next:b=>{const E=v(b);if(f)o.done=b>=c;else{let _=0;m<1&&(_=b===0?Jr(p):Jv(v,b,E));const S=Math.abs(_)<=n,I=Math.abs(a-E)<=t;o.done=S&&I}return o.value=o.done?a:E,o}}}function nb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=D=>s!==void 0&&D<s||l!==void 0&&D>l,m=D=>s===void 0?l:l===void 0||Math.abs(s-D)<Math.abs(l-D)?s:l;let g=n*t;const x=d+g,w=o===void 0?x:o(x);w!==x&&(g=w-d);const v=D=>-g*Math.exp(-D/r),b=D=>w+v(D),E=D=>{const V=v(D),N=b(D);f.done=Math.abs(V)<=u,f.value=f.done?w:N};let _,S;const I=D=>{p(f.value)&&(_=D,S=tb({keyframes:[f.value,m(f.value)],velocity:Jv(b,D,f.value),damping:i,stiffness:a,restDelta:u,restSpeed:c}))};return I(0),{calculatedDuration:null,next:D=>{let V=!1;return!S&&_===void 0&&(V=!0,E(D),I(D)),_!==void 0&&D>=_?S.next(D-_):(!V&&E(D),f)}}}const t4=tl(.42,0,1,1),n4=tl(0,0,.58,1),rb=tl(.42,0,.58,1),r4=e=>Array.isArray(e)&&typeof e[0]!="number",Bh=e=>Array.isArray(e)&&typeof e[0]=="number",ib={linear:qt,easeIn:t4,easeInOut:rb,easeOut:n4,circIn:Eh,circInOut:Cv,circOut:Sv,backIn:xh,backInOut:Tv,backOut:Ev,anticipate:_v},ab=e=>{if(Bh(e)){Th(e.length===4);const[t,n,r,i]=e;return tl(t,n,r,i)}else if(typeof e=="string")return Th(ib[e]!==void 0),ib[e];return e},i4=(e,t)=>n=>t(e(n)),ti=(...e)=>e.reduce(i4),Ao=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ut=(e,t,n)=>e+(t-e)*n;function jh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function a4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=jh(l,s,e+1/3),a=jh(l,s,e),o=jh(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function kc(e,t){return n=>n>0?t:e}const Uh=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},o4=[Ph,Ma,ko],s4=e=>o4.find(t=>t.test(e));function ob(e){const t=s4(e);if(!t)return!1;let n=t.parse(e);return t===ko&&(n=a4(n)),n}const sb=(e,t)=>{const n=ob(e),r=ob(t);if(!n||!r)return kc(e,t);const i={...n};return a=>(i.red=Uh(n.red,r.red,a),i.green=Uh(n.green,r.green,a),i.blue=Uh(n.blue,r.blue,a),i.alpha=ut(n.alpha,r.alpha,a),Ma.transform(i))},zh=new Set(["none","hidden"]);function l4(e,t){return zh.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function u4(e,t){return n=>ut(e,t,n)}function Hh(e){return typeof e=="number"?u4:typeof e=="string"?_h(e)?kc:Gt.test(e)?sb:f4:Array.isArray(e)?lb:typeof e=="object"?Gt.test(e)?sb:c4:kc}function lb(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>Hh(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function c4(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Hh(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function d4(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],s=e.indexes[o][i[o]],l=(n=e.values[s])!==null&&n!==void 0?n:0;r[a]=l,i[o]++}return r}const f4=(e,t)=>{const n=Oi.createTransformer(t),r=al(e),i=al(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?zh.has(e)&&!i.values.length||zh.has(t)&&!r.values.length?l4(e,t):ti(lb(d4(r,i),i.values),n):kc(e,t)};function ub(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ut(e,t,n):Hh(e)(e,t)}function p4(e,t,n){const r=[],i=n||ub,a=e.length-1;for(let o=0;o<a;o++){let s=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||qt:t;s=ti(l,s)}r.push(s)}return r}function h4(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Th(a===t.length),a===1)return()=>t[0];if(a===2&&e[0]===e[1])return()=>t[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=p4(t,r,i),s=o.length,l=u=>{let c=0;if(s>1)for(;c<e.length-2&&!(u<e[c+1]);c++);const d=Ao(e[c],e[c+1],u);return o[c](d)};return n?u=>l(Pi(e[0],e[a-1],u)):l}function m4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ao(0,t,r);e.push(ut(n,1,i))}}function g4(e){const t=[0];return m4(t,e.length-1),t}function w4(e,t){return e.map(n=>n*t)}function y4(e,t){return e.map(()=>t||rb).splice(0,e.length-1)}function Ac({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=r4(r)?r.map(ab):ab(r),a={done:!1,value:t[0]},o=w4(n&&n.length===t.length?n:g4(t),e),s=h4(o,t,{ease:Array.isArray(i)?i:y4(t,i)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}const cb=2e4;function v4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<cb;)t+=n,r=e.next(t);return t>=cb?1/0:t}const b4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Xe.update(t,!0),stop:()=>Ni(t),now:()=>Ut.isProcessing?Ut.timestamp:Ir.now()}},x4={decay:nb,inertia:nb,tween:Ac,keyframes:Ac,spring:tb},E4=e=>e/100;class Vh extends Qv{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:a}=this.options,o=(i==null?void 0:i.KeyframeResolver)||kh,s=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(a,s,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=this.options,s=Lh(n)?n:x4[n]||Ac;let l,u;s!==Ac&&typeof t[0]!="number"&&(l=ti(E4,ub(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});a==="mirror"&&(u=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=v4(c));const{calculatedDuration:d}=c,f=d+i,p=f*(r+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:D}=this.options;return{done:!0,value:D[D.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return a.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:g,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const w=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?w<0:w>c;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let b=this.currentTime,E=a;if(p){const D=Math.min(this.currentTime,c)/d;let V=Math.floor(D),N=D%1;!N&&D>=1&&(N=1),N===1&&V--,V=Math.min(V,p+1),!!(V%2)&&(m==="reverse"?(N=1-N,g&&(N-=g/d)):m==="mirror"&&(E=o)),b=Pi(0,1,N)*d}const _=v?{done:!1,value:l[0]}:E.next(b);s&&(_.value=s(_.value));let{done:S}=_;!v&&u!==null&&(S=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return I&&i!==void 0&&(_.value=Tc(l,this.options,i)),x&&x(_.value),I&&this.finish(),_}get duration(){const{resolved:t}=this;return t?ei(t.calculatedDuration):0}get time(){return ei(this.currentTime)}set time(t){t=Jr(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ei(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=b4,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const db=new Set(["opacity","clipPath","filter","transform"]),T4=10,_4=(e,t)=>{let n="";const r=Math.max(Math.round(t/T4),2);for(let i=0;i<r;i++)n+=e(Ao(0,r-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function $h(e){let t;return()=>(t===void 0&&(t=e()),t)}const S4={linearEasing:void 0};function C4(e,t){const n=$h(e);return()=>{var r;return(r=S4[t])!==null&&r!==void 0?r:n()}}const Rc=C4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function fb(e){return!!(typeof e=="function"&&Rc()||!e||typeof e=="string"&&(e in Wh||Rc())||Bh(e)||Array.isArray(e)&&e.every(fb))}const ol=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Wh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ol([0,.65,.55,1]),circOut:ol([.55,0,1,.45]),backIn:ol([.31,.01,.66,-.59]),backOut:ol([.33,1.53,.69,.99])};function pb(e,t){if(e)return typeof e=="function"&&Rc()?_4(e,t):Bh(e)?ol(e):Array.isArray(e)?e.map(n=>pb(n,t)||Wh.easeOut):Wh[e]}function k4(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=pb(s,i);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}function hb(e,t){e.timeline=t,e.onfinish=null}const A4=$h(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Nc=10,R4=2e4;function N4(e){return Lh(e.type)||e.type==="spring"||!fb(e.ease)}function P4(e,t){const n=new Vh({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let a=0;for(;!r.done&&a<R4;)r=n.sample(a),i.push(r.value),a+=Nc;return{times:void 0,keyframes:i,duration:a-Nc,ease:"linear"}}const mb={anticipate:_v,backInOut:Tv,circInOut:Cv};function I4(e){return e in mb}class gb extends Qv{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:a}=this.options;this.resolver=new Kv(a,(o,s)=>this.onKeyframesResolved(o,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:a,ease:o,type:s,motionValue:l,name:u,startTime:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(typeof o=="string"&&Rc()&&I4(o)&&(o=mb[o]),N4(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,element:g,...x}=this.options,w=P4(t,x);t=w.keyframes,t.length===1&&(t[1]=t[0]),i=w.duration,a=w.times,o=w.ease,s="keyframes"}const d=k4(l.owner.current,u,t,{...this.options,duration:i,times:a,ease:o});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(hb(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(Tc(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:a,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ei(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ei(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Jr(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return qt;const{animation:r}=n;hb(r,t)}return qt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:a,ease:o,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:d,element:f,...p}=this.options,m=new Vh({...p,keyframes:r,duration:i,type:a,ease:o,times:s,isGenerator:!0}),g=Jr(this.time);u.setWithVelocity(m.sample(g-Nc).value,m.sample(g).value,Nc)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:a,damping:o,type:s}=t;return A4()&&r&&db.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&a!=="mirror"&&o!==0&&s!=="inertia"}}const O4=$h(()=>window.ScrollTimeline!==void 0);class D4{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>O4()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,a)=>{i&&i(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function L4({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Yh=(e,t,n,r={},i,a)=>o=>{const s=vh(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Jr(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};L4(s)||(c={...c,...t6(e,c)}),c.duration&&(c.duration=Jr(c.duration)),c.repeatDelay&&(c.repeatDelay=Jr(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!a&&t.get()!==void 0){const f=Tc(c.keyframes,s);if(f!==void 0)return Xe.update(()=>{c.onUpdate(f),c.onComplete()}),new D4([])}return!a&&gb.supports(c)?new gb(c):new Vh(c)},M4=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),F4=e=>mh(e)?e[e.length-1]||0:e;function qh(e,t){e.indexOf(t)===-1&&e.push(t)}function Gh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Kh{constructor(){this.subscriptions=[]}add(t){return qh(this.subscriptions,t),()=>Gh(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const wb=30,B4=e=>!isNaN(parseFloat(e));class j4{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=Ir.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ir.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=B4(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Kh);const r=this.events[t].add(n);return t==="change"?()=>{r(),Xe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ir.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>wb)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,wb);return Zv(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function sl(e,t){return new j4(e,t)}function U4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,sl(n))}function z4(e,t){const n=Ec(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=F4(a[o]);U4(e,o,s)}}const Pc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yb="data-"+Pc("framerAppearId");function vb(e){return e.props[yb]}const Kt=e=>!!(e&&e.getVelocity);function H4(e){return!!(Kt(e)&&e.add)}function Xh(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(H4(n))return n.add(t)}function V4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function bb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(o=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in l){const f=e.getValue(d,(a=e.latestValues[d])!==null&&a!==void 0?a:null),p=l[d];if(p===void 0||c&&V4(c,d))continue;const m={delay:n,...vh(o||{},d)};let g=!1;if(window.MotionHandoffAnimation){const w=vb(e);if(w){const v=window.MotionHandoffAnimation(w,d,Xe);v!==null&&(m.startTime=v,g=!0)}}Xh(e,d),f.start(Yh(d,f,p,e.shouldReduceMotion&&Ri.has(d)?{type:!1}:m,e,g));const x=f.animation;x&&u.push(x)}return s&&Promise.all(u).then(()=>{Xe.update(()=>{s&&z4(e,s)})}),u}function Qh(e,t,n={}){var r;const i=Ec(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(bb(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=a;return $4(e,t,c+u,d,f,n)}:()=>Promise.resolve(),{when:l}=a;if(l){const[u,c]=l==="beforeChildren"?[o,s]:[s,o];return u().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function $4(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(W4).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(Qh(u,t,{...a,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function W4(e,t){return e.sortNodePosition(t)}function Y4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>Qh(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=Qh(e,t,n);else{const i=typeof t=="function"?Ec(e,t,n.custom):t;r=Promise.all(bb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const q4=yh.length;function xb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<q4;n++){const r=yh[n],i=e.props[r];(Js(i)||i===!1)&&(t[r]=i)}return t}const G4=[...wh].reverse(),K4=wh.length;function X4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Y4(e,n,r)))}function Q4(e){let t=X4(e),n=Eb(),r=!0;const i=l=>(u,c)=>{var d;const f=Ec(e,c,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...g}=f;u={...u,...g,...m}}return u};function a(l){t=l(e)}function o(l){const{props:u}=e,c=xb(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let x=0;x<K4;x++){const w=G4[x],v=n[w],b=u[w]!==void 0?u[w]:c[w],E=Js(b),_=w===l?v.isActive:null;_===!1&&(m=x);let S=b===c[w]&&b!==u[w]&&E;if(S&&r&&e.manuallyAnimateOnMount&&(S=!1),v.protectedKeys={...p},!v.isActive&&_===null||!b&&!v.prevProp||Zs(b)||typeof b=="boolean")continue;const I=Z4(v.prevProp,b);let D=I||w===l&&v.isActive&&!S&&E||x>m&&E,V=!1;const N=Array.isArray(b)?b:[b];let $=N.reduce(i(w),{});_===!1&&($={});const{prevResolvedValues:z={}}=v,X={...z,...$},Y=ee=>{D=!0,f.has(ee)&&(V=!0,f.delete(ee)),v.needsAnimating[ee]=!0;const F=e.getValue(ee);F&&(F.liveStyle=!1)};for(const ee in X){const F=$[ee],B=z[ee];if(p.hasOwnProperty(ee))continue;let k=!1;mh(F)&&mh(B)?k=!gv(F,B):k=F!==B,k?F!=null?Y(ee):f.add(ee):F!==void 0&&f.has(ee)?Y(ee):v.protectedKeys[ee]=!0}v.prevProp=b,v.prevResolvedValues=$,v.isActive&&(p={...p,...$}),r&&e.blockInitialAnimation&&(D=!1),D&&(!(S&&I)||V)&&d.push(...N.map(ee=>({animation:ee,options:{type:w}})))}if(f.size){const x={};f.forEach(w=>{const v=e.getBaseTarget(w),b=e.getValue(w);b&&(b.liveStyle=!0),x[w]=v??null}),d.push({animation:x})}let g=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const d=o(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Eb(),r=!0}}}function Z4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!gv(t,e):!1}function Fa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Eb(){return{animate:Fa(!0),whileInView:Fa(),whileHover:Fa(),whileTap:Fa(),whileDrag:Fa(),whileFocus:Fa(),exit:Fa()}}class Di{constructor(t){this.isMounted=!1,this.node=t}update(){}}class J4 extends Di{constructor(t){super(t),t.animationState||(t.animationState=Q4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Zs(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let e5=0;class t5 extends Di{constructor(){super(...arguments),this.id=e5++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const n5={animation:{Feature:J4},exit:{Feature:t5}},Tb=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ic(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const r5=e=>t=>Tb(t)&&e(t,Ic(t));function ni(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ri(e,t,n,r){return ni(e,t,r5(n),r)}const _b=(e,t)=>Math.abs(e-t);function i5(e,t){const n=_b(e.x,t.x),r=_b(e.y,t.y);return Math.sqrt(n**2+r**2)}class Sb{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Jh(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=i5(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:g}=Ut;this.history.push({...m,timestamp:g});const{onStart:x,onMove:w}=this.handlers;f||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Zh(f,this.transformPagePoint),Xe.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Jh(d.type==="pointercancel"?this.lastMoveEventInfo:Zh(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,x),m&&m(d,x)},!Tb(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Ic(t),s=Zh(o,this.transformPagePoint),{point:l}=s,{timestamp:u}=Ut;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Jh(s,this.history)),this.removeListeners=ti(ri(this.contextWindow,"pointermove",this.handlePointerMove),ri(this.contextWindow,"pointerup",this.handlePointerUp),ri(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ni(this.updatePoint)}}function Zh(e,t){return t?{point:t(e.point)}:e}function Cb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jh({point:e},t){return{point:e,delta:Cb(e,kb(t)),offset:Cb(e,a5(t)),velocity:o5(t,.1)}}function a5(e){return e[0]}function kb(e){return e[e.length-1]}function o5(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=kb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Jr(t)));)n--;if(!r)return{x:0,y:0};const a=ei(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ab(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Rb=Ab("dragHorizontal"),Nb=Ab("dragVertical");function Pb(e){let t=!1;if(e==="y")t=Nb();else if(e==="x")t=Rb();else{const n=Rb(),r=Nb();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Ib(){const e=Pb(!0);return e?(e(),!1):!0}function Ro(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const Ob=1e-4,s5=1-Ob,l5=1+Ob,Db=.01,u5=0-Db,c5=0+Db;function On(e){return e.max-e.min}function d5(e,t,n){return Math.abs(e-t)<=n}function Lb(e,t,n,r=.5){e.origin=r,e.originPoint=ut(t.min,t.max,e.origin),e.scale=On(n)/On(t),e.translate=ut(n.min,n.max,e.origin)-e.originPoint,(e.scale>=s5&&e.scale<=l5||isNaN(e.scale))&&(e.scale=1),(e.translate>=u5&&e.translate<=c5||isNaN(e.translate))&&(e.translate=0)}function ll(e,t,n,r){Lb(e.x,t.x,n.x,r?r.originX:void 0),Lb(e.y,t.y,n.y,r?r.originY:void 0)}function Mb(e,t,n){e.min=n.min+t.min,e.max=e.min+On(t)}function f5(e,t,n){Mb(e.x,t.x,n.x),Mb(e.y,t.y,n.y)}function Fb(e,t,n){e.min=t.min-n.min,e.max=e.min+On(t)}function ul(e,t,n){Fb(e.x,t.x,n.x),Fb(e.y,t.y,n.y)}function p5(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ut(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ut(n,e,r.max):Math.min(e,n)),e}function Bb(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function h5(e,{top:t,left:n,bottom:r,right:i}){return{x:Bb(e.x,n,i),y:Bb(e.y,t,r)}}function jb(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function m5(e,t){return{x:jb(e.x,t.x),y:jb(e.y,t.y)}}function g5(e,t){let n=.5;const r=On(e),i=On(t);return i>r?n=Ao(t.min,t.max-r,e.min):r>i&&(n=Ao(e.min,e.max-i,t.min)),Pi(0,1,n)}function w5(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const em=.35;function y5(e=em){return e===!1?e=0:e===!0&&(e=em),{x:Ub(e,"left","right"),y:Ub(e,"top","bottom")}}function Ub(e,t,n){return{min:zb(e,t),max:zb(e,n)}}function zb(e,t){return typeof e=="number"?e:e[t]||0}const Hb=()=>({translate:0,scale:1,origin:0,originPoint:0}),No=()=>({x:Hb(),y:Hb()}),Vb=()=>({min:0,max:0}),Et=()=>({x:Vb(),y:Vb()});function Kn(e){return[e("x"),e("y")]}function $b({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function v5({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function b5(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function tm(e){return e===void 0||e===1}function nm({scale:e,scaleX:t,scaleY:n}){return!tm(e)||!tm(t)||!tm(n)}function Ba(e){return nm(e)||Wb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Wb(e){return Yb(e.x)||Yb(e.y)}function Yb(e){return e&&e!=="0%"}function Oc(e,t,n){const r=e-n,i=t*r;return n+i}function qb(e,t,n,r,i){return i!==void 0&&(e=Oc(e,i,r)),Oc(e,n,r)+t}function rm(e,t=0,n=1,r,i){e.min=qb(e.min,t,n,r,i),e.max=qb(e.max,t,n,r,i)}function Gb(e,{x:t,y:n}){rm(e.x,t.translate,t.scale,t.originPoint),rm(e.y,n.translate,n.scale,n.originPoint)}const Kb=.999999999999,Xb=1.0000000000001;function x5(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Io(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Gb(e,o)),r&&Ba(a.latestValues)&&Io(e,a.latestValues))}t.x<Xb&&t.x>Kb&&(t.x=1),t.y<Xb&&t.y>Kb&&(t.y=1)}function Po(e,t){e.min=e.min+t,e.max=e.max+t}function Qb(e,t,n,r,i=.5){const a=ut(e.min,e.max,i);rm(e,t,n,a,r)}function Io(e,t){Qb(e.x,t.x,t.scaleX,t.scale,t.originX),Qb(e.y,t.y,t.scaleY,t.scale,t.originY)}function Zb(e,t){return $b(b5(e.getBoundingClientRect(),t))}function E5(e,t,n){const r=Zb(e,n),{scroll:i}=t;return i&&(Po(r.x,i.offset.x),Po(r.y,i.offset.y)),r}const Jb=({current:e})=>e?e.ownerDocument.defaultView:null,T5=new WeakMap;class _5{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=Et(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ic(c,"page").point)},a=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Pb(f),!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),Kn(x=>{let w=this.getAxisMotionValue(x).get()||0;if(Pr.test(w)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[x];b&&(w=On(b)*(parseFloat(w)/100))}}this.originPoint[x]=w}),m&&Xe.postRender(()=>m(c,d)),Xh(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:x}=d;if(p&&this.currentDirection===null){this.currentDirection=S5(x),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),g&&g(c,d)},s=(c,d)=>this.stop(c,d),l=()=>Kn(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Sb(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Jb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Xe.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Dc(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=p5(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&Ro(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=h5(i.layoutBox,n):this.constraints=!1,this.elastic=y5(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Kn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=w5(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ro(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=E5(r,i.root,this.visualElement.getTransformPagePoint());let o=m5(i.layout.layoutBox,a);if(n){const s=n(v5(o));this.hasMutatedConstraints=!!s,s&&(o=$b(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Kn(c=>{if(!Dc(c,n,this.currentDirection))return;let d=l&&l[c]||{};o&&(d={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Xh(this.visualElement,t),r.start(Yh(t,r,0,n,this.visualElement,!1))}stopAnimation(){Kn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Kn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Kn(n=>{const{drag:r}=this.getProps();if(!Dc(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-ut(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ro(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Kn(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const l=s.get();i[o]=g5({min:l,max:l},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Kn(o=>{if(!Dc(o,t,null))return;const s=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];s.set(ut(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;T5.set(this.visualElement,this);const t=this.visualElement.current,n=ri(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ro(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Xe.read(r);const o=ni(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Kn(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=em,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function Dc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function S5(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class C5 extends Di{constructor(t){super(t),this.removeGroupControls=qt,this.removeListeners=qt,this.controls=new _5(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||qt}unmount(){this.removeGroupControls(),this.removeListeners()}}const ex=e=>(t,n)=>{e&&Xe.postRender(()=>e(t,n))};class k5 extends Di{constructor(){super(...arguments),this.removePointerDownListener=qt}onPointerDown(t){this.session=new Sb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ex(t),onStart:ex(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&Xe.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=ri(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Lc=y.createContext(null);function A5(){const e=y.useContext(Lc);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=y.useId();y.useEffect(()=>r(i),[]);const a=y.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,a]:[!0]}const im=y.createContext({}),tx=y.createContext({}),Mc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function nx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const cl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(we.test(e))e=parseFloat(e);else return e;const n=nx(e,t.target.x),r=nx(e,t.target.y);return`${n}% ${r}%`}},R5={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Oi.parse(e);if(i.length>5)return r;const a=Oi.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=l;const u=ut(s,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),a(i)}},Fc={};function N5(e){Object.assign(Fc,e)}const{schedule:am,cancel:gie}=yv(queueMicrotask,!1);class P5 extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;N5(I5),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Mc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Xe.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),am.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function rx(e){const[t,n]=A5(),r=y.useContext(im);return T.jsx(P5,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(tx),isPresent:t,safeToRemove:n})}const I5={borderRadius:{...cl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cl,borderTopRightRadius:cl,borderBottomLeftRadius:cl,borderBottomRightRadius:cl,boxShadow:R5},ix=["TopLeft","TopRight","BottomLeft","BottomRight"],O5=ix.length,ax=e=>typeof e=="string"?parseFloat(e):e,ox=e=>typeof e=="number"||we.test(e);function D5(e,t,n,r,i,a){i?(e.opacity=ut(0,n.opacity!==void 0?n.opacity:1,L5(r)),e.opacityExit=ut(t.opacity!==void 0?t.opacity:1,0,M5(r))):a&&(e.opacity=ut(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<O5;o++){const s=`border${ix[o]}Radius`;let l=sx(t,s),u=sx(n,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ox(l)===ox(u)?(e[s]=Math.max(ut(ax(l),ax(u),r),0),(Pr.test(u)||Pr.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||n.rotate)&&(e.rotate=ut(t.rotate||0,n.rotate||0,r))}function sx(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const L5=lx(0,.5,Sv),M5=lx(.5,.95,qt);function lx(e,t,n){return r=>r<e?0:r>t?1:n(Ao(e,t,r))}function ux(e,t){e.min=t.min,e.max=t.max}function Xn(e,t){ux(e.x,t.x),ux(e.y,t.y)}function cx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function dx(e,t,n,r,i){return e-=t,e=Oc(e,1/n,r),i!==void 0&&(e=Oc(e,1/i,r)),e}function F5(e,t=0,n=1,r=.5,i,a=e,o=e){if(Pr.test(t)&&(t=parseFloat(t),t=ut(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=ut(a.min,a.max,r);e===a&&(s-=t),e.min=dx(e.min,t,n,s,i),e.max=dx(e.max,t,n,s,i)}function fx(e,t,[n,r,i],a,o){F5(e,t[n],t[r],t[i],t.scale,a,o)}const B5=["x","scaleX","originX"],j5=["y","scaleY","originY"];function px(e,t,n,r){fx(e.x,t,B5,n?n.x:void 0,r?r.x:void 0),fx(e.y,t,j5,n?n.y:void 0,r?r.y:void 0)}function hx(e){return e.translate===0&&e.scale===1}function mx(e){return hx(e.x)&&hx(e.y)}function gx(e,t){return e.min===t.min&&e.max===t.max}function U5(e,t){return gx(e.x,t.x)&&gx(e.y,t.y)}function wx(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yx(e,t){return wx(e.x,t.x)&&wx(e.y,t.y)}function vx(e){return On(e.x)/On(e.y)}function bx(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class z5{constructor(){this.members=[]}add(t){qh(this.members,t),t.scheduleRender()}remove(t){if(Gh(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function H5(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const V5=(e,t)=>e.depth-t.depth;class $5{constructor(){this.children=[],this.isDirty=!1}add(t){qh(this.children,t),this.isDirty=!0}remove(t){Gh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(V5),this.isDirty=!1,this.children.forEach(t)}}function Bc(e){const t=Kt(e)?e.get():e;return M4(t)?t.toValue():t}function W5(e,t){const n=Ir.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Ni(r),e(a-t))};return Xe.read(r,!0),()=>Ni(r)}function Y5(e){return e instanceof SVGElement&&e.tagName!=="svg"}function q5(e,t,n){const r=Kt(e)?e:sl(e);return r.start(Yh("",r,t,n)),r.animation}const ja={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},dl=typeof window<"u"&&window.MotionDebug!==void 0,om=["","X","Y","Z"],G5={visibility:"hidden"},xx=1e3;let K5=0;function sm(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ex(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=vb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xe,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ex(r)}function Tx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=K5++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,dl&&(ja.totalNodes=ja.resolvedTargetDeltas=ja.recalculatedProjection=0),this.nodes.forEach(Z5),this.nodes.forEach(rD),this.nodes.forEach(iD),this.nodes.forEach(J5),dl&&window.MotionDebug.record(ja)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new $5)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Kh),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const l=this.eventHandlers.get(o);l&&l.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Y5(o),this.instance=o;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(u||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=W5(f,250),Mc.hasAnimatedSinceResize&&(Mc.hasAnimatedSinceResize=!1,this.nodes.forEach(Sx))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||uD,{onLayoutAnimationStart:x,onLayoutAnimationComplete:w}=c.getProps(),v=!this.targetLayout||!yx(this.targetLayout,m)||p,b=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const E={...vh(g,"layout"),onPlay:x,onComplete:w};(c.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else f||Sx(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ni(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(aD),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ex(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(_x);return}this.isUpdating||this.nodes.forEach(tD),this.isUpdating=!1,this.nodes.forEach(nD),this.nodes.forEach(X5),this.nodes.forEach(Q5),this.clearAllSnapshots();const s=Ir.now();Ut.delta=Pi(0,1e3/60,s-Ut.timestamp),Ut.timestamp=s,Ut.isProcessing=!0,bh.update.process(Ut),bh.preRender.process(Ut),bh.render.process(Ut),Ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,am.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eD),this.sharedNodes.forEach(oD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Et(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!mx(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&(s||Ba(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return o&&(l=this.removeTransform(l)),cD(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:s}=this.options;if(!s)return Et();const l=s.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(dD))){const{scroll:c}=this.root;c&&(Po(l.x,c.offset.x),Po(l.y,c.offset.y))}return l}removeElementScroll(o){var s;const l=Et();if(Xn(l,o),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&Xn(l,o),Po(l.x,d.offset.x),Po(l.y,d.offset.y))}return l}applyTransform(o,s=!1){const l=Et();Xn(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Io(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ba(c.latestValues)&&Io(l,c.latestValues)}return Ba(this.latestValues)&&Io(l,this.latestValues),l}removeTransform(o){const s=Et();Xn(s,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Ba(u.latestValues))continue;nm(u.latestValues)&&u.updateSnapshot();const c=Et(),d=u.measurePageBox();Xn(c,d),px(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Ba(this.latestValues)&&px(s,this.latestValues),s}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ut.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Ut.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Et(),this.relativeTargetOrigin=Et(),ul(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Xn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Et(),this.targetWithTransforms=Et()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),f5(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xn(this.target,this.layout.layoutBox),Gb(this.target,this.targetDelta)):Xn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Et(),this.relativeTargetOrigin=Et(),ul(this.relativeTargetOrigin,this.target,p.target),Xn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}dl&&ja.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||nm(this.parent.latestValues)||Wb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Ut.timestamp&&(u=!1),u)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;Xn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;x5(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Et());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(cx(this.prevProjectionDelta.x,this.projectionDelta.x),cx(this.prevProjectionDelta.y,this.projectionDelta.y)),ll(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!bx(this.projectionDelta.x,this.prevProjectionDelta.x)||!bx(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),dl&&ja.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=No(),this.projectionDelta=No(),this.projectionDeltaWithTransform=No()}setAnimationOrigin(o,s=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=No();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=Et(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,x=this.getStack(),w=!x||x.members.length<=1,v=!!(g&&!w&&this.options.crossfade===!0&&!this.path.some(lD));this.animationProgress=0;let b;this.mixTargetDelta=E=>{const _=E/1e3;Cx(d.x,o.x,_),Cx(d.y,o.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ul(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sD(this.relativeTarget,this.relativeTargetOrigin,f,_),b&&U5(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Et()),Xn(b,this.relativeTarget)),g&&(this.animationValues=c,D5(c,u,this.latestValues,_,v,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ni(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{Mc.hasAnimatedSinceResize=!0,this.currentAnimation=q5(0,xx,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(xx),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:c}=o;if(!(!s||!l||!u)){if(this!==o&&this.layout&&u&&Px(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Et();const d=On(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=On(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Xn(s,l),Io(s,c),ll(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new z5),this.sharedNodes.get(o).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const u={};l.z&&sm("z",o,u,this.animationValues);for(let c=0;c<om.length;c++)sm(`rotate${om[c]}`,o,u,this.animationValues),sm(`skew${om[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return G5;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Bc(o==null?void 0:o.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Bc(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Ba(this.latestValues)&&(g.transform=c?c({},""):"none",this.hasProjected=!1),g}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),u.transform=H5(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:p,y:m}=this.projectionDelta;u.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?u.opacity=d===this?(l=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in Fc){if(f[g]===void 0)continue;const{correct:x,applyTo:w}=Fc[g],v=u.transform==="none"?f[g]:x(f[g],d);if(w){const b=w.length;for(let E=0;E<b;E++)u[w[E]]=v}else u[g]=v}return this.options.layoutId&&(u.pointerEvents=d===this?Bc(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(_x),this.root.sharedNodes.clear()}}}function X5(e){e.updateLayout()}function Q5(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?Kn(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=On(f);f.min=r[d].min,f.max=f.min+p}):Px(a,n.layoutBox,r)&&Kn(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=On(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const s=No();ll(s,r,n.layoutBox);const l=No();o?ll(l,e.applyTransform(i,!0),n.measuredBox):ll(l,r,n.layoutBox);const u=!mx(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=Et();ul(m,n.layoutBox,f.layoutBox);const g=Et();ul(g,r,p.layoutBox),yx(m,g)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Z5(e){dl&&ja.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function J5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eD(e){e.clearSnapshot()}function _x(e){e.clearMeasurements()}function tD(e){e.isLayoutDirty=!1}function nD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Sx(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rD(e){e.resolveTargetDelta()}function iD(e){e.calcProjection()}function aD(e){e.resetSkewAndRotation()}function oD(e){e.removeLeadSnapshot()}function Cx(e,t,n){e.translate=ut(t.translate,0,n),e.scale=ut(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function kx(e,t,n,r){e.min=ut(t.min,n.min,r),e.max=ut(t.max,n.max,r)}function sD(e,t,n,r){kx(e.x,t.x,n.x,r),kx(e.y,t.y,n.y,r)}function lD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const uD={duration:.45,ease:[.4,0,.1,1]},Ax=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Rx=Ax("applewebkit/")&&!Ax("chrome/")?Math.round:qt;function Nx(e){e.min=Rx(e.min),e.max=Rx(e.max)}function cD(e){Nx(e.x),Nx(e.y)}function Px(e,t,n){return e==="position"||e==="preserve-aspect"&&!d5(vx(t),vx(n),.2)}function dD(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const fD=Tx({attachResizeListener:(e,t)=>ni(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),lm={current:void 0},Ix=Tx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!lm.current){const e=new fD({});e.mount(window),e.setOptions({layoutScroll:!0}),lm.current=e}return lm.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),pD={pan:{Feature:k5},drag:{Feature:C5,ProjectionNode:Ix,MeasureLayout:rx}};function Ox(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(a,o)=>{if(a.pointerType==="touch"||Ib())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const l=s[r];l&&Xe.postRender(()=>l(a,o))};return ri(e.current,n,i,{passive:!e.getProps()[r]})}class hD extends Di{mount(){this.unmount=ti(Ox(this.node,!0),Ox(this.node,!1))}unmount(){}}class mD extends Di{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{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=ti(ni(this.node.current,"focus",()=>this.onFocus()),ni(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Dx=(e,t)=>t?e===t?!0:Dx(e,t.parentElement):!1;function um(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ic(n))}class gD extends Di{constructor(){super(...arguments),this.removeStartListeners=qt,this.removeEndListeners=qt,this.removeAccessibleListeners=qt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),a=ri(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!Dx(this.node.current,s.target)?c:u;f&&Xe.update(()=>f(s,l))},{passive:!(r.onTap||r.onPointerUp)}),o=ri(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=ti(a,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const o=s=>{s.key!=="Enter"||!this.checkPressEnd()||um("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&Xe.postRender(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=ni(this.node.current,"keyup",o),um("down",(s,l)=>{this.startPress(s,l)})},n=ni(this.node.current,"keydown",t),r=()=>{this.isPressing&&um("cancel",(a,o)=>this.cancelPress(a,o))},i=ni(this.node.current,"blur",r);this.removeAccessibleListeners=ti(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Xe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Ib()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Xe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=ri(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=ni(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ti(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const cm=new WeakMap,dm=new WeakMap,wD=e=>{const t=cm.get(e.target);t&&t(e)},yD=e=>{e.forEach(wD)};function vD({root:e,...t}){const n=e||document;dm.has(n)||dm.set(n,{});const r=dm.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(yD,{root:e,...t})),r[i]}function bD(e,t,n){const r=vD(t);return cm.set(e,n),r.observe(e),()=>{cm.delete(e),r.unobserve(e)}}const xD={some:0,all:1};class ED extends Di{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:xD[i]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return bD(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(TD(t,n))&&this.startObserver()}unmount(){}}function TD({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const _D={inView:{Feature:ED},tap:{Feature:gD},focus:{Feature:mD},hover:{Feature:hD}},SD={layout:{ProjectionNode:Ix,MeasureLayout:rx}},fm=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),jc=y.createContext({}),pm=typeof window<"u",Lx=pm?y.useLayoutEffect:y.useEffect,Mx=y.createContext({strict:!1});function CD(e,t,n,r,i){var a,o;const{visualElement:s}=y.useContext(jc),l=y.useContext(Mx),u=y.useContext(Lc),c=y.useContext(fm).reducedMotion,d=y.useRef();r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=y.useContext(tx);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&kD(d.current,n,i,p),y.useInsertionEffect(()=>{f&&f.update(n,u)});const m=n[yb],g=y.useRef(!!m&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return Lx(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),am.render(f.render),g.current&&f.animationState&&f.animationState.animateChanges())}),y.useEffect(()=>{f&&(!g.current&&f.animationState&&f.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,m)}),g.current=!1))}),f}function kD(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Fx(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Ro(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function Fx(e){if(e)return e.options.allowProjection!==!1?e.projection:Fx(e.parent)}function AD(e,t,n){return y.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Ro(n)&&(n.current=r))},[t])}function Uc(e){return Zs(e.animate)||yh.some(t=>Js(e[t]))}function Bx(e){return!!(Uc(e)||e.variants)}function RD(e,t){if(Uc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Js(n)?n:void 0,animate:Js(r)?r:void 0}}return e.inherit!==!1?t:{}}function ND(e){const{initial:t,animate:n}=RD(e,y.useContext(jc));return y.useMemo(()=>({initial:t,animate:n}),[jx(t),jx(n)])}function jx(e){return Array.isArray(e)?e.join(" "):e}const Ux={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"]},Oo={};for(const e in Ux)Oo[e]={isEnabled:t=>Ux[e].some(n=>!!t[n])};function PD(e){for(const t in e)Oo[t]={...Oo[t],...e[t]}}const ID=Symbol.for("motionComponentSymbol");function OD({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&PD(e);function a(s,l){let u;const c={...y.useContext(fm),...s,layoutId:DD(s)},{isStatic:d}=c,f=ND(s),p=r(s,d);if(!d&&pm){LD();const m=MD(c);u=m.MeasureLayout,f.visualElement=CD(i,p,c,t,m.ProjectionNode)}return T.jsxs(jc.Provider,{value:f,children:[u&&f.visualElement?T.jsx(u,{visualElement:f.visualElement,...c}):null,n(i,s,AD(p,f.visualElement,l),p,d,f.visualElement)]})}const o=y.forwardRef(a);return o[ID]=i,o}function DD({layoutId:e}){const t=y.useContext(im).id;return t&&e!==void 0?t+"-"+e:e}function LD(e,t){y.useContext(Mx).strict}function MD(e){const{drag:t,layout:n}=Oo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const FD=["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 hm(e){return typeof e!="string"||e.includes("-")?!1:!!(FD.indexOf(e)>-1||/[A-Z]/u.test(e))}function zx(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const Hx=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 Vx(e,t,n,r){zx(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Hx.has(i)?i:Pc(i),t.attrs[i])}function $x(e,{layout:t,layoutId:n}){return Ri.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Fc[e]||e==="opacity")}function mm(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(Kt(i[o])||t.style&&Kt(t.style[o])||$x(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(a[o]=i[o]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),a}function Wx(e,t,n){const r=mm(e,t,n);for(const i in e)if(Kt(e[i])||Kt(t[i])){const a=el.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}function gm(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}function BD(e){if(Ri.has(e))return"transform";if(db.has(e))return Pc(e)}function jD({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,a,o,s){const l={latestValues:UD(i,a,o,s?!1:e,t),renderState:n()};return r&&(l.mount=u=>r(i,u,l)),l}const Yx=e=>(t,n)=>{const r=y.useContext(jc),i=y.useContext(Lc),a=()=>jD(e,t,r,i,n);return n?a():gm(a)};function qx(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const a=gh(e,r[i]);if(a){const{transitionEnd:o,transition:s,...l}=a;n(l,o)}}}function UD(e,t,n,r,i){var a;const o={},s=new Set,l=r&&((a=e.style)===null||a===void 0?void 0:a.willChange)===void 0,u=i(e,{});for(const x in u)o[x]=Bc(u[x]);let{initial:c,animate:d}=e;const f=Uc(e),p=Bx(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const g=m?d:c;return g&&typeof g!="boolean"&&!Zs(g)&&qx(e,g,(x,w)=>{for(const v in x){let b=x[v];if(Array.isArray(b)){const E=m?b.length-1:0;b=b[E]}b!==null&&(o[v]=b)}for(const v in w)o[v]=w[v]}),l&&(d&&c!==!1&&!Zs(d)&&qx(e,d,x=>{for(const w in x){const v=BD(w);v&&s.add(v)}}),s.size&&(o.willChange=Array.from(s).join(","))),o}const wm=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Gx=()=>({...wm(),attrs:{}}),Kx=(e,t)=>t&&typeof e=="number"?t.transform(e):e,zD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},HD=el.length;function VD(e,t,n){let r="",i=!0;for(let a=0;a<HD;a++){const o=el[a],s=e[o];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(o.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const u=Kx(s,Oh[o]);if(!l){i=!1;const c=zD[o]||o;r+=`${c}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function ym(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const l in t){const u=t[l];if(Ri.has(l)){o=!0;continue}else if(Nv(l)){i[l]=u;continue}else{const c=Kx(u,Oh[l]);l.startsWith("origin")?(s=!0,a[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=VD(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:u="50%",originZ:c=0}=a;r.transformOrigin=`${l} ${u} ${c}`}}function Xx(e,t,n){return typeof e=="string"?e:we.transform(t+n*e)}function $D(e,t,n){const r=Xx(t,e.x,e.width),i=Xx(n,e.y,e.height);return`${r} ${i}`}const WD={offset:"stroke-dashoffset",array:"stroke-dasharray"},YD={offset:"strokeDashoffset",array:"strokeDasharray"};function qD(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?WD:YD;e[a.offset]=we.transform(-r);const o=we.transform(t),s=we.transform(n);e[a.array]=`${o} ${s}`}function vm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:l=0,...u},c,d){if(ym(e,u,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=$D(m,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&qD(f,o,s,l,!1)}const bm=e=>typeof e=="string"&&e.toLowerCase()==="svg",GD={useVisualState:Yx({scrapeMotionValuesFromProps:Wx,createRenderState:Gx,onMount:(e,t,{renderState:n,latestValues:r})=>{Xe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Xe.render(()=>{vm(n,r,bm(t.tagName),e.transformTemplate),Vx(t,n)})}})},KD={useVisualState:Yx({applyWillChange:!0,scrapeMotionValuesFromProps:mm,createRenderState:wm})};function Qx(e,t,n){for(const r in t)!Kt(t[r])&&!$x(r,n)&&(e[r]=t[r])}function XD({transformTemplate:e},t){return y.useMemo(()=>{const n=wm();return ym(n,t,e),Object.assign({},n.vars,n.style)},[t])}function QD(e,t){const n=e.style||{},r={};return Qx(r,n,e),Object.assign(r,XD(e,t)),r}function ZD(e,t){const n={},r=QD(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const JD=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 zc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||JD.has(e)}let Zx=e=>!zc(e);function eL(e){e&&(Zx=t=>t.startsWith("on")?!zc(t):e(t))}try{eL(require("@emotion/is-prop-valid").default)}catch{}function tL(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Zx(i)||n===!0&&zc(i)||!t&&!zc(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function nL(e,t,n,r){const i=y.useMemo(()=>{const a=Gx();return vm(a,t,bm(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Qx(a,e.style,e),i.style={...a,...i.style}}return i}function rL(e=!1){return(n,r,i,{latestValues:a},o)=>{const l=(hm(n)?nL:ZD)(r,a,o,n),u=tL(r,typeof n=="string",e),c=n!==y.Fragment?{...u,...l,ref:i}:{},{children:d}=r,f=y.useMemo(()=>Kt(d)?d.get():d,[d]);return y.createElement(n,{...c,children:f})}}function iL(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...hm(r)?GD:KD,preloadedFeatures:e,useRender:rL(i),createVisualElement:t,Component:r};return OD(o)}}const xm={current:null},Jx={current:!1};function aL(){if(Jx.current=!0,!!pm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xm.current=e.matches;e.addListener(t),t()}else xm.current=!1}function oL(e,t,n){for(const r in t){const i=t[r],a=n[r];if(Kt(i))e.addValue(r,i);else if(Kt(a))e.addValue(r,sl(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,sl(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const eE=new WeakMap,sL=[...Fv,Gt,Oi],lL=e=>sL.find(Mv(e)),tE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class uL{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=kh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Ir.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Xe.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Uc(n),this.isVariantNode=Bx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&Kt(p)&&p.set(l[f],!1)}}mount(t){this.current=t,eE.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((n,r)=>this.bindToMotionValue(r,n)),Jx.current||aL(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:xm.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){eE.delete(this.current),this.projection&&this.projection.unmount(),Ni(this.notifyUpdate),Ni(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),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){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ri.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Xe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Oo){const n=Oo[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Et()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<tE.length;r++){const i=tE[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=oL(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=sl(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Av(i)||kv(i))?i=parseFloat(i):!lL(i)&&Oi.test(n)&&(i=Gv(t,n)),this.setBaseTarget(t,Kt(i)?i.get():i)),Kt(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=gh(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Kt(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kh),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class nE extends uL{constructor(){super(...arguments),this.KeyframeResolver=Kv}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function cL(e){return window.getComputedStyle(e)}class dL extends nE{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=zx}readValueFromInstance(t,n){if(Ri.has(n)){const r=Dh(n);return r&&r.default||0}else{const r=cL(t),i=(Nv(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Zb(t,n)}build(t,n,r){ym(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return mm(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Kt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class fL extends nE{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Et}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ri.has(n)){const r=Dh(n);return r&&r.default||0}return n=Hx.has(n)?n:Pc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Wx(t,n,r)}build(t,n,r){vm(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){Vx(t,n,r,i)}mount(t){this.isSVGTag=bm(t.tagName),super.mount(t)}}const pL=(e,t)=>hm(e)?new fL(t):new dL(t,{allowProjection:e!==y.Fragment}),hL=iL({...n5,..._D,...pD,...SD},pL),Ua=XO(hL);class mL extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function gL({children:e,isPresent:t}){const n=y.useId(),r=y.useRef(null),i=y.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=y.useContext(fm);return y.useInsertionEffect(()=>{const{width:o,height:s,top:l,left:u}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return a&&(c.nonce=a),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
|
|
18
18
|
[data-motion-pop-id="${n}"] {
|
|
19
19
|
position: absolute !important;
|
|
20
20
|
width: ${o}px !important;
|