(function(p,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],g):(p=typeof globalThis<"u"?globalThis:p||self,g(p.easegen={},p.React))})(this,function(p,g){"use strict";"use client";var Rr=Object.defineProperty;var _r=(p,g,S)=>g in p?Rr(p,g,{enumerable:!0,configurable:!0,writable:!0,value:S}):p[g]=S;var U=(p,g,S)=>_r(p,typeof g!="symbol"?g+"":g,S);var S={exports:{}},Y={};/** * @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 ae;function Ae(){if(ae)return Y;ae=1;var E=g,a=Symbol.for("react.element"),s=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,f=E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,x={key:!0,ref:!0,__self:!0,__source:!0};function C(P,b,A){var R,T={},w=null,B=null;A!==void 0&&(w=""+A),b.key!==void 0&&(w=""+b.key),b.ref!==void 0&&(B=b.ref);for(R in b)c.call(b,R)&&!x.hasOwnProperty(R)&&(T[R]=b[R]);if(P&&P.defaultProps)for(R in b=P.defaultProps,b)T[R]===void 0&&(T[R]=b[R]);return{$$typeof:a,type:P,key:w,ref:B,props:T,_owner:f.current}}return Y.Fragment=s,Y.jsx=C,Y.jsxs=C,Y}var L={};/** * @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 ie;function Ie(){return ie||(ie=1,process.env.NODE_ENV!=="production"&&function(){var E=g,a=Symbol.for("react.element"),s=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),P=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),ce=Symbol.iterator,Ye="@@iterator";function Le(e){if(e===null||typeof e!="object")return null;var r=ce&&e[ce]||e[Ye];return typeof r=="function"?r:null}var I=E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n=1&&v>=0&&i[d]!==h[v];)v--;for(;d>=1&&v>=0;d--,v--)if(i[d]!==h[v]){if(d!==1||v!==1)do if(d--,v--,v<0||i[d]!==h[v]){var _=` `+i[d].replace(" at new "," at ");return e.displayName&&_.includes("")&&(_=_.replace("",e.displayName)),typeof e=="function"&&K.set(e,_),_}while(d>=1&&v>=0);break}}}finally{H=!1,X.current=l,Xe(),Error.prepareStackTrace=u}var W=e?e.displayName||e.name:"",F=W?z(W):"";return typeof e=="function"&&K.set(e,F),F}function He(e,r,t){return me(e,!1)}function Ze(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function J(e,r,t){if(e==null)return"";if(typeof e=="function")return me(e,Ze(e));if(typeof e=="string")return z(e);switch(e){case A:return z("Suspense");case R:return z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case b:return He(e.render);case T:return J(e.type,r,t);case w:{var n=e,u=n._payload,l=n._init;try{return J(l(u),r,t)}catch{}}}return""}var N=Object.prototype.hasOwnProperty,Re={},_e=I.ReactDebugCurrentFrame;function G(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);_e.setExtraStackFrame(t)}else _e.setExtraStackFrame(null)}function Qe(e,r,t,n,u){{var l=Function.call.bind(N);for(var o in e)if(l(e,o)){var i=void 0;try{if(typeof e[o]!="function"){var h=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}i=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){i=d}i&&!(i instanceof Error)&&(G(u),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",t,o,typeof i),G(null)),i instanceof Error&&!(i.message in Re)&&(Re[i.message]=!0,G(u),y("Failed %s type: %s",t,i.message),G(null))}}}var er=Array.isArray;function Z(e){return er(e)}function rr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function tr(e){try{return xe(e),!1}catch{return!0}}function xe(e){return""+e}function Oe(e){if(tr(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",rr(e)),xe(e)}var V=I.ReactCurrentOwner,nr={key:!0,ref:!0,__self:!0,__source:!0},Te,Se,Q;Q={};function ar(e){if(N.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ir(e){if(N.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function or(e,r){if(typeof e.ref=="string"&&V.current&&r&&V.current.stateNode!==r){var t=O(V.current.type);Q[t]||(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',O(V.current.type),e.ref),Q[t]=!0)}}function sr(e,r){{var t=function(){Te||(Te=!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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ur(e,r){{var t=function(){Se||(Se=!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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var cr=function(e,r,t,n,u,l,o){var i={$$typeof:a,type:e,key:r,ref:t,props:o,_owner:l};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function lr(e,r,t,n,u){{var l,o={},i=null,h=null;t!==void 0&&(Oe(t),i=""+t),ir(r)&&(Oe(r.key),i=""+r.key),ar(r)&&(h=r.ref,or(r,u));for(l in r)N.call(r,l)&&!nr.hasOwnProperty(l)&&(o[l]=r[l]);if(e&&e.defaultProps){var d=e.defaultProps;for(l in d)o[l]===void 0&&(o[l]=d[l])}if(i||h){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&sr(o,v),h&&ur(o,v)}return cr(e,i,h,u,n,V.current,o)}}var ee=I.ReactCurrentOwner,je=I.ReactDebugCurrentFrame;function $(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);je.setExtraStackFrame(t)}else je.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function Ce(){{if(ee.current){var e=O(ee.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function fr(e){return""}var Pe={};function dr(e){{var r=Ce();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=` Check the top-level render call using <`+t+">.")}return r}}function we(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=dr(r);if(Pe[t])return;Pe[t]=!0;var n="";e&&e._owner&&e._owner!==ee.current&&(n=" It was passed a child from "+O(e._owner.type)+"."),$(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.',t,n),$(null)}}function ke(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t",i=" Did you accidentally export a JSX literal instead of a component?"):d=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",d,i)}var v=lr(e,r,t,u,l);if(v==null)return v;if(o){var _=r.children;if(_!==void 0)if(n)if(Z(_)){for(var W=0;W<_.length;W++)ke(_[W],e);Object.freeze&&Object.freeze(_)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ke(_,e)}if(N.call(r,"key")){var F=O(e),m=Object.keys(r).filter(function(mr){return mr!=="key"}),ne=m.length>0?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}";if(!Fe[F+ne]){var Er=m.length>0?"{"+m.join(": ..., ")+": ...}":"{}";y(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`,ne,F,Er,F),Fe[F+ne]=!0}}return e===c?gr(v):vr(v),v}}function pr(e,r,t){return De(e,r,t,!0)}function yr(e,r,t){return De(e,r,t,!1)}var br=yr,hr=pr;L.Fragment=c,L.jsx=br,L.jsxs=hr}()),L}process.env.NODE_ENV==="production"?S.exports=Ae():S.exports=Ie();var D=S.exports;class oe{constructor(a){U(this,"easings",{});U(this,"array",{});U(this,"css",{});U(this,"string",{});const s=a||{p1:[{x:.2,y:.4},{x:.2,y:.333},{x:.2,y:.1}],p2:[{x:.6,y:0},{x:.666,y:0},{x:.8,y:0}]},c={p1:{x:0,y:0},p2:{x:1,y:1}};this.generateEasings(s,c),this.generateExports()}generateCubicBezier(a,s){const c=[a.x,a.y,s.x,s.y],f=`cubic-bezier(${a.x},${a.y},${s.x},${s.y})`,x=`${a.x},${a.y},${s.x},${s.y}`;return{default:c,css:f,string:x}}subtractPoints(a,s){return{x:a.x-s.x,y:a.y-s.y}}generateEasings(a,s){for(let c=0;c[a,s.css])),this.string=Object.fromEntries(Object.entries(this.easings).map(([a,s])=>[a,s.string])),this.array=Object.fromEntries(Object.entries(this.easings).map(([a,s])=>[a,s.default]))}}const j=new oe,se=g.createContext(null),$e=()=>{const E=g.useContext(se);if(!E)throw new Error("useEasegen must be used within an EasegenProvider");return E},ue=E=>{if(E in j.array)return{css:j.css[E],string:j.string[E],array:j.array[E]}},We=({children:E})=>{const[a,s]=g.useState(ue(Object.keys(j.array)[0])||{css:"",string:"",array:[]}),c=Object.keys(j.array).sort((f,x)=>x[0].localeCompare(f[0]));return D.jsxs(se.Provider,{value:{selectedEasing:a,setSelectedEasing:s},children:[E,D.jsxs("div",{style:{position:"fixed",bottom:"20px",left:"50%",transform:"translateX(-50%)",zIndex:1e3},children:[D.jsx("br",{}),D.jsx("label",{htmlFor:"easing",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Select easing"}),D.jsx("select",{className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",id:"easing",value:JSON.stringify(a),onChange:f=>s(JSON.parse(f.target.value)),style:{padding:"8px",fontSize:"16px",borderRadius:"4px"},children:c.map(f=>D.jsx("option",{value:JSON.stringify(ue(f)),children:f},f))})]})]})};p.Easegen=oe,p.EasegenProvider=We,p.default=j,p.useEasegen=$e,Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});