(function(at,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","react","framer-motion"],u):(at=typeof globalThis<"u"?globalThis:at||self,u(at["react-flip-tilt"]={},at.React,at.framerMotion))})(this,function(at,u,pt){"use strict";var gt={exports:{}},lt={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var _t;function Wt(){if(_t)return lt;_t=1;var a=u,f=Symbol.for("react.element"),R=Symbol.for("react.fragment"),v=Object.prototype.hasOwnProperty,T=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_={key:!0,ref:!0,__self:!0,__source:!0};function Y(O,p,X){var b,F={},C=null,Q=null;X!==void 0&&(C=""+X),p.key!==void 0&&(C=""+p.key),p.ref!==void 0&&(Q=p.ref);for(b in p)v.call(p,b)&&!_.hasOwnProperty(b)&&(F[b]=p[b]);if(O&&O.defaultProps)for(b in p=O.defaultProps,p)F[b]===void 0&&(F[b]=p[b]);return{$$typeof:f,type:O,key:C,ref:Q,props:F,_owner:T.current}}return lt.Fragment=R,lt.jsx=Y,lt.jsxs=Y,lt}var st={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var St;function Ut(){return St||(St=1,process.env.NODE_ENV!=="production"&&function(){var a=u,f=Symbol.for("react.element"),R=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),O=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),Q=Symbol.for("react.offscreen"),Me=Symbol.iterator,be="@@iterator";function _e(e){if(e===null||typeof e!="object")return null;var t=Me&&e[Me]||e[be];return typeof t=="function"?t:null}var U=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=1&&g>=0&&o[m]!==x[g];)g--;for(;m>=1&&g>=0;m--,g--)if(o[m]!==x[g]){if(m!==1||g!==1)do if(m--,g--,g<0||o[m]!==x[g]){var L=` `+o[m].replace(" at new "," at ");return e.displayName&&L.includes("")&&(L=L.replace("",e.displayName)),typeof e=="function"&&A.set(e,L),L}while(m>=1&&g>=0);break}}}finally{$=!1,ye.current=c,I(),Error.prepareStackTrace=s}var ge=e?e.displayName||e.name:"",nt=ge?ue(ge):"";return typeof e=="function"&&A.set(e,nt),nt}function W(e,t,r){return Ie(e,!1)}function w(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function E(e,t,r){if(e==null)return"";if(typeof e=="function")return Ie(e,w(e));if(typeof e=="string")return ue(e);switch(e){case X:return ue("Suspense");case b:return ue("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return W(e.render);case F:return E(e.type,t,r);case C:{var n=e,s=n._payload,c=n._init;try{return E(c(s),t,r)}catch{}}}return""}var k=Object.prototype.hasOwnProperty,ae={},h=U.ReactDebugCurrentFrame;function j(e){if(e){var t=e._owner,r=E(e.type,e._source,t?t.type:null);h.setExtraStackFrame(r)}else h.setExtraStackFrame(null)}function Se(e,t,r,n,s){{var c=Function.call.bind(k);for(var l in e)if(c(e,l)){var o=void 0;try{if(typeof e[l]!="function"){var x=Error((n||"React class")+": "+r+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}o=e[l](t,l,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(m){o=m}o&&!(o instanceof Error)&&(j(s),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,l,typeof o),j(null)),o instanceof Error&&!(o.message in ae)&&(ae[o.message]=!0,j(s),y("Failed %s type: %s",r,o.message),j(null))}}}var Re=Array.isArray;function Ae(e){return Re(e)}function Ze(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function et(e){try{return G(e),!1}catch{return!0}}function G(e){return""+e}function xe(e){if(et(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ze(e)),G(e)}var H=U.ReactCurrentOwner,ke={key:!0,ref:!0,__self:!0,__source:!0},le,ee,te;te={};function tt(e){if(k.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function rt(e){if(k.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function qe(e,t){if(typeof e.ref=="string"&&H.current&&t&&H.current.stateNode!==t){var r=M(H.current.type);te[r]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(H.current.type),e.ref),te[r]=!0)}}function He(e,t){{var r=function(){le||(le=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function se(e,t){{var r=function(){ee||(ee=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var fe=function(e,t,r,n,s,c,l){var o={$$typeof:f,type:e,key:t,ref:r,props:l,_owner:c};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function Le(e,t,r,n,s){{var c,l={},o=null,x=null;r!==void 0&&(xe(r),o=""+r),rt(t)&&(xe(t.key),o=""+t.key),tt(t)&&(x=t.ref,qe(t,s));for(c in t)k.call(t,c)&&!ke.hasOwnProperty(c)&&(l[c]=t[c]);if(e&&e.defaultProps){var m=e.defaultProps;for(c in m)l[c]===void 0&&(l[c]=m[c])}if(o||x){var g=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&He(l,g),x&&se(l,g)}return fe(e,o,x,s,n,H.current,l)}}var pe=U.ReactCurrentOwner,me=U.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,r=E(e.type,e._source,t?t.type:null);me.setExtraStackFrame(r)}else me.setExtraStackFrame(null)}var de;de=!1;function ce(e){return typeof e=="object"&&e!==null&&e.$$typeof===f}function ve(){{if(pe.current){var e=M(pe.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function Be(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),r=e.lineNumber;return` Check your code at `+t+":"+r+"."}return""}}var Ce={};function Ye(e){{var t=ve();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=` Check the top-level render call using <`+r+">.")}return t}}function $e(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=Ye(t);if(Ce[r])return;Ce[r]=!0;var n="";e&&e._owner&&e._owner!==pe.current&&(n=" It was passed a child from "+M(e._owner.type)+"."),re(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),re(null)}}function Pe(e,t){{if(typeof e!="object")return;if(Ae(e))for(var r=0;r",o=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,o)}var g=Le(e,t,r,s,c);if(g==null)return g;if(l){var L=t.children;if(L!==void 0)if(n)if(Ae(L)){for(var ge=0;ge1?t-1:0),n=1;n=1&&g>=0&&o[m]!==x[g];)g--;for(;m>=1&&g>=0;m--,g--)if(o[m]!==x[g]){if(m!==1||g!==1)do if(m--,g--,g<0||o[m]!==x[g]){var L=` `+o[m].replace(" at new "," at ");return e.displayName&&L.includes("")&&(L=L.replace("",e.displayName)),typeof e=="function"&&A.set(e,L),L}while(m>=1&&g>=0);break}}}finally{$=!1,ye.current=c,I(),Error.prepareStackTrace=s}var ge=e?e.displayName||e.name:"",nt=ge?ue(ge):"";return typeof e=="function"&&A.set(e,nt),nt}function W(e,t,r){return Ie(e,!1)}function w(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function E(e,t,r){if(e==null)return"";if(typeof e=="function")return Ie(e,w(e));if(typeof e=="string")return ue(e);switch(e){case X:return ue("Suspense");case b:return ue("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return W(e.render);case F:return E(e.type,t,r);case C:{var n=e,s=n._payload,c=n._init;try{return E(c(s),t,r)}catch{}}}return""}var k=Object.prototype.hasOwnProperty,ae={},h=U.ReactDebugCurrentFrame;function j(e){if(e){var t=e._owner,r=E(e.type,e._source,t?t.type:null);h.setExtraStackFrame(r)}else h.setExtraStackFrame(null)}function Se(e,t,r,n,s){{var c=Function.call.bind(k);for(var l in e)if(c(e,l)){var o=void 0;try{if(typeof e[l]!="function"){var x=Error((n||"React class")+": "+r+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}o=e[l](t,l,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(m){o=m}o&&!(o instanceof Error)&&(j(s),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,l,typeof o),j(null)),o instanceof Error&&!(o.message in ae)&&(ae[o.message]=!0,j(s),y("Failed %s type: %s",r,o.message),j(null))}}}var Re=Array.isArray;function Ae(e){return Re(e)}function Ze(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function et(e){try{return G(e),!1}catch{return!0}}function G(e){return""+e}function xe(e){if(et(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ze(e)),G(e)}var H=U.ReactCurrentOwner,ke={key:!0,ref:!0,__self:!0,__source:!0},le,ee,te;te={};function tt(e){if(k.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function rt(e){if(k.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function qe(e,t){if(typeof e.ref=="string"&&H.current&&t&&H.current.stateNode!==t){var r=M(H.current.type);te[r]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(H.current.type),e.ref),te[r]=!0)}}function He(e,t){{var r=function(){le||(le=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function se(e,t){{var r=function(){ee||(ee=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var fe=function(e,t,r,n,s,c,l){var o={$$typeof:f,type:e,key:t,ref:r,props:l,_owner:c};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function Le(e,t,r,n,s){{var c,l={},o=null,x=null;r!==void 0&&(xe(r),o=""+r),rt(t)&&(xe(t.key),o=""+t.key),tt(t)&&(x=t.ref,qe(t,s));for(c in t)k.call(t,c)&&!ke.hasOwnProperty(c)&&(l[c]=t[c]);if(e&&e.defaultProps){var m=e.defaultProps;for(c in m)l[c]===void 0&&(l[c]=m[c])}if(o||x){var g=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&He(l,g),x&&se(l,g)}return fe(e,o,x,s,n,H.current,l)}}var pe=U.ReactCurrentOwner,me=U.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,r=E(e.type,e._source,t?t.type:null);me.setExtraStackFrame(r)}else me.setExtraStackFrame(null)}var de;de=!1;function ce(e){return typeof e=="object"&&e!==null&&e.$$typeof===f}function ve(){{if(pe.current){var e=M(pe.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function Be(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),r=e.lineNumber;return` Check your code at `+t+":"+r+"."}return""}}var Ce={};function Ye(e){{var t=ve();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=` Check the top-level render call using <`+r+">.")}return t}}function $e(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=Ye(t);if(Ce[r])return;Ce[r]=!0;var n="";e&&e._owner&&e._owner!==pe.current&&(n=" It was passed a child from "+M(e._owner.type)+"."),re(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),re(null)}}function Pe(e,t){{if(typeof e!="object")return;if(Ae(e))for(var r=0;r",o=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,o)}var g=Le(e,t,r,s,c);if(g==null)return g;if(l){var L=t.children;if(L!==void 0)if(n)if(Ae(L)){for(var ge=0;geaR?R:a,zt=(a,f,R)=>{let v=0;return f==="top"?v=(a.offsetY*2-1)*-1:f==="bottom"?v=(a.offsetY-.5)*2:f==="left"?v=(a.offsetX*2-1)*-1:f==="right"?v=(a.offsetX-.5)*2:f==="all"&&(v=Math.max(Math.abs(a.offsetX-.5)*2,Math.abs(a.offsetY-.5)*2)),(v*R).toFixed(2)},qt=(a,f,R)=>{let v=a.offsetX,T=a.offsetY;R||(v=1-v,T=1-T);let _="translateX(0%) translateY(0%)";return f==="top"?_=`translateX( ${v*50}% )`:f==="bottom"?_=`translateX( ${v*50}% ) translateY(50%)`:f==="left"?_=`translateY( ${T*50}% )`:f==="right"?_=`translateX(50%) translateY( ${T*50}% ) `:f==="all"&&(_=`translateX(${(v-.5)*50}%) translateY(${(T-.5)*50}%) `),_},jt=a=>{if(!a)return"translateX(0%) translateY(0%)";switch(a){case"top-left":a={left:"25%",top:"25%"};break;case"top-right":a={left:"75%",top:"25%"};break;case"bottom-left":a={left:"25%",top:"75%"};break;case"bottom-right":a={left:"75%",top:"75%"};break;case"center":a={left:"50%",top:"50%"};break}const f=a.left.includes("%")?String(parseInt(a.left)/2)+"%":a.left,R=a.top.includes("%")?String(parseInt(a.top)/2)+"%":a.top;return`translateX(${f}) translateY(${R})`},Bt=(a,f,R)=>{let v=a.offsetX,T=a.offsetY;f==="top-right"&&(v=1-v),f==="bottom-left"&&(T=1-T),f==="bottom-right"&&(v=1-v,T=1-T);let _=0;return R?_=((v+T)*(3/2)-1)*100:_=((v+T)*(-3/2)+.5)*100,`translateX(${_}%)`},Ot=(a,f)=>{if(!f)return`translateX(${a?"50%":"-100%"})`;switch(f){case"left":f={left:"25%"};break;case"center":f={left:"50%"};break;case"right":f={left:"75%"};break}return`translateX(${f.left.includes("%")?String(parseInt(f.left)/2)+"%":f.left})`},xt=a=>{if(a instanceof HTMLElement)return a;if(a instanceof Document)return document.documentElement;if(a.current&&a.current instanceof Object&&"element"in a.current&&a.current.element instanceof HTMLElement)return a.current.element;if(a.current&&a.current instanceof HTMLElement)return a.current},Ht=u.forwardRef(({width:a,height:f,borderRadius:R,perspective:v="1000px",scale:T=1,shadowEnable:_=!1,shadow:Y="0 0 1rem rgba(0,0,0,0.5)",shadowType:O="box",lineGlareEnable:p=!0,lineGlareBlurEnable:X=!0,lineGlareBlurAmount:b="4px",lineGlareMaxOpacity:F=.1,lineGlareWidthPercent:C=10,lineGlareMixBlendMode:Q="normal",lineGlareColor:Me="white",lineGlareReverse:be=!1,lineGlareDirection:_e="to-bottom-right",lineGlareHoverPosition:U="top-left",lineGlareFixedPosition:y=void 0,spotGlareEnable:Ne=!0,spotGlareSizePercent:Te=200,spotGlareMaxOpacity:je=.5,spotGlareMixBlendMode:Ge="normal",spotGlarePosition:he="top",spotGlareColor:ze="white",spotGlareReverse:Ee=!1,spotGlareFixedPosition:J=void 0,tiltMaxAngleX:Z=20,tiltMaxAngleY:B=20,tiltReverse:M=!1,tiltReset:N=!0,initialAngleX:P=0,initialAngleY:K=0,disableScrollOnTouch:D=!0,style:Fe,tiltStyle:oe,tiltClass:ie,tiltProps:De,gyroMaxAngleX:z=0,gyroMaxAngleY:V=0,gyroReverse:Oe=!1,disabled:I=!1,disabledFilter:ye="grayscale(1) brightness(125%)",CSSTransition:ne="all 0.4s cubic-bezier(0.03, 0.98, 0.52, 0.99)",TiltWrapper:ue,fullPageListening:$=!1,controlElement:A,controlElementOnly:we=!1,preserve3dEnable:Ie=!0,testIdEnable:W=!1,onTilt:w,onReset:E,onMouseEnter:k,onMouseMove:ae,onMouseLeave:h,onTouchStart:j,onTouchMove:Se,onTouchEnd:Re,children:Ae,...Ze},et)=>{const G=u.useRef(),xe=u.useRef(!1),H=!$&&(!A||A&&!we),ke=u.useRef(null),le=u.useRef(null),ee=u.useRef(null),te=u.useRef(null),tt=u.useCallback(({children:i})=>ot.jsx(ot.Fragment,{children:i}),[]),rt=ue||tt;p&&(C=Qe(C,0,50)/2),Ne&&(Te=Te<0?0:Te/2),Z=Qe(Z,0,90),B=Qe(B,0,90),z=Qe(z,0,90),V=Qe(V,0,90),P&&(P=Qe(P,-Z,Z)),K&&(K=Qe(K,-B,B));const qe=u.useMemo(()=>p?(100-C)/2:0,[p,C]),He=u.useMemo(()=>p?qe+C:0,[p,C,qe]),se=u.useCallback((i=!0)=>{requestAnimationFrame(()=>{le.current&&(le.current.style.willChange=i?"transform":""),ee.current&&(ee.current.style.willChange=i?"transform, opacity":""),te.current&&(te.current.style.willChange=i?"transform":"")})},[]),fe=u.useCallback((i=!0)=>{requestAnimationFrame(()=>{if(O==="box")le.current&&_&&(le.current.style.boxShadow=i?Y:"");else if(ke.current&&_){const d=ke.current.style.filter.replace(/(drop-shadow?\(.*?\))(?=\s[a-z].*?\(.*?\)|\s*$)/g,"");ke.current.style.filter=i?d+` drop-shadow(${Y})`:d}})},[Y,_,O]),Le=u.useCallback(()=>{if(!ke.current||!ee.current||!G.current||J)return;const i=zt(G.current,he,je),d=qt(G.current,he,Ee);requestAnimationFrame(()=>{ee.current&&(ee.current.style.opacity=i,ee.current.style.transform=d)})},[he,je,Ee,J]),pe=u.useCallback(()=>{if(!ke.current||!te.current||!G.current||y)return;const i=Bt(G.current,U,be);requestAnimationFrame(()=>{te.current&&(te.current.style.transform=i)})},[U,be,y]),me=u.useCallback((i=!0)=>{if(!ke.current||!G.current)return{angleX:0,angleY:0};let d=-(G.current.offsetY-.5)*2*Z,S=(G.current.offsetX-.5)*2*B;return M&&i&&(d=-d,S=-S),{angleX:d,angleY:S}},[Z,B,M]),re=u.useCallback(i=>{const d=(i.angleY/B+1)/2,S=(-i.angleX/Z+1)/2;G.current={offsetX:d,offsetY:S}},[Z,B]),de=u.useCallback((i,d=!0,S=!1)=>{const Ve=d?T:1;requestAnimationFrame(()=>{le.current&&(le.current.style.transform=`rotateX(${i.angleX}deg) rotateY(${i.angleY}deg) scale3d(${Ve},${Ve},${Ve})`)}),w&&w({angleX:i.angleX,angleY:i.angleY},S)},[w,T]),ce=u.useCallback((i,d=!1,S=!1)=>{re(i),de(i,d,S),fe(d),pe(),Le()},[re,de,fe,pe,Le]),ve=u.useCallback(()=>{E&&E(),P||K?ce({angleX:P||0,angleY:K||0}):(G.current=void 0,requestAnimationFrame(()=>{te.current&&!y&&(te.current.style.transform=Ot(be)),ee.current&&!J&&(ee.current.style.transform=jt(),ee.current.style.opacity="0"),le.current&&(le.current.style.transform="rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)")}))},[P,K,be,J,y,E,ce]),Be=u.useCallback((i,d)=>{if(!d)return;if($){G.current={offsetX:i.x/window.innerWidth,offsetY:i.y/window.innerHeight};return}const S=d.getBoundingClientRect();if(!S.width||!S.height)return;const Ve=Qe(i.x,S.left,S.right),e=Qe(i.y,S.top,S.bottom),t=(Ve-S.left)/S.width,r=(e-S.top)/S.height;G.current={offsetX:t,offsetY:r}},[$]);u.useImperativeHandle(et,()=>({tilt:ce,reset:ve,angle:()=>me(!1),updateWillChange:se,element:ke.current}),[ce,ve,se,me]);const Ce=u.useCallback(()=>{I||(xe.current=!0,se(),fe())},[I,fe,se]),Ye=u.useCallback(()=>{I||(D&&!$&&(typeof D=="boolean"?document.body.style.overflow="hidden":D.style.overflow="hidden"),xe.current=!0,se(),fe())},[D,I,$,fe,se]),$e=u.useCallback(i=>{I||(Be({x:i.clientX,y:i.clientY},i.currentTarget),de(me()),pe(),Le())},[I,me,Be,de,pe,Le]),Pe=u.useCallback(i=>{if(I)return;const d=i.changedTouches[0];d&&(Be({x:d.clientX,y:d.clientY},i.currentTarget),de(me()),pe(),Le())},[I,me,Be,de,pe,Le]),Xe=u.useCallback(()=>{I||(xe.current=!1,se(!1),fe(!1),N&&ve())},[I,ve,N,fe,se]),We=u.useCallback(()=>{I||(D&&!$&&(typeof D=="boolean"?document.body.style.overflow="":D.style.overflow=""),xe.current=!1,se(!1),fe(!1),N&&ve())},[D,I,$,ve,N,fe,se]);u.useEffect(()=>{if(!A&&!$)return;let i;$||!A?i=[document]:i=Array.isArray(A)?A:[A];for(let d of i){const S=xt(d);S&&(d=S,d.addEventListener("mouseenter",Ce),d.addEventListener("mousemove",$e),d.addEventListener("mouseleave",Xe),d.addEventListener("touchstart",Ye,{passive:!0}),d.addEventListener("touchmove",Pe,{passive:!0}),d.addEventListener("touchend",We,{passive:!0}))}return()=>{for(let d of i){const S=xt(d);S&&(d=S,d.removeEventListener("mouseenter",Ce),d.removeEventListener("mousemove",$e),d.removeEventListener("mouseleave",Xe),d.removeEventListener("touchstart",Ye),d.removeEventListener("touchmove",Pe),d.removeEventListener("touchend",We))}}},[A,Ce,$e,Xe,Ye,Pe,We,$]);const Ue=u.useCallback(i=>{if(xe.current||i.beta===null&&i.gamma===null)return;let d=z&&i.beta?Qe(-i.beta,-z,z):P||0,S=V&&i.gamma?Qe(i.gamma,-V,V):K||0;Oe&&(d=-d,S=-S),ce({angleX:d,angleY:S},!1,!0)},[z,V,P,K,Oe,ce]);return u.useEffect(()=>{if(!(!z&&!V))return window.addEventListener("deviceorientation",Ue),()=>window.removeEventListener("deviceorientation",Ue)},[z,V,Ue,se]),ot.jsx("div",{ref:i=>{i&&(ke.current=i,G.current&&(I?ve():ce(me())),(P||K)&&!G.current&&ve())},"data-testid":W?"container":void 0,style:Object.assign({display:"inline-block",verticalAlign:"middle",width:a,height:f,borderRadius:R,perspective:v,transformStyle:Ie?"preserve-3d":void 0,backfaceVisibility:"hidden",filter:I?ye:void 0,transition:O==="drop"?ne:void 0},Fe),onMouseEnter:H?k?i=>{Ce(),k(i)}:Ce:k,onTouchStart:H?j?i=>{Ye(),j(i)}:Ye:j,onMouseMove:H?ae?i=>{$e(i),ae(i)}:$e:ae,onTouchMove:H?Se?i=>{Pe(i),Se(i)}:Pe:Se,onMouseLeave:H?h?i=>{Xe(),h(i)}:Xe:h,onTouchEnd:H?Re?i=>{We(),Re(i)}:We:Re,...Ze,children:ot.jsx(rt,{children:ot.jsxs("div",{ref:le,"data-testid":W?"tilt":void 0,style:Object.assign({boxSizing:"border-box",position:"relative",width:"100%",height:"100%",borderRadius:R,transformStyle:Ie?"preserve-3d":void 0,backfaceVisibility:"hidden",transition:ne,transform:"rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)"},oe),className:ie,...De,children:[Ae,Ne&&ot.jsx("div",{"data-testid":W?"spot-glare-container":void 0,style:{pointerEvents:"none",position:"absolute",inset:"0",borderRadius:R,overflow:"hidden",backfaceVisibility:"hidden",mixBlendMode:Ge},children:ot.jsx("div",{ref:ee,"data-testid":W?"spot-glare":void 0,style:{position:"absolute",left:he==="all"&&!J?"-50%":"-100%",top:he==="all"&&!J?"-50%":"-100%",width:"200%",height:"200%",transition:ne,backgroundImage:`radial-gradient(${ze}, transparent ${Te}%)`,transform:jt(J),opacity:J?je:"0"}})}),p&&ot.jsx("div",{"data-testid":W?"line-glare-container":void 0,style:{pointerEvents:"none",position:"absolute",inset:"0",borderRadius:R,overflow:"hidden",backfaceVisibility:"hidden",mixBlendMode:Q},children:ot.jsx("div",{"data-testid":W?"line-glare":void 0,ref:te,style:{position:"absolute",left:y?"-100%":0,top:"-50%",width:"200%",height:"200%",filter:X?`blur(${b})`:"",transition:ne,opacity:String(F),transform:Ot(be,y),backgroundImage:`linear-gradient(${_e==="to-bottom-right"?"to bottom right":"to bottom left"}, transparent, transparent ${qe}%, ${Me} calc(${qe}% + 1px), ${Me} ${He}%, transparent calc(${He}% + 1px), transparent 0%)`}})})]})})})}),Ct=u.memo(Ht);Ct.displayName="Tilt";var ht={exports:{}},ut={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var $t;function Kt(){if($t)return ut;$t=1;var a=u,f=Symbol.for("react.element"),R=Symbol.for("react.fragment"),v=Object.prototype.hasOwnProperty,T=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_={key:!0,ref:!0,__self:!0,__source:!0};function Y(O,p,X){var b,F={},C=null,Q=null;X!==void 0&&(C=""+X),p.key!==void 0&&(C=""+p.key),p.ref!==void 0&&(Q=p.ref);for(b in p)v.call(p,b)&&!_.hasOwnProperty(b)&&(F[b]=p[b]);if(O&&O.defaultProps)for(b in p=O.defaultProps,p)F[b]===void 0&&(F[b]=p[b]);return{$$typeof:f,type:O,key:C,ref:Q,props:F,_owner:T.current}}return ut.Fragment=R,ut.jsx=Y,ut.jsxs=Y,ut}var vt={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Pt;function Qt(){return Pt||(Pt=1,process.env.NODE_ENV!=="production"&&function(){var a=u,f=Symbol.for("react.element"),R=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),O=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),Q=Symbol.for("react.offscreen"),Me=Symbol.iterator,be="@@iterator";function _e(e){if(e===null||typeof e!="object")return null;var t=Me&&e[Me]||e[be];return typeof t=="function"?t:null}var U=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=1&&g>=0&&o[m]!==x[g];)g--;for(;m>=1&&g>=0;m--,g--)if(o[m]!==x[g]){if(m!==1||g!==1)do if(m--,g--,g<0||o[m]!==x[g]){var L=` `+o[m].replace(" at new "," at ");return e.displayName&&L.includes("")&&(L=L.replace("",e.displayName)),typeof e=="function"&&A.set(e,L),L}while(m>=1&&g>=0);break}}}finally{$=!1,ye.current=c,I(),Error.prepareStackTrace=s}var ge=e?e.displayName||e.name:"",nt=ge?ue(ge):"";return typeof e=="function"&&A.set(e,nt),nt}function W(e,t,r){return Ie(e,!1)}function w(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function E(e,t,r){if(e==null)return"";if(typeof e=="function")return Ie(e,w(e));if(typeof e=="string")return ue(e);switch(e){case X:return ue("Suspense");case b:return ue("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return W(e.render);case F:return E(e.type,t,r);case C:{var n=e,s=n._payload,c=n._init;try{return E(c(s),t,r)}catch{}}}return""}var k=Object.prototype.hasOwnProperty,ae={},h=U.ReactDebugCurrentFrame;function j(e){if(e){var t=e._owner,r=E(e.type,e._source,t?t.type:null);h.setExtraStackFrame(r)}else h.setExtraStackFrame(null)}function Se(e,t,r,n,s){{var c=Function.call.bind(k);for(var l in e)if(c(e,l)){var o=void 0;try{if(typeof e[l]!="function"){var x=Error((n||"React class")+": "+r+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}o=e[l](t,l,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(m){o=m}o&&!(o instanceof Error)&&(j(s),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,l,typeof o),j(null)),o instanceof Error&&!(o.message in ae)&&(ae[o.message]=!0,j(s),y("Failed %s type: %s",r,o.message),j(null))}}}var Re=Array.isArray;function Ae(e){return Re(e)}function Ze(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function et(e){try{return G(e),!1}catch{return!0}}function G(e){return""+e}function xe(e){if(et(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ze(e)),G(e)}var H=U.ReactCurrentOwner,ke={key:!0,ref:!0,__self:!0,__source:!0},le,ee,te;te={};function tt(e){if(k.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function rt(e){if(k.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function qe(e,t){if(typeof e.ref=="string"&&H.current&&t&&H.current.stateNode!==t){var r=M(H.current.type);te[r]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(H.current.type),e.ref),te[r]=!0)}}function He(e,t){{var r=function(){le||(le=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function se(e,t){{var r=function(){ee||(ee=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var fe=function(e,t,r,n,s,c,l){var o={$$typeof:f,type:e,key:t,ref:r,props:l,_owner:c};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function Le(e,t,r,n,s){{var c,l={},o=null,x=null;r!==void 0&&(xe(r),o=""+r),rt(t)&&(xe(t.key),o=""+t.key),tt(t)&&(x=t.ref,qe(t,s));for(c in t)k.call(t,c)&&!ke.hasOwnProperty(c)&&(l[c]=t[c]);if(e&&e.defaultProps){var m=e.defaultProps;for(c in m)l[c]===void 0&&(l[c]=m[c])}if(o||x){var g=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&He(l,g),x&&se(l,g)}return fe(e,o,x,s,n,H.current,l)}}var pe=U.ReactCurrentOwner,me=U.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,r=E(e.type,e._source,t?t.type:null);me.setExtraStackFrame(r)}else me.setExtraStackFrame(null)}var de;de=!1;function ce(e){return typeof e=="object"&&e!==null&&e.$$typeof===f}function ve(){{if(pe.current){var e=M(pe.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function Be(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),r=e.lineNumber;return` Check your code at `+t+":"+r+"."}return""}}var Ce={};function Ye(e){{var t=ve();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=` Check the top-level render call using <`+r+">.")}return t}}function $e(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=Ye(t);if(Ce[r])return;Ce[r]=!0;var n="";e&&e._owner&&e._owner!==pe.current&&(n=" It was passed a child from "+M(e._owner.type)+"."),re(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),re(null)}}function Pe(e,t){{if(typeof e!="object")return;if(Ae(e))for(var r=0;r",o=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,o)}var g=Le(e,t,r,s,c);if(g==null)return g;if(l){var L=t.children;if(L!==void 0)if(n)if(Ae(L)){for(var ge=0;ge1?t-1:0),n=1;n=1&&g>=0&&o[m]!==x[g];)g--;for(;m>=1&&g>=0;m--,g--)if(o[m]!==x[g]){if(m!==1||g!==1)do if(m--,g--,g<0||o[m]!==x[g]){var L=` `+o[m].replace(" at new "," at ");return e.displayName&&L.includes("")&&(L=L.replace("",e.displayName)),typeof e=="function"&&A.set(e,L),L}while(m>=1&&g>=0);break}}}finally{$=!1,ye.current=c,I(),Error.prepareStackTrace=s}var ge=e?e.displayName||e.name:"",nt=ge?ue(ge):"";return typeof e=="function"&&A.set(e,nt),nt}function W(e,t,r){return Ie(e,!1)}function w(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function E(e,t,r){if(e==null)return"";if(typeof e=="function")return Ie(e,w(e));if(typeof e=="string")return ue(e);switch(e){case X:return ue("Suspense");case b:return ue("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return W(e.render);case F:return E(e.type,t,r);case C:{var n=e,s=n._payload,c=n._init;try{return E(c(s),t,r)}catch{}}}return""}var k=Object.prototype.hasOwnProperty,ae={},h=U.ReactDebugCurrentFrame;function j(e){if(e){var t=e._owner,r=E(e.type,e._source,t?t.type:null);h.setExtraStackFrame(r)}else h.setExtraStackFrame(null)}function Se(e,t,r,n,s){{var c=Function.call.bind(k);for(var l in e)if(c(e,l)){var o=void 0;try{if(typeof e[l]!="function"){var x=Error((n||"React class")+": "+r+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}o=e[l](t,l,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(m){o=m}o&&!(o instanceof Error)&&(j(s),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,l,typeof o),j(null)),o instanceof Error&&!(o.message in ae)&&(ae[o.message]=!0,j(s),y("Failed %s type: %s",r,o.message),j(null))}}}var Re=Array.isArray;function Ae(e){return Re(e)}function Ze(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function et(e){try{return G(e),!1}catch{return!0}}function G(e){return""+e}function xe(e){if(et(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ze(e)),G(e)}var H=U.ReactCurrentOwner,ke={key:!0,ref:!0,__self:!0,__source:!0},le,ee,te;te={};function tt(e){if(k.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function rt(e){if(k.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function qe(e,t){if(typeof e.ref=="string"&&H.current&&t&&H.current.stateNode!==t){var r=M(H.current.type);te[r]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(H.current.type),e.ref),te[r]=!0)}}function He(e,t){{var r=function(){le||(le=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function se(e,t){{var r=function(){ee||(ee=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var fe=function(e,t,r,n,s,c,l){var o={$$typeof:f,type:e,key:t,ref:r,props:l,_owner:c};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function Le(e,t,r,n,s){{var c,l={},o=null,x=null;r!==void 0&&(xe(r),o=""+r),rt(t)&&(xe(t.key),o=""+t.key),tt(t)&&(x=t.ref,qe(t,s));for(c in t)k.call(t,c)&&!ke.hasOwnProperty(c)&&(l[c]=t[c]);if(e&&e.defaultProps){var m=e.defaultProps;for(c in m)l[c]===void 0&&(l[c]=m[c])}if(o||x){var g=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&He(l,g),x&&se(l,g)}return fe(e,o,x,s,n,H.current,l)}}var pe=U.ReactCurrentOwner,me=U.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,r=E(e.type,e._source,t?t.type:null);me.setExtraStackFrame(r)}else me.setExtraStackFrame(null)}var de;de=!1;function ce(e){return typeof e=="object"&&e!==null&&e.$$typeof===f}function ve(){{if(pe.current){var e=M(pe.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function Be(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),r=e.lineNumber;return` Check your code at `+t+":"+r+"."}return""}}var Ce={};function Ye(e){{var t=ve();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=` Check the top-level render call using <`+r+">.")}return t}}function $e(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=Ye(t);if(Ce[r])return;Ce[r]=!0;var n="";e&&e._owner&&e._owner!==pe.current&&(n=" It was passed a child from "+M(e._owner.type)+"."),re(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),re(null)}}function Pe(e,t){{if(typeof e!="object")return;if(Ae(e))for(var r=0;r",o=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,o)}var g=Le(e,t,r,s,c);if(g==null)return g;if(l){var L=t.children;if(L!==void 0)if(n)if(Ae(L)){for(var ge=0;geaR?R:a,tr=(a,f,R)=>{let v=0;return f==="top"?v=(a.offsetY*2-1)*-1:f==="bottom"?v=(a.offsetY-.5)*2:f==="left"?v=(a.offsetX*2-1)*-1:f==="right"?v=(a.offsetX-.5)*2:f==="all"&&(v=Math.max(Math.abs(a.offsetX-.5)*2,Math.abs(a.offsetY-.5)*2)),(v*R).toFixed(2)},rr=(a,f,R)=>{let v=a.offsetX,T=a.offsetY;R||(v=1-v,T=1-T);let _="translateX(0%) translateY(0%)";return f==="top"?_=`translateX( ${v*50}% )`:f==="bottom"?_=`translateX( ${v*50}% ) translateY(50%)`:f==="left"?_=`translateY( ${T*50}% )`:f==="right"?_=`translateX(50%) translateY( ${T*50}% ) `:f==="all"&&(_=`translateX(${(v-.5)*50}%) translateY(${(T-.5)*50}%) `),_},It=a=>{if(!a)return"translateX(0%) translateY(0%)";switch(a){case"top-left":a={left:"25%",top:"25%"};break;case"top-right":a={left:"75%",top:"25%"};break;case"bottom-left":a={left:"25%",top:"75%"};break;case"bottom-right":a={left:"75%",top:"75%"};break;case"center":a={left:"50%",top:"50%"};break}const f=a.left.includes("%")?String(parseInt(a.left)/2)+"%":a.left,R=a.top.includes("%")?String(parseInt(a.top)/2)+"%":a.top;return`translateX(${f}) translateY(${R})`},nr=(a,f,R)=>{let v=a.offsetX,T=a.offsetY;f==="top-right"&&(v=1-v),f==="bottom-left"&&(T=1-T),f==="bottom-right"&&(v=1-v,T=1-T);let _=0;return R?_=((v+T)*(3/2)-1)*100:_=((v+T)*(-3/2)+.5)*100,`translateX(${_}%)`},At=(a,f)=>{if(!f)return`translateX(${a?"50%":"-100%"})`;switch(f){case"left":f={left:"25%"};break;case"center":f={left:"50%"};break;case"right":f={left:"75%"};break}return`translateX(${f.left.includes("%")?String(parseInt(f.left)/2)+"%":f.left})`},Lt=a=>{if(a instanceof HTMLElement)return a;if(a instanceof Document)return document.documentElement;if(a.current&&a.current instanceof Object&&"element"in a.current&&a.current.element instanceof HTMLElement)return a.current.element;if(a.current&&a.current instanceof HTMLElement)return a.current},ar=u.forwardRef(({width:a,height:f,borderRadius:R,perspective:v="1000px",scale:T=1,shadowEnable:_=!1,shadow:Y="0 0 1rem rgba(0,0,0,0.5)",shadowType:O="box",lineGlareEnable:p=!0,lineGlareBlurEnable:X=!0,lineGlareBlurAmount:b="4px",lineGlareMaxOpacity:F=.1,lineGlareWidthPercent:C=10,lineGlareMixBlendMode:Q="normal",lineGlareColor:Me="white",lineGlareReverse:be=!1,lineGlareDirection:_e="to-bottom-right",lineGlareHoverPosition:U="top-left",lineGlareFixedPosition:y=void 0,spotGlareEnable:Ne=!0,spotGlareSizePercent:Te=200,spotGlareMaxOpacity:je=.5,spotGlareMixBlendMode:Ge="normal",spotGlarePosition:he="top",spotGlareColor:ze="white",spotGlareReverse:Ee=!1,spotGlareFixedPosition:J=void 0,tiltMaxAngleX:Z=20,tiltMaxAngleY:B=20,tiltReverse:M=!1,tiltReset:N=!0,initialAngleX:P=0,initialAngleY:K=0,disableScrollOnTouch:D=!0,style:Fe,tiltStyle:oe,tiltClass:ie,tiltProps:De,gyroMaxAngleX:z=0,gyroMaxAngleY:V=0,gyroReverse:Oe=!1,disabled:I=!1,disabledFilter:ye="grayscale(1) brightness(125%)",CSSTransition:ne="all 0.4s cubic-bezier(0.03, 0.98, 0.52, 0.99)",TiltWrapper:ue,fullPageListening:$=!1,controlElement:A,controlElementOnly:we=!1,preserve3dEnable:Ie=!0,testIdEnable:W=!1,onTilt:w,onReset:E,onMouseEnter:k,onMouseMove:ae,onMouseLeave:h,onTouchStart:j,onTouchMove:Se,onTouchEnd:Re,children:Ae,...Ze},et)=>{const G=u.useRef(),xe=u.useRef(!1),H=!$&&(!A||A&&!we),ke=u.useRef(null),le=u.useRef(null),ee=u.useRef(null),te=u.useRef(null),tt=u.useCallback(({children:i})=>it.jsx(it.Fragment,{children:i}),[]),rt=ue||tt;p&&(C=Je(C,0,50)/2),Ne&&(Te=Te<0?0:Te/2),Z=Je(Z,0,90),B=Je(B,0,90),z=Je(z,0,90),V=Je(V,0,90),P&&(P=Je(P,-Z,Z)),K&&(K=Je(K,-B,B));const qe=u.useMemo(()=>p?(100-C)/2:0,[p,C]),He=u.useMemo(()=>p?qe+C:0,[p,C,qe]),se=u.useCallback((i=!0)=>{requestAnimationFrame(()=>{le.current&&(le.current.style.willChange=i?"transform":""),ee.current&&(ee.current.style.willChange=i?"transform, opacity":""),te.current&&(te.current.style.willChange=i?"transform":"")})},[]),fe=u.useCallback((i=!0)=>{requestAnimationFrame(()=>{if(O==="box")le.current&&_&&(le.current.style.boxShadow=i?Y:"");else if(ke.current&&_){const d=ke.current.style.filter.replace(/(drop-shadow?\(.*?\))(?=\s[a-z].*?\(.*?\)|\s*$)/g,"");ke.current.style.filter=i?d+` drop-shadow(${Y})`:d}})},[Y,_,O]),Le=u.useCallback(()=>{if(!ke.current||!ee.current||!G.current||J)return;const i=tr(G.current,he,je),d=rr(G.current,he,Ee);requestAnimationFrame(()=>{ee.current&&(ee.current.style.opacity=i,ee.current.style.transform=d)})},[he,je,Ee,J]),pe=u.useCallback(()=>{if(!ke.current||!te.current||!G.current||y)return;const i=nr(G.current,U,be);requestAnimationFrame(()=>{te.current&&(te.current.style.transform=i)})},[U,be,y]),me=u.useCallback((i=!0)=>{if(!ke.current||!G.current)return{angleX:0,angleY:0};let d=-(G.current.offsetY-.5)*2*Z,S=(G.current.offsetX-.5)*2*B;return M&&i&&(d=-d,S=-S),{angleX:d,angleY:S}},[Z,B,M]),re=u.useCallback(i=>{const d=(i.angleY/B+1)/2,S=(-i.angleX/Z+1)/2;G.current={offsetX:d,offsetY:S}},[Z,B]),de=u.useCallback((i,d=!0,S=!1)=>{const Ve=d?T:1;requestAnimationFrame(()=>{le.current&&(le.current.style.transform=`rotateX(${i.angleX}deg) rotateY(${i.angleY}deg) scale3d(${Ve},${Ve},${Ve})`)}),w&&w({angleX:i.angleX,angleY:i.angleY},S)},[w,T]),ce=u.useCallback((i,d=!1,S=!1)=>{re(i),de(i,d,S),fe(d),pe(),Le()},[re,de,fe,pe,Le]),ve=u.useCallback(()=>{E&&E(),P||K?ce({angleX:P||0,angleY:K||0}):(G.current=void 0,requestAnimationFrame(()=>{te.current&&!y&&(te.current.style.transform=At(be)),ee.current&&!J&&(ee.current.style.transform=It(),ee.current.style.opacity="0"),le.current&&(le.current.style.transform="rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)")}))},[P,K,be,J,y,E,ce]),Be=u.useCallback((i,d)=>{if(!d)return;if($){G.current={offsetX:i.x/window.innerWidth,offsetY:i.y/window.innerHeight};return}const S=d.getBoundingClientRect();if(!S.width||!S.height)return;const Ve=Je(i.x,S.left,S.right),e=Je(i.y,S.top,S.bottom),t=(Ve-S.left)/S.width,r=(e-S.top)/S.height;G.current={offsetX:t,offsetY:r}},[$]);u.useImperativeHandle(et,()=>({tilt:ce,reset:ve,angle:()=>me(!1),updateWillChange:se,element:ke.current}),[ce,ve,se,me]);const Ce=u.useCallback(()=>{I||(xe.current=!0,se(),fe())},[I,fe,se]),Ye=u.useCallback(()=>{I||(D&&!$&&(typeof D=="boolean"?document.body.style.overflow="hidden":D.style.overflow="hidden"),xe.current=!0,se(),fe())},[D,I,$,fe,se]),$e=u.useCallback(i=>{I||(Be({x:i.clientX,y:i.clientY},i.currentTarget),de(me()),pe(),Le())},[I,me,Be,de,pe,Le]),Pe=u.useCallback(i=>{if(I)return;const d=i.changedTouches[0];d&&(Be({x:d.clientX,y:d.clientY},i.currentTarget),de(me()),pe(),Le())},[I,me,Be,de,pe,Le]),Xe=u.useCallback(()=>{I||(xe.current=!1,se(!1),fe(!1),N&&ve())},[I,ve,N,fe,se]),We=u.useCallback(()=>{I||(D&&!$&&(typeof D=="boolean"?document.body.style.overflow="":D.style.overflow=""),xe.current=!1,se(!1),fe(!1),N&&ve())},[D,I,$,ve,N,fe,se]);u.useEffect(()=>{if(!A&&!$)return;let i;$||!A?i=[document]:i=Array.isArray(A)?A:[A];for(let d of i){const S=Lt(d);S&&(d=S,d.addEventListener("mouseenter",Ce),d.addEventListener("mousemove",$e),d.addEventListener("mouseleave",Xe),d.addEventListener("touchstart",Ye,{passive:!0}),d.addEventListener("touchmove",Pe,{passive:!0}),d.addEventListener("touchend",We,{passive:!0}))}return()=>{for(let d of i){const S=Lt(d);S&&(d=S,d.removeEventListener("mouseenter",Ce),d.removeEventListener("mousemove",$e),d.removeEventListener("mouseleave",Xe),d.removeEventListener("touchstart",Ye),d.removeEventListener("touchmove",Pe),d.removeEventListener("touchend",We))}}},[A,Ce,$e,Xe,Ye,Pe,We,$]);const Ue=u.useCallback(i=>{if(xe.current||i.beta===null&&i.gamma===null)return;let d=z&&i.beta?Je(-i.beta,-z,z):P||0,S=V&&i.gamma?Je(i.gamma,-V,V):K||0;Oe&&(d=-d,S=-S),ce({angleX:d,angleY:S},!1,!0)},[z,V,P,K,Oe,ce]);return u.useEffect(()=>{if(!(!z&&!V))return window.addEventListener("deviceorientation",Ue),()=>window.removeEventListener("deviceorientation",Ue)},[z,V,Ue,se]),it.jsx("div",{ref:i=>{i&&(ke.current=i,G.current&&(I?ve():ce(me())),(P||K)&&!G.current&&ve())},"data-testid":W?"container":void 0,style:Object.assign({display:"inline-block",verticalAlign:"middle",width:a,height:f,borderRadius:R,perspective:v,transformStyle:Ie?"preserve-3d":void 0,backfaceVisibility:"hidden",filter:I?ye:void 0,transition:O==="drop"?ne:void 0},Fe),onMouseEnter:H?k?i=>{Ce(),k(i)}:Ce:k,onTouchStart:H?j?i=>{Ye(),j(i)}:Ye:j,onMouseMove:H?ae?i=>{$e(i),ae(i)}:$e:ae,onTouchMove:H?Se?i=>{Pe(i),Se(i)}:Pe:Se,onMouseLeave:H?h?i=>{Xe(),h(i)}:Xe:h,onTouchEnd:H?Re?i=>{We(),Re(i)}:We:Re,...Ze,children:it.jsx(rt,{children:it.jsxs("div",{ref:le,"data-testid":W?"tilt":void 0,style:Object.assign({boxSizing:"border-box",position:"relative",width:"100%",height:"100%",borderRadius:R,transformStyle:Ie?"preserve-3d":void 0,backfaceVisibility:"hidden",transition:ne,transform:"rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)"},oe),className:ie,...De,children:[Ae,Ne&&it.jsx("div",{"data-testid":W?"spot-glare-container":void 0,style:{pointerEvents:"none",position:"absolute",inset:"0",borderRadius:R,overflow:"hidden",backfaceVisibility:"hidden",mixBlendMode:Ge},children:it.jsx("div",{ref:ee,"data-testid":W?"spot-glare":void 0,style:{position:"absolute",left:he==="all"&&!J?"-50%":"-100%",top:he==="all"&&!J?"-50%":"-100%",width:"200%",height:"200%",transition:ne,backgroundImage:`radial-gradient(${ze}, transparent ${Te}%)`,transform:It(J),opacity:J?je:"0"}})}),p&&it.jsx("div",{"data-testid":W?"line-glare-container":void 0,style:{pointerEvents:"none",position:"absolute",inset:"0",borderRadius:R,overflow:"hidden",backfaceVisibility:"hidden",mixBlendMode:Q},children:it.jsx("div",{"data-testid":W?"line-glare":void 0,ref:te,style:{position:"absolute",left:y?"-100%":0,top:"-50%",width:"200%",height:"200%",filter:X?`blur(${b})`:"",transition:ne,opacity:String(F),transform:At(be,y),backgroundImage:`linear-gradient(${_e==="to-bottom-right"?"to bottom right":"to bottom left"}, transparent, transparent ${qe}%, ${Me} calc(${qe}% + 1px), ${Me} ${He}%, transparent calc(${He}% + 1px), transparent 0%)`}})})]})})})}),Dt=u.memo(ar);Dt.displayName="Tilt";const Nt=a=>{if(a instanceof HTMLElement)return a;if(a instanceof Document)return document;if(a.current&&a.current instanceof Object&&"element"in a.current&&a.current.element instanceof HTMLElement)return a.current.element;if(a.current&&a.current instanceof HTMLElement)return a.current},or=(a,f)=>{const R=a.split(f);for(const _ of R)if(isNaN(Number(_)))return;const v=R.length>1?Number(R[0]):0,T=R.length>1?Number(R[1]):Number(R[0]);return[v,T]},wt=(a,f,R)=>{a[f]=R},ir=(a,f,R,v,T,_,Y)=>{const O={element:a,transformInitial:a.style.transform};for(const p of f){const X=a.getAttribute(`${R}-${p}`);if(X)switch(p){case"offset":{const b=_==="all"||_==="offset";O.offset=Number(X)*Y.offset,b&&(O.offset*=-1),O.transformInitial=O.transformInitial.replace(/translate[XY3d]*\([^)]*\)/g,"");break}case"opacity":case"scale":case"rotation":case"skew":{const b=or(X,v);if(!b)continue;const F=_==="all"||_==="all-except-offset"||_==="opacity"&&p==="opacity"||_==="scale"&&p==="scale"||_==="rotation"&&p==="rotation"||_==="skew"&&p==="skew";let C=F?b[1]:b[0],Q=F?b[0]:b[1];Y[p]!==1&&(C*=Y[p],Q*=Y[p]),wt(O,p+"Initial",T==="center-to-edge"?C:C+(Q-C)/2),wt(O,p+"Start",C),wt(O,p+"End",Q),p==="scale"?O.transformInitial=O.transformInitial.replace(/scale[XY3d]*\([^)]*\)/g,""):p==="rotation"?O.transformInitial=O.transformInitial.replace(/rotate[Z3d]*\([^)]*\)/g,""):p==="skew"&&(O.transformInitial=O.transformInitial.replace(/skew[XY3d]*\([^)]*\)/g,""));break}}}return O},mt=(a,f,R,v,T,_)=>{if(_==="center-to-edge"){const Y=f?Math.abs(a.angleX)/f:0,O=R?Math.abs(a.angleY)/R:0;return Math.max(Y,O)*(T-v)+v}else{const Y=f?a.angleX/f:0,O=R?a.angleY/R:0;return _==="edge-to-edge-x"?(O+1)/2*(T-v)+v:_==="edge-to-edge-y"?(-Y+1)/2*(T-v)+v:((-Y+O)/2+1)/2*(T-v)+v}},lr=u.forwardRef(({overflowHiddenEnable:a=!0,animationMode:f="center-to-edge",animationReverse:R="none",offsetMultiplier:v=1,opacityMultiplier:T=1,scaleMultiplier:_=1,rotationMultiplier:Y=1,skewMultiplier:O=1,disabled:p=!1,fullPageListening:X,controlElement:b,controlElementOnly:F,perspective:C="1200px",scale:Q=1.05,shadowEnable:Me=!0,shadow:be="0 0 1.5rem rgba(0, 0, 0, 0.5)",CSSTransition:_e="all 0.3s ease-out",spotGlareSizePercent:U=100,spotGlarePosition:y="all",children:Ne,tiltMaxAngleX:Te=20,tiltMaxAngleY:je=20,gyroMaxAngleX:Ge=0,gyroMaxAngleY:he=0,tiltStyle:ze={},onMouseEnter:Ee,onMouseLeave:J,onTouchStart:Z,onTouchEnd:B,onTilt:M,onReset:N,...P},K)=>{const[D,Fe]=u.useState([]),oe=!X&&(!b||b&&!F),ie=u.useRef(null),De="data-parallax",z=";",V=u.useMemo(()=>["offset","opacity","rotation","scale","skew"],[]),Oe=V.map(w=>`[${De}-${w}]`).join(", "),I=u.useMemo(()=>({offset:v,opacity:T,scale:_,rotation:Y,skew:O}),[v,T,Y,_,O]),ye=u.useCallback((w=!0)=>{requestAnimationFrame(()=>{for(const E of D)if(!w)E.element.style.willChange="";else{const k=[];(E.offset||E.opacityInitial!==void 0||E.scaleInitial!==void 0||E.rotationInitial!==void 0||E.skewInitial!==void 0)&&k.push("transform"),E.opacityInitial!==void 0&&k.push("opacity"),E.element.style.willChange=k.join(", ")}})},[D]),ne=u.useCallback((w,E=!1)=>{for(const k of D){const ae=E?Ge:Te,h=E?he:je;let j="",Se=k.opacityInitial;if(k.offset){const Re=h?w.angleY/h*k.offset:0,Ae=ae?-w.angleX/ae*k.offset:0;j+=`translate(${Re}%, ${Ae}%)`}if(k.rotationStart!==void 0&&k.rotationEnd!==void 0){const Re=mt(w,ae,h,k.rotationStart,k.rotationEnd,f);j+=` rotate(${Re}deg)`}if(k.scaleStart!==void 0&&k.scaleEnd!==void 0){const Re=mt(w,ae,h,k.scaleStart,k.scaleEnd,f);j+=` scale(${Re})`}if(k.skewStart!==void 0&&k.skewEnd!==void 0){const Re=mt(w,ae,h,k.skewStart,k.skewEnd,f);j+=` skew(${Re}deg, ${Re}deg)`}k.opacityStart!==void 0&&k.opacityEnd!==void 0&&(Se=mt(w,ae,h,k.opacityStart,k.opacityEnd,f)),k.transformInitial&&(j+=" "+k.transformInitial),requestAnimationFrame(()=>{j&&(k.element.style.transform=j),k.opacityStart!==void 0&&k.opacityEnd!==void 0&&(k.element.style.opacity=String(Se))})}},[D,f,Te,je,Ge,he]),ue=u.useCallback(()=>{requestAnimationFrame(()=>{for(const w of D)w.element.style.transition=_e})},[_e,D]),$=u.useCallback(()=>{for(const w of D){let E="";w.offset&&(E+="translate(0%, 0%)"),w.rotationInitial!==void 0&&(E+=` rotate(${w.rotationInitial}deg)`),w.scaleInitial!==void 0&&(E+=` scale(${w.scaleInitial})`),w.skewInitial!==void 0&&(E+=` skew(${w.skewInitial}deg, ${w.skewInitial}deg)`),w.transformInitial&&(E+=" "+w.transformInitial),requestAnimationFrame(()=>{E&&(w.element.style.transform=E),w.opacityInitial!==void 0&&(w.element.style.opacity=String(w.opacityInitial))})}},[D]);u.useImperativeHandle(K,()=>ie.current?{...ie.current,updateWillChange:(w=!0)=>{var E;(E=ie.current)==null||E.updateWillChange(w),ye(w)}}:{element:null,angle:()=>({angleX:0,angleY:0}),reset:()=>{},tilt:()=>{},updateWillChange:()=>{}},[ye,Q]);const A=u.useCallback(()=>{p||ye()},[p,ye]),we=u.useCallback(()=>{p||ye(!1)},[p,ye]),Ie=u.useCallback((w,E)=>{ne(w,E)},[ne]),W=u.useCallback(()=>{$()},[$]);return u.useEffect(()=>{if(!b&&!X)return;let w;X||!b?w=[document]:w=Array.isArray(b)?b:[b];for(let E of w){const k=Nt(E);k&&(E=k,E.addEventListener("mouseenter",A),E.addEventListener("mouseleave",we),E.addEventListener("touchstart",A,{passive:!0}),E.addEventListener("touchend",we))}return()=>{for(let E of w){const k=Nt(E);k&&(E=k,E.removeEventListener("mouseenter",A),E.removeEventListener("mouseleave",we),E.removeEventListener("touchstart",A),E.removeEventListener("touchend",we))}}},[b,X,A,we]),u.useEffect(()=>{var w;if(!((w=ie.current)!=null&&w.element))return;const E=[];ie.current.element.querySelectorAll(Oe).forEach(k=>{E.push(ir(k,V,De,z,f,R,I)),k.style.transition=_e}),Fe(E)},[_e,f,R,Oe,V,I,Ne]),u.useEffect(()=>{D.length!==0&&($(),ue())},[ue,D,$]),Jt.jsx(Dt,{ref:ie,onMouseEnter:oe?Ee?w=>{A(),Ee(w)}:A:Ee,onTouchStart:oe?Z?w=>{A(),Z(w)}:A:Z,onMouseLeave:oe?J?w=>{we(),J(w)}:we:J,onTouchEnd:oe?B?w=>{we(),B(w)}:we:B,onTilt:M?(w,E)=>{Ie(w,E),M(w,E)}:Ie,onReset:N?()=>{W(),N()}:W,disabled:p,fullPageListening:X,controlElement:b,controlElementOnly:F,perspective:C,scale:Q,shadowEnable:Me,shadow:be,CSSTransition:_e,spotGlareSizePercent:U,spotGlarePosition:y,tiltMaxAngleX:Te,tiltMaxAngleY:je,tiltStyle:a?Object.assign({overflow:"hidden"},ze):ze,...P,children:Ne})}),Yt=u.memo(lr);Yt.displayName="Parallax";const Xt=a=>{if(a instanceof HTMLElement)return a;if(a instanceof Document)return document;if(a.current&&a.current instanceof Object&&"element"in a.current&&a.current.element instanceof HTMLElement)return a.current.element;if(a.current&&a.current instanceof HTMLElement)return a.current},sr=u.forwardRef(({front:a=Ke.jsx(Ke.Fragment,{}),back:f=Ke.jsx(Ke.Fragment,{}),direction:R="horizontal",borderRadius:v="8px",borderWidth:T="2px",borderColor:_="white",borderStyle:Y="solid",shadowEnable:O=!0,mass:p=.5,stiffness:X=120,flipped:b,flipReverse:F=!1,flipBackReverse:C=!1,type:Q="tilt",disabled:Me=!1,overflowHiddenEnable:be=!1,testIdEnable:_e,fullPageListening:U,controlElement:y,controlElementOnly:Ne,tiltStyle:Te,onFlip:je,onFlipBack:Ge,onMouseEnter:he,onMouseMove:ze,onTouchMove:Ee,onMouseLeave:J,onTouchStart:Z,onTouchEnd:B,onKeyDown:M,onBlur:N,...P},K)=>{const D=u.useRef(!1);D.current=!!b;const Fe=R==="vertical",oe=b!==void 0||Me,ie=!U&&(!y||y&&!Ne),De=Q==="tilt"?Ct:Yt,z=u.useRef(null),V=u.useRef(null),Oe=b?0:F?180:-180,I=pt.useMotionValue(Oe);Q!=="parallax"&&(delete P.animationMode,delete P.animationReverse,delete P.offsetMultiplier,delete P.opacityMultiplier,delete P.scaleMultiplier,delete P.rotationMultiplier,delete P.skewMultiplier);const ye=Q==="tilt"?{}:{overflowHiddenEnable:be},ne=u.useMemo(()=>({type:"spring",mass:p,stiffness:X}),[p,X]),ue=u.useCallback((h=!0)=>{V.current&&(V.current.style.willChange=h?"transform":"")},[]),$=u.useCallback(async()=>{var h;(h=z.current)!=null&&h.element&&(ue(),requestAnimationFrame(()=>{V.current&&(V.current.style.pointerEvents="none")}),D.current?(D.current=!1,Ge&&Ge(z.current.element),await pt.animate(I,!C&&Math.abs(I.get())<90?-Oe:Oe,ne)):(D.current=!0,je&&je(z.current.element),!C&&I.get()!==Oe&&I.jump(Oe),await pt.animate(I,0,ne)),I.isAnimating()||(ue(!1),requestAnimationFrame(()=>{V.current&&(V.current.style.pointerEvents="")})))},[ue,je,Ge,C,I,ne,Oe,z]),A=u.useCallback(()=>D.current,[]);u.useImperativeHandle(K,()=>z.current?{flip:$,isFlipped:A,...z.current}:{flip:$,isFlipped:A,element:null,angle:()=>({angleX:0,angleY:0}),reset:()=>{},tilt:()=>{},updateWillChange:()=>{}},[$,A]);const we=u.memo(({element:h,side:j})=>typeof h=="string"?Ke.jsx("img",{src:h,alt:"","data-testid":_e?j==="front"?"front-image":"back-image":void 0,loading:"lazy","aria-hidden":"true",style:{pointerEvents:"none",touchAction:"none",userSelect:"none",display:"block",verticalAlign:"middle",width:"100%",height:"100%",backgroundSize:"10px"}}):h),Ie=u.useCallback(({children:h})=>Ke.jsxs(pt.motion.div,{ref:V,"data-testid":_e?"motion":void 0,style:{display:"grid",gridAutoRows:"100%",width:"100%",height:"100%",borderRadius:v,rotateX:Fe?I:void 0,rotateY:Fe?void 0:I,transformStyle:"preserve-3d"},children:[Ke.jsx("div",{"data-testid":_e?"front-wrapper":void 0,style:{width:"100%",height:"100%",gridArea:"1 / 1 / 1 / 1",borderRadius:v,overflow:typeof a=="string"||be?"hidden":void 0,backfaceVisibility:"hidden",transformStyle:"preserve-3d",transform:Fe?"rotateX(180deg)":"rotateY(180deg)"},children:Ke.jsx(we,{element:a,side:"front"})}),h]}),[we,v,a,Fe,I,_e,be]),W=u.useCallback(()=>{!oe&&!D.current&&$()},[oe,$]),w=u.useCallback(()=>{!oe&&D.current&&$()},[oe,$]),E=u.useCallback(h=>{h.cancelable&&h.preventDefault(),!oe&&D.current&&$()},[oe,$]),k=u.useCallback(h=>{let j=!1;h.currentTarget instanceof HTMLElement&&h.target instanceof HTMLElement&&h.currentTarget!==h.target&&h.currentTarget.contains(h.target)&&(j=!0),(h.key===" "||h.key==="Enter")&&!j&&(h.preventDefault(),oe||$())},[oe,$]),ae=u.useCallback(h=>{let j=!1;h.currentTarget instanceof HTMLElement&&h.relatedTarget instanceof HTMLElement&&h.currentTarget!==h.relatedTarget&&h.currentTarget.contains(h.relatedTarget)&&(j=!0),!oe&&D.current&&!j&&$()},[oe,$]);return u.useEffect(()=>{if(!y&&!U)return;let h;U||!y?h=[document]:h=Array.isArray(y)?y:[y];for(let j of h){const Se=Xt(j);Se&&(j=Se,j.addEventListener("mouseenter",W),j.addEventListener("mousemove",W),j.addEventListener("mouseleave",w),j.addEventListener("touchstart",W,{passive:!0}),j.addEventListener("touchmove",W,{passive:!0}),j.addEventListener("touchend",E),j.addEventListener("keydown",k,{passive:!0}),j.addEventListener("blur",ae,{passive:!0}))}return()=>{for(let j of h){const Se=Xt(j);Se&&(j=Se,j.removeEventListener("mouseenter",W),j.removeEventListener("mousemove",W),j.removeEventListener("mouseleave",w),j.removeEventListener("touchstart",W),j.removeEventListener("touchmove",W),j.removeEventListener("touchend",E),j.removeEventListener("keydown",k),j.removeEventListener("blur",ae))}}},[W,w,E,$,k,ae,y,U]),Ke.jsx(De,{ref:z,onMouseEnter:ie?he?h=>{W(),he(h)}:W:he,onTouchStart:ie?Z?h=>{W(),Z(h)}:W:Z,onMouseMove:ie?ze?h=>{W(),ze(h)}:W:ze,onTouchMove:ie?Ee?h=>{W(),Ee(h)}:W:Ee,onMouseLeave:ie?J?h=>{w(),J(h)}:w:J,onTouchEnd:ie?B?h=>{E(h),B(h)}:E:B,onKeyDown:ie?M?h=>{k(h),M(h)}:k:M,onBlur:ie?N?h=>{ae(h),N(h)}:ae:N,tiltStyle:Object.assign({gridArea:"1 / 1 / 1 / 1",width:"100%",height:"100%"},Te),TiltWrapper:Ie,borderRadius:v,disabled:Me,testIdEnable:_e,fullPageListening:U,controlElement:y,controlElementOnly:Ne,shadowEnable:O,...ye,...P,children:Ke.jsx("div",{"data-testid":_e?"back-wrapper":void 0,style:{boxSizing:"border-box",width:"100%",height:"100%",borderRadius:v,borderWidth:T,borderStyle:Y,borderColor:_,overflow:typeof f=="string"||be?"hidden":void 0,backfaceVisibility:"hidden",transformStyle:"preserve-3d"},children:Ke.jsx(we,{element:f,side:"back"})})})}),kt=u.memo(sr);kt.displayName="FlipTilt",at.FlipTilt=kt,at.default=kt,Object.defineProperties(at,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});