Files
ai-course/node_modules/framer-motion/dist/framer-motion.js

2 lines
152 KiB
JavaScript
Raw Normal View History

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var i=n(e),s=React,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,u=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,s={},r=null,c=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,i)&&!l.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:o,type:t,key:r,ref:c,props:s,_owner:u.current}}const h=r,d=c,p=c,m=e.createContext({});function f(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const g="undefined"!=typeof window,y=g?e.useLayoutEffect:e.useEffect,v=e.createContext(null);function x(t,e){-1===t.indexOf(e)&&t.push(e)}function w(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function T([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t}const P=(t,e,n)=>n>e?e:n<t?t:n;let S=()=>{},b=()=>{};const A={},E=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function M(t){return"object"==typeof t&&null!==t}const V=t=>/^0[^.\s]+$/u.test(t);function C(t){let e;return()=>(void 0===e&&(e=t()),e)}const R=t=>t,D=(t,e)=>n=>e(t(n)),k=(...t)=>t.reduce(D),L=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class O{constructor(){this.subscriptions=[]}add(t){return x(this.subscriptions,t),()=>w(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const j=t=>1e3*t,B=t=>t/1e3;function F(t,e){return e?t*(1e3/e):0}const I=new Set;const W=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},U=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function N(t,e,n,i){if(t===e&&n===i)return R;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=U(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:U(s(t),e,i)}const $=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,z=t=>e=>1-t(1-e),X=N(.33,1.53,.69,.99),Y=z(X),H=$(Y),K=t=>(t*=2)<1?.5*Y(t):.5*(2-Math.pow(2,-10*(t-1))),G=t=>1-Math.sin(Math.acos(t)),_=z(G),q=$(G),Z=N(.42,0,1,1),J=N(0,0,.58,1),Q=N(.42,0,.58,1);const tt=t=>Array.isArray(t)&&"number"!=typeof t[0];function et(t,e){return tt(t)?t[W(0,t.length,e)]:t}const nt=t=>Array.isArray(t)&&"number"==typeof t[0],it={linear:R,easeIn:Z,easeInOut:Q,easeOut:J,circIn:G,circInOut:q,circOut:_,backIn:Y,backInOut:H,backOut:X,anticipate:K},st=t=>{if(nt(t)){t.length;const[e,n,i,s]=t;return N(e,n,i,s)}return"string"==typeof t?it[t]:t},ot=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],rt={value:null,addProjectionMetrics:null};function at(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=ot.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},u=0;function l(e){r.has(e)&&(c.schedule(e),t()),u++,e(a)}const c={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(l),e&&rt.value&&rt.value.frameloop[e].push(u),u=0,n.clear(),s=!1,o&&(o=!1,c.process(t)))}};return c}(o,e?n:void 0),t),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:c,update:h,preRender:d,render:p,postRender:m}=r,f=()=>{const o=A.useManualTiming?s.timestamp:p