alrdy-animate
Version:
A library to handle animations on scroll with GSAP integration.
2 lines • 8.72 kB
JavaScript
/*! For license information please see 357.f28a06899d010672ed30.js.LICENSE.txt */
"use strict";(this.webpackChunkAlrdyAnimate=this.webpackChunkAlrdyAnimate||[]).push([[357],{357:(t,n,r)=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function i(){i=function(){return n};var t,n={},r=Object.prototype,o=r.hasOwnProperty,u="function"==typeof Symbol?Symbol:{},a=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function h(t,n,r,e){return Object.defineProperty(t,n,{value:r,enumerable:!e,configurable:!e,writable:!e})}try{h({},"")}catch(t){h=function(t,n,r){return t[n]=r}}function f(n,r,e,i){var o=r&&r.prototype instanceof d?r:d,u=Object.create(o.prototype);return h(u,"_invoke",function(n,r,e){var i=1;return function(o,u){if(3===i)throw Error("Generator is already running");if(4===i){if("throw"===o)throw u;return{value:t,done:!0}}for(e.method=o,e.arg=u;;){var a=e.delegate;if(a){var c=S(a,e);if(c){if(c===p)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(1===i)throw i=4,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);i=3;var s=l(n,r,e);if("normal"===s.type){if(i=e.done?4:2,s.arg===p)continue;return{value:s.arg,done:e.done}}"throw"===s.type&&(i=4,e.method="throw",e.arg=s.arg)}}}(n,e,new _(i||[])),!0),u}function l(t,n,r){try{return{type:"normal",arg:t.call(n,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=f;var p={};function d(){}function g(){}function y(){}var v={};h(v,a,(function(){return this}));var m=Object.getPrototypeOf,w=m&&m(m(k([])));w&&w!==r&&o.call(w,a)&&(v=w);var b=y.prototype=d.prototype=Object.create(v);function x(t){["next","throw","return"].forEach((function(n){h(t,n,(function(t){return this._invoke(n,t)}))}))}function E(t,n){function r(i,u,a,c){var s=l(t[i],t,u);if("throw"!==s.type){var h=s.arg,f=h.value;return f&&"object"==e(f)&&o.call(f,"__await")?n.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):n.resolve(f).then((function(t){h.value=t,a(h)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}var i;h(this,"_invoke",(function(t,e){function o(){return new n((function(n,i){r(t,e,n,i)}))}return i=i?i.then(o,o):o()}),!0)}function S(n,r){var e=r.method,i=n.i[e];if(i===t)return r.delegate=null,"throw"===e&&n.i.return&&(r.method="return",r.arg=t,S(n,r),"throw"===r.method)||"return"!==e&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+e+"' method")),p;var o=l(i,n.i,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,p;var u=o.arg;return u?u.done?(r[n.r]=u.value,r.next=n.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,p):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function P(t){this.tryEntries.push(t)}function T(n){var r=n[4]||{};r.type="normal",r.arg=t,n[4]=r}function _(t){this.tryEntries=[[-1]],t.forEach(P,this),this.reset(!0)}function k(n){if(null!=n){var r=n[a];if(r)return r.call(n);if("function"==typeof n.next)return n;if(!isNaN(n.length)){var i=-1,u=function r(){for(;++i<n.length;)if(o.call(n,i))return r.value=n[i],r.done=!1,r;return r.value=t,r.done=!0,r};return u.next=u}}throw new TypeError(e(n)+" is not iterable")}return g.prototype=y,h(b,"constructor",y),h(y,"constructor",g),g.displayName=h(y,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===g||"GeneratorFunction"===(n.displayName||n.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,h(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},n.awrap=function(t){return{__await:t}},x(E.prototype),h(E.prototype,c,(function(){return this})),n.AsyncIterator=E,n.async=function(t,r,e,i,o){void 0===o&&(o=Promise);var u=new E(f(t,r,e,i),o);return n.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},x(b),h(b,s,"Generator"),h(b,a,(function(){return this})),h(b,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var n=Object(t),r=[];for(var e in n)r.unshift(e);return function t(){for(;r.length;)if((e=r.pop())in n)return t.value=e,t.done=!1,t;return t.done=!0,t}},n.values=k,_.prototype={constructor:_,reset:function(n){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!n)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function e(t){u.type="throw",u.arg=n,r.next=t}for(var i=r.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],u=o[4],a=this.prev,c=o[1],s=o[2];if(-1===o[0])return e("end"),!1;if(!c&&!s)throw Error("try statement without catch or finally");if(null!=o[0]&&o[0]<=a){if(a<c)return this.method="next",this.arg=t,e(c),!0;if(a<s)return e(s),!1}}},abrupt:function(t,n){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[0]>-1&&e[0]<=this.prev&&this.prev<e[2]){var i=e;break}}i&&("break"===t||"continue"===t)&&i[0]<=n&&n<=i[2]&&(i=null);var o=i?i[4]:{};return o.type=t,o.arg=n,i?(this.method="next",this.next=i[2],p):this.complete(o)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),p},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[2]===t)return this.complete(r[4],r[3]),T(r),p}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[0]===t){var e=r[4];if("throw"===e.type){var i=e.arg;T(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(n,r,e){return this.delegate={i:k(n),r,n:e},"next"===this.method&&(this.arg=t),p}},n}function o(t,n,r,e,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void r(t)}a.done?n(c):Promise.resolve(c).then(e,i)}r.r(n),r.d(n,{coreBundles:()=>s,getGSAPModules:()=>a,gsapBundles:()=>c});var u={textSplitter:function(){return r.e(478).then(r.bind(r,321))},splitTextPlugin:function(t){return t?r.e(478).then(r.bind(r,373)).then((function(t){return[{SplitText:t.SplitText}]})):Promise.resolve([{SplitText:window.SplitText}])}},a=function(){var t,n=(t=i().mark((function t(){var n,e,o,u,a=arguments;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a.length>0&&void 0!==a[0]&&!a[0]){t.next=13;break}return t.next=4,r.e(678).then(r.bind(r,880));case 4:return n=t.sent,e=n.gsap,t.next=8,r.e(678).then(r.bind(r,575));case 8:return o=t.sent,u=o.ScrollTrigger,t.abrupt("return",{gsap:e,ScrollTrigger:u});case 13:return t.abrupt("return",{gsap:window.gsap,ScrollTrigger:window.ScrollTrigger});case 14:case"end":return t.stop()}}),t)})),function(){var n=this,r=arguments;return new Promise((function(e,i){var u=t.apply(n,r);function a(t){o(u,e,i,a,c,"next",t)}function c(t){o(u,e,i,a,c,"throw",t)}a(void 0)}))});return function(){return n.apply(this,arguments)}}(),c={text:{plugins:function(t){return u.splitTextPlugin(t)},animations:function(){return r.e(478).then(r.bind(r,646))},dependencies:u.textSplitter},section:{animations:function(){return r.e(955).then(r.bind(r,608))}},appear:{animations:function(){return r.e(336).then(r.bind(r,960))}},marquee:{animations:function(){return r.e(525).then(r.bind(r,687))}},slider:{plugins:function(t){return t?Promise.all([r.e(704).then(r.bind(r,929)).then((function(t){return{Draggable:t.Draggable}})),r.e(704).then(r.bind(r,423)).then((function(t){return{InertiaPlugin:t.InertiaPlugin}}))]):Promise.resolve([{Draggable:window.Draggable},{InertiaPlugin:window.InertiaPlugin}])},animations:function(){return r.e(704).then(r.bind(r,280))}},hover:{plugins:function(t){return u.splitTextPlugin(t)},animations:function(){return r.e(267).then(r.bind(r,701))},dependencies:u.textSplitter},nav:{animations:function(){return r.e(298).then(r.bind(r,402))}},flip:{plugins:function(t){return t?r.e(638).then(r.bind(r,863)).then((function(t){return[{Flip:t.Flip}]})):Promise.resolve([{Flip:window.Flip}])}},modal:{animations:function(){return r.e(297).then(r.bind(r,558))}}},s={smoothScroll:{plugins:function(){return r.e(332).then(r.bind(r,66))},setup:function(){return r.e(332).then(r.bind(r,686))}},modals:{setup:function(){return r.e(341).then(r.bind(r,971))}}}}}]);